2,308 research outputs found
How to prove similarity a precongruence in non-deterministic call-by-need lambda calculi
Extending the method of Howe, we establish a large class of untyped higher-order calculi, in particular such with call-by-need evaluation, where similarity, also called applicative simulation, can be used as a proof tool for showing contextual preorder. The paper also demonstrates that Mannâs approach using an intermediate âapproximationâ calculus scales up well from a basic call-by-need non-deterministic lambdacalculus to more expressive lambda calculi. I.e., it is demonstrated, that after transferring the contextual preorder of a non-deterministic call-byneed lambda calculus to its corresponding approximation calculus, it is possible to apply Howeâs method to show that similarity is a precongruence. The transfer is not treated in this paper. The paper also proposes an optimization of the similarity-test by cutting off redundant computations. Our results also applies to deterministic or non-deterministic call-by-value lambda-calculi, and improves upon previous work insofar as it is proved that only closed values are required as arguments for similaritytesting instead of all closed expressions
Simulation in the Call-by-Need Lambda-Calculus with Letrec, Case, Constructors, and Seq
This paper shows equivalence of several versions of applicative similarity
and contextual approximation, and hence also of applicative bisimilarity and
contextual equivalence, in LR, the deterministic call-by-need lambda calculus
with letrec extended by data constructors, case-expressions and Haskell's
seq-operator. LR models an untyped version of the core language of Haskell. The
use of bisimilarities simplifies equivalence proofs in calculi and opens a way
for more convenient correctness proofs for program transformations. The proof
is by a fully abstract and surjective transfer into a call-by-name calculus,
which is an extension of Abramsky's lazy lambda calculus. In the latter
calculus equivalence of our similarities and contextual approximation can be
shown by Howe's method. Similarity is transferred back to LR on the basis of an
inductively defined similarity. The translation from the call-by-need letrec
calculus into the extended call-by-name lambda calculus is the composition of
two translations. The first translation replaces the call-by-need strategy by a
call-by-name strategy and its correctness is shown by exploiting infinite trees
which emerge by unfolding the letrec expressions. The second translation
encodes letrec-expressions by using multi-fixpoint combinators and its
correctness is shown syntactically by comparing reductions of both calculi. A
further result of this paper is an isomorphism between the mentioned calculi,
which is also an identity on letrec-free expressions.Comment: 50 pages, 11 figure
The Sigma-Semantics: A Comprehensive Semantics for Functional Programs
A comprehensive semantics for functional programs is presented, which generalizes the well-known call-by-value and call-by-name semantics. By permitting a separate choice between call-by value and call-by-name for every argument position of every function and parameterizing the semantics by this choice we abstract from the parameter-passing mechanism. Thus common and distinguishing features of all instances of the sigma-semantics, especially call-by-value and call-by-name semantics, are highlighted. Furthermore, a property can be validated for all instances of the sigma-semantics by a single proof. This is employed for proving the equivalence of the given denotational (fixed-point based) and two operational (reduction based) definitions of the sigma-semantics. We present and apply means for very simple proofs of equivalence with the denotational sigma-semantics for a large class of reduction-based sigma-semantics. Our basis are simple first-order constructor-based functional programs with patterns
Inductive Definition and Domain Theoretic Properties of Fully Abstract
A construction of fully abstract typed models for PCF and PCF^+ (i.e., PCF +
"parallel conditional function"), respectively, is presented. It is based on
general notions of sequential computational strategies and wittingly consistent
non-deterministic strategies introduced by the author in the seventies.
Although these notions of strategies are old, the definition of the fully
abstract models is new, in that it is given level-by-level in the finite type
hierarchy. To prove full abstraction and non-dcpo domain theoretic properties
of these models, a theory of computational strategies is developed. This is
also an alternative and, in a sense, an analogue to the later game strategy
semantics approaches of Abramsky, Jagadeesan, and Malacaria; Hyland and Ong;
and Nickau. In both cases of PCF and PCF^+ there are definable universal
(surjective) functionals from numerical functions to any given type,
respectively, which also makes each of these models unique up to isomorphism.
Although such models are non-omega-complete and therefore not continuous in the
traditional terminology, they are also proved to be sequentially complete (a
weakened form of omega-completeness), "naturally" continuous (with respect to
existing directed "pointwise", or "natural" lubs) and also "naturally"
omega-algebraic and "naturally" bounded complete -- appropriate generalisation
of the ordinary notions of domain theory to the case of non-dcpos.Comment: 50 page
Total Haskell is Reasonable Coq
We would like to use the Coq proof assistant to mechanically verify
properties of Haskell programs. To that end, we present a tool, named
hs-to-coq, that translates total Haskell programs into Coq programs via a
shallow embedding. We apply our tool in three case studies -- a lawful Monad
instance, "Hutton's razor", and an existing data structure library -- and prove
their correctness. These examples show that this approach is viable: both that
hs-to-coq applies to existing Haskell code, and that the output it produces is
amenable to verification.Comment: 13 pages plus references. Published at CPP'18, In Proceedings of 7th
ACM SIGPLAN International Conference on Certified Programs and Proofs
(CPP'18). ACM, New York, NY, USA, 201
The Sigma-Semantics: A Comprehensive Semantics for Functional Programs
A comprehensive semantics for functional programs is presented, which generalizes the well-known call-by-value and call-by-name semantics. By permitting a separate choice between call-by value and call-by-name for every argument position of every function and parameterizing the semantics by this choice we abstract from the parameter-passing mechanism. Thus common and distinguishing features of all instances of the sigma-semantics, especially call-by-value and call-by-name semantics, are highlighted. Furthermore, a property can be validated for all instances of the sigma-semantics by a single proof. This is employed for proving the equivalence of the given denotational (fixed-point based) and two operational (reduction based) definitions of the sigma-semantics. We present and apply means for very simple proofs of equivalence with the denotational sigma-semantics for a large class of reduction-based sigma-semantics. Our basis are simple first-order constructor-based functional programs with patterns
- âŚ