Abstract

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.

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