Results 11 - 20
of
31
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 non-standard domains whose elements denote properties over the standard domains. This thesis is concerned with higherorder functional languages and abstract interpretations with ..."
Abstract
-
Cited by 24 (0 self)
- Add to MetaCart
Abstract interpretation is the name applied to a number of techniques for reasoning about programs by evaluating them over non-standard 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...
Caching Intermediate Results for Program Improvement
- In Proceedings of the ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation
, 1995
"... A systematic approach is given for symbolically caching intermediate results useful for deriving incremental programs from non-incremental programs. We exploit a number of program analysis and transformation techniques, centered around effective caching based on its utilization in deriving increment ..."
Abstract
-
Cited by 19 (6 self)
- Add to MetaCart
A systematic approach is given for symbolically caching intermediate results useful for deriving incremental programs from non-incremental programs. We exploit a number of program analysis and transformation techniques, centered around effective caching based on its utilization in deriving incremental programs, in order to increase the degree of incrementality not otherwise achievable by using only the return values of programs that are of direct interest. Our method can be applied straightforwardly to provide a systematic approach to program improvement via caching. 1 Introduction Incremental programs take advantage of repeated computations on inputs that differ only slightly from one another, making use of the old output in computing a new output rather than computing from scratch. Methods of incremental computation have widespread application, e.g., optimizing compilers [2, 9, 11], transformational programming [29, 32, 42], interactive editing systems [4, 38], etc. In this paper, ...
Constructor Specialization
- In Schmidt [25
"... In the section on "challenging problems" in the proceedings from the first international workshop on partial evaluation and mixed computation [BEJ88] a question is stated: "Can PE be used to generate new specialized data types, in a way analogous to generating specialized functions". Since then litt ..."
Abstract
-
Cited by 15 (2 self)
- Add to MetaCart
In the section on "challenging problems" in the proceedings from the first international workshop on partial evaluation and mixed computation [BEJ88] a question is stated: "Can PE be used to generate new specialized data types, in a way analogous to generating specialized functions". Since then little has been done to address this problem. In [Lau89], new types are indeed generated, but they are all simpler versions of the types in the original program. It is, e.g. not possible to have types with more constructors than the types in the original program. I propose to alleviate this by means of constructor specialization. Constructors are specialized with respect to the static parts of their arguments, just like residual functions. I show how this is done and argue that it makes it possible to get good results from partial evaluation in cases where the traditional methods fail to produce satisfactory results. The discussion is centered around a small subset of Standard ML, but the idea a...
Eliminating dead code on recursive data
- Science of Computer Programming
, 1999
"... Abstract. This paper describes a general and powerful method for dead code analysis and elimination in the presence of recursive data constructions. We represent partially dead recursive data using liveness patterns based on general regular tree grammars extended with the notion of live and dead, an ..."
Abstract
-
Cited by 14 (4 self)
- Add to MetaCart
Abstract. This paper describes a general and powerful method for dead code analysis and elimination in the presence of recursive data constructions. We represent partially dead recursive data using liveness patterns based on general regular tree grammars extended with the notion of live and dead, and we formulate the analysis as computing liveness patterns at all program points based on program semantics. This analysis yields a most precise liveness pattern for the data at each program point, which is signi cantly more precise than results from previous methods. The analysis algorithm takes cubic time in terms of the size of the program in the worst case but is very e cient in practice, as shown by our prototype implementation. The analysis results are used to identify and eliminate dead code. The general framework for representing and analyzing properties of recursive data structures using general regular tree grammars applies to other analyses as well. 1
Higher-order Binding-time Analysis
- In ACM Symposium on Partial Evaluation and Semantics-Based Program Manipulation (PEPM'93
, 1993
"... The partial evaluation process requires a binding-time analysis. Binding-time analysis seeks to determine which parts of a program's result is determined when some part of the input is known. Domain projections provide a very general way to encode a description of which parts of a data structure are ..."
Abstract
-
Cited by 13 (2 self)
- Add to MetaCart
The partial evaluation process requires a binding-time analysis. Binding-time analysis seeks to determine which parts of a program's result is determined when some part of the input is known. Domain projections provide a very general way to encode a description of which parts of a data structure are static (known), and which are dynamic (not static). For first-order functional languages Launchbury [Lau91a] has developed an abstract interpretation technique for bindingtime analysis in which the basic abstract value is a projection. Unfortunately this technique does not generalise easily to higher-order languages. This paper develops such a generalisation: a projection-based abstract interpretation suitable for higher-order binding-time analysis. Launchbury [Lau91b] has shown that binding-time analysis and strictness analysis are equivalent problems at first order, and for projection-based analyses have exactly the same safety condition. We argue that the same is true at higher order, ...
On-line Off-line Partial Evaluation: Semantic Specifications and Correctness Proofs
- Yale University
, 1993
"... This paper presents semantic specifications and correctness proofs for both on-line and offline partial evaluation of strict first-order functional programs. To do so, our strategy consists of defining a core semantics as a basis for the specification of three non-standard evaluations: instrumented ..."
Abstract
-
Cited by 9 (1 self)
- Add to MetaCart
This paper presents semantic specifications and correctness proofs for both on-line and offline partial evaluation of strict first-order functional programs. To do so, our strategy consists of defining a core semantics as a basis for the specification of three non-standard evaluations: instrumented evaluation, on-line and off-line partial evaluation. We then use the technique of logical relations to prove the correctness of both on-line and off-line partial evaluation semantics. The contributions of this work are as follows. 1. We provide a uniform framework to defining and proving correct both on-line and off-line partial evaluation. 2. This work required a formal specification of on-line partial evaluation with polyvariant specialization. We define criteria for its correctness with respect to an instrumented standard semantics. As a byproduct, on-line partial evaluation appears to be based on a fixpoint iteration process, just like binding-time analysis. 3. We show that binding-time...
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
Implementing Projection-based Strictness Analysis
- In Glasgow Workshop on Functional Programming
, 1992
"... Projection-based backwards strictness analysis has been understood for some years. Surprisingly, even though the method is fairly simple and quite general, no reports of its implementation have appeared. This paper describes ideas underlying our prototype implementation of the analysis for a simple ..."
Abstract
-
Cited by 4 (1 self)
- Add to MetaCart
Projection-based backwards strictness analysis has been understood for some years. Surprisingly, even though the method is fairly simple and quite general, no reports of its implementation have appeared. This paper describes ideas underlying our prototype implementation of the analysis for a simple programming language. The implementation serves as a case study before applying the method in the Glasgow Haskell compiler. 1 Introduction The method of projection-based backwards strictness analysis for first-order, lazy functional languages was first presented by Wadler and Hughes [8] in 1987. Since then it has been generalised by Hughes [4] and Hughes and Launchbury [3] to work for user-defined types and for polymorphism. Yet, to our knowledge, it has never been implemented even though the method is fairly simple and quite general. The time has come for projection-based strictness analysis to meet practice. This paper describes a prototype implementation. Initially we expected that build...
Analyse Statique De Programmes : Fondements Et Applications
, 1999
"... domains . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.2.2 Lattices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.2.3 Specification of analyses . . . . . . . . . . . . . . . . . . . . . . . 9 1.2.4 Semantic correctness . . . . . . . . . . . . . . . . . . . . . . . . ..."
Abstract
-
Cited by 2 (0 self)
- Add to MetaCart
domains . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.2.2 Lattices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.2.3 Specification of analyses . . . . . . . . . . . . . . . . . . . . . . . 9 1.2.4 Semantic correctness . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.2.5 Solving systems of equations . . . . . . . . . . . . . . . . . . . . . 13 1.3 This document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2 Program analysis with conjunctive types 17 2.1 Strictness types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2.1.1 Lindenbaum algebras . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.2 The strictness logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 2.3 Relationship to abstract interpretation . . . . . . . . . . . . . . . . . . . . 22 2.4 A variation: binding-time analysis . . . . . . . . . . . . . . . . . . . . . . 22 3 Disjunctions and data structures: Properties 25 3.1 Axiomatisation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 3.1.1 Normal Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 3.2 Abstract domains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.2.1 Base Types, Products, Sums and Functions . . . . . . . . . . . . . 31 3.2.2 Recursive Data Structures . . . . . . . . . . . . . . . . . . . . . . 32 3.2.3 Strictness Properties of Lists . . . . . . . . . . . . . . . . . . . . . 35 4 Disjunctions and data structures: Logic 37 4.1 Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 4.1.1 Strictness Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 4.1.2 Proving properties for lists . . . . . . . . . . . . . . . . . . . . . . 42 4.2 Bibliographical not...

