Abstract
A meta-level extension of a logic programming language is presented. The resulting language, called 'LOG (read quote-log), provides meta-programming facilities similar to those of Prolog while preserving a declarative logical semantics. It also offers new meta-programming opportunities as compared with Prolog due to its ability to treat whole programs, i.e. sequences of clauses, as data objects. The extension basically consists in defining a suitable naming scheme. It associates two different but related meta-representations with every syntactic object of the language, from characters to programs. The choice of the double metarepresentation is motivated by both the user and the implementation viewpoints. All Prolog built-in meta-predicates can be redefined as 'LOG programs by exploiting the new naming scheme. Then some syntactic sugar is added to make the language more concrete. Some examples are given, in particular to show the ability of the language to deal with programs as data.
Work partially supported by M.U.R.S.T. 40% and C.N.R. — Progetto Finalizzato Sistemi Informatici e Calcolo Parallelo”, grant no. 890002369.
This is a preview of subscription content, log in via an institution.
Preview
Unable to display preview. Download preview PDF.
References
J. Barklund: What is a Meta-variable in Prolog?. In: H.D. Abramson and M.H. Rogers (eds.): Meta-Programming in Logic Programming: Proceedings of the META88 Workshop, Bristol. MIT Press, 1990, pp. 383–398.
K.A. Bowen: Meta-Level Programming and Knowledge Representation. New Generation Computing 3, 1985, pp. 359–383.
K.A. Bowen, R.A. Kowalski: Amalgamating Language and Metalanguage in Logic Programming. In: K.L. Clark, S.A. Tärnlund (eds.): Logic Programming. Academic Press, 1982, pp. 153–172.
K.A. Bowen, T. Weinberg: A Meta-Level Extension of Prolog. In: IEEE Symposium on Logic Programming, Boston, 1985, pp. 669–675.
S. Costantini, G.A. Lanzarone: A Metalogic Programming Language. In: G. Levi, M. Martelli (eds.): Logic Programming: Proceedings of the 6th International Conference, Lisbon. MIT Press, 1989, pp. 218–233.
P.M. Hill, J.W. Lloyd: The Gödel Report (Preliminary Version). Technical Report TR-91-02, Department of Computer Science, University of Bristol, March 1991.
J. Jaffar, J.L. Lassez: Constraint Logic Programming. In: Proceedings of the 14th POPL Conference, Munich. ACM, 1987, pp. 111–118.
P. Lim, PJ. Stuckey: Meta-Programming as Constraint Programming. In: S. Debray, M. Hermenegildo (eds.): Logic Programming: Proceedings of the 1990 North American Conference on Logic Programming, Jerusalem. MIT Press, 1990, pp. 416–430.
J.W. Lloyd: Foundations of Logic Programming. Springer Verlag, 2nd ed., 1987.
A. Martelli, G.F. Rossi: Enhancing Prolog to Support Prolog Programming Environments. In: H. Ganzinger (ed.): ESOP'88: 2nd European Symposium on Programming, Nancy. Lecture Notes in Computer Science 300, Springer Verlag, 1988, pp. 317–327.
G.F. Rossi: Meta-programming Facilities in an Extended Prolog. In: I. Plander (ed.): Artificial Intelligence and Information-Control Systems of Robots-89, North Holland, 1989
G.F. Rossi: Programs as Data in an Extended Prolog. To appear in: The Computer Journal, British Computer Society, 1992.
S. Safra, E. Shapiro: Meta-interpreters for Real. In H-J. Kugler, (ed.): Information Processing 86, North-Holland, 1986, pp. 271–278.
L. Sterling, A. Lakhotia: Composing Prolog Meta-interpreters. In: R.A. Kowalski, K.A. Bowen (eds.): Logic Programming: Proceedings of the 5th International Conference and Symposium, Seattle, MIT Press, 1988, pp. 386–403.
H. Sugano H.: Meta and Reflective Computation in Logic Programming and Its Semantics. In: M. Bruynooghe (ed.): META90: 2nd Workshop on MetaProgramming in Logic Programming, Leuven, 1990, pp. 19–34.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1992 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Cervesato, I., Rossi, G.F. (1992). Logic meta-programming facilities in 'LOG. In: Pettorossi, A. (eds) Meta-Programming in Logic. META 1992. Lecture Notes in Computer Science, vol 649. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-56282-6_10
Download citation
DOI: https://doi.org/10.1007/3-540-56282-6_10
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-56282-5
Online ISBN: 978-3-540-47505-7
eBook Packages: Springer Book Archive