|
ABSTRACT
Languages that integrate functional and logic programming with a complete operational semantics are based on narrowing, a unification-based goal-solving mechanism which subsumes the reduction principle of functional languages and the resolution principle of logic languages. In this article, we present a partial evaluation scheme for functional logic languages based on an automatic unfolding algorithm which builds narrowing trees. The method is formalized within the theoretical framework established by Lloyd and Shepherdson for the partial deduction of logic programs, which we have generalized for dealing with functional computations. A generic specialization algorithm is proposed which does not depend on the eager or lazy nature of the narrower being used. To the best of our knowledge, this is the first generic algorithm for the specialization of functional logic programs. We also discuss the relation to work on partial evaluation in functional programming, term-rewriting systems, and logic programming. Finally, we present some experimental results with an implementation of the algorithm which show in practice that the narrowing-driven partial evaluator effectively combines the propagation of partial data structures (by means of logical variables and unification) with better opportunities for optimization (thanks to the functional dimension).
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
1
|
|
| |
2
|
ALBERT, E., ALPUENTE, M., FALASCHI, M., AND VIDAL, G. 1998. INDY user's manual. Tech. Rep. DSIC-II/12/98, UPV. Available from URL: http://www, dsic. upv. es/users/elp/papers, html.
|
 |
3
|
M. Alpuente , M. Falaschi , P. Julián , G. Vidal, Specialization of lazy functional logic programs, Proceedings of the 1997 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation, p.151-162, June 12-13, 1997, Amsterdam, The Netherlands
|
| |
4
|
|
| |
5
|
|
| |
6
|
|
| |
7
|
ALPUENTE, M., FALASCHI, M.,AND VIDAL, G. 1998a.Experiments with the callby-value partial evaluator.Tech. Rep. DSIC-II/13/98, UPV. Available from http://www, dsic. upv. es/users/elp/papers, html.
|
 |
8
|
|
 |
9
|
Sergio Antoy , Rachid Echahed , Michael Hanus, A needed narrowing strategy, Proceedings of the 21st ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.268-279, January 16-19, 1994, Portland, Oregon, United States
[doi> 10.1145/174675.177899]
|
| |
10
|
|
| |
11
|
|
| |
12
|
|
| |
13
|
BENKERIMI, I~. AND HILL, P. 1993. Supporting transformations for the partial evaluation of logic programs. J. Logic Comput. 3, 5, 469-486.
|
| |
14
|
|
| |
15
|
|
| |
16
|
|
| |
17
|
|
| |
18
|
BOL, R. 1993. Loop checking in partial deduction. J. Logic Program. 16, 1&2, 25-46.
|
| |
19
|
BONACINA, M. 1988. Partial evaluation by completion. In Conferenza dell'Associazione Italiana per il Calcolo Automatico, G. Italiani et al., Ed.
|
| |
20
|
BONDORF, t. 1988. Towards a self-applicable partial evaluator for term rewriting systems. In Proceedings of the International Workshop on Partial Evaluation and Mixed Computation, D. Bj0rner, A. Ershov, and N. Jones, Eds. North-Holland, Amsterdam, 27-50.
|
| |
21
|
|
| |
22
|
BossI, t., GABBRIELLI, M., LEVI, G., AND MARTELLI, M. 1994. The s-semantics approach: Theory and applications. J. Logic Program. 19-20, 149-197.
|
| |
23
|
BOWEN, K. AND KOWALSKI, R. 1982. Amalgamating language and metalanguage in logic programruing. In Logic Programming, K. Clark and S. Tgrnlund, Eds. Academic Press, New York, 153-172.
|
| |
24
|
BRUYNOOGHE, M., DE SCHREYE, D., AND MARTENS, B. 1992. A general criterion for avoiding infinite unfolding. New Gen. Comput. 11, 1, 47-79.
|
 |
25
|
|
| |
26
|
|
 |
27
|
|
 |
28
|
|
 |
29
|
|
| |
30
|
DARLINGTON, J. 1982. Program transformations. In Functional Programming and Its Applications, J. Darlington, P. Henderson, and D. A. Turner, Eds. Cambridge University Press, Cambridge, U.K., 193-215.
|
| |
31
|
DARLINGTON, J. AND PULL, H. 1988. A program development methodology based on a unified approach to execution and transformation. In Proceedings of the International Workshop on Partial Evaluation and Mixed Computation, D. Bj0rner, A. Ershov, and N. Jones, Eds. North- Holland, Amsterdam, 117-131.
|
| |
32
|
DERSHOWITZ, N. 1995. Goal solving as operational semantics. In Proceedings of the 1995 International Logic Programming Symposium, J. Lloyd, Ed. The MIT Press, Cambridge, MA, 3-17.
|
| |
33
|
|
| |
34
|
DERSHOWITZ, N. AND JOUANNAUD, J.-P. 1991. Notations for rewriting. Bull. Euro. Assoc. Theor. Comp. Sci. 43, 162-172.
|
| |
35
|
|
| |
36
|
|
| |
37
|
FERNANDEZ, M. 1992. Narrowing based procedures for equational disunification. Appl. Alg. Eng. Commun. Comput. 3, 1-26.
|
| |
38
|
FRIBOURG, L. 1985. SLOG: A logic programming language interpreter based on clausal superposition and rewriting. In Proceedings of the 2nd IEEE International Symposium on Logic Programming. IEEE Press, New York, 172-185.
|
 |
39
|
|
| |
40
|
CJALLAGHER, J. AND BRUYNOOGHE, M. 1990. Some low-level source transformations for logic programs. In Proceedings of the 2nd Workshop on Meta-Programming in Logic, M. Bruynooghe, Ed. Department of Computer Science, KU Leuven, Belgium, 229-246.
|
| |
41
|
|
| |
42
|
|
| |
43
|
|
| |
44
|
Robert Glück , Jesper Jørgensen , Bern Martens , Morten Heine Sørensen, Controlling Conjunctive Partial Deduction, Proceedings of the 8th International Symposium on Programming Languages: Implementations, Logics, and Programs, p.152-166, September 24-27, 1996
|
| |
45
|
|
| |
46
|
|
| |
47
|
|
| |
48
|
|
| |
49
|
HANUS, M. 1994b. The integration of functions into logic programming: From theory to practice. J. Logic Program. 19~20, 583-628.
|
| |
50
|
HANUS, M. 1995. On extra variables in (equational) logic programming. In Proceedings of the 20th International Conference on Logic Programming. The MIT Press, Cambridge, MA, 665-678.
|
| |
51
|
HANUS, M., KUCHEN, H., AND MORENO-NAVARRO, J. 1995. Curry: A truly functional logic language. In Proceedings of the ILPS'95 Workshop on Visions for the Future of Logic Programming. 95-107.
|
| |
52
|
HERMENEGILDO, M. AND ROSSI, F. 1989. On the correctness and efficiency of independent Andparallelism in logic programs. In Proceedings of the 1989 North American Conference on Logic Programming, E. Lusk and R. Overbeck, Eds. The MIT Press, Cambridge, MA, 369-389.
|
| |
53
|
|
| |
54
|
|
| |
55
|
|
 |
56
|
|
| |
57
|
JONES, N. 1994. The essence of program transformation by partial evaluation and driving. In Logic, Language and Computation, N. Jones, M. Hagiya, and M. Sato, Eds. Lecture Notes in Computer Science, vol. 792. Springer-Verlag, Berlin, 206-224.
|
| |
58
|
|
| |
59
|
|
| |
60
|
|
 |
61
|
|
| |
62
|
|
| |
63
|
|
| |
64
|
LAM, J. AND I~USALIK, t. 1991. A comparative analysis of partial deductors for pure Prolog. Tech. rep., Department of Computational Science, University of Saskatchewan, Canada. Revised April 1991.
|
| |
65
|
|
| |
66
|
LEUSCHEL, M. 1998. The ECCE partial deduction system and the DPPD library of benchmarks. Tech. rep., Accessible via http ://www. cs. kuleuven, ac. be/~ipai.
|
| |
67
|
LEUSCHEL, M., DE SCHREYE, D., AND DE WAAL, A. 1996. A conceptual embedding of folding into partial deduction: Towards a maximal integration. In Proceedings of the Joint International Conference and Symposium on Logic Programming, JICSLP'96, M. Maher, Ed. The MIT Press, Cambridge, MA, 319-332.
|
| |
68
|
|
 |
69
|
|
| |
70
|
LEVI, G. AND SIROVICH, F. 1975. Proving program properties, symbolic evaluation and logical procedural semantics. In Proceedings of the ~th International Symposium on Mathematical Foundations of Computer Science, MFCS'75. Lecture Notes in Computer Science, vol. 32. Springer-Verlag, Berlin, 294-301.
|
| |
71
|
|
| |
72
|
MARTENS, B. AND GALLAGHER, J. 1995. Ensuring global termination of partial deduction while allowing flexible polyvariance. In Proceedings of the 12th International Conference on Logic Programming, L. Sterling, Ed. The MIT Press, Cambridge, MA, 597-611.
|
| |
73
|
MIDDELDORP, A. AND HAMOEN, E. 1994. Completeness results for basic narrowing. Appl. Alg. Eng. Commun. Comput. 5, 213-253.
|
| |
74
|
|
| |
75
|
|
| |
76
|
|
| |
77
|
|
| |
78
|
|
| |
79
|
|
| |
80
|
PETTOROSSI, t. AND PROIETTI, M. 1994. Transformation of logic programs: Foundations and techniques. J. Logic Program. 19,20, 261-320.
|
| |
81
|
|
| |
82
|
|
| |
83
|
REDDY, U. 1985. Narrowing as the operational semantics of functional languages. In Proceedings of 2nd IEEE International Symposium on Logic Programming. IEEE Press, New York, 138-151.
|
| |
84
|
|
 |
85
|
|
 |
86
|
|
 |
87
|
|
 |
88
|
|
| |
89
|
SORENSEN, M. 1994. Turchin's supercompiler revisited: An operational theory of positive information propagation. Tech. Rep. 94//7, Master's Thesis, DIKU, University of Copenhagen, Denmark.
|
| |
90
|
SORENSEN, M. AND GLUCK, R. 1995. An algorithm of generalization in positive supercompilation. In Proceedings of the 1995 International Logic Programming Symposium, J. Lloyd, Ed. The MIT Press, Cambridge, MA, 465-479.
|
| |
91
|
Morten Heine Sørensen , Robert Glück , Neil D. Jones, Towards Unifying Partial Evaluation, Deforestation, Supercompilation, and GPC, Proceedings of the 5th European Symposium on Programming: Programming Languages and Systems, p.485-500, April 11-13, 1994
|
| |
92
|
SORENSEN, M., GL/JCK, R., AND JONES, N. 1996. A positive supercompiler. J. Fttnct. Program. 6, 6, 811-838.
|
| |
93
|
|
 |
94
|
|
| |
95
|
TURCHIN, V. 1988. The algorithm of generalization in the supercompiler. In Proceedings of the International Workshop on Partial Evaluation and Mixed Computation, D. Bjorner, A. Ershov, and N. Jones, Eds. North-Holland, Amsterdam, 531-549.
|
| |
96
|
|
| |
97
|
VIDAL, G. 1996. Semantics-based analysis and transformation of functional logic programs. Ph.D. thesis, DSIC, Universidad Polit6cnica de Valencia, Spain. In spanish.
|
| |
98
|
|
Peer to Peer - Readers of this Article have also read:
-
Data structures for quadtree approximation and compression
Communications of the ACM
28, 9
Hanan Samet
-
A hierarchical single-key-lock access control using the Chinese remainder theorem
Proceedings of the 1992 ACM/SIGAPP Symposium on Applied computing
Kim S. Lee
, Huizhu Lu
, D. D. Fisher
-
An intelligent component database for behavioral synthesis
Proceedings of the 27th ACM/IEEE conference on Design automation
Gwo-Dong Chen
, Daniel D. Gajski
-
The GemStone object database management system
Communications of the ACM
34, 10
Paul Butterworth
, Allen Otis
, Jacob Stein
-
Putting innovation to work: adoption strategies for multimedia communication systems
Communications of the ACM
34, 12
Ellen Francik
, Susan Ehrlich Rudman
, Donna Cooper
, Stephen Levine
|