Relation level semantics

  • Jules Desharnais
  • Nazim H. Madhavji
Session 9 Semantics
Part of the Lecture Notes in Computer Science book series (LNCS, volume 338)


It is common to consider a program as a relation on the set of its possible states. The relational equations describing the behavior of programs can be object level, i.e., they refer to states and values of variables, or they can be relation level, i.e., the constants and variables in the equations range over relations. Relation level work using binary relations has been mostly limited to the study of statements. This is partly because the calculus of binary relations has no operator for accessing the cartesian components of the space of the program, so that it is difficult to discuss expressions and declarations. This paper introduces an algebra that combines features of Codd's relational algebra and of the algebra of binary relations. Using this hybrid algebra, we give a relation level semantics of a language with types, procedures, and variable declarations.

CR Categories

D.1.4 [Programming Techniques] Sequential Programming D.3.1 [Programming Languages] Formal Definitions and Theory: Semantics F.3.1 [Logics and Meanings of Programs] Specifying and Verifying and Reasoning about programs: Relations F.3.2 [Logics and Meanings of Programs] Semantics of Programming Languages: Algebraic approaches to semantics, Denotational Semantics F.3.3 [Logics and Meanings of Programs] Studies of Program Constructs: Control Structures, Procedures, Expressions 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

6. References

  1. [Backus 85]
    J. Backus. From function level semantics to program transformation and optimization. Mathematical Foundations of Software Development. Proc. Int. Joint Conf. on Theory and Practice of Software Development (TAPSOFT), Berlin, March 1985, Vol. 1, Lecture Notes in Comp. Sci. 185, Springer-Verlag 1985, 60–91.Google Scholar
  2. [De Bakker 73]
    J. W. De Bakker and W. P. De Roever. A calculus for recursive program schemes. Automata, languages and programming. Proc. symp. organized by IRIA, Rocquencourt, France, July 1972, (M. Nivat, ed.), North-Holland 1973, 167–196.Google Scholar
  3. [Berghammer 86]
    R. Berghammer and H. Zierer. Relational algebraic semantics of deterministic and nondeterministic programs. Theor. Comput. Sci. 43, 1986, 123–147.Google Scholar
  4. [Blikle 77]
    A. Blikle. A comparative review of some program verification methods. Proc. 6th Symp. Math. Found. Comput. Sci., (J. Gruska, ed.), Lecture Notes in Comp. Sci. 53, Springer-Verlag 1977, 17–33.Google Scholar
  5. [Codd 70]
    E.F. Codd. A relational model for large shared data banks. Commun. ACM 13, 6, June 1970, 377–387.Google Scholar
  6. [Desharnais 88]
    J. Desharnais and N. Madhavji. Object-free relational specification and program derivation. Internal technical report, available from the authors.Google Scholar
  7. [Fischer 83]
    P.C. Fischer and S.J. Thomas. Operators for non-first-normal-form relations. Proc. 7th Int. Computer Software & Applications Conference (COMPSAC 83), Chicago, IL, IEEE Comp. Soc. Press 1983, 464–475.Google Scholar
  8. [Hoare 69]
    C. A. R. Hoare. An axiomatic basis for computer programming. Commun. ACM 12, 10, October 1969, 576–581.Google Scholar
  9. [Hoare 86]
    C. A. R. Hoare and He Jifeng. The weakest prespecification. Fundam. Inform. IX, 1986, Part I: 51–84, Part II: 217–252.Google Scholar
  10. [Hoare 87]
    C.A.R. Hoare, I.J. Hayes, He Jifeng, C.C. Morgan, A.W. Roscoe, J.W. Sanders, I.H. Sorensen, J.M. Spivey and B.A. Sufrin. Laws of Programming. Commun. ACM 30, 8, August 87, pp. 672–686. Plus Corrigenda: Commun. ACM 30, 9, September 87, p. 770.Google Scholar
  11. [Maier 83]
    D. Maier. The theory of relational databases. Computer Science Press, Inc., Rockville, MD, 1983.Google Scholar
  12. [Mili 83]
    A. Mili. A relational approach to the design of deterministic programs. Acta Inform. 20, 1983, 315–328.Google Scholar
  13. [Mili 87]
    A. Mili, J. Desharnais and F. Mili. Relational heuristics for the design of deterministic programs. Acta Inform. 24, 1987, 239–276.Google Scholar
  14. [Schmidt 81]
    G. Schmidt. Programs as partial graphs I: Flow equivalence and correctness. Theor. Comput. Sci. 15, 1981, 1–25.Google Scholar
  15. [Scott 76]
    D. Scott. Data types as lattices. SIAM J. Comput. 5, 3, September 1976, 522–587.Google Scholar
  16. [Stoy 77]
    J. E. Stoy. Denotational semantics: The Scott-Strachey approach to programming language theory. The MIT Press, Cambridge, MA, 1977.Google Scholar
  17. [Tarski 41]
    A. Tarski. On the calculus of relations. J. Symb. Log. 6, 3, September 1941, 73–89.Google Scholar
  18. [Tarski 55]
    A. Tarski. A lattice-theoretical fixpoint theorem and its applications. Pacific J. Math. 5, 1955, 285–309.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1988

Authors and Affiliations

  • Jules Desharnais
    • 1
  • Nazim H. Madhavji
    • 1
  1. 1.School of Computer ScienceMcGill UniversityMontréalCanada

Personalised recommendations