Results 11  20
of
40
Polymorphic Strictness Analysis Using Frontiers
 Proceedings of the 1993 ACM on Partial Evaluation and SemanticsBased Program Manipulation (PEPM '93), ACM
, 1992
"... This paper shows how to implement sensible polymorphic strictness analysis using the Frontiers algorithm. A central notion is to only ever analyse each function once, at its simplest polymorphic instance. Subsequent nonbase uses of functions are dealt with by generalising their simplest instance an ..."
Abstract

Cited by 8 (0 self)
 Add to MetaCart
This paper shows how to implement sensible polymorphic strictness analysis using the Frontiers algorithm. A central notion is to only ever analyse each function once, at its simplest polymorphic instance. Subsequent nonbase uses of functions are dealt with by generalising their simplest instance analyses. This generalisation is done using an algorithm developed by Baraki, based on embeddingclosure pairs. Compared with an alternative approach of expanding the program out into a collection of monomorphic instances, this technique is hundreds of times faster for realistic programs. There are some approximations involved, but these do not seem to have a detrimental effect on the overall result. The overall effect of this technology is to considerably expand the range of programs for which the Frontiers algorithm gives useful results reasonably quickly. 1 Introduction The Frontiers algorithm was introduced in [CP85 ] as an allegedly efficient way of doing forwards strictness analysis, al...
On the Safety of Nöcker’s Strictness Analysis
 FRANKFURT AM MAIN, GERMANY
"... Abstract. This paper proves correctness of Nöcker’s method of strictness analysis, implemented for Clean, which is an effective way for strictness analysis in lazy functional languages based on their operational semantics. We improve upon the work of Clark, Hankin and Hunt, which addresses correctne ..."
Abstract

Cited by 8 (7 self)
 Add to MetaCart
Abstract. This paper proves correctness of Nöcker’s method of strictness analysis, implemented for Clean, which is an effective way for strictness analysis in lazy functional languages based on their operational semantics. We improve upon the work of Clark, Hankin and Hunt, which addresses correctness of the abstract reduction rules. Our method also addresses the cycle detection rules, which are the main strength of Nöcker’s strictness analysis. We reformulate Nöcker’s strictness analysis algorithm in a higherorder lambdacalculus with case, constructors, letrec, and a nondeterministic choice operator ⊕ used as a union operator. Furthermore, the calculus is expressive enough to represent abstract constants like Top or Inf. The operational semantics is a smallstep semantics and equality of expressions is defined by a contextual semantics that observes termination of expressions. The correctness of several reductions is proved using a context lemma and complete sets of forking and commuting diagrams.
A Logical Framework for Program Analysis
 Proceedings of the 1992 Glasgow Functional Programming Workshop
, 1992
"... Using logics to express program properties, and deduction systems for proving properties of programs, gives a very elegant way of defining program analysis techniques. This paper addresses a shortcoming of previous work in the area by establishing a more general framework for such logics, as is comm ..."
Abstract

Cited by 7 (0 self)
 Add to MetaCart
Using logics to express program properties, and deduction systems for proving properties of programs, gives a very elegant way of defining program analysis techniques. This paper addresses a shortcoming of previous work in the area by establishing a more general framework for such logics, as is commonly done for progam analysis using abstract interpretation. Moreover, there are natural extensions of this work which deal with polymorphic languages. 1 Introduction Kuo and Mishra gave a `type' deduction system for proving strictness properties of programs, and gave a type inference (sometimes called type reconstruction) algorithm for determining these strictness types [10]. The algorithm was proved correct by showing that the types deduced by it were true in an operational model of the language. They observed that their algorithm was not as powerful as one based on the strictness abstract interpretation of [4], and it appeared to be because their type system lacked intersection types. Bo...
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
Effective Optimisation of Multiple Traversals in Lazy Languages
 University of Aarhus
, 1999
"... Tupling transformation strategy can be applied to eliminate redundant calls in a program and also to eliminate multiple traversals of data structures. While the former application can produce superlinear speedup in the transformed program, the effectiveness of the latter has yet to be appreciated. ..."
Abstract

Cited by 5 (0 self)
 Add to MetaCart
Tupling transformation strategy can be applied to eliminate redundant calls in a program and also to eliminate multiple traversals of data structures. While the former application can produce superlinear speedup in the transformed program, the effectiveness of the latter has yet to be appreciated. In this paper, we investigate the pragmatic issues behind elimination of multiple data traversal in the context of lazy languages, and propose a framework of tupling tactic called strictnessguided tupling . This tactic is capable of exploiting specialised strictness contexts where possible to effect tupling optimisation. Two further enhancements of the tupling tactic are also proposed. One achieves circular tupling when multiple traversals from nested recursive calls are eliminated. The other exploits speculative strictness to further improve the performance of tupling. Benchmarks are given throughout the paper to illustrate the performance gains due to these tactics. Keywords: Tupling, ...
On the power of abstract interpretation
 Computer Languages
, 1992
"... Abstract Increasingly sophisticated applications of static analysis make it important to precisely characterize the power of static analysis techniques. Sekar et al. recently studied the power of strictness analysis techniques and showed that strictness analysis is perfect up to variations in consta ..."
Abstract

Cited by 5 (0 self)
 Add to MetaCart
Abstract Increasingly sophisticated applications of static analysis make it important to precisely characterize the power of static analysis techniques. Sekar et al. recently studied the power of strictness analysis techniques and showed that strictness analysis is perfect up to variations in constants. We generalize this approach to abstract interpretation in general by defining a notion of similarity semantics. This semantics associates to a program a collection of interpretations all of which are obtained by blurring the distinctions that a particular static analysis ignores. We define completeness with respect to similarity semantics and obtain two completeness results. For firstorder languages, abstract interpretation is complete with respect to a standard similarity semantics provided the base abstract domain is linearly ordered. For typed higherorder languages, it is complete with respect a logical similarity semantics again under the condition of linearly ordered base abstract domain. 1
Semanticsbased Program Analysis via Symbolic Composition of Transfer Relations
, 1996
"... The goal of program analysis is to determine automatically properties of the runtime behavior of a program. Tools of software development, such as compilers, programverification systems, and programcomprehension systems, are in large part based on program analyses. Most semanticsbased program an ..."
Abstract

Cited by 5 (2 self)
 Add to MetaCart
The goal of program analysis is to determine automatically properties of the runtime behavior of a program. Tools of software development, such as compilers, programverification systems, and programcomprehension systems, are in large part based on program analyses. Most semanticsbased program analyses model the runtime behavior of a program as a trace of execution states and compute a property of these states. Typically, this property is drawn from a predetermined language of semantic information, such as aliasing descriptions or types of values. The standard methodology of program analysis is to construct the property as a fixed point, a single execution step at a time. We explain that these ubiquitous methodological choicesthe a priori choice of the describable program properties and the use of a fixedpoint computationhave some fundamental limitations and can result in poor precision. In this dissertation, we present a different approach to semanticsbased program analysis...
Proving the Correctness of Compiler Optimisations Based on Strictness Analysis
 in Proceedings 5th int. Symp. on Programming Language Implementation and Logic Programming, LNCS 714
, 1993
"... . We show that compiler optimisations based on strictness analysis can be expressed formally in the functional framework using continuations. This formal presentation has two benefits: it allows us to give a rigorous correctness proof of the optimised compiler; and it exposes the various optimisatio ..."
Abstract

Cited by 4 (2 self)
 Add to MetaCart
. We show that compiler optimisations based on strictness analysis can be expressed formally in the functional framework using continuations. This formal presentation has two benefits: it allows us to give a rigorous correctness proof of the optimised compiler; and it exposes the various optimisations made possible by a strictness analysis. 1 Introduction Realistic compilers for imperative or functional languages include a number of optimisations based on nontrivial global analyses. Proving the correctness of such optimising compilers can be done in three steps: 1. proving the correctness of the original (unoptimised) compiler; 2. proving the correctness of the analysis; and 3. proving the correctness of the modifications of the simpleminded compiler to exploit the results of the analysis. A substantial amount of work has been devoted to steps (1) and (2) but there have been surprisingly few attempts at tackling step (3). In this paper we show how to carry out this third step in the...
Partitioning Nonstrict Languages for Multithreaded Code Generation
 Master's thesis, Dept. of EECS, MIT
, 1994
"... In a nonstrict language, functions may return values before their arguments are available, and data structures may be defined before all their components are defined. Compiling such languages to conventional hardware is not straightforward; instructions do not have a fixed compile time ordering. Su ..."
Abstract

Cited by 4 (1 self)
 Add to MetaCart
In a nonstrict language, functions may return values before their arguments are available, and data structures may be defined before all their components are defined. Compiling such languages to conventional hardware is not straightforward; instructions do not have a fixed compile time ordering. Such an ordering is necessary to execute programs efficiently on current microprocessors. Partitioning is the process of compiling a nonstrict program into threads (i.e., a sequence of instructions). This process involves detecting data dependencies at compile time and using these dependencies to "sequentialize" parts of the program. Previous work on partitioning did not propagate dependence information across recursive procedure boundaries. Using a representation known as Paths we are able to represent dependence information of recursive functions. Also, we incorporate them into a known partitioning algorithm. However, this algorithm fails to make use of all the information contained in pat...
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...