Results 1  10
of
36
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...
Deriving a Lazy Abstract Machine
 Journal of Functional Programming
, 1997
"... Machine Peter Sestoft Department of Mathematics and Physics Royal Veterinary and Agricultural University Thorvaldsensvej 40, DK1871 Frederiksberg C, Denmark Email: sestoft@dina.kvl.dk Version 6 of March 13, 1996 Abstract We derive a simple abstract machine for lazy evaluation of the lambda cal ..."
Abstract

Cited by 64 (2 self)
 Add to MetaCart
Machine Peter Sestoft Department of Mathematics and Physics Royal Veterinary and Agricultural University Thorvaldsensvej 40, DK1871 Frederiksberg C, Denmark Email: sestoft@dina.kvl.dk Version 6 of March 13, 1996 Abstract We derive a simple abstract machine for lazy evaluation of the lambda calculus, starting from Launchbury's natural semantics. Lazy evaluation here means nonstrict evaluation with sharing of argument evaluation, that is, callbyneed. The machine we derive is a lazy version of Krivine's abstract machine, which was originally designed for callbyname evaluation. We extend it with datatype constructors and base values, so the final machine implements all dynamic aspects of a lazy functional language. 1 Introduction The development of an efficient abstract machine for lazy evaluation usually starts from either a graph reduction machine or an environment machine. Graph reduction machines perform substitution by rewriting the term graph, that is, the program itself...
Closure Analysis in Constraint Form
 ACM Transactions on Programming Languages and Systems
, 1995
"... Interpretation Bondorf's definition can be simplified considerably. To see why, consider the second component of CMap(E) \Theta CEnv(E). This component is updated only in Closure Analysis in Constraint Form \Delta 9 b(E 1 @ i E 2 )¯ae and read only in b(x l )¯ae. The key observation is that both ..."
Abstract

Cited by 57 (5 self)
 Add to MetaCart
Interpretation Bondorf's definition can be simplified considerably. To see why, consider the second component of CMap(E) \Theta CEnv(E). This component is updated only in Closure Analysis in Constraint Form \Delta 9 b(E 1 @ i E 2 )¯ae and read only in b(x l )¯ae. The key observation is that both these operations can be done on the first component instead. Thus, we can omit the use of CEnv(E). By rewriting Bondorf's definition according to this observation, we arrive at the following definition. As with Bondorf's definition, we assume that all labels are distinct. Definition 2.3.1. We define m : (E : ) ! CMap(E) ! CMap(E) m(x l )¯ = ¯ m( l x:E)¯ = (m(E)¯) t h[[ l ]] 7! flgi m(E 1 @ i E 2 )¯ = (m(E 1 )¯) t (m(E 2 )¯) t F l2¯(var(E1 )) (h[[ l ]] 7! ¯(var(E 2 ))i t h[[@ i ]] 7! ¯(var(body(l)))i) . We can now do closure analysis of E by computing fix(m(E)). A key question is: is the simpler abstract interpretation equivalent to Bondorf's? We might attempt to prove this u...
A modular, polyvariant, and typebased closure analysis
 In ICFP ’97 [ICFP97
"... We observe that the principal typing property of a type system is the enabling technology for modularity and separate compilation [10]. We use this technology to formulate a modular and polyvariant closure analysis, based on the rank 2 intersection types annotated with controlflow information. Modu ..."
Abstract

Cited by 54 (1 self)
 Add to MetaCart
We observe that the principal typing property of a type system is the enabling technology for modularity and separate compilation [10]. We use this technology to formulate a modular and polyvariant closure analysis, based on the rank 2 intersection types annotated with controlflow information. Modularity manifests itself in a syntaxdirected, annotatedtype inference algorithm that can analyse program fragments containing free variables: a principal typing property is used to formalise it. Polyvariance manifests itself in the separation of different behaviours of the same function at its different uses: this is formalised via the rank 2 intersection types. As the rank 2 intersection type discipline types at least all (core) ML programs, our analysis can be used in the separate compilation of such programs. 1
A Functional Correspondence between CallbyNeed Evaluators and Lazy Abstract Machines
, 2004
"... ..."
Interconvertibility of a Class of Set Constraints and ContextFreeLanguage Reachability
 TCS
, 1998
"... We show the interconvertibility of contextfreelanguage reachability problems and a class of setconstraint problems: given a contextfreelanguage reachability problem, we show how to construct a setconstraint problem whose answer gives a solution to the reachability problem; given a setconstra ..."
Abstract

Cited by 27 (2 self)
 Add to MetaCart
We show the interconvertibility of contextfreelanguage reachability problems and a class of setconstraint problems: given a contextfreelanguage reachability problem, we show how to construct a setconstraint problem whose answer gives a solution to the reachability problem; given a setconstraint problem, we show how to construct a contextfreelanguage reachability problem whose answer gives a solution to the setconstraint problem. The interconvertibility of these two formalisms offers an conceptual advantage akin to the advantage gained from the interconvertibility of finitestate automata and regular expressions in formal language theory, namely, a problem can be formulated in whichever formalism is most natural. It also offers some insight into the "O(n ) bottleneck" for different types of programanalysis problems and allows results previously obtained for contextfreelanguage reachability problems to be applied to setconstraint problems and vice versa.
A rational deconstruction of Landin’s SECD machine
 Implementation and Application of Functional Languages, 16th International Workshop, IFL’04, number 3474 in Lecture Notes in Computer Science
, 2004
"... Abstract. Landin’s SECD machine was the first abstract machine for applicative expressions, i.e., functional programs. Landin’s J operator was the first control operator for functional languages, and was specified by an extension of the SECD machine. We present a family of evaluation functions corre ..."
Abstract

Cited by 27 (19 self)
 Add to MetaCart
Abstract. Landin’s SECD machine was the first abstract machine for applicative expressions, i.e., functional programs. Landin’s J operator was the first control operator for functional languages, and was specified by an extension of the SECD machine. We present a family of evaluation functions corresponding to this extension of the SECD machine, using a series of elementary transformations (transformation into continuationpassing style (CPS) and defunctionalization, chiefly) and their left inverses (transformation into direct style and refunctionalization). To this end, we modernize the SECD machine into a bisimilar one that operates in lockstep with the original one but that (1) does not use a data stack and (2) uses the callersave rather than the calleesave convention for environments. We also identify that the dump component of the SECD machine is managed in a calleesave way. The callersave counterpart of the modernized SECD machine precisely corresponds to Thielecke’s doublebarrelled continuations and to Felleisen’s encoding of J in terms of call/cc. We then variously characterize the J operator in terms of CPS and in terms of delimitedcontrol operators in the CPS hierarchy. As a byproduct, we also present several reduction semantics for applicative expressions
Single and loving it: Mustalias analysis for higherorder languages
, 1998
"... In standard controlflow analyses for higherorder languages, a single abstract binding for a variable represents a set of exact bindings, and a single abstract reference cell represents a set of exact reference cells. While such analyses provide useful mayalias information, they are unable to answ ..."
Abstract

Cited by 25 (5 self)
 Add to MetaCart
In standard controlflow analyses for higherorder languages, a single abstract binding for a variable represents a set of exact bindings, and a single abstract reference cell represents a set of exact reference cells. While such analyses provide useful mayalias information, they are unable to answer mustalias questions about variables and cells, as these questions ask about equality of specific bindings and references. In this paper, we present a novel program analysis for higherorder languages that answers mustalias questions. At every program point, the analysis associates with each variable and abstract cell a cardinality, which is either single or multiple. If variable x is single at program point p, then all bindings for x in the heap reachable from the environment at p hold the same value. If abstract cell r is single at p, then at most one exact cell corresponding to r is reachable from the environment at p. Mustalias information facilitates various program optimizations...
Optimizing Lazy Functional Programs Using Flow Inference
, 1995
"... . Nonstrict higher order functional programming languages are notorious for their low run time efficiency. Optimizations based on flow analysis, which determines for each variable x in a program which expressions could have originated the value of x, can improve the situation by removing redundant ..."
Abstract

Cited by 20 (5 self)
 Add to MetaCart
. Nonstrict higher order functional programming languages are notorious for their low run time efficiency. Optimizations based on flow analysis, which determines for each variable x in a program which expressions could have originated the value of x, can improve the situation by removing redundant eval and thunk operations, avoiding thunk updates, and allowing the use of unboxed representations of some data. We formulate flow analysis as an inference problem in a type system built using type inclusion constraints and an algorithm for solving these constraints is also given. 1 Introduction Polymorphically typed nonstrict higher order functional programming languages are a boon to the programmer because they provide powerful mechanisms for abstraction [11]. Equally, and for the same reasons, they are very difficult to compile to efficient code. Among the main obstacles are the frequent need to build thunks (representations for unevaluated expressions), test whether objects are thunks o...