Abstract
Declarative programming languages, are high-level programming languages in which one only has to state what is to be computed and not necessarily how it is to be computed. Logic programming and functional programming are two prominent members of this class of programming languages. While functional programming is based on the λ-calculus, logic programming has its roots in first-order logic and automated theorem proving. Both approaches share the view that a program is a theory and execution consists in performing deduction from that theory.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
E. Albert, M. Alpuente, M. Falaschi, P. Julián and G. Vidal. Improving Control in Functional Logic Program Specialization. In G. Levi, editor, Static Analysis. Proceedings of SAS’98, LNCS 1503, pages 262–277, Pisa, Italy, September 1998. Springer-Verlag.
M. Alpuente, M. Falaschi, and G. Vidal. Narrowing-driven partial evaluation of functional logic programs. In H. Riis Nielson, editor, Proceedings of the 6th European Symposium on Programming, ESOP’96, LNCS 1058, pages 45–61. Springer-Verlag, 1996.
L. O. Andersen. Partial evaluation of C and automatic compiler generation. In U. Kastens and P. Pfahler, editors, 4th International Conference on Compiler Construction, LNCS 641, pages 251–257, Paderborn, Germany, 1992. Springer-Verlag.
L. O. Andersen. Program Analysis and Specialization for the C Programming Language. PhD thesis, DIKU, University of Copenhagen, May 1994. (DIKU report 94/19).
K. R. Apt. Introduction to logic programming. In J. van Leeuwen, editor, Handbook of Theoretical Computer Science, chapter 10, pages 495–574. North-Holland Amsterdam, 1990.
K. R. Apt. From Logic Programming to Prolog. Prentice Hall, 1997.
K. R. Apt and R. N. Bol. Logic programming and negation: A survey. The Journal of Logic Programming, 19 & 20:9–72, May 1994.
K. R. Apt and H. Doets. A new definition of SLDNF-resolution. The Journal of Logic Programming, 8:177–190, 1994.
K. R. Apt and M. H. van Emden. Contributions to the theory of logic programming. Journal of the ACM, 29(3):841–862, 1982.
K. Benkerimi and P. M. Hill. Supporting transformations for the partial evaluation of logic programs. Journal of Logic and Computation, 3(5):469–486, October 1993.
K. Benkerimi and J. W. Lloyd. A partial evaluation procedure for logic programs. In S. Debray and M. Hermenegildo, editors, Proceedings of the North American Conference on Logic Programming, pages 343–358. MIT Press, 1990.
R. Bol. Loop checking in partial deduction. The Journal of Logic Programming, 16(1&2):25–46, 1993.
A. Bondorf. Towards a self-applicable partial evaluator for term rewriting systems. In D. Bjørner, A. P. Ershov, and N. D. Jones, editors, Partial Evaluation and Mixed Computation, pages 27–50. North-Holland, 1988.
A. Bondorf. A self-applicable partial evaluator for term rewriting systems. In J. Diaz and F. Orejas, editors, TAPSOFT’89, Proceedings of the International Joint Conference on Theory and Practice of Software Development, LNCS 352, pages 81–96, Barcelona, Spain, March 1989. Springer-Verlag.
A. Bossi and N. Cocco. Preserving universal termination through unfold/fold. In G. Levi and M. Rodriguez-Artalejo, editors, Proceedings of the Fourth International Conference on Algebraic and Logic Programming, LNCS 850, pages 269–286, Madrid, Spain, 1994. Springer-Verlag.
A. Bossi, N. Cocco, and S. Dulli. A method for specialising logic programs. ACM Transactions on Programming Languages and Systems, 12(2):253–302, 1990.
A. Bossi, N. Cocco, and S. Etalle. Transformation of left terminating programs: The reordering problem. In M. Proietti, editor, Logic Program Synthesis and Transformation. Proceedings of LOPSTR’95, LNCS 1048, pages 33–45, Utrecht, The Netherlands, September 1995. Springer-Verlag.
M. Bruynooghe, D. De Schreye, and B. Martens. A general criterion for avoiding infinite unfolding during partial deduction. New Generation Computing, 11(1):47–79, 1992.
R. M. Burstall and J. Darlington. A transformation system for developing recursive programs. Journal of the ACM, 24(1):44–67, 1977.
D. Chan. Constructive negation based on the completed database. In Proceedings of the Joint International Conference and Symposium on Logic Programming, pages 111–125, Seattle, 1988. IEEE, MIT Press.
D. Chan and M. Wallace. A treatment of negation during partial evaluation. In H. Abramson and M. Rogers, editors, Meta-Programming in Logic Programming, Proceedings of the Meta88 Workshop, June 1988, pages 299–318. MIT Press, 1989.
K. L. Clark. Negation as failure. In H. Gallaire and J. Minker, editors, Logic and Data Bases, pages 293–322. Plenum Press, 1978.
W. Clocksin and C. Mellish. Programming in Prolog (Third Edition). Springer-Verlag, 1987.
C. Consel and O. Danvy. Tutorial notes on partial evaluation. In Proceedings of ACM Symposium on Principles of Programming Languages (POPL≐93), Charleston, South Carolina, January 1993. ACM Press.
D. De Schreye and S. Decorte. Termination of logic programs: The never ending story. The Journal of Logic Programming, 19 & 20:199–260, May 1994.
D. De Schreye, M. Leuschel, and B. Martens. Tutorial on program specialisation (abstract). In J. W. Lloyd, editor, Proceedings of ILPS’95, the International Logic Programming Symposium, Portland, USA, December 1995. MIT Press.
M. Denecker. Knowledge Representation and Reasoning in Incomplete Logic Programming. PhD thesis, Department of Computer Science, K.U.Leuven, 1993.
P. Derensart, A. Ed-Dbali, and L. Cervoni. Prolog: The Standard, Reference Manual. Springer-Verlag, 1996.
N. Dershowitz. Termination of rewriting. Journal of Symbolic Computation, 3:69–116, 1987.
N. Dershowitz and J.-P. Jouannaud. Rewrite systems. In J. van Leeuwen, editor, Handbook of Theoretical Computer Science, Vol. B, pages 243–320. Elsevier, MIT Press, 1990.
N. Dershowitz and Z. Manna. Proving termination with multiset orderings. Communications of the ACM, 22(8):465–476, 1979.
K. Doets. Levationis laus. Journal of Logic and Computation, 3(5):487–516, 1993.
K. Doets. Prom Logic to Logic Programming. MIT Press, 1994.
W. Drabent. What is failure ? An apporach to constructive negation. Acta Informatica, 32:27–59, 1995.
A. Ershov. Mixed computation: Potential applications and problems for study. Theoretical Computer Science, 18:41–67, 1982.
M. Fitting. First-Order Logic and Automated Theorem Proving. Springer-Verlag, 1990.
H. Pujita and K. Purukawa. A self-applicable partial evaluator and its use in incremental compilation. New Generation Computing, 6(2 & 3):91–118, 1988.
D. A. Puller and S. Abramsky. Mixed computation of prolog programs. New Generation Computing, 6(2 & 3):119–141, June 1988.
J. Gallagher. A system for specialising logic programs. Technical Report TR-91-32, University of Bristol, November 1991.
J. Gallagher. Tutorial on specialisation of logic programs. In Proceedings of PEPM’93, the ACM Sigplan Symposium on Partial Evaluation and Semantics-Based Program Manipulation, pages 88–98. ACM Press, 1993.
J. Gallagher and M. Bruynooghe. The derivation of an algorithm for program specialisation. New Generation Computing, 9(3 & 4):305–333, 1991.
R. Glück and M. H. Sørensen. Partial deduction and driving are equivalent. In M. Hermenegildo and J. Penjam, editors, Programming Language Implementation and Logic Programming. Proceedings, Proceedings of PLILP’94, LNCS 844, pages 165–181, Madrid, Spain, 1994. Springer-Verlag.
R. Glück and M. H. Sørensen. A roadmap to supercompilation. In O. Danvy, R. Glück, and P. Thiemann, editors, Proceedings of the 1996 Dagstuhl Seminar on Partial Evaluation, LNCS 1110, pages 137–160, Schloß Dagstuhl, 1996. Springer-Verlag.
C. A. Gurr. A Self-Applicable Partial Evaluator for the Logic Programming Language Gödel. PhD thesis, Department of Computer Science, University of Bristol, January 1994.
J. Herbrand. Investigations in proof theory. In J. van Heijenoort, editor, From Frege to Gödel: A Source Book in Mathematical Logic, 1879–1931, pages 525–581. Harvard University Press, 1967.
G. Higman. Ordering by divisibility in abstract algebras. Proceedings of the London Mathematical Society, 2:326–336, 1952.
P. Hill and J. W. Lloyd. The Gödel Programming Language. MIT Press, 1994.
J.-M. Jacquet. Constructing Logic Programs. Wiley, Chichester, 1993.
N. D. Jones. The essence of program transformation by partial evaluation and driving. In M. S. Neil D. Jones, Masami Hagiya, editor, Logic, Language and Computation, LNCS 792, pages 206–224. Springer-Verlag, 1994.
N. D. Jones. An introduction to partial evaluation. ACM Computing Surveys, 28(3):480–503, September 1996.
N. D. Jones, C. K. Gomard, and P. Sestoft. Partial Evaluation and Automatic Program Generation. Prentice Hall, 1993.
S. Kleene. Introduction to Metamathematics. van Nostrand, Princeton, New Jersey, 1952.
H.-P. Ko and M. E. Nadel. Substitution and refutation revisited. In K. Purukawa, editor, Logic Programming: Proceedings of the Eighth International Conference, pages 679–692. MIT Press, 1991.
J. Komorowski. Partial evaluation as a means for inferencing data structures in an applicative language: a theory and implementation in the case of Prolog. In Ninth Annual ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages. Albuquerque, New Mexico, pages 255–267, 1982.
J. Komorowski. An introduction to partial deduction. In A. Pettorossi, editor, Proceedings Meta’92, LNCS 649, pages 49–69. Springer-Verlag, 1992.
R. Kowalski. Predicate logic as a programming language. In Proceedings IFIP Congress, pages 569–574. IEEE, 1974.
J. B. Kruskal. Well-quasi ordering, the tree theorem, and Vazsonyi’s conjecture. Transactions of the American Mathematical Society, 95:210–225, 1960.
L. Lafave and J. Gallagher. Constraint-based partial evaluation of rewriting-based functional logic programs. In N. Fuchs, editor, Proceedings of the International Workshop on Logic Program Synthesis and Transformation (LOPSTR’97), LNCS 1463, Leuven, Belgium, July 1998.
J.-L. Lassez, M. Maher, and K. Marriott. Unification revisited. In J. Minker, editor, Foundations of Deductive Databases and Logic Programming, pages 587–625. Morgan-Kaufmann, 1988.
M. Leuschel. Advanced Logic Program Specialisation. In J. Hatcliff, T. Mogensen, and P. Thiemann, editors, DIKU 1998 International Summerschool on Partial Evaluation, LNCS 1706, pages 271–292, Copenhagen, Denmark, July 1998. Springer-Verlag. In this volume.
M. Leuschel. On the power of homeomorphic embedding for online termination. In G. Levi, editor, Static Analysis. Proceedings of SAS’98, LNCS 1503, pages 230–245, Pisa, Italy, September 1998. Springer-Verlag.
M. Leuschel and D. De Schreye. Towards creating specialised integrity checks through partial evaluation of meta-interpreters. In Proceedings of PEPM’95, the ACM Sigplan Symposium on Partial Evaluation and Semantics-Based Program Manipulation, pages 253–263, La Jolla, California, June 1995. ACM Press.
M. Leuschel and D. De Schreye. Constrained partial deduction and the preservation of characteristic trees. New Generation Computing, 16(3):283–342, 1998.
M. Leuschel and D. De Schreye. Creating specialised integrity checks through partial evaluation of meta-interpreters. The Journal of Logic Programming, 36:149–193, 1998.
M. Leuschel, B. Martens, and D. De Schreye. Controlling generalisation and polyvariance in partial deduction of normal logic programs. ACM Transactions on Programming Languages and Systems, 20(1):208–258, January 1998.
M. Leuschel, B. Martens, and K. Sagonas. Preserving termination of tabled logic programs while unfolding. In N. Fuchs, editor, Proceedings of the International Workshop on Logic Program Synthesis and Transformation (LOPSTR’97), LNCS 1463, Leuven, Belgium, July 1998.
M. Leuschel and M. H. Sørensen. Redundant argument filtering of logic programs. In J. Gallagher, editor, Proceedings of the International Workshop on Logic Program Synthesis and Transformation (LOPSTR’96), LNCS 1207, pages 83–103, Stockholm, Sweden, August 1996. Springer-Verlag.
J. W. Lloyd. Foundations of Logic Programming. Springer-Verlag, 1987.
J. W. Lloyd and J. C. Shepherdson. Partial evaluation in logic programming. The Journal of Logic Programming, 11(3& 4):217–242, 1991.
A. Martelli and U. Montanari. An efficient unification algorithm. ACM Transactions on Programming Languages and Systems, 4(2):258–282, April 1982.
B. Martens. On the Semantics of Meta-Programming and the Control of Partial Deduction in Logic Programming. PhD thesis, K.U. Leuven, February 1994.
B. Martens and D. De Schreye. Automatic finite unfolding using well-founded measures. The Journal of Logic Programming, 28(2):89–146, August 1996.
B. Martens, D. De Schreye, and T. Horváth. Sound and complete partial deduction with unfolding based on well-founded measures. Theoretical Computer Science, 122(1–2):97–117, 1994.
B. Martens and J. Gallagher. Ensuring global termination of partial deduction while allowing flexible polyvariance. In L. Sterling, editor, Proceedings ICLP’95, pages 597–613, Kanagawa, Japan, June 1995. MIT Press.
A. Miniuissi and D. J. Sherman. Squeezing intermediate construction in equational programs. In O. Danvy, R. Glück, and P. Thiemann, editors, Proceedings of the 1996 Dagstuhl Seminar on Partial Evaluation, LNCS 1110, pages 284–302, Schloß Dagstuhl, 1996. Springer-Verlag.
T. Mogensen and A. Bondorf. Logimix: A self-applicable partial evaluator for Prolog. In K.-K. Lau and T. Clement, editors, Logic Program Synthesis and Transformation. Proceedings of LOPSTR’92, pages 214–227. Springer-Verlag, 1992.
L. Naish. Higher-order logic programming in Prolog. Technical Report 96/2, Department of Computer Science, University of Melbourne, 1995.
U. Nilsson and J. Małuszyński. Logic, Programming and Prolog. Wiley, Chichester, 1990.
S. Owen. Issues in the partial evaluation of meta-interpreters. In H. Abramson and M. Rogers, editors, Meta-Programming in Logic Programming, Proceedings of the Meta88 Workshop, June 1988, pages 319–339. MIT Press, 1989.
M. Paterson and M. Wegman. Linear unification. Journal of Computer and System Sciences, 16(2):158–167, 1978.
A. Pettorossi and M. Proietti. Transformation of logic programs: Foundations and techniques. The Journal of Logic Programming, 19&20:261–320, May 1994.
S. Prestwich. An unfold rule for full Prolog. In K.-K. Lau and T. Clement, editors, Logic Program Synthesis and Transformation. Proceedings of LOPSTR’92, Workshops in Computing, pages 199–213, University of Manchester, 1992. Springer-Verlag.
M. Proietti and A. Pettorossi. Semantics preserving transformation rules for Prolog. In Proceedings of the ACM Symposium on Partial Evaluation and Semantics based Program Manipulation, PEPM’91, Sigplan Notices, Vol. 26, N. 9, pages 274–284, Yale University, New Haven, U.S.A., 1991.
M. Proietti and A. Pettorossi. The loop absorption and the generalization strategies for the development of logic programs and partial deduction. The Journal of Logic Programming, 16(1 & 2):123–162, May 1993.
T. C. Przymusinksi. On the declarative and procedural semantics of logic programs. Journal of Automated Reasoning, 5(2):167–205, 1989.
R. Reiter. On closed world data bases. In H. Gallaire and J. Minker, editors, Logic and Data Bases, pages 55–76. Plenum Press, 1978.
A. Robinson. A machine-oriented logic based on the resolution principle. Journal of the ACM, 12(1):23–41, 1965.
D. Sahlin. Mixtus: An automatic partial evaluator for full Prolog. New Generation Computing, 12(1):7–51, 1993.
J. C. Shepherdson. Language and equality theory in logic programming. Technical Report PM-91-02, University of Bristol, 1991.
M. H. Sørensen and R. Glück. Introduction to Supercompilation. In J. Hatcliff, T. Mogensen, and P. Thiemann, editors, DIKU 1998 International Summerschool on Partial Evaluation, LNCS 1706, pages 246–270, Copenhagen, Denmark, July 1998. Springer-Verlag. In this volume.
M. H. Sørensen and R. Glück. An algorithm of generalization in positive supercompilation. In J. W. Lloyd, editor, Proceedings of ILPS’95, the International Logic Programming Symposium, pages 465–479, Portland, USA, December 1995. MIT Press.
M. H. Sørensen, R. Glück, and N. D. Jones. Towards unifying partial evaluation, deforestation, supercompilation, and GPC. In D. Sannella, editor, Programming Languages and Systems — ESOP’ 94. Proceedings, LNCS 788, pages 485–500, Edinburgh, Scotland, 1994. Springer-Verlag.
M. H. Sørensen, R. Glück, and N. D. Jones. A positive supercompiler. Journal of Functional Programming, 6(6):811–838, 1996.
L. Sterling and R. D. Beer. Metainterpreters for expert system construction. The Journal of Logic Programming, 6(1 & 2):163–178, 1989.
L. Sterling and E. Shapiro. The Art of Prolog. MIT Press, 1986.
P. J. Stuckey. Constructive negation for constraint logic programming. In Proceedings, Sixth Annual IEEE Symposium on Logic in Computer Science, pages 328–339, Amsterdam, The Netherlands, July 1991. IEEE Computer Society Press.
P. J. Stuckey. Negation and constraint logic programming. Information and Computation, 118(1):12–33, April 1995.
V. F. Turchin. The concept of a supercompiler. ACM Transactions on Programming Languages and Systems, 8(3):292–325, 1986.
D. H. D. Warren. Higher-order extensions to Prolog: Are they needed? In J. E. Hayes, D. Michie, and Y.-H. Pao, editors, Machine Intelligence 10, pages 441–454. Ellis Horwood Ltd., Chicester, England, 1982.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 1999 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Leuschel, M. (1999). Logic Program Specialisation. In: Hatcliff, J., Mogensen, T.Æ., Thiemann, P. (eds) Partial Evaluation. DIKU 1998. Lecture Notes in Computer Science, vol 1706. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-47018-2_5
Download citation
DOI: https://doi.org/10.1007/3-540-47018-2_5
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-66710-0
Online ISBN: 978-3-540-47018-2
eBook Packages: Springer Book Archive