Results 1  10
of
11
Projections for Strictness Analysis
, 1987
"... Contexts have been proposed as a means of performing strictness analysis on nonflat domains. Roughly speaking, a context describes how much a subexpression will be evaluated by the surrounding program. This paper shows how contexts can be represented using the notion of projection from domain theo ..."
Abstract

Cited by 96 (4 self)
 Add to MetaCart
Contexts have been proposed as a means of performing strictness analysis on nonflat domains. Roughly speaking, a context describes how much a subexpression will be evaluated by the surrounding program. This paper shows how contexts can be represented using the notion of projection from domain theory. This is clearer than the previous explanation of contexts in terms of continuations. In addition, this paper describes finite domains of contexts over the nonflat list domain. This means that recursive context equations can be solved using standard fixpoint techniques, instead of the algebraic manipulation previously used. Praises of lazy functional languages have been widely sung, and so have some curses. One reason for praise is that laziness supports programming styles that are inconvenient or impossible otherwise [Joh87, Hug84, Wad85a]. One reason for cursing is that laziness hinders efficient implementation. Still, acceptable efficiency for lazy languages is at last being achieved...
The semantics of Scheme controlflow analysis
 School of Computer Science, Pittsburgh
, 1991
"... This is a followon to my 1988 PLDI paper, “ControlFlow Analysis in Scheme”[9]. I usethe methodof abstractsemantic interpretations to explicate the controlflow analysis technique presented in that paper. I begin with a denotational semantics for CPS Scheme. I then present an alternate semantics th ..."
Abstract

Cited by 54 (3 self)
 Add to MetaCart
This is a followon to my 1988 PLDI paper, “ControlFlow Analysis in Scheme”[9]. I usethe methodof abstractsemantic interpretations to explicate the controlflow analysis technique presented in that paper. I begin with a denotational semantics for CPS Scheme. I then present an alternate semantics that precisely expresses the controlflow analysis problem. I abstract this semantics in a natural way, arriving at two different semantic interpretations giving approximate solutions to the flow analysis problem, each computable at compile time. The development of the final abstract semantics provides a clear, formal description of the analysis technique presented in “ControlFlow Analysis in Scheme.” 1
Abstract Interpretation of Functional Languages: From Theory to Practice
, 1991
"... Abstract interpretation is the name applied to a number of techniques for reasoning about programs by evaluating them over nonstandard domains whose elements denote properties over the standard domains. This thesis is concerned with higherorder functional languages and abstract interpretations with ..."
Abstract

Cited by 25 (0 self)
 Add to MetaCart
Abstract interpretation is the name applied to a number of techniques for reasoning about programs by evaluating them over nonstandard domains whose elements denote properties over the standard domains. This thesis is concerned with higherorder functional languages and abstract interpretations with a formal semantic basis. It is known how abstract interpretation for the simply typed lambda calculus can be formalised by using binary logical relations. This has the advantage of making correctness and other semantic concerns straightforward to reason about. Its main disadvantage is that it enforces the identification of properties as sets. This thesis shows how the known formalism can be generalised by the use of ternary logical relations, and in particular how this allows abstract values to deno...
Code optimizations for lazy evaluation
 LISP and Symbolic Computation
, 1988
"... Implementations of lazy evaluation for nonstrict functional languages usually involve the notion of a delayed representation of the value of an expression, which we call a thunk. We present several techniques for implementing thunks and formalize a class of optimizations that reduce both the space ..."
Abstract

Cited by 15 (0 self)
 Add to MetaCart
Implementations of lazy evaluation for nonstrict functional languages usually involve the notion of a delayed representation of the value of an expression, which we call a thunk. We present several techniques for implementing thunks and formalize a class of optimizations that reduce both the space and time overhead of these techniques. The optimizations depend on a compiletime inferencing strategy called path analysis, a generalization of strictness analysis that uncovers orderofevaluation information. Although the techniques in this paper are focused on the compilation of a nonstrict functional language for a conventional architecture, they are directly applicable to most of the virtual machines commonly used for implementing such languages. The same techniques also apply to other forms of delayed evaluation such as futures and promises. 1
On Static and Dynamic ControlFlow Information in Program Analysis and Transformation
, 2001
"... interpretation and fixedpoint computation . . . 71 5.1.2 The timestamping technique . . . . . . . . . . . . . . . . 72 5.2 The timestampsbased approximation algorithm . . . . . . . . . 73 5.2.1 A class of recursive equations . . . . . . . . . . . . . . . . 73 5.2.2 The intuition behind time stam ..."
Abstract

Cited by 13 (6 self)
 Add to MetaCart
interpretation and fixedpoint computation . . . 71 5.1.2 The timestamping technique . . . . . . . . . . . . . . . . 72 5.2 The timestampsbased approximation algorithm . . . . . . . . . 73 5.2.1 A class of recursive equations . . . . . . . . . . . . . . . . 73 5.2.2 The intuition behind time stamps . . . . . . . . . . . . . 74 5.3 A formalization of the timestampsbased algorithm . . . . . . . 75 5.3.1 Statepassing recursive equations . . . . . . . . . . . . . . 75 5.3.2 Correctness . . . . . . . . . . . . . . . . . . . . . . . . . . 77 5.3.3 Complexity estimates . . . . . . . . . . . . . . . . . . . . 78 5.4 An extension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 5.6 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 Appendix 5.A Operational specification . . . . . . . . . . . . . . . . . 81 6 Static Transition Compression 85 6.2 Source and target languages . . . . . . . . . . . . . . . . . . . . . 86 6.2.1 An unstructured target language . . . . . . . . . . . . . . 86 6.2.2 A structured source language . . . . . . . . . . . . . . . . 86 6.3 A contextinsensitive translation . . . . . . . . . . . . . . . . . . 87 6.3.4 Chains of jumps . . . . . . . . . . . . . . . . . . . . . . . 91 6.4 Context awareness . . . . . . . . . . . . . . . . . . . . . . . . . . 92 6.4.1 Continuations and duplication . . . . . . . . . . . . . . . 92 6.4.2 Towards the right thing . . . . . . . . . . . . . . . . . . . 92 6.5 A contextsensitive translation . . . . . . . . . . . . . . . . . . . 93 6.6 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Transformation in a NonStrict Language: An Approach to Instantiation
, 1989
"... A problem arises when the usual rules of fold/unfold transformation are applied in a nonstrict programming system. Case analysis by instantiation may alter strictness characteristics of the function being transformed, and hence alter the behaviour of programs. Although such behavioural changes can ..."
Abstract

Cited by 8 (2 self)
 Add to MetaCart
A problem arises when the usual rules of fold/unfold transformation are applied in a nonstrict programming system. Case analysis by instantiation may alter strictness characteristics of the function being transformed, and hence alter the behaviour of programs. Although such behavioural changes can in general be quite subtle, they are all too apparent if the program is interactive, since I/O interleaving is closely tied to strictness properties. A twophase solution to the problem is proposed. It comprises a suitable form of strictness analysis to determine whether a proposed instantiation is safe, and a procedure to reformulate troublesome definitions so that, in effect, case analysis is shifted to a nearby safe context. 1. Introduction We assume a purely functional programming language in the recursion equation style[7]. Data values are generated from constants and constructor functions. Functions other than constructors may be defined by cases in a series of clauses. In each ...
A Loopdetecting Interpreter for Lazy, Higherorder Programs
 Functional Programming, Workshops in Computing
, 1992
"... Interpreters that detect some forms of nontermination have a variety of applications, from abstract interpretation to partial evaluation. A simple and often used strategy is to test for a repeated state, but this cannot handle infinite values (such as firstclass functions) or unevaluated states su ..."
Abstract

Cited by 6 (0 self)
 Add to MetaCart
Interpreters that detect some forms of nontermination have a variety of applications, from abstract interpretation to partial evaluation. A simple and often used strategy is to test for a repeated state, but this cannot handle infinite values (such as firstclass functions) or unevaluated states such as arise in lazy programs. In this paper we propose using Berry and Curien's theory of sequential algorithms as a semantic foundation for loop detection: we obtain straightforwardly a loop detector for lazy higherorder functional programs, which is more effective than the simple strategy even for strict first order cases. 1 Introduction We normally expect an interpreter, given a nonterminating program to interpret, to fail to terminate itself. But there are applications in which it is useful for an interpreter to stop in such cases, with a report that the interpreted program is in an infinite loop. One such application is abstract interpretation[1], a method of compiletime analysis in...
Fast Strictness Analysis Via Symbolic Fixpoint Iteration
, 1991
"... . Strictness analysis (at least for flat domains) is well understood. For a few years the main concern was efficiency, since the standard analysis was shown to be exponential in the worst case [9]. Thus lots of research evolved to find efficient averagecase algorithms. In Yale Haskell we have imple ..."
Abstract

Cited by 2 (1 self)
 Add to MetaCart
. Strictness analysis (at least for flat domains) is well understood. For a few years the main concern was efficiency, since the standard analysis was shown to be exponential in the worst case [9]. Thus lots of research evolved to find efficient averagecase algorithms. In Yale Haskell we have implemented a strictness analyzer that computes fixpoints via symbolic manipulation of boolean functions. This extremely simple approach also is extremely fast  the strictness analysis phase of our compiler typically takes about 1% of the overall compilation time. 1 Introduction The goal of strictness analysis is to determine, for every function in a program, the parameters in which it is strict. Strictness information is crucial to the implementation of a nonstrict language such as Haskell, since conventional machines are best suited to strict, or eager evaluation. Knowing that a function is strict in a given argument allows one to evaluate that argument eargerly and thus avoid creating dela...
Abstract Interpretation and Attribute Grammars
, 1992
"... The objective of this thesis is to explore the connections between abstract interpretation and attribute grammars as frameworks in program analysis. Abstract interpretation is a semanticsbased program analysis method. A large class of data flow analysis problems can be expressed as nonstandard sem ..."
Abstract

Cited by 1 (1 self)
 Add to MetaCart
The objective of this thesis is to explore the connections between abstract interpretation and attribute grammars as frameworks in program analysis. Abstract interpretation is a semanticsbased program analysis method. A large class of data flow analysis problems can be expressed as nonstandard semantics where the “meaning ” contains information about the runtime behaviour of programs. In an abstract interpretation the analysis is proved correct by relating it to the usual semantics for the language. Attribute grammars provide a method and notation to specify code generation and program analysis directly from the syntax of the programming language. They are especially used for describing compilation of programming languages and very efficient evaluators have been developed for subclasses of attribute grammars. By relating abstract interpretation and attribute grammars we obtain a closer connection between the specification and implementation of abstract interpretations which at the same time facilitates the correctness proofs of interpretations. Implementation and specification of abstract interpretations using circular attribute grammars is realised with an evaluator system for a class of domain theoretic attribute grammars. In this system thecircularity of attribute grammars is resolved by fixpoint iteration. The use of finite lattices in abstract interpretations requires automatic generation of specialised fixpoint iterators. This is done using a technique called lazy fixpoint iteration which is presented in the thesis. Methods from abstract interpretation can also be used in correctness proofs of attribute grammars. This proof technique introduces a new class of attribute grammars based on domain theory. This method is illustrated with examples. i ii SUMMARY