Theory of Programs
A general theory of programs, programming and programming languages built up from a few concepts of elementary set theory. Derives, as theorems, properties treated as axioms by classic approaches to programming. Covers sequential and concurrent computation.
💡 Research Summary
The paper presents a unified, set‑theoretic foundation for programs, programming languages, and computation models. A program is defined as a pair ⟨S, R⟩ where S is a set of states and R ⊆ S × S is a transition relation. This simple definition subsumes deterministic commands, nondeterministic choices, functional evaluations, and even concurrent actions, because any computational step can be represented as a relation between states.
Sequential composition is modeled by relational composition (R₂ ∘ R₁), choice by set union (R₁ ∪ R₂), and iteration by the reflexive‑transitive closure R* (Kleene star). The paper proves that these operators satisfy the usual algebraic laws—associativity, distributivity, identity elements—directly from elementary set theory. In particular, iteration is characterized as the least fixed point of the functional λX. R ∪ X, linking the approach to classical fixed‑point semantics.
Concurrency is captured through a “cross product” operator ⊗ on relations. Given two transition relations R₁ and R₂, the concurrent relation R₁ ⊗ R₂ consists of all interleavings of their individual steps, effectively embedding interleaving semantics without extra labeling or communication primitives. The authors demonstrate that ⊗ is associative and commutative, and they express deadlock and livelock conditions as invariants of the combined relation.
For verification, pre‑ and post‑conditions are treated as subsets P, Q ⊆ S. The Hoare triple {P} R {Q} is reformulated as the inclusion P ∩ Dom(R) ⊆ R⁻¹(Q), where Dom(R) is the domain of R and R⁻¹(Q) is the pre‑image of Q under R. This translation turns Hoare logic rules into elementary set‑inclusion manipulations, allowing proofs of partial correctness, total correctness, and termination to be carried out using only relational algebra.
The paper then systematically derives classic axioms of program semantics—such as the sequencing law, the choice distributivity, and the loop invariant rule—from the set‑theoretic definitions, showing that these axioms are not independent postulates but theorems of the underlying relational model. By doing so, it reduces the axiomatic basis of programming theory to a minimal set of set‑theoretic concepts.
Finally, the authors discuss the broader implications: language designers can specify language constructs simply by defining appropriate state spaces and transition relations; compiler writers can reason about optimizations as algebraic transformations on relations; and verification tools can implement proof engines that manipulate sets and relations directly. The framework thus offers a compact, mathematically rigorous platform that unifies sequential, nondeterministic, and concurrent computation under a single, elementary theory.
Comments & Academic Discussion
Loading comments...
Leave a Comment