ArticlePDF Available

Towards a Mathematical Semantics for Computer Languages

Authors:
A preview of the PDF is not available
... Denotational semantics is often chosen for expressivity and extensibility. For example, adding recursion to a denotational model raises questions about the properties of the underlying domain, which motivated the development of domain theory to provide mathematical representations of iterated computations [1], [2]. More expressive program constructs necessitate more involved semantic domains; two prime examples of this are probabilistic and concurrent programs. ...
... By Lemma 3, we know that D admits a sup, let us call it α and let α = [α]; we have to prove that α = sup D, i.e., 1) for all i ∈ I it holds that [α i ] ⊑ pom [α], and 2) for every β, if [α i ] ⊑ pom β for all i ∈ I, then α ⊑ pom β. The first property is trivial, thanks to Lemma C.1 (2). ...
... We start by showing that f (α, ψ, S, x)(s) ⊑ f (β, ψ, S, x)(s). First, we remark that S ∩ Bot α = ∅ and so, if x / ∈ Bot α , then (S ∪ {x}) ∩ Bot α = ∅, which will allow us to use the induction hypothesis in cases (1), (2), and (4) below. We proceed by case analysis on λ α (x). ...
Preprint
Full-text available
We develop a denotational model for programs that have standard programming constructs such as conditionals and while-loops, as well as probabilistic and concurrent commands. Whereas semantic models for languages with either concurrency or randomization are well studied, their combination is limited to languages with bounded loops. Our work is the first to consider both randomization and concurrency for a language with unbounded looping constructs. The interaction between Boolean tests (arising from the control flow structures), probabilistic actions, and concurrent execution creates challenges in generalizing previous work on pomsets and convex languages, prominent models for those effects, individually. To illustrate the generality of our model, we show that it recovers a typical powerdomain semantics for concurrency, as well as the convex powerset semantics for probabilistic nondeterminism.
... A single domain D ♯ ≜ D ♯ + ∪ D ♯ ∞ is used in denotational semantics [78,80] but this is not always possible e.g. when D ♯ + ∩ D ♯ ∞ ≠ ∅. Moreover the separation into two different domains for finite and infinite executions allows e.g. for the use of input-output relations for finite behaviors and traces for infinite behaviors. ...
... Remark 3.15. The semantic domain of our algebraic semantics is much more refined than traditional ones such as [57] where, the computational and logical ordering are subset inclusion and, following the denotational semantics [80] approach, "Nontermination has to be represented by a fictitious "state at infinity" that can be "reached" only by a non-terminating program. Also, if the fictitious state is in the image of a state, then that image is universal. ...
Preprint
Full-text available
We design various logics for proving hyper properties of iterative programs by application of abstract interpretation principles. In part I, we design a generic, structural, fixpoint abstract interpreter parameterized by an algebraic abstract domain describing finite and infinite computations that can be instantiated for various operational, denotational, or relational program semantics. Considering semantics as program properties, we define a post algebraic transformer for execution properties (e.g. sets of traces) and a Post algebraic transformer for semantic (hyper) properties (e.g. sets of sets of traces), we provide corresponding calculuses as instances of the generic abstract interpreter, and we derive under and over approximation hyperlogics. In part II, we define exact and approximate semantic abstractions, and show that they preserve the mathematical structure of the algebraic semantics, the collecting semantics post, the hyper collecting semantics Post, and the hyperlogics. Since proofs by sound and complete hyperlogics require an exact characterization of the program semantics within the proof, we consider in part III abstractions of the (hyper) semantic properties that yield simplified proof rules. These abstractions include the join, the homomorphic, the elimination, the principal ideal, the order ideal, the frontier order ideal, and the chain limit algebraic abstractions, as well as their combinations, that lead to new algebraic generalizations of hyperlogics, including the \forall\exists^\ast, \forall\forall^\ast,and, and \exists\forall-^\ast$ hyperlogics
... La semántica denotacional, presentada inicialmente en (Scott y Strachey, 1971), no tiene este riesgo, ya que no recurre a máquinas, configuraciones ni computaciones, sino a objetos matemáticos más abstractos, como conjuntos, funciones, funcionales, etc. Se define mediante funciones que relacionan estructuras sintácticas con objetos matemáticos. Toda estructura denota un valor (de acá surge el nombre de la semántica), determinado a partir del valor de los componentes de la estructura. ...
Book
Full-text available
El libro Verificación de programas. Programas secuenciales y concurrentes presenta una introducción a la Verificación Axiomática de Programas, en su variante conocida como Lógica de Hoare. Se prioriza lo conceptual por sobre lo formal, y se desarrollan numerosos ejemplos y ejercicios. Se incluyen tanto los programas secuenciales -determinísticos y no determinísticos- como los programas concurrentes -paralelos y distribuidos-. También se tratan elementos de metateoría de la verificación de programas -composicionalidad, sensatez y completitud de los métodos de prueba- y de semántica formal de los lenguajes de especificación y programación empleados. En el libro se destaca el aporte de las axiomáticas estudiadas a la construcción sistemática de programas.
... The history of semantics of programming languages has taught us that to better understand the underlying principles it is beneficial to abstract from the details of the operational semantics. This view was put forward by Scott and Strachey [SS71] in their proposal of denotational semantics of programming languages according to which, given a programming language, the meaning of each program is a mathematical function of the meanings of its direct constituents. ...
Preprint
In Apt and Bezem [AB99] (see cs.LO/9811017) we provided a computational interpretation of first-order formulas over arbitrary interpretations. Here we complement this work by introducing a denotational semantics for first-order logic. Additionally, by allowing an assignment of a non-ground term to a variable we introduce in this framework logical variables. The semantics combines a number of well-known ideas from the areas of semantics of imperative programming languages and logic programming. In the resulting computational view conjunction corresponds to sequential composition, disjunction to ``don't know'' nondeterminism, existential quantification to declaration of a local variable, and negation to the ``negation as finite failure'' rule. The soundness result shows correctness of the semantics with respect to the notion of truth. The proof resembles in some aspects the proof of the soundness of the SLDNF-resolution.
... 8]. ¹⁸ We later understood that structural induction as found in Scott-Strachey denotational semantics [189] and Gordon Plotkin's structural operational semantics [182] is much more readable, although mostly equivalent, "mostly" since patterns can be ambiguous while induction on the program syntax is not. ¹⁹ Nowadays rule-based deductive systems are used but the structural induction idea is the same. ...
Chapter
Full-text available
Following an historical perspective, and restricted to my work with Radhia Cousot, I discuss the origin and evolution of concepts in abstract interpretation applied to semantics, verification, static and dynamic analysis, and algorithm design. Abstract interpretation is a unifying theory of formal methods that proposes a general methodology for proving the correctness of computing systems, by sound (and sometimes complete) approximation on their semantics.
... El principio de composicionalidad [Pelletier, 1994] y [Pelletier, 2001] es un principio de la semántica denotacional [Scott y Strachey, 1971]. Esta define una formalización del significado (semántica) de lenguajes -humanos y de programación-por la construcción de objetos matemáticos llamados denotaciones que describen el significado de las expresiones del lenguaje. ...
Thesis
Full-text available
The symbolic computation is a paradigm that emerges from the need for computer programs from programming languages with high-level of abstraction. Symbolic computation does not pretend to either substitute or minimize the utility of low-level languages, but to provide to programmers and users the ability of manipulation of entities closer to the real world. In opposition to low-level entities, which are closer to the computer, the number and nature of real world entities are wider, changing and increasing. On the other hand, since the tools we currently have to produce computer languages, such as gammars and compilers are restricted to a fixed definition of languages, along with software development methodologies that produce monolithic programs, they can produce fixed programming and immutable languages only. This work is about the design of a metodology for the constructions of programming languages with arbitraryly high levels of abstraction, by the use of symbolic computation, non conventional mean of validation such as the compositionality principle and ontologies, and promoting the methodologies for modular software development, enabling the definition of programming languages able to grow, evolve and adapt to the dynamics of human knowledge.
Article
Full-text available
We design various logics for proving hyper properties of iterative programs by application of abstract interpretation principles. In part I, we design a generic, structural, fixpoint abstract interpreter parameterized by an algebraic abstract domain describing finite and infinite computations that can be instantiated for various operational, denotational, or relational program semantics. Considering semantics as program properties, we define a post algebraic transformer for execution properties (e.g. sets of traces) and a Post algebraic transformer for semantic (hyper) properties (e.g. sets of sets of traces), we provide corresponding calculuses as instances of the generic abstract interpreter, and we derive under and over approximation hyperlogics. In part II, we define exact and approximate semantic abstractions, and show that they preserve the mathematical structure of the algebraic semantics, the collecting semantics post, the hyper collecting semantics Post, and the hyperlogics. Since proofs by sound and complete hyperlogics require an exact characterization of the program semantics within the proof, we consider in part III abstractions of the (hyper) semantic properties that yield simplified proof rules. These abstractions include the join, the homomorphic, the elimination, the principal ideal, the order ideal, the frontier order ideal, and the chain limit algebraic abstractions, as well as their combinations, that lead to new algebraic generalizations of hyperlogics, including the ∀∃ ∗ , ∀∀ ∗ , and ∃∀ ∗ hyperlogics.
Article
Full-text available
We study transformational program logics for correctness and incorrectness that we extend to explicitly handle both termination and nontermination. We show that the logics are abstract interpretations of the right image transformer for a natural relational semantics covering both finite and infinite executions. This understanding of logics as abstractions of a semantics facilitates their comparisons through their respective abstractions of the semantics (rather that the much more difficult comparison through their formal proof systems). More importantly, the formalization provides a calculational method for constructively designing the sound and complete formal proof system by abstraction of the semantics. As an example, we extend Hoare logic to cover all possible behaviors of nondeterministic programs and design a new precondition (in)correctness logic.
Chapter
We identify and highlight certain landmark results in Samson Abramsky’s work which we believe are fundamental to current developments and future trends. In particular, we focus on the use of topological duality methods to solve problems in logic and computer science; category theory and, more particularly, free (and co-free) constructions; these tools to unify the ‘power’ and ‘structure’ strands in computer science. KeywordsDuality theoryTopological methods in logicVietoris spaceQuantifiers and measuresStructural limitsLindenbaum-Tarski algebrasFree constructions
Article
This paper describes one approach to developing a general theory relevant to the formalization and proof of arbitrary properties of computer programs.
  • Erwin Engeler
Erwin Engeler, ed.• Semantics of Algorithmi c Languages, Springer Lecture Notes in Mathematics, vol. 188 (1971).
Semantio~ of Context-FJ'ee Language8
  • Donald E Knuth
Donald E. Knuth. Semantio~ of Context-FJ'ee Language8.
Lattl-ce-tlleoretic Models for Various Type-free Calculi, in preparation
  • Notes Springer Lecture
Springer Lecture Notes, in press. [8J , Lattl-ce-tlleoretic Models for Various Type-free Calculi, in preparation. [9] @BULLET Data Types a8 Lattices, in preparation.
Ledgard Production Sy8tem8: A FOT'mali8m for Specifying :he S1:lr1ta.x and Translation of ComputeT
  • Prg-L Henry R
PRG-l Henry r. Ledgard Production Sy8tem8: A FOT'mali8m for Specifying :he S1:lr1ta.x and Translation of ComputeT' Lang1J.1ges. (£1.00, $2.50)
An Abstract Model for Storage
  • Chris Tophc R St Rachel
Chris tophc r St rachel' An Abstract Model for Storage (in preparation)
Theo:roy of Computation
  • Dana Scott
  • Outl
Dana Scott, Outl.ine of a Mathematioal. Theo:roy of Computation, in Proc. of the Fourth Annual Princeton Conference on Information 5cieflces and Systems (1970), pp. 169-176. [6J The Lattice of Fl.ow Diagrams, in [1]. pp. 311-366.