Results 1 - 10
of
27
Parameter-Passing and the Lambda Calculus
, 1991
"... The choice of a parameter-passing technique is an important decision in the design of a high-level programming language. To clarify some of the semantic aspects of the decision, we develop, analyze, and compare modifications of the -calculus for the most common parameter-passing techniques, i.e., ca ..."
Abstract
-
Cited by 166 (20 self)
- Add to MetaCart
The choice of a parameter-passing technique is an important decision in the design of a high-level programming language. To clarify some of the semantic aspects of the decision, we develop, analyze, and compare modifications of the -calculus for the most common parameter-passing techniques, i.e., call-by-value and call-by-name combined with pass-by-worth and passby -reference, respectively. More specifically, for each parameter-passing technique we provide 1. a program rewriting semantics for a language with side-effects and first-class procedures based on the respective parameter-passing technique; 2. an equational theory that is derived from the rewriting semantics in a uniform manner; 3. a formal analysis of the correspondence between the calculus and the semantics; and 4. a strong normalization theorem for the imperative fragment of the theory (when applicable). A comparison of the various systems reveals that Algol's call-by-name indeed satisfies the well-known fi rule of the orig...
Models of Sharing Graphs: A Categorical Semantics of let and letrec
, 1997
"... To my parents A general abstract theory for computation involving shared resources is presented. We develop the models of sharing graphs, also known as term graphs, in terms of both syntax and semantics. According to the complexity of the permitted form of sharing, we consider four situations of sha ..."
Abstract
-
Cited by 61 (9 self)
- Add to MetaCart
To my parents A general abstract theory for computation involving shared resources is presented. We develop the models of sharing graphs, also known as term graphs, in terms of both syntax and semantics. According to the complexity of the permitted form of sharing, we consider four situations of sharing graphs. The simplest is first-order acyclic sharing graphs represented by let-syntax, and others are extensions with higher-order constructs (lambda calculi) and/or cyclic sharing (recursive letrec binding). For each of four settings, we provide the equational theory for representing the sharing graphs, and identify the class of categorical models which are shown to be sound and complete for the theory. The emphasis is put on the algebraic nature of sharing graphs, which leads us to the semantic account of them. We describe the models in terms of the notions of symmetric monoidal categories and functors, additionally with symmetric monoidal adjunctions and traced
Recursion from Cyclic Sharing: Traced Monoidal Categories and Models of Cyclic Lambda Calculi
, 1997
"... . Cyclic sharing (cyclic graph rewriting) has been used as a practical technique for implementing recursive computation efficiently. To capture its semantic nature, we introduce categorical models for lambda calculi with cyclic sharing (cyclic lambda graphs), using notions of computation by Moggi / ..."
Abstract
-
Cited by 40 (5 self)
- Add to MetaCart
. Cyclic sharing (cyclic graph rewriting) has been used as a practical technique for implementing recursive computation efficiently. To capture its semantic nature, we introduce categorical models for lambda calculi with cyclic sharing (cyclic lambda graphs), using notions of computation by Moggi / Power and Robinson and traced monoidal categories by Joyal, Street and Verity. The former is used for representing the notion of sharing, whereas the latter for cyclic data structures. Our new models provide a semantic framework for understanding recursion created from cyclic sharing, which includes traditional models for recursion created from fixed points as special cases. Our cyclic lambda calculus serves as a uniform language for this wider range of models of recursive computation. 1 Introduction One of the traditional methods of interpreting a recursive program in a semantic domain is to use the least fixed-point of continuous functions. However, in the real implementations of program...
The Call-by-Need Lambda Calculus
- Journal of Functional Programming
, 1994
"... We present a calculus that captures the operational semantics of call-by-need. The call-by-need lambda calculus is confluent, has a notion of standard reduction, and entails the same observational equivalence relation as the call-by-name calculus. The system can be formulated with or without explici ..."
Abstract
-
Cited by 36 (2 self)
- Add to MetaCart
We present a calculus that captures the operational semantics of call-by-need. The call-by-need lambda calculus is confluent, has a notion of standard reduction, and entails the same observational equivalence relation as the call-by-name calculus. The system can be formulated with or without explicit let bindings, admits useful notions of marking and developments, and has a straightforward operational interpretation. Introduction The correspondence between call-by-value lambda calculi and strict functional languages (such as the pure subset of Standard ML) is quite good; the correspondence between callby -name lambda calculi and lazy functional languages (such as Miranda or Haskell) is not so good. Call-by-name re-evaluates an argument each time it is used, a prohibitive expense. Thus, many lazy languages are implemented using the call-by-need mechanism proposed by Wadsworth (1971), which overwrites an argument with its value the first time it is evaluated, avoiding the need for any s...
Cyclic Lambda Calculi
, 1997
"... . We precisely characterize a class of cyclic lambda-graphs, and then give a sound and complete axiomatization of the terms that represent a given graph. The equational axiom system is an extension of lambda calculus with the letrec construct. In contrast to current theories, which impose restrictio ..."
Abstract
-
Cited by 34 (4 self)
- Add to MetaCart
. We precisely characterize a class of cyclic lambda-graphs, and then give a sound and complete axiomatization of the terms that represent a given graph. The equational axiom system is an extension of lambda calculus with the letrec construct. In contrast to current theories, which impose restrictions on where the rewriting can take place, our theory is very liberal, e.g., it allows rewriting under lambda-abstractions and on cycles. As shown previously, the reduction theory is non-confluent. We thus introduce an approximate notion of confluence. Using this notion we define the infinite normal form or L'evy-Longo tree of a cyclic term. We show that the infinite normal form defines a congruence on the set of terms. We relate our cyclic lambda calculus to the traditional lambda calculus and to the infinitary lambda calculus. Since most implementations of non-strict functional languages rely on sharing to avoid repeating computations, we develop a variant of our calculus that enforces the ...
Call-by-Name, Call-by-Value, Call-by-Need, and the Linear Lambda Calculus
, 1994
"... Girard described two translations of intuitionistic logic into linear logic, one where A -> B maps to (!A) -o B, and another where it maps to !(A -o B). We detail the action of these translations on terms, and show that the first corresponds to a call-by-name calculus, while the second corresponds t ..."
Abstract
-
Cited by 26 (5 self)
- Add to MetaCart
Girard described two translations of intuitionistic logic into linear logic, one where A -> B maps to (!A) -o B, and another where it maps to !(A -o B). We detail the action of these translations on terms, and show that the first corresponds to a call-by-name calculus, while the second corresponds to call-by-value. We further show that if the target of the translation is taken to be an affine calculus, where ! controls contraction but weakening is allowed everywhere, then the second translation corresponds to a call-by-need calculus, as recently defined by Ariola, Felleisen, Maraist, Odersky, and Wadler. Thus the different calling mechanisms can be explained in terms of logical translations, bringing them into the scope of the Curry-Howard isomorphism.
Combinatory Reduction Systems with Explicit Substitution
- REWRITING TECHNIQUES AND APPLICATIONS (RTA), LECTURE NOTES IN COMPUTER SCIENCE
, 1996
"... We generalise the notion of explicit substitution from the lambda-calculus to higher order rewriting, realised by combinatory reduction systems (CRS). In this general framework this is achieved by identifying the "explicit" subclass of CRSs within which rewriting can be implemented efficiently.
Fo ..."
Abstract
-
Cited by 16 (2 self)
- Add to MetaCart
We generalise the notion of explicit substitution from the lambda-calculus to higher order rewriting, realised by combinatory reduction systems (CRS). In this general framework this is achieved by identifying the "explicit" subclass of CRSs within which rewriting can be implemented efficiently.
For every CRS R we show how to construct an explicit substitution variant, Rx, which is a conservative extension of R (and hence confluent when R is confluent). Furthermore we give a syntactic criterion on the rewrite rules that identifies a large subset of the CRSs, the redex-preserving CRSs, for which we show that Rx preserves strong normalisation of R.
We believe that this is a significant first step towards providing a methodology for reasoning about the operational properties of higher-order rewriting in general, and higher-order program transformations in particular, since confluence ensures correctness of such transformations and preservation of strong normalisation ensures that the transformations are always safe, in both cases independently of the used reduction strategy.
Recursion is a Computational Effect
, 2000
"... In a recent paper, Launchbury, Lewis, and Cook observe that some Haskell applications could benefit from a combinator mfix for expressing recursion over monadic types. We investigate three possible definitions of mfix and implement them in Haskell. Like traditional fixpoint operators, there are ..."
Abstract
-
Cited by 7 (1 self)
- Add to MetaCart
In a recent paper, Launchbury, Lewis, and Cook observe that some Haskell applications could benefit from a combinator mfix for expressing recursion over monadic types. We investigate three possible definitions of mfix and implement them in Haskell. Like traditional fixpoint operators, there are two approaches to the definition of mfix: an unfolding one based on mathematical semantics, and an updating one based on operational semantics. The two definitions are equivalent in pure calculi but have different behaviors when used within monads. The unfolding version can be easily defined in Haskell if one restricts fixpoints to function types. The updating version is much more challenging to define in Haskell despite the fact that its definition is straightforward in Scheme. After studying the Scheme definition in detail, we mirror it in Haskell using the primitive unsafePerformIO. The resulting definition of mfix appears to work well but proves to be unsafe, in the sense that i...
lambdaS: an implicitly parallel lambda-calculus with recursive bindings, synchronization and side effects
"... S extends the -calculus with recursive bindings, barriers, and updatable memory cells with synchronized operations. The calculus can express both deterministic and nondeterministic computations. It is designed to be useful for reasoning about compiler optimizations and thus allows reductions anywher ..."
Abstract
-
Cited by 5 (0 self)
- Add to MetaCart
S extends the -calculus with recursive bindings, barriers, and updatable memory cells with synchronized operations. The calculus can express both deterministic and nondeterministic computations. It is designed to be useful for reasoning about compiler optimizations and thus allows reductions anywhere, even inside 's. Despite the presence of side effects, the calculus retains fine-grained, implicit parallelism and non-strict functions: there is no global, sequentializing store. Barriers, for sequencing, capture a robust notion of termination. Although S was developed as a foundation for the parallel functional languages pH and Id, we believe that barriers give it wider applicability---to sequential, explicitly parallel and concurrent languages. In this paper we describe the S -calculus and its properties, based on a notion of observable information in a term. We also describe reduction strategies to compute maximal observable information even in the presence of unbounded nondeterminis...

