×

Relational algebraic semantics of deterministic and nondeterministic programs. (English) Zbl 0596.68019

Summary: Abstract relational algebra is proposed as a practical means to describe the denotational semantics of programming languages. We apply this method of semantics description to a functional language and demonstrate the usefulness of this approach by some examples. In particular, we prove the correctness of a program transformation rule within our calculus.
Then, the deterministic language DFP is extended to a nondeterministic functional language NFP in order to investigate three kinds of nondeterminism, viz. erratic, angelic, and demonic nondeterminism. We provide a relational algebraic semantics for each kind of nondeterminism. These three different semantics are not obtained by using three different orderings on certain domains, but by using three different interpretations on the same ordered domain. The alternative kinds of nondeterminism are then compared and an illustrative example is given.
Finally, we characterize the natural numbers with relational algebraic means. The uniform description of domains and programs makes it possible to prove the termination of ”concrete” deterministic and nondeterministic programs by induction.

MSC:

68Q60 Specification and verification (program logics, model checking, etc.)
PDFBibTeX XMLCite
Full Text: DOI

References:

[1] Backus, J., Can programming be liberated from the Von Neumann style? A functional style and its algebra of programs, Comm. ACM, 21, 8, 613-641 (1978) · Zbl 0383.68013
[2] Bauer, F. L.; Wössner, H., Algorithmische Sprache und Programmentwicklung (1981), Springer: Springer Berlin/Heidelberg/New York · Zbl 0466.68006
[3] Berghammer, R.; Zierer, H., Relational algebraic semantics of functional programs, (Tech. Rept. TUM-18501 (1985), Institut für Informatik, Technische Universität München) · Zbl 0596.68019
[4] Broy, M.; Gnatz, R.; Wirsing, M., Semantics of nondeterministic and noncontinuous constructs, (Bauer, F. L.; Broy, M., Program Construction. Program Construction, Internat. Summer School, Marktoberdorf 1978. Program Construction. Program Construction, Internat. Summer School, Marktoberdorf 1978, Lecture Notes in Computer Science, 69 (1979), Springer: Springer Berlin/Heidelberg/New York), 553-592 · Zbl 0406.03059
[5] Chin, L. H.; Tarski, A., Distributive and modular laws in the arithmetic of relation algebras, Univ. California Publ. Math., 1, 341-384 (1951)
[6] De Bakker, J. W.; De Roever, W. P., A calculus for recursive program schemes, (Nivat, M., Automata, Languages, and Programming (1973), North-Holland: North-Holland Amsterdam), 167-196 · Zbl 0238.68006
[7] De Bakker, J. W., Semantics and termination of nondeterministic recursive programs, (Michaelson, S.; Milner, R., Automata, Languages, and Programming (1976), Edinburgh University Press), 436-477 · Zbl 0354.68021
[8] De Roever, W. P., A formalization of various parameter mechanisms as products of relations within a calculus of recursive program schemes, Théorie des Algorithmes, des Languages et de la Programmation. Théorie des Algorithmes, des Languages et de la Programmation, Séminaires IRIA, 55-88 (1972)
[9] Loeckx, J.; Sieber, K., The Foundations of Program Verification (1984), Wiley/Teubner: Wiley/Teubner Chichester/Stuttgart
[10] Manna, Z., Mathematical Theory of Computation (1974), McGraw-Hill: McGraw-Hill New York · Zbl 0353.68066
[11] Markowsky, G., Chain-complete posets and directed sets with applications, Algebra Universalis, 6, 53-68 (1976) · Zbl 0332.06001
[12] McCarthy, J., A basis for a mathematical theory of computation, (Braffort, P.; Hirschberg, D., Computer Programming and Formal Systems (1963), North-Holland: North-Holland Amsterdam), 33-70
[13] Schmidt, G., Programs as partial graphs I: Flow equivalence and correctness, Theoret. Comput. Sci., 15, 1-25 (1981) · Zbl 0493.68015
[14] G. Schmidt, Private comm., 1982.; G. Schmidt, Private comm., 1982.
[15] Schmidt, G.; Ströhlein, Th., Diskrete Mathematik—Relationen, Graphen und Programme (1985), Technische Universität München, Internal Rept.
[16] Schmidt, G.; Ströhlein, Th., Relation algebras: Concept of points and representability, Discrete Math., 54, 83-92 (1985) · Zbl 0575.03040
[17] Tarski, A., On the calculus of relations, J. Symbolic Logic, 6, 83-89 (1941) · JFM 67.0973.02
[18] Tarski, A., A lattice-theoretical fixpoint theorem and its applications, Pacific J. Math., 5, 285-309 (1955) · Zbl 0064.26004
[19] Williams, J. H., On the development of the algebra of functional programs, ACM TOPLAS, 4, 4, 733-755 (1982) · Zbl 0492.68018
[20] Zierer, H., Relationale Semantik, (Diplomarbeit (1983), Institut für Informatik, Technische Universität München)
This reference list is based on information provided by the publisher or from digital mathematics libraries. Its items are heuristically matched to zbMATH identifiers and may contain data conversion errors. In some cases that data have been complemented/enhanced by data from zbMATH Open. This attempts to reflect the references listed in the original paper as accurately as possible without claiming completeness or a perfect matching.