Programming languages are studied in the abstract. Algebraic theories supply the syntax for programming languages. Semantics is provided by coproduct preserving functors from the algebraic theory to some semantic category with finite coproducts. Deterministic programming languages are provided when the semantic domain is the category of pointed sets and point preserving functions. Nondeterministic programming languages occur when the semantic domain is the category of Abelian monoids. The class of all nondeterministic programming languages with a fixed syntax is shown to be a variety of algebras. All classes of deterministic programming languages that allow branching are shown to be nonvarietal. Other properties of classes of programming languages are studied using category theory.
Read full abstract