Download:
|
by M. Alpuente, M. Falaschi, G. Vidal
http://snake.cs.tu-berlin.de:8081/~chak/mplp/proc/alpuente.ps.gz
Add To MetaCart
Abstract:
Partial evaluation is a method for program specialization based on fold/unfold transformations [4, 15]. Partial evaluation of functional programs uses only static values of given data to specialize the program. In logic programming, the so-called static/dynamic distinction is hardly present, whereas considerations of determinacy and choice points are far more important for control [7]. In this paper, we formalize a two-phase specialization method for a non-strict functional logic language which makes use of (normalizing) lazy narrowing to specialize the program w.r.t. a goal. The basic algorithm (rst phase) is formalized as an instance of the framework for the partial evaluation of functional logic programs of [2], using lazy narrowing. However, the results inherited by [2] mainly regard the termination of the PE method, while the (strong) soundness and completeness results must be restated for the lazy strategy. A post-processing renaming scheme (second phase) for obtaining independence is then described and illustrated on the well-known matching example. We show that our method preserves the lazy narrowing semantics and that the inclusion of simplication steps in narrowing derivations can greatly improve control during specialization. 1
Citations
|
722
|
Rewrite systems
– Dershowitz, Jouannaud
- 1990
|
|
579
|
Term rewriting systems
– Klop
- 1992
|
|
552
|
Partial evaluation and automatic program generation
– Jones, Gomard, et al.
- 1993
|
|
529
|
A transformation system for developing recursive programs
– Burstall, Darlington
- 1977
|
|
447
|
Fast pattern matching in strings
– Knuth, Morris, et al.
- 1977
|
|
366
|
Deforestation: Transforming programs to eliminate trees
– Wadler
- 1988
|
|
333
|
The integration of functions into logic programming: from theory to practice
– Hanus
- 1994
|
|
288
|
M.: A needed narrowing strategy
– Antoy, Echahed, et al.
- 2000
|
|
231
|
C.: Partial Evaluation in Logic Programming
– Lloyd, Shepherdson
- 1991
|
|
213
|
Unification Revisited
– Lassez, Maher, et al.
- 1988
|
|
176
|
Logic Programming with Functions and Predicates: The Language BABEL
– Moreno-Navarro, Rodríguez-Artalejo
- 1992
|
|
144
|
Tutorial on specialisation of logic programs
– Gallagher
- 1993
|
|
102
|
M.: A demand driven computation strategy for lazy narrowing
– Loogen, López-Fraguas, et al.
- 1993
|
|
101
|
Narrowing as the Operational Semantics of Functional Languages
– Reddy
- 1985
|
|
89
|
Slog: a logic programming language interpreter based on clausal superposition and rewriting
– Fribourg
- 1985
|
|
77
|
Narrowing-driven partial evaluation of functional logic programs
– Alpuente, Falaschi, et al.
- 1996
|
|
63
|
Ensuring Global Termination of Partial Deduction while Allowing Flexible Polyvariance
– Martens, Gallagher
- 1995
|
|
36
|
Graph-based Implementation of a Functional Logic Language
– Kuchen, Loogen, et al.
- 1990
|
|
27
|
The Essence of Program Transformation by Partial Evaluation and Driving
– Jones
- 1994
|
|
25
|
A Deterministic Lazy Narrowing Calculus
– Middeldorp, Okui
- 1998
|
|
20
|
Unification in Conditional-Equational Theories
– Hussmann
- 1985
|
|
20
|
A positive supercompiler
– Srensen, Gluck, et al.
- 1996
|
|
7
|
Canonical forms and unication
– Hullot
- 1980
|
|
2
|
Turchin's Supercompiler Revisited
– Srensen
- 1994
|
|
1
|
Partial Deduction and Driving are Equivalent
– Glck, Srensen
- 1994
|
|
1
|
Combining Lazy Narrowing with Simplication
– Hanus
|
|
1
|
Foundations of Equational Logic Programming
– Hlldobler
- 1989
|