Results 1  10
of
10
A Type System Equivalent to Flow Analysis
 ACM Transactions on Programming Languages and Systems
, 1995
"... Flowbased safety analysis of higherorder languages has been studied by Shivers, and Palsberg and Schwartzbach. Open until now is the problem of finding a type system that accepts exactly the same programs as safety analysis. In this paper we prove that Amadio and Cardelli's type system with subtyp ..."
Abstract

Cited by 87 (16 self)
 Add to MetaCart
Flowbased safety analysis of higherorder languages has been studied by Shivers, and Palsberg and Schwartzbach. Open until now is the problem of finding a type system that accepts exactly the same programs as safety analysis. In this paper we prove that Amadio and Cardelli's type system with subtyping and recursive types accepts the same programs as a certain safety analysis. The proof involves mappings from types to flow information and back. As a result, we obtain an inference algorithm for the type system, thereby solving an open problem. 1 Introduction 1.1 Background Many program analyses for higherorder languages are based on flow analysis, also known as closure analysis. Examples include various analyses in the Standard ML of New Jersey compiler [3], and the bindingtime analyses for Scheme in the partial evaluators Schism [5] and Similix [4]. Such analyses have the advantage that they can be applied to untyped languages. This is in contrast to more traditional abstract inter...
Simple Relational Correctness Proofs for Static Analyses and Program Transformations
, 2004
"... We show how some classical static analyses for imperative programs, and the optimizing transformations which they enable, may be expressed and proved correct using elementary logical and denotational techniques. The key ingredients are an interpretation of program properties as relations, rather tha ..."
Abstract

Cited by 83 (9 self)
 Add to MetaCart
We show how some classical static analyses for imperative programs, and the optimizing transformations which they enable, may be expressed and proved correct using elementary logical and denotational techniques. The key ingredients are an interpretation of program properties as relations, rather than predicates, and a realization that although many program analyses are traditionally formulated in very intensional terms, the associated transformations are actually enabled by more liberal extensional properties.
Lazy rewriting on eager machinery
 ACM Transactions on Programming Languages and Systems
, 2000
"... The article introduces a novel notion of lazy rewriting. By annotating argument positions as lazy, redundant rewrite steps are avoided, and the termination behaviour of a term rewriting system can be improved. Some transformations of rewrite rules enable an implementation using the same primitives a ..."
Abstract

Cited by 23 (1 self)
 Add to MetaCart
The article introduces a novel notion of lazy rewriting. By annotating argument positions as lazy, redundant rewrite steps are avoided, and the termination behaviour of a term rewriting system can be improved. Some transformations of rewrite rules enable an implementation using the same primitives as an implementation of eager rewriting. 1
Thunks and the λcalculus
 IN THE JOURNAL OF FUNCTIONAL PROGRAMMING. RS976 OLIVIER DANVY AND ULRIK
, 1997
"... Plotkin, in his seminal article Callbyname, callbyvalue and the λcalculus, formalized evaluation strategies and simulations using operational semantics and continuations. In particular, he showed how callbyname evaluation could be simulated under callbyvalue evaluation and vice versa. Si ..."
Abstract

Cited by 21 (9 self)
 Add to MetaCart
Plotkin, in his seminal article Callbyname, callbyvalue and the λcalculus, formalized evaluation strategies and simulations using operational semantics and continuations. In particular, he showed how callbyname evaluation could be simulated under callbyvalue evaluation and vice versa. Since Algol 60, however, callbyname is both implemented and simulated with thunks rather than with continuations. We recast
Selective Thunkification
 In Proceedings of the 1st International Static Analysis Symposium
"... . Recently, Amtoft presented an analysis and transformation for mapping typed callbyname programs to callbyvalue equivalents. Here, we present a comparable analysis and transformation for untyped programs using dataflow analysis. In the general case, the transformation generates thunks for call ..."
Abstract

Cited by 10 (1 self)
 Add to MetaCart
. Recently, Amtoft presented an analysis and transformation for mapping typed callbyname programs to callbyvalue equivalents. Here, we present a comparable analysis and transformation for untyped programs using dataflow analysis. In the general case, the transformation generates thunks for call site operands of a callbyname program. Using strictness information derived as part of a larger flow analysis, we can determine that some operands are necessarily evaluated under callbyname, so the transformation does not need to generate thunks for them. The dataflow analysis is formulated as the solution to a set of constraints. We show that any solution to the constraints is sound, and that any such solution justifies the resulting transformation. 1 Introduction In [1], Amtoft presented a strictness analysis for typed programs, and based on that analysis, developed an algorithm to transform callbyname programs into callbyvalue equivalents. The algorithm was correct in that the tra...
Local type reconstruction by means of symbolic fixed point iteration
 In Proc. 5th European Symposium on Programming (ESOP
, 1994
"... Abstract. We convert, via a version that uses constraints, a type inference system for strictness analysis into an algorithm which given an expression finds the set of possible typings. Although this set in general does not possess a minimal element, it can be represented compactly by means of symbo ..."
Abstract

Cited by 3 (0 self)
 Add to MetaCart
Abstract. We convert, via a version that uses constraints, a type inference system for strictness analysis into an algorithm which given an expression finds the set of possible typings. Although this set in general does not possess a minimal element, it can be represented compactly by means of symbolic expressions in normal form – such expressions have the property that once values for the constraint variables with negative polarity have been supplied it is straightforward to compute the minimal values for the constraint variables with positive polarity. The normalization process works on the fly, i.e. by a leaftoroot traversal of the inference tree. 1
Compiling Laziness using Projections
"... Abstract. Projectionbased strictness analysis is a powerful technique, able to cope with nonflat domains and latent demand. By analysing the projections as embeddingprojection pairs, we develop an algorithm to translate lazy functions into a strict functional language with explicit closures. The ..."
Abstract
 Add to MetaCart
Abstract. Projectionbased strictness analysis is a powerful technique, able to cope with nonflat domains and latent demand. By analysing the projections as embeddingprojection pairs, we develop an algorithm to translate lazy functions into a strict functional language with explicit closures. The translated functions typically operate on simpler types than the originals, in particular types containing fewer liftings, which correspond to the operational notion of closures. Like the analysis on which it is based, our algorithm is restricted to firstorder functions. 1 Introduction A lazy functional language provides great expressive power, but this comes ata cost in both space and time, for delayed computations must be stored as closures on the heap. The management of these closures also adds to executiontime, and the frequent context switches frustrate both compiletime optimization and efficient exploitation of hardware. Strictness analysis [17,3,20,14] aims to ameliorate this situation by identifyingstrict functions, which can be implemented using callbyvalue. The arguments of
A Semantic Model of Binding Times for Safe Partial Evaluation
 Proc. Programming Languages: Implementations, Logics and Programs (PLILP
"... In program optimisation an analysis determines some information about a portion of a program, which is then used to justify certain transformations on the code. The correctness of the optimisation can be argued monolithically by considering the behaviour of the optimiser and a particular analysis i ..."
Abstract
 Add to MetaCart
In program optimisation an analysis determines some information about a portion of a program, which is then used to justify certain transformations on the code. The correctness of the optimisation can be argued monolithically by considering the behaviour of the optimiser and a particular analysis in conjunction. Alternatively, correctness can be established by finding an interface, a semantic property, between the analysis and the transformation. The semantic property provides modularity by giving a specification for a systematic construction of the analysis, and the program transformations are justified via the semantic properties. This paper considers the problem of partial evaluation. The safety of a partial evaluator ("it does not go wrong") has previously been argued in the monolithic style by considering the behaviour of a particular bindingtime analysis and program specialiser in conjunction. In this paper we pursue the alternative approach of justifying the bindingtime prop...
Lazy Rewriting on Eager Machinery
 Rewriting Techniques and Applications, number 914 in Lecture Notes in Computer Science
, 1995
"... We define Lazy Term Rewriting Systems and show that they can be realized by local adaptations of an eager implementation of conventional term rewriting systems. The overhead of lazy evaluation is only incurred when lazy evaluation is actually performed. Our method is modelled by a transformation ..."
Abstract
 Add to MetaCart
We define Lazy Term Rewriting Systems and show that they can be realized by local adaptations of an eager implementation of conventional term rewriting systems. The overhead of lazy evaluation is only incurred when lazy evaluation is actually performed. Our method is modelled by a transformation of term rewriting systems, which concisely expresses the intricate interaction between pattern matching and lazy evaluation. The method easily extends to term graph rewriting. CR Subject Classification (1991): D.3.4 [Programming languages]: Processors  Compilers, Optimization; D.1.1 [Programming Techniques]: Applicative (Functional) Programming; D.1.6: Logic Programming. AMS Subject Classification (1991): 68N20: Compilers and generators; 68Q05: Models of Computation; 68Q42: Rewriting Systems Keywords & Phrases: lazy term rewriting, program transformation. Note: Partial support received from the European Communities under the ESPRIT project 5399 (Compiler Generation for Parallel M...
Adding Plural Arguments to Curry Programs
 UNDER CONSIDERATION FOR PUBLICATION IN THEORY AND PRACTICE OF LOGIC PROGRAMMING
, 2003
"... Functional logic languages combine lazy (demanddriven) evaluation strategies from functional programming with nondeterministic computations from logic programming. To provide a strategyindependent semantics, most languages are based on the calltime choice semantics where parameters are passed as ..."
Abstract
 Add to MetaCart
Functional logic languages combine lazy (demanddriven) evaluation strategies from functional programming with nondeterministic computations from logic programming. To provide a strategyindependent semantics, most languages are based on the calltime choice semantics where parameters are passed as values. From an implementation point of view, the calltime choice semantics fits well with sharing performed by lazy languages. On the other hand, there are also situations where it is intended to pass nondeterministic arguments as sets of values in order to exploit the power of nondeterministic programming. This alternative parameter passing model is known under the name “plural ” arguments. In this paper, we show how both mechanisms can be integrated in a single language. In particular, we present a novel technique to implement plural arguments in a calltime choice language so that existing implementations of contemporary functional logic languages can be easily reused to implement plural parameter passing.