A Behavioral Specification of Imperative Programming Languages

In this paper, we give a denotational semantics of imperative programming languages as a CafeOBJ behavioral specification. Since CafeOBJ is an executable algebraic specification language, not only execution of programs but also semi-automatic verification of programs properties can be done. We first describe an imperative programming language with integer and Boolean types, called IPL. Next we discuss about how to extend IPL, that is, IPL with user-defined types. We give a notion of equivalent programs, which is defined by using the notion of the behavioral equivalence of behavioral specifications. We show a sufficient condition for the equivalence relation of programs, which reduces the task to prove programs to be equivalent.

[1]  C. A. R. HOARE,et al.  An axiomatic basis for computer programming , 1969, CACM.

[2]  Razvan Diaconescu,et al.  Behavioural Coherence in Object-Oriented Algebraic Specification , 2000, J. Univers. Comput. Sci..

[3]  Joseph A. Goguen,et al.  Algebraic semantics of imperative programs , 1996, Foundations of computing series.

[4]  Tobias Nipkow,et al.  Term rewriting and all that , 1998 .

[5]  Joseph A. Goguen,et al.  A hidden agenda , 2000, Theor. Comput. Sci..