Results 1  10
of
15
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 98 (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...
ContextSensitive Computations in Functional and Functional Logic Programs
 JOURNAL OF FUNCTIONAL AND LOGIC PROGRAMMING
, 1998
"... ..."
ContextSensitive Rewriting Strategies
, 1997
"... Contextsensitive rewriting is a simple restriction of rewriting which is formalized by imposing fixed restrictions on replacements. Such a restriction is given on a purely syntactic basis: it is (explicitly or automatically) specified on the arguments of symbols of the signature and inductively ..."
Abstract

Cited by 43 (30 self)
 Add to MetaCart
Contextsensitive rewriting is a simple restriction of rewriting which is formalized by imposing fixed restrictions on replacements. Such a restriction is given on a purely syntactic basis: it is (explicitly or automatically) specified on the arguments of symbols of the signature and inductively extended to arbitrary positions of terms built from those symbols. Termination is not only preserved but usually improved and several methods have been developed to formally prove it. In this paper, we investigate the definition, properties, and use of contextsensitive rewriting strategies, i.e., particular, fixed sequences of contextsensitive rewriting steps. We study how to define them in order to obtain efficient computations and to ensure that contextsensitive computations terminate whenever possible. We give conditions enabling the use of these strategies for rootnormalization, normalization, and infinitary normalization. We show that this theory is suitable for formalizing ...
Strictness Analysis Aids Time Analysis
 In Conference Record of the 15th Annual ACM Symposium on Principles of Programming Languages. ACM
, 1988
"... Analysing time complexity of functional programs in a lazy language is problematic, because the time required to evaluate a function depends on how much of the result is "needed" in the computation. Recent results in strictness analysis provide a formalisation of this notion of "need", and thus can ..."
Abstract

Cited by 35 (0 self)
 Add to MetaCart
Analysing time complexity of functional programs in a lazy language is problematic, because the time required to evaluate a function depends on how much of the result is "needed" in the computation. Recent results in strictness analysis provide a formalisation of this notion of "need", and thus can be adapted to analyse time complexity. The future of programming may be in this paradigm: to create software, first write a specification that is clear, and then refine it to an implementation that is efficient. In particular, this paradigm is a prime motivation behind the study of functional programming. Much has been written about the process of transforming one functional program into another. However, a key part of the process has been largely ignored, for very little has been written about assessing the efficiency of the resulting programs. Traditionally, the major indicators of efficiency are time and space complexity. This paper focuses on the former. Functional programming can be sp...
Using Projection Analysis in Compiling Lazy Functional Programs
 In Proceedings of the 1990 ACM Conference on Lisp and Functional Programming
, 1990
"... Projection analysis is a technique for finding out information about lazy functional programs. We show how the information obtained from this analysis can be used to speed up sequential implementations, and introduce parallelism into parallel implementations. The underlying evaluation model is evalu ..."
Abstract

Cited by 15 (6 self)
 Add to MetaCart
Projection analysis is a technique for finding out information about lazy functional programs. We show how the information obtained from this analysis can be used to speed up sequential implementations, and introduce parallelism into parallel implementations. The underlying evaluation model is evaluation transformers, where the amount of evaluation that is allowed of an argument in a function application depends on the amount of evaluation allowed of the application. We prove that the transformed programs preserve the semantics of the original programs. Compilation rules, which encode the information from the analysis, are given for sequential and parallel machines. 1 Introduction A number of analyses have been developed which find out information about programs. The methods that have been developed fall broadly into two classes, forwards analyses such as those based on the ideas of abstract interpretation (e.g. [9, 18, 19, 7, 17, 12, 4, 20]), and backward analyses such as those based...
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
Projections for Polymorphic FirstOrder Strictness Analysis
 Math. Struct. in Comp. Science
, 1991
"... this paper, that results from this kind of analysis are, in a sense, polymorphic. This confirms an earlier conjecture [19], and shows how the technique can be applied to firstorder polymorphic functions. The paper is organised as follows. In the next section, we review projectionbased strictness a ..."
Abstract

Cited by 6 (1 self)
 Add to MetaCart
this paper, that results from this kind of analysis are, in a sense, polymorphic. This confirms an earlier conjecture [19], and shows how the technique can be applied to firstorder polymorphic functions. The paper is organised as follows. In the next section, we review projectionbased strictness analysis very briefly. In Section 3 we introduce the types we will be working with: they are the objects of a category. We show that parameterised types are functors, with certain cancellation properties. In Section 4 we define strong and weak polymorphism: polymorphic functions in programming languages are strongly polymorphic, but we will need to use projections with a slightly weaker property. We prove that, under certain conditions, weakly polymorphic functions are characterised by any nontrivial instance. We can therefore analyse one monomorphic instance of a polymorphic function using existing techniques, and apply the results to every instance. In Section 5 we choose a finite set of projections for each type, suitable for use in a practical compiler. We call these specially chosen projections contexts, and we show examples of factorising contexts for compound types in order to facilitate application of the results of Section 4. We give a number of examples of polymorphic strictness analysis. Finally, in Section 6 we discuss related work and draw some conclusions. 2. Projections for Strictness Analysis
On the Power and Limitations of Strictness Analysis
, 1997
"... this paper, we provide a precise and formal characterizationof the loss of information that leads to this incompleteness. Specifically, we establish the following characterization theorem for Mycroft's strictness analysis method and a natural generalization of his method to nonflat domains called e ..."
Abstract

Cited by 5 (0 self)
 Add to MetaCart
this paper, we provide a precise and formal characterizationof the loss of information that leads to this incompleteness. Specifically, we establish the following characterization theorem for Mycroft's strictness analysis method and a natural generalization of his method to nonflat domains called eeanalysis: Mycroft's method will deduce a strictness property for program P iff the property is independent of any constant appearing in any evaluation of P . To prove this, we specify a small set of equations called Eaxioms, that capture the information loss in Mycroft's method and develop a new proof technique called Erewriting. Erewriting extends the standard notion of rewriting to permit the use of reductions using Eaxioms interspersed with standard reduction steps. Eaxioms are a syntactic characterization of information loss and Erewriting provides an algorithm independent proof technique for characterizing the power of analysis methods. It can be used to answer questions on completeness and incompleteness of Mycroft's method on certain natural classes of programs. Finally, the techniques developed in this paper provide a general principle for establishing similar results for other analysis methods such as those based on abstract interpretation. As a demonstration of the generality of our technique, we give a characterization theorem for another variation of Mycroft's method called ddanalysis. Categories and Subject Descriptors: D.3.1 [Programming Languages]: Formal Definitions and Theory; D.3.2 [Programming Languages]: Language Classificationsapplicative languages; D.3.4 [Programming Languages]: Processorscompilers ; optimization General Terms: Languages, Theory, Measurement Additional Key Words and Phrases: Program analysis, abstract interpretation, str...
Higher Order Demand Propagation
 Lecture Notes in Computer Science
, 1998
"... . A new denotational semantics is introduced for realistic nonstrict functional languages, which have a polymorphic type system and support higher order functions and user definable algebraic data types. It maps each function definition to a demand propagator, which is a higher order function, t ..."
Abstract

Cited by 4 (0 self)
 Add to MetaCart
. A new denotational semantics is introduced for realistic nonstrict functional languages, which have a polymorphic type system and support higher order functions and user definable algebraic data types. It maps each function definition to a demand propagator, which is a higher order function, that propagates context demands to function arguments. The relation of this "higher order demand propagation semantics" to the standard semantics is explained and it is used to define a backward strictness analysis. The strictness information deduced by this analysis is very accurate, because demands can actually be constructed during the analysis. These demands conform better to the analysed functions than abstract values, which are constructed alone with respect to types like in other existing strictness analyses. The richness of the semantic domains of higher order demand propagation makes it possible to express generalised strictness information for higher order functions even ac...
Demand Transformation Analysis for Concurrent Constraint Programs
, 1994
"... Domain In this section we construct a domain of abstract constraints called ACon, which abstracts the domain #(C). In the construction of ACon, we use two domains called D and D V , also introduced in this section, which consist of nonground, downwardsclosed types representing sets of terms in #( ..."
Abstract

Cited by 4 (0 self)
 Add to MetaCart
Domain In this section we construct a domain of abstract constraints called ACon, which abstracts the domain #(C). In the construction of ACon, we use two domains called D and D V , also introduced in this section, which consist of nonground, downwardsclosed types representing sets of terms in #(H V ) and some basic types, such as the set of integers. (H V is ordered by t 1 t 2 if t 1 is a substitution instance of t 2 .) The domain of types is given by D ::= ? j? j j c(D; : : : ; D) j numj D D j :D. Program variables are not mentioned by types in D. In the syntax of D, c ranges over constructor symbols and is a fixpoint operator. Type variables are given by 2 TV , which are used only for fixpoint constructions. The base types ?, ? (read, "nonvar"), and num represent H V , H V n V , and the set of integers, respectively. Example 3.1. fX = ?; Y = ?g is an element of ACon representing the downwardsclosed set of constraints where X is constrained arbitrarily (including not at all...