15,768 research outputs found

    A Definitional approach to the combination of functional and relational programming

    Get PDF
    We show how the programming language GCLA can be used to naturally express both relational and functional programs in an integrated framework. We give a short introduction to GCLA, and to the theory of partial inductive definitions on which GCLA is based. GCLA is best regarded as a logic programming language, but instead of saying that the query follows from the program in some a priori given logic, we say that the program defines the logic in which the query is proved. We then demonstrate how to implement both relational and functional programs as well as a combination of them in GCLA

    Functional Big-step Semantics

    Get PDF
    When doing an interactive proof about a piece of software, it is important that the underlying programming language’s semantics does not make the proof unnecessarily difficult or unwieldy. Both smallstep and big-step semantics are commonly used, and the latter is typically given by an inductively defined relation. In this paper, we consider an alternative: using a recursive function akin to an interpreter for the language. The advantages include a better induction theorem, less duplication, accessibility to ordinary functional programmers, and the ease of doing symbolic simulation in proofs via rewriting. We believe that this style of semantics is well suited for compiler verification, including proofs of divergence preservation. We do not claim the invention of this style of semantics: our contribution here is to clarify its value, and to explain how it supports several language features that might appear to require a relational or small-step approach. We illustrate the technique on a simple imperative language with C-like for-loops and a break statement, and compare it to a variety of other approaches. We also provide ML and lambda-calculus based examples to illustrate its generality

    Extending the Calculus of Constructions with Tarski's fix-point theorem

    Get PDF
    We propose to use Tarski's least fixpoint theorem as a basis to define recursive functions in the calculus of inductive constructions. This widens the class of functions that can be modeled in type-theory based theorem proving tool to potentially non-terminating functions. This is only possible if we extend the logical framework by adding the axioms that correspond to classical logic. We claim that the extended framework makes it possible to reason about terminating and non-terminating computations and we show that common facilities of the calculus of inductive construction, like program extraction can be extended to also handle the new functions
    • …
    corecore