Abstract

Certain features of programming languages, such as data structure operations and procedure call mechanisms, have been found to resist formalization by conventional program verification techniques. An alternate approach is presented, based on a "situational calculus," which makes explicit reference to the states of a computation. For each state, a distinction is drawn between an expression, its value, and the location of the value. Within this conceptual framework, the features of a programming language can be described axiomatically. Programs in the language can then be synthesized, executed, verified, or transformed by performing deductions in this axiomatic system. Properties of entire classes of programs, and of programming languages, can also be expressed and proved in this way. The approach is amenable to machine implementation. In a situational-calculus formalism it is possible to model precisely many "problematic" features of programming languages, including operations on such data structures as arrays, pointers, lists, and records, and such procedure call mechanisms as call by reference, call by value, and call by name. No particular obstacle is presented by aliasing between variables, by declarations, or by recursive procedures. In this paper, we introduce our conceptual framework and present an axiomatic definition of the assignment statement. If suitable restrictions on the programming language are imposed, the well-known Hoare assignment axiom can then be proved as a theorem. However, our definition can also describe the assignment statement of unrestricted programming languages, for which the Hoare axiom does not hold. In forthcoming papers, we apply the situational-calculus framework to the description of data structure operations and procedure call mechanisms.

Full Text
Published version (Free)

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