Results 11  20
of
56
A Usage Analysis With Bounded Usage Polymorphism and Subtyping
 In Proceedings of the 12th International Workshop on Implementation of Functional Languages, number AIB007 in Aachener Informatik Berichte
, 2000
"... Previously proposed usage analyses have proved not to scale up well for large programs. In this paper we present a powerful and accurate type based analysis designed to scale up for large programs. The key features of the type system are usage subtyping and bounded usage polymorphism. Bounded polymo ..."
Abstract

Cited by 13 (3 self)
 Add to MetaCart
Previously proposed usage analyses have proved not to scale up well for large programs. In this paper we present a powerful and accurate type based analysis designed to scale up for large programs. The key features of the type system are usage subtyping and bounded usage polymorphism. Bounded polymorphism can lead to huge constraint sets and to express constraints compactly we introduce a new expressive form of constraints which allows constraints to be represented compactly through calls to constraint abstractions. 1 Introduction In the implementation of a lazy functional language sharing of evaluation is performed by updating. For example, the (unoptimised) evaluation of (x:x + x) (1 + 2) proceeds as follows. First, a closure for 1 + 2 is built in the heap and a reference to the closure is passed to the abstraction. Second, to evaluate x + x the value of x is required. Thus the closure is fetched from the heap and evaluated. Third, the closure is updated with the result so that w...
Supercompilation by evaluation
, 2010
"... Supercompilation is a technique due to Turchin [1] which allows for the construction of program optimisers that are both simple and extremely powerful. Supercompilation is capable of achieving transformations such as deforestation [2], function specialisation and constructor specialisation [3]. Insp ..."
Abstract

Cited by 12 (4 self)
 Add to MetaCart
Supercompilation is a technique due to Turchin [1] which allows for the construction of program optimisers that are both simple and extremely powerful. Supercompilation is capable of achieving transformations such as deforestation [2], function specialisation and constructor specialisation [3]. Inspired by Mitchell’s promising results [4], we show how the callbyneed supercompilation algorithm can be recast to be based explicitly on an evaluator, and in the process extend it to deal with recursive let expressions.
A.: Lazy evaluation and delimited control
 In: POPL ’09: Proceedings of the 36th Annual ACM SIGPLANSIGACT Symposium on Principles of Programming Languages
, 2009
"... The callbyneed lambda calculus provides an equational framework for reasoning syntactically about lazy evaluation. This paper examines its operational characteristics. By a series of reasoning steps, we systematically unpack the standardorder reduction relation of the calculus and discover a nove ..."
Abstract

Cited by 11 (0 self)
 Add to MetaCart
The callbyneed lambda calculus provides an equational framework for reasoning syntactically about lazy evaluation. This paper examines its operational characteristics. By a series of reasoning steps, we systematically unpack the standardorder reduction relation of the calculus and discover a novel abstract machine definition which, like the calculus, goes “under lambdas. ” We prove that machine evaluation is equivalent to standardorder evaluation. Unlike traditional abstract machines, delimited control plays a significant role in the machine’s behavior. In particular, the machine replaces the manipulation of a heap using storebased effects with disciplined management of the evaluation stack using controlbased effects. In short, state is replaced with control. To further articulate this observation, we present a simulation of callbyneed in a callbyvalue language using delimited control operations.
Linear Explicit Substitutions
 In Proc. of Westapp'98
, 1998
"... The oecalculus adds explicit substitutions to the calculus so as to provide a theoretical framework within which the implementation of functional programming languages can be studied. This paper generalises the oecalculus to provide a linear calculus of explicit substitutions, called xDILL, which ..."
Abstract

Cited by 11 (7 self)
 Add to MetaCart
The oecalculus adds explicit substitutions to the calculus so as to provide a theoretical framework within which the implementation of functional programming languages can be studied. This paper generalises the oecalculus to provide a linear calculus of explicit substitutions, called xDILL, which analogously describes the implementation of linear functional programming languages. Our main observation is that there are nontrivial interactions between linearity and explicit substitutions and that xDILL is therefore best understood as a synthesis of its underlying logical structure and the technology of explicit substitutions. This is in contrast to the oecalculus where the explicit substitutions are independent of the underlying logical structure. Keywords: calculus, explicit substitutions, linear logic 1 Introduction This paper combines the technologies of explicit substitutions and linearity in a mathematically consistent way. We start by describing these technologies and the...
A Type Based Sharing Analysis for Update Avoidance and Optimisation
 In ACM SIGPLAN International Conference on Functional Programming (ICFP'98
, 1998
"... Sharing of evaluation is crucial for the efficiency of lazy functional languages, but unfortunately the machinery to implement it carries an inherent overhead. In abstract machines this overhead shows up as the cost of performing updates, many of them actually unnecessary, and also in the cost of th ..."
Abstract

Cited by 11 (5 self)
 Add to MetaCart
Sharing of evaluation is crucial for the efficiency of lazy functional languages, but unfortunately the machinery to implement it carries an inherent overhead. In abstract machines this overhead shows up as the cost of performing updates, many of them actually unnecessary, and also in the cost of the associated bookkeeping, that is keeping track of when and where to update. In spineless abstract machines, such as the STGmachine and the TIM, this bookkeeping consists of pushing, checking for and popping update markers. Checking for update markers is a very frequent operation and indeed the implementation of the STGmachine has been optimised for fast update marker checks at the expense of making the pushing and popping of update markers more costly. In this paper we present a type based sharing analysis that can determine when updates can be safely omitted and marker checks bypassed. The type system is proved sound with respect to the lazy Krivine machine. We have implemented the anal...
A Taxonomy of Functional Language Implementations Part II: CallbyName, CallbyNeed and Graph Reduction
, 1996
"... In Part I [5], we proposed an approach to formally describe and compare functional languages implementations. We focused on callbyvalue and described wellknown compilers for strict languages. Here, we complete our exploration of the design space of implementations by studying callbyname, cal ..."
Abstract

Cited by 9 (3 self)
 Add to MetaCart
In Part I [5], we proposed an approach to formally describe and compare functional languages implementations. We focused on callbyvalue and described wellknown compilers for strict languages. Here, we complete our exploration of the design space of implementations by studying callbyname, callbyneed and graph reduction. We express the whole compilation process as a succession of program transformations in a common framework. At each step, different transformations model fundamental choices or optimizations. We describe and compare the diverse alternatives for the compilation of the callbyname strategy in both environment and graphbased models. The different options for the compilation of breduction described in [5] can be applied here as well. Instead, we describe other possibilities specific to graph reduction. Callbyneed is nothing but callbyname with redex sharing and update. We present how sharing can be expressed in our framework and we describe different...
A Monadic Semantics for Core Curry
, 2003
"... We give a deterministic, bigstep operational semantics for the essential core of the Curry language, including higherorder functions, callbyneed evaluation, nondeterminism, narrowing, and residuation. The semantics is structured in modular monadic style, and is presented in the form of an execut ..."
Abstract

Cited by 8 (2 self)
 Add to MetaCart
We give a deterministic, bigstep operational semantics for the essential core of the Curry language, including higherorder functions, callbyneed evaluation, nondeterminism, narrowing, and residuation. The semantics is structured in modular monadic style, and is presented in the form of an executable interpreter written in Haskell. It uses monadic formulations of state, nondeterminism, and resumptionbased concurrency.
Semantics of value recursion for monadic input/output
 Journal of Theoretical Informatics and Applications
, 2002
"... Abstract. Monads have been employed in programming languages for modeling various language features, most importantly those that involve side effects. In particular, Haskell’s IO monad provides access to I/O operations and mutable variables, without compromising referential transparency. Cyclic defi ..."
Abstract

Cited by 7 (1 self)
 Add to MetaCart
Abstract. Monads have been employed in programming languages for modeling various language features, most importantly those that involve side effects. In particular, Haskell’s IO monad provides access to I/O operations and mutable variables, without compromising referential transparency. Cyclic definitions that involve monadic computations give rise to the concept of valuerecursion, where the fixedpoint computation takes place only over the values, without repeating or losing effects. In this paper, we describe a semantics for a lazy language based on Haskell, supporting monadic I/O, mutable variables, usual recursive definitions, and value recursion. Our semantics is composed of two layers: A natural semantics for the functional layer, and a labeled transition semantics for the IO layer. Mathematics Subject Classification. 68N18, 68Q55, 18C15.
FUNDIO: A LambdaCalculus with a letrec, case, Constructors, and an IOInterface: Approaching a Theory of unsafePerformIO
, 2003
"... This paper proposes a nonstandard way to combine lazy functional languages with I/O. In order to demonstrate the usefulness of the approach, a tiny lazy functional core language “FUNDIO”, which is also a callbyneed lambda calculus, is investigated. The syntax of “FUNDIO ” has case, letrec, constr ..."
Abstract

Cited by 7 (0 self)
 Add to MetaCart
This paper proposes a nonstandard way to combine lazy functional languages with I/O. In order to demonstrate the usefulness of the approach, a tiny lazy functional core language “FUNDIO”, which is also a callbyneed lambda calculus, is investigated. The syntax of “FUNDIO ” has case, letrec, constructors and an IOinterface: its operational semantics is described by smallstep reductions. A contextual approximation and equivalence depending on the inputoutput behavior of normal order reduction sequences is defined and a context lemma is proved. This enables to study a semantics of “FUNDIO ” and its semantic properties. The paper demonstrates that the technique of complete reduction diagrams enables to show a considerable set of program transformations to be correct. Several optimizations of evaluation are given, including strictness optimizations and an abstract machine, and shown to be correct w.r.t. contextual equivalence. Correctness of strictness optimizations also justifies correctness of parallel evaluation.
Thus this calculus has a potential to integrate nonstrict functional programming with a nondeterministic approach to inputoutput and also to provide a useful semantics for this combination.
It is argued that monadic IO and unsafePerformIO can be combined in Haskell, and that the result is reliable, if all reductions and transformations are correct w.r.t. to the FUNDIOsemantics. Of course, we do not address the typing problems the are involved in the usage of Haskell’s
unsafePerformIO.
The semantics can also be used as a novel semantics for strict functional languages with IO, where the sequence of IOs is not fixed.