11,045 research outputs found
Completeness of a relational calculus for program schemes
AbstractThe relational calculus MU was presented in Willem-Paul de Roever's dissertation as a framework for describing and proving properties of programs. MU is axiomatized by de Roever in stages. The next-to-last stage is the calculus MU2, namely MU without the recursive μ-operator. Its axioms include typed versions of Tarski's axioms for the calculus of relations, together with axioms for the projection functions. For MU there is, in addition, an axiom expressing the least-fixed-point property of terms containing the μ-operator, and Scott's induction rule. Thus MU2 is a calculus for nonrecursive program schemes. Around 1976 David Park conjectured that de Roever's axiomatization for MU2 is complete. In this paper, we confirm Park's conjecture
Using models to model-check recursive schemes
We propose a model-based approach to the model checking problem for recursive
schemes. Since simply typed lambda calculus with the fixpoint operator,
lambda-Y-calculus, is equivalent to schemes, we propose the use of a model of
lambda-Y-calculus to discriminate the terms that satisfy a given property. If a
model is finite in every type, this gives a decision procedure. We provide a
construction of such a model for every property expressed by automata with
trivial acceptance conditions and divergence testing. Such properties pose
already interesting challenges for model construction. Moreover, we argue that
having models capturing some class of properties has several other virtues in
addition to providing decidability of the model-checking problem. As an
illustration, we show a very simple construction transforming a scheme to a
scheme reflecting a property captured by a given model.Comment: Long version of a paper presented at TLCA 201
A type system for Continuation Calculus
Continuation Calculus (CC), introduced by Geron and Geuvers, is a simple
foundational model for functional computation. It is closely related to lambda
calculus and term rewriting, but it has no variable binding and no pattern
matching. It is Turing complete and evaluation is deterministic. Notions like
"call-by-value" and "call-by-name" computation are available by choosing
appropriate function definitions: e.g. there is a call-by-value and a
call-by-name addition function. In the present paper we extend CC with types,
to be able to define data types in a canonical way, and functions over these
data types, defined by iteration. Data type definitions follow the so-called
"Scott encoding" of data, as opposed to the more familiar "Church encoding".
The iteration scheme comes in two flavors: a call-by-value and a call-by-name
iteration scheme. The call-by-value variant is a double negation variant of
call-by-name iteration. The double negation translation allows to move between
call-by-name and call-by-value.Comment: In Proceedings CL&C 2014, arXiv:1409.259
Recursive Schemes, Krivine Machines, and Collapsible Pushdown Automata
Higher-order recursive schemes offer an interesting method of approximating program semantics. The semantics of a scheme is an infinite tree labeled with built-in constants. This tree represents the meaning of the program up to the meaning of built-in constants. It is much easier to reason about properties of such trees than properties of interpreted programs. Moreover some interesting properties of programs are already expressible on the level of these trees. Collapsible pushdown automata (CPDA) give another way of generating the same class of trees as the schemes do. We present two relatively simple translations from recursive schemes to CPDA using Krivine machines as an intermediate step. The later are general machines for describing computation of the weak head normal form in the lambda- calculus. They provide the notions of closure and environment that facilitate reasoning about computation
Type-Based Termination, Inflationary Fixed-Points, and Mixed Inductive-Coinductive Types
Type systems certify program properties in a compositional way. From a bigger
program one can abstract out a part and certify the properties of the resulting
abstract program by just using the type of the part that was abstracted away.
Termination and productivity are non-trivial yet desired program properties,
and several type systems have been put forward that guarantee termination,
compositionally. These type systems are intimately connected to the definition
of least and greatest fixed-points by ordinal iteration. While most type
systems use conventional iteration, we consider inflationary iteration in this
article. We demonstrate how this leads to a more principled type system, with
recursion based on well-founded induction. The type system has a prototypical
implementation, MiniAgda, and we show in particular how it certifies
productivity of corecursive and mixed recursive-corecursive functions.Comment: In Proceedings FICS 2012, arXiv:1202.317
Practical Datatype Specializations with Phantom Types and Recursion Schemes
Datatype specialization is a form of subtyping that captures program
invariants on data structures that are expressed using the convenient and
intuitive datatype notation. Of particular interest are structural invariants
such as well-formedness. We investigate the use of phantom types for describing
datatype specializations. We show that it is possible to express
statically-checked specializations within the type system of Standard ML. We
also show that this can be done in a way that does not lose useful programming
facilities such as pattern matching in case expressions.Comment: 25 pages. Appeared in the Proc. of the 2005 ACM SIGPLAN Workshop on
M
Indexed linear logic and higher-order model checking
In recent work, Kobayashi observed that the acceptance by an alternating tree
automaton A of an infinite tree T generated by a higher-order recursion scheme
G may be formulated as the typability of the recursion scheme G in an
appropriate intersection type system associated to the automaton A. The purpose
of this article is to establish a clean connection between this line of work
and Bucciarelli and Ehrhard's indexed linear logic. This is achieved in two
steps. First, we recast Kobayashi's result in an equivalent infinitary
intersection type system where intersection is not idempotent anymore. Then, we
show that the resulting type system is a fragment of an infinitary version of
Bucciarelli and Ehrhard's indexed linear logic. While this work is very
preliminary and does not integrate key ingredients of higher-order
model-checking like priorities, it reveals an interesting and promising
connection between higher-order model-checking and linear logic.Comment: In Proceedings ITRS 2014, arXiv:1503.0437
Functional programming with bananas, lenses, envelopes and barbed wire
We develop a calculus for lazy functional programming based on recursion operators associated with data type definitions. For these operators we derive various algebraic laws that are useful in deriving and manipulating programs. We shall show that all example functions in Bird and Wadler's Introduction to Functional Programming can be expressed using these operators
On the Termination Problem for Probabilistic Higher-Order Recursive Programs
In the last two decades, there has been much progress on model checking of
both probabilistic systems and higher-order programs. In spite of the emergence
of higher-order probabilistic programming languages, not much has been done to
combine those two approaches. In this paper, we initiate a study on the
probabilistic higher-order model checking problem, by giving some first
theoretical and experimental results. As a first step towards our goal, we
introduce PHORS, a probabilistic extension of higher-order recursion schemes
(HORS), as a model of probabilistic higher-order programs. The model of PHORS
may alternatively be viewed as a higher-order extension of recursive Markov
chains. We then investigate the probabilistic termination problem -- or,
equivalently, the probabilistic reachability problem. We prove that almost sure
termination of order-2 PHORS is undecidable. We also provide a fixpoint
characterization of the termination probability of PHORS, and develop a sound
(but possibly incomplete) procedure for approximately computing the termination
probability. We have implemented the procedure for order-2 PHORSs, and
confirmed that the procedure works well through preliminary experiments that
are reported at the end of the article
- …