Abstract

By giving a declarative meaning to an imperative program, the verification of the imperative program is switched from the imperative paradigm to the declarative or logic paradigm where one can take advantage of, for example, referential transparency. Rather than ‘compiling’ an imperative program to a ‘lower level’ we ‘inverse compile’ the imperative program to the ‘higher’ declarative level. The declarative view of an imperative program is a predicate associated with the imperative program such that if this predicate satisfies the specification of the program then the imperative program is correct relative to the specification. In one sense the associated predicate gives a declarative meaning to the imperative program.

Highlights

  • In imperative programming, programs are implicitly state transformations

  • We want to abstract away from dealing with states and try to express programs within the “problem domain”, that is, we want to give a declarative meaning to imperative programs

  • By transforming a structured program to an ‘assignment-less’ program we indicate a non-operational declarative meaning to the program

Read more

Summary

Introduction

We want to abstract away from dealing with states and try to express programs within the “problem domain”, that is, we want to give a declarative meaning to imperative programs. Imperative programs may have functional and relational features - functions and procedures - but they contain constructs which deal only with state transformation e.g. the assignment statement. We consider a more general use of wp that will give a declarative meaning to a program such as MOD. Our aim is to associate the predicate wp(PROG, z = z!) with the program PROG and show how, in particular, this gives an appropriate meaning to the program for proving the program correct. We first consider when the program, PROG, is just the assignment statement

Assignment and Substitution
Associating a Predicate with a Loop
Program Verification
The Invariant
Example
Examples
Example 1
Example 2
Summary and Conclusion
Conclusion
Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.