Results 1 - 10
of
18
Tutorial Notes on Partial Evaluation
- Proceedings of the Twentieth Annual ACM Symposium on Principles of Programming Languages
, 1993
"... The last years have witnessed a flurry of new results in the area of partial evaluation. These tutorial notes survey the field and present a critical assessment of the state of the art. 1 Introduction Partial evaluation is a source-to-source program transformation technique for specializing program ..."
Abstract
-
Cited by 230 (60 self)
- Add to MetaCart
The last years have witnessed a flurry of new results in the area of partial evaluation. These tutorial notes survey the field and present a critical assessment of the state of the art. 1 Introduction Partial evaluation is a source-to-source program transformation technique for specializing programs with respect to parts of their input. In essence, partial evaluation removes layers of interpretation. In the most general sense, an interpreter can be defined as a program whose control flow is determined by its input data. As Abelson points out, [43, Foreword], even programs that are not themselves interpreters have important interpreter-like pieces. These pieces contain both compile-time and run-time constructs. Partial evaluation identifies and eliminates the compile-time constructs. 1.1 A complete example We consider a function producing formatted text. Such functions exist in most programming languages (e.g., format in Lisp and printf in C). Figure 1 displays a formatting functio...
A System For Specialising Logic Programs
, 1991
"... This report describes SP, a system for specialising logic programs. The report functions as a user's manual for SP, and also contains the algorithms employed and arguments for their correctness. A number of examples of program specialisation are given in Appendix A. Contents 1 Program Specialisation ..."
Abstract
-
Cited by 141 (12 self)
- Add to MetaCart
This report describes SP, a system for specialising logic programs. The report functions as a user's manual for SP, and also contains the algorithms employed and arguments for their correctness. A number of examples of program specialisation are given in Appendix A. Contents 1 Program Specialisation 4 2 Transformations in SP 5 3 Unfolding Rules 10 4 Approximation 13 5 The Specialisation Algorithm 16 6 How to Use SP 20 7 Discussion 23 A Examples of Specialisation 28 B Unfoldability Conditions for Built-ins 36 1 Program Specialisation SP is a system for specialising logic programs. Before describing the system, it is worth reviewing briefly the aims and interesting applications of program specialisation. To specialise a program is to restrict its behaviour in some way. The purpose of specialisation is to exploit the restriction to gain efficiency. A specialised program is equivalent, within the bounds of the restriction imposed, to the original unspecialised program, but should be ...
Compile-time Derivation of Variable Dependency Using Abstract Interpretation
- Journal of Logic Programming
, 1992
"... Traditional schemes for abstract interpretation-based global analysis of logic programs generally focus on obtaining procedure argument mode and type information. Variable sharing information is often given only the attention needed to preserve the correctness of the analysis. However, such sharing ..."
Abstract
-
Cited by 111 (39 self)
- Add to MetaCart
Traditional schemes for abstract interpretation-based global analysis of logic programs generally focus on obtaining procedure argument mode and type information. Variable sharing information is often given only the attention needed to preserve the correctness of the analysis. However, such sharing information can be very useful. In particular, it can be used for predicting runtime goal independence, which can eliminate costly run-time checks in and-parallel execution. In this paper, a new algorithm for doing abstract interpretation in logic programs is described which concentrates on inferring the dependencies of the terms bound to program variables with increased precision and at all points in the execution of the program, rather than just at a procedure level. Algorithms are presented for computing abstract entry and success substitutions which extensively domain independent fixpoint algorithm is presented and described in detail. The algorithms are illustrated with examples. Finally, results from an implementation of the abstract interpreter are presented. 1
A General Framework for Semantics-based Bottom-up Abstract Interpretation of Logic Programs
- ACM Transactions on Programming Languages and Systems
, 1993
"... Interpretation of Logic Programs Roberto Barbuti , Roberto Giacobazzi , Giorgio Levi Dipartimento di Informatica Universit`a di Pisa Corso Italia 40, 56125 Pisa fbarbuti,giaco,levig@di.unipi.it in ACM Transactions on Programming Languages and Systems Vol 15, January 1993 Abstract The theory ..."
Abstract
-
Cited by 71 (25 self)
- Add to MetaCart
Interpretation of Logic Programs Roberto Barbuti , Roberto Giacobazzi , Giorgio Levi Dipartimento di Informatica Universit`a di Pisa Corso Italia 40, 56125 Pisa fbarbuti,giaco,levig@di.unipi.it in ACM Transactions on Programming Languages and Systems Vol 15, January 1993 Abstract The theory of abstract interpretation provides a formal framework to develop advanced dataflow analysis tools. The idea is to define a non-standard semantics which is able to compute, in finite time, an approximated model of the program. In this paper we define an abstract interpretation framework based on a fixpoint approach to the semantics. This leads to the definition, by means of a suitable set of operators, of an abstract fixpoint characterization of a -model associated with the program. Thus, we obtain a specializable abstract framework for bottom-up abstract interpretations of definite logic programs. The specialization of the framework is shown on two examples, namely ground dependence analysis and depth-k analysis.
On the Complexity of Dataflow Analysis of Logic Programs
, 1992
"... This article reports some results on this correlation in the context of logic programs. A formal notion of the "precision" of an analysis algorithm is proposed, and this is used to characterize the worst-case computational complexity of a number of dataflow analyses with different degrees of precisi ..."
Abstract
-
Cited by 35 (4 self)
- Add to MetaCart
This article reports some results on this correlation in the context of logic programs. A formal notion of the "precision" of an analysis algorithm is proposed, and this is used to characterize the worst-case computational complexity of a number of dataflow analyses with different degrees of precision. While this article considers the analysis of logic programs, the technique proposed, namely the use of "exactness sets" to study relationships between complexity and precision of analyses, is not specific to logic programming in any way, and is equally applicable to flow analyses of other language families.
Implementation of Multiple Specialization in Logic Programs
- In Proc. ACM SIGPLAN Symposium on Partial Evaluation and Semantics Based Program Manipulation
, 1995
"... We study the multiple specialization of logic programs based on abstract interpretation. This involves in general generating several versions of a program predicate for different uses of such predicate, making use of information obtained from global analysis performed by an abstract interpreter, and ..."
Abstract
-
Cited by 24 (14 self)
- Add to MetaCart
We study the multiple specialization of logic programs based on abstract interpretation. This involves in general generating several versions of a program predicate for different uses of such predicate, making use of information obtained from global analysis performed by an abstract interpreter, and finally producing a new, "multiply specialized" program. While the topic of multiple specialization of logic programs has received considerable theoretical attention, it has never been actually incorporated in a compiler and its effects quantified. We perform such a study in the context of a parallelizing compiler and show that it is indeed a relevant technique in practice. Also, we propose an implementation technique which has the same power as the strongest of the previously proposed techniques but requires little or no modification of an existing abstract interpreter. Keywords: Multiple Program Specialization, Abstract Interpretation, Logic Programming, Compile-time Analysis, Optimizati...
Partial Evaluation
, 1996
"... Introduction: What is partial evaluation? Partial evaluation is a technique to partially execute a program, when only some of its input data are available. Consider a program p requiring two inputs, x 1 and x 2 . When specific values d 1 and d 2 are given for the two inputs, we can run the program ..."
Abstract
-
Cited by 21 (0 self)
- Add to MetaCart
Introduction: What is partial evaluation? Partial evaluation is a technique to partially execute a program, when only some of its input data are available. Consider a program p requiring two inputs, x 1 and x 2 . When specific values d 1 and d 2 are given for the two inputs, we can run the program, producing a result. When only one input value d 1 is given, we cannot run p, but can partially evaluate it, producing a version p d1 of p specialized for the case where x 1 = d 1 . Partial evaluation is an instance of program specialization, and the specialized version p d1 of p is called a residual program. For an example, consider the following C function p
A Technique for Recursive Invariance Detection and Selective Program Specialization
- In Proc. 3rd. Int’l Symposium on Programming Language Implementation and Logic Programming. Number 528 in LNCS
, 1991
"... This paper presents a technique for achieving a class of optimizations related to the reduction of checks within cycles. The technique uses both Program Transformation and Abstract Interpretation. After a first pass of an abstract interpreter which detects simple invariants, program transformation i ..."
Abstract
-
Cited by 17 (12 self)
- Add to MetaCart
This paper presents a technique for achieving a class of optimizations related to the reduction of checks within cycles. The technique uses both Program Transformation and Abstract Interpretation. After a first pass of an abstract interpreter which detects simple invariants, program transformation is used to build a hypothetical situation that simplifies some predicates that should be executed within the cycle. This transformation implements the heuristic hypothesis that once conditional tests hold they may continue doing so recursively. Specialized versions of predicates are generated to detect and exploit those cases in which the invariance may hold. Abstract interpretation is then used again to verify the truth of such hypotheses and confirm the proposed simplification. This allows optimizations that go beyond those possible with only one pass of the abstract interpreter over the original program, as is normally the case. It also allows selective program specialization using a standard abstract interpreter not specifically designed for this purpose, thus simplifying the design of this already complex module of the compiler. In the paper, a class of programs amenable to such optimization is presented, along with some examples and an evaluation of the proposed techniques in some application areas such as floundering detection and reducing run-time tests in automatic logic program parallelization. The analysis of the examples presented interpretation and program transformation tools.
Abstract specialization and its application to program parallelization
- VI International Workshop on Logic Program Synthesis and Transformation, number 1207 in LNCS
, 1997
"... Abstract. Program specialization optimizes programs for known values of the input. It is often the case that the set of possible input values is unknown, or this set is infinite. However, a form of specialization can still be performed in such cases by means of abstract interpretation, specializatio ..."
Abstract
-
Cited by 13 (4 self)
- Add to MetaCart
Abstract. Program specialization optimizes programs for known values of the input. It is often the case that the set of possible input values is unknown, or this set is infinite. However, a form of specialization can still be performed in such cases by means of abstract interpretation, specialization then being with respect to abstract values (substitutions), multiple specialization to automatic program parallelization in the &-Prolog compiler. Abstract executability, the main concept underlying abstract specialization, is formalized, the design of the specialization system presented, and a non-trivial example of specialization in automatic parallelization is given. 1
Towards Integrating Partial Evaluation in a Specialization Framework based on Generic Abstract Interpretation (Extended Abstract)
- Proceedings of the ILPS’97 Workshop on Specialisation of Declarative Programs and its Application, K.U. Leuven, Tech. Rep. CW 255
, 1997
"... Interpretation Germ'an Puebla John Gallagher y Manuel Hermenegildo (Extended Abstract) 1 Introduction Partial evaluation [JGS93, DGT96] specializes programs for known values of the input. Partial evaluation of logic programs has received considerable attention [Neu90, LS91, Sah93, Gal93, Le ..."
Abstract
-
Cited by 12 (1 self)
- Add to MetaCart
Interpretation Germ'an Puebla John Gallagher y Manuel Hermenegildo (Extended Abstract) 1 Introduction Partial evaluation [JGS93, DGT96] specializes programs for known values of the input. Partial evaluation of logic programs has received considerable attention [Neu90, LS91, Sah93, Gal93, Leu97] and several algorithms parameterized by different control strategies have been proposed which produce useful partial evaluations of programs. Regarding the correctness of such transformations, two conditions, defined on the set of atoms to be partially evaluated, have been identified which which ensure correctness of the transformation: "closedness" and "independence" [LS91]. From a practical point of view, effectiveness, that is, finding suitable control strategies which provide an appropriate level of specialization while ensuring termination, is a crucial problem which has also received considerable attention. Much work has been devoted to the study of such control strategies in the ...

