Results 11 - 20
of
29
Polymorphic Strictness Analysis Using Frontiers
- Proceedings of the 1993 ACM on Partial Evaluation and Semantics-Based 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 non-base uses of functions are dealt with by generalising their simplest instance an ..."
Abstract
-
Cited by 7 (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 non-base uses of functions are dealt with by generalising their simplest instance analyses. This generalisation is done using an algorithm developed by Baraki, based on embedding-closure 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...
Projections for Polymorphic First-Order 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 first-order polymorphic functions. The paper is organised as follows. In the next section, we review projection-based 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 first-order polymorphic functions. The paper is organised as follows. In the next section, we review projection-based 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 non-trivial 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 non-flat 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 non-flat domains called ee-analysis: 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 E-axioms, that capture the information loss in Mycroft's method and develop a new proof technique called E-rewriting. E-rewriting extends the standard notion of rewriting to permit the use of reductions using E-axioms interspersed with standard reduction steps. E-axioms are a syntactic characterization of information loss and E-rewriting 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 dd-analysis. Categories and Subject Descriptors: D.3.1 [Programming Languages]: Formal Definitions and Theory; D.3.2 [Programming Languages]: Language Classifications---applicative languages; D.3.4 [Programming Languages]: Processors---compilers ; optimization General Terms: Languages, Theory, Measurement Additional Key Words and Phrases: Program analysis, abstract interpretation, str...
Three Non-determinism Analyses in a Parallel-Functional Language
, 2001
"... This paper is an extension of a previous work where two non-determinism analyses were presented. The first of them was efficient (linear) but not very powerful and the second one was more powerful but very expensive (exponential). Here, we develop an intermediate analysis in both aspects, efficiency ..."
Abstract
-
Cited by 5 (4 self)
- Add to MetaCart
This paper is an extension of a previous work where two non-determinism analyses were presented. The first of them was efficient (linear) but not very powerful and the second one was more powerful but very expensive (exponential). Here, we develop an intermediate analysis in both aspects, efficiency and power. The improvement in efficiency is obtained by speeding up the fixpoint calculation by means of a widening operator, and the representation of functions through easily comparable signatures. Also details about the implementation and its cost are given. Additionally: (1) the second and third analyses are completed with polymorphism, (2) we prove that the domains in the second and third analyses form a category in which the morphisms are embedding-closure pairs of functions; respectively called abstraction and concretisation functions; and (3) we formally relate the analyses and prove that the first analysis is a safe approximation to the third one and that the third one is a safe approximation to the second one. In this way the three analyses become totally ordered by increasing cost and precision. 1
A Syntactic Approach to Fixed Point Computation on Finite Domains
- In Proc. 1992 ACM Symposium on Lisp and Functional Programming
, 1992
"... We propose a syntactic approach to performing fixed point computation on finite domains. Finding fixed points in finite domains for monotonic functions is an essential task when calculating abstract semantics of functional programs. Previous methods for fixed point finding have been mainly based on ..."
Abstract
-
Cited by 5 (0 self)
- Add to MetaCart
We propose a syntactic approach to performing fixed point computation on finite domains. Finding fixed points in finite domains for monotonic functions is an essential task when calculating abstract semantics of functional programs. Previous methods for fixed point finding have been mainly based on semantic approaches which may be very inefficient even for simple programs. We outline the development of a syntactic approach, and show that the syntactic approach is sound and complete with respect to semantics. A few examples are provided to illustrate this syntactic approach. 1 Motivation and Introduction Finding fixed points for monotonic functions over finite domains is an important task in abstract interpretation. In abstract interpretation, a standard (or non--standard) semantics of a functional program is abstracted to a monotonic function over finite domains, and, if the program contains recursive definitions, fixed point finding is used to calculate the abstract semantics of th...
Efficient Computation of Fixpoints that Arise in Complex Program Analysis
"... This paper proposes a model for studying the computation of fixpoints that arise in complex program analysis based on abstract interpretation, and presents an efficient algorithm for computing fixpoints based on the model. Abstract interpretation provides a unified framework for handling interproced ..."
Abstract
-
Cited by 4 (2 self)
- Add to MetaCart
This paper proposes a model for studying the computation of fixpoints that arise in complex program analysis based on abstract interpretation, and presents an efficient algorithm for computing fixpoints based on the model. Abstract interpretation provides a unified framework for handling interprocedural analysis of programs with unrestricted pointer manipulation, higher-order functions, and continuations. In the general case, the structure of the fixpoint computation is not known before analysis; that is, the flow graph cannot be determined from the syntax of a program. Abstract interpretation handles this situation easily. In our algorithm, the entailment graph, representing the structure of the fixpoint computation, is developed during analysis. The strategies for determining the evaluation order, which underlie the algorithm, are described. Based on the strategies, local knowledge of the entailment graph at each node is exploited to determine dynamically an effective order of evalu...
Partitioning Non-strict Languages for Multi-threaded Code Generation
- Master's thesis, Dept. of EECS, MIT
, 1994
"... In a non-strict 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 non-strict 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 non-strict 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...
What About the Natural Numbers
- Computer Languages
, 1989
"... A prime concern in the design of any general purpose programming language should be the ease and safety of working with natural numbers, particularly in conjunction with discrete data structures. This theme of commitment to the naturals as the basic numeric data type is explored in the context of a ..."
Abstract
-
Cited by 3 (2 self)
- Add to MetaCart
A prime concern in the design of any general purpose programming language should be the ease and safety of working with natural numbers, particularly in conjunction with discrete data structures. This theme of commitment to the naturals as the basic numeric data type is explored in the context of a lazy functional language. Non-Title Keywords: structural correspondence, numeric types, total functions, closed systems, functional programming, lazy evaluation.
Partitioning Non-strict Functional Languages for Multi-threaded Code Generation
- In Proceedings of Static Analysis Symposium '95
, 1995
"... In this paper, we present a new approach to partitioning, the problem of generating sequential threads for programs written in a non-strict functional language. The goal of partitioning is to generate threads as large as possible, while retaining the non-strict semantics of the program. We define p ..."
Abstract
-
Cited by 3 (0 self)
- Add to MetaCart
In this paper, we present a new approach to partitioning, the problem of generating sequential threads for programs written in a non-strict functional language. The goal of partitioning is to generate threads as large as possible, while retaining the non-strict semantics of the program. We define partitioning as a program transformation and design algorithms for basic block partitioning and inter-procedural partitioning. The inter-procedural algorithm presented here is more powerful than the ones previously known and is based on abstract interpretation, enabling the algorithm to handle recursion in a straightforward manner. We prove the correctness of these algorithms in a denotational semantic framework. Keywords: Partitioning, abstract interpretation, demand and tolerance sets, inter-procedural analysis, non-strict functional languages. 1 Introduction Functional programming languages can be divided into two classes: strict and non-strict. In a non-strict language, functions may r...

