874 research outputs found
Control Flow Analysis for SF Combinator Calculus
Programs that transform other programs often require access to the internal
structure of the program to be transformed. This is at odds with the usual
extensional view of functional programming, as embodied by the lambda calculus
and SK combinator calculus. The recently-developed SF combinator calculus
offers an alternative, intensional model of computation that may serve as a
foundation for developing principled languages in which to express intensional
computation, including program transformation. Until now there have been no
static analyses for reasoning about or verifying programs written in
SF-calculus. We take the first step towards remedying this by developing a
formulation of the popular control flow analysis 0CFA for SK-calculus and
extending it to support SF-calculus. We prove its correctness and demonstrate
that the analysis is invariant under the usual translation from SK-calculus
into SF-calculus.Comment: In Proceedings VPT 2015, arXiv:1512.0221
Superdevelopments for Weak Reduction
We study superdevelopments in the weak lambda calculus of Cagman and Hindley,
a confluent variant of the standard weak lambda calculus in which reduction
below lambdas is forbidden. In contrast to developments, a superdevelopment
from a term M allows not only residuals of redexes in M to be reduced but also
some newly created ones. In the lambda calculus there are three ways new
redexes may be created; in the weak lambda calculus a new form of redex
creation is possible. We present labeled and simultaneous reduction
formulations of superdevelopments for the weak lambda calculus and prove them
equivalent
Discriminating Lambda-Terms Using Clocked Boehm Trees
As observed by Intrigila, there are hardly techniques available in the
lambda-calculus to prove that two lambda-terms are not beta-convertible.
Techniques employing the usual Boehm Trees are inadequate when we deal with
terms having the same Boehm Tree (BT). This is the case in particular for fixed
point combinators, as they all have the same BT. Another interesting equation,
whose consideration was suggested by Scott, is BY = BYS, an equation valid in
the classical model P-omega of lambda-calculus, and hence valid with respect to
BT-equality but nevertheless the terms are beta-inconvertible. To prove such
beta-inconvertibilities, we employ `clocked' BT's, with annotations that convey
information of the tempo in which the data in the BT are produced. Boehm Trees
are thus enriched with an intrinsic clock behaviour, leading to a refined
discrimination method for lambda-terms. The corresponding equality is strictly
intermediate between beta-convertibility and Boehm Tree equality, the equality
in the model P-omega. An analogous approach pertains to Levy-Longo and
Berarducci Trees. Our refined Boehm Trees find in particular an application in
beta-discriminating fixed point combinators (fpc's). It turns out that Scott's
equation BY = BYS is the key to unlocking a plethora of fpc's, generated by a
variety of production schemes of which the simplest was found by Boehm, stating
that new fpc's are obtained by postfixing the term SI, also known as Smullyan's
Owl. We prove that all these newly generated fpc's are indeed new, by
considering their clocked BT's. Even so, not all pairs of new fpc's can be
discriminated this way. For that purpose we increase the discrimination power
by a precision of the clock notion that we call `atomic clock'.Comment: arXiv admin note: substantial text overlap with arXiv:1002.257
RPO, Second-order Contexts, and Lambda-calculus
First, we extend Leifer-Milner RPO theory, by giving general conditions to
obtain IPO labelled transition systems (and bisimilarities) with a reduced set
of transitions, and possibly finitely branching. Moreover, we study the weak
variant of Leifer-Milner theory, by giving general conditions under which the
weak bisimilarity is a congruence. Then, we apply such extended RPO technique
to the lambda-calculus, endowed with lazy and call by value reduction
strategies.
We show that, contrary to process calculi, one can deal directly with the
lambda-calculus syntax and apply Leifer-Milner technique to a category of
contexts, provided that we work in the framework of weak bisimilarities.
However, even in the case of the transition system with minimal contexts, the
resulting bisimilarity is infinitely branching, due to the fact that, in
standard context categories, parametric rules such as the beta-rule can be
represented only by infinitely many ground rules.
To overcome this problem, we introduce the general notion of second-order
context category. We show that, by carrying out the RPO construction in this
setting, the lazy observational equivalence can be captured as a weak
bisimilarity equivalence on a finitely branching transition system. This result
is achieved by considering an encoding of lambda-calculus in Combinatory Logic.Comment: 35 pages, published in Logical Methods in Computer Scienc
An Invariant Cost Model for the Lambda Calculus
We define a new cost model for the call-by-value lambda-calculus satisfying
the invariance thesis. That is, under the proposed cost model, Turing machines
and the call-by-value lambda-calculus can simulate each other within a
polynomial time overhead. The model only relies on combinatorial properties of
usual beta-reduction, without any reference to a specific machine or evaluator.
In particular, the cost of a single beta reduction is proportional to the
difference between the size of the redex and the size of the reduct. In this
way, the total cost of normalizing a lambda term will take into account the
size of all intermediate results (as well as the number of steps to normal
form).Comment: 19 page
Functionality, Polymorphism, and Concurrency: A Mathematical Investigation of Programming Paradigms
The search for mathematical models of computational phenomena often leads to problems that are of independent mathematical interest. Selected problems of this kind are investigated in this thesis. First, we study models of the untyped lambda calculus. Although many familiar models are constructed by order-theoretic methods, it is also known that there are some models of the lambda calculus that cannot be non-trivially ordered. We show that the standard open and closed term algebras are unorderable. We characterize the absolutely unorderable T-algebras in any algebraic variety T. Here an algebra is called absolutely unorderable if it cannot be embedded in an orderable algebra. We then introduce a notion of finite models for the lambda calculus, contrasting the known fact that models of the lambda calculus, in the traditional sense, are always non-recursive. Our finite models are based on Plotkin’s syntactical models of reduction. We give a method for constructing such models, and some examples that show how finite models can yield useful information about terms. Next, we study models of typed lambda calculi. Models of the polymorphic lambda calculus can be divided into environment-style models, such as Bruce and Meyer’s non-strict set-theoretic models, and categorical models, such as Seely’s interpretation in PL-categories. Reynolds has shown that there are no set-theoretic strict models. Following a different approach, we investigate a notion of non-strict categorical models. These provide a uniform framework in which one can describe various classes of non-strict models, including set-theoretic models with or without empty types, and Kripke-style models. We show that completeness theorems correspond to categorical representation theorems, and we reprove a completeness result by Meyer et al. on set-theoretic models of the simply-typed lambda calculus with possibly empty types. Finally, we study properties of asynchronous communication in networks of communicating processes. We formalize several notions of asynchrony independently of any particular concurrent process paradigm. A process is asynchronous if its input and/or output is filtered through a communication medium, such as a buffer or a queue, possibly with feedback. We prove that the behavior of asynchronous processes can be equivalently characterized by first-order axioms
- …