Abstract
This paper describes a partial evaluation system specifically designed to be used as an automatic compilation tool for metaprograms in a KBMS (EPSILON) based on Prolog. EPSILON main underlying concepts are the extension of Prolog with theories (“multiple worlds”) and the use of metaprogramming as the basic technique to define new inference engines and tools. Our partial evaluator is oriented towards theories and metainterpreter specialization. Being designed to be used as an automatic compiler, it does not require declarations from the user to control the unfolding process. It handles full Prolog and provides also an elegant solution to the problem of the partial evaluation of incomplete and self-modifying programs, by exploiting the multiple worlds feature added to Prolog. EPSILON partial evaluation system turned out to be a very useful and powerful tool to combine the low cost and the flexibility of metaprogramming with the performance requirements of a practical knowledge based system.
Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.References
Bowen, K. A. and Kowalski, R. A., “Amalgamating language and metalanguage in logic programming,” inLogic Programming (K. L. Clark and S.-A. Tarnlund, eds., Academic Press, pp. 153–172, 1982.
Coscia, P. et al., “The Epsilon Knowledge Base Management System: architecture and Data Base access optimization,”Workshop on Logic Programming and Data Bases, Venezia, Italy, December, 1986.
Coscia, P., Franceschi, P., Levi, G., Sardu, G. and Torre, L., “Object level reflection of inference rules by partial evaluation” inMeta-Level Architectures and Reflection (D. Nardi and P. Maes, eds.), North-Holland, 1987.
Ershov, A., “On the partial evaluation principle,”Information Processing Letters, Vol. 6, No. 2, pp. 38–41, 1977.
Ershov, A., “Mixed Computation: Potential applications and problems for study,”Theoretical Computer Science, 18, pp. 41–67, 1982.
Fanti, L. and Zanobetti, S.,Proprietà della valutazione parziale in programmazione logica (in Italian), Tesi di laurea, Università di Pisa, Italy, 1986.
Fujita, H. and Furukawa, K., “A self-applicable partial evaluator and its use in incremental compilation,” inWorkshop on Partial Evaluation and Mixed Computation (D. Bjørner, A. P. Ershov and N. D. Jones, eds.), Gl. Avernaes, Denmark, October, 1987. [to appear inNew Generation Computing]
Furukawa, K., Takeuchi, A., Kunifuji, S., Yasukawa, H., Ohki, M. and Ueda, K., “Mandala: A logic based knowledge programming system,”International Conference on Fifth Generation Computer Systems, Tokyo, Japan, pp. 613–622, 1984.
Futamura Y., “Partial evaluation of computation process—an approach to a compiler-compiler,”Systems, Computers, Controls, Vol. 2, No. 5, pp. 45–50, 1971.
Gallagher, J., “Transforming logic programs by specializing interpreters,”ECAI86. 7th European Conference on Artificial Intelligence, Brighton, U. K., pp. 109–122, 1986.
Gallagher, J. and Codish, M., “Specialisation of Prolog programs using abstract interpretation,”Workshop on Partial Evaluation and Mixed Computation (D. Bjørner, A. P. Ershov and N. D. Jones, eds.), Gl. Avernaes, Denmark, October, 1987. [to appear inNew Generation Computing]
Ghelfo, S. and Levi, G., “A partial evaluator for metaprograms in a multiple theories logic language,”ESPRIT Project 530 (Epsilon) Report, October, 1986.
Jones, N.D. Sestoft, P. and Sondergaard, H., “An experiment in partial evaluation: The generation of a compiler-compiler,” inRewriting Techniques and Applications (J.-P. Jouannaud, ed.),Lecture Notes in Computer Science, Vol. 202, Springer-Verlag, pp. 124–140, 1985.
Kahn, K. M., “A partial evaluator, of Lisp written in a Prolog intended to be applied to the Prolog and itself which in turn is intended to be given to itself together with the Prolog to produce a Prolog compiler,”Technical Report, UPMAIL, Uppsala University, Sweden, March, 1982.
Kahn, K. M. and Carlsson, M., “The compilation of Prolog programs without the use of Prolog compiler,”International Conference on Fifth Generation Computer Systems, Tokyo, Japan, pp. 348–355, 1984.
Kauffmann, H. and Grumbach, A., “Representing and manipulating knowledge within “worlds”,”Proc. First Int’l Conf. on Expert Data Base Systems (L. Kershberg., ed), pp. 61–73, 1986.
Komorowski, H. J., “A specification of an abstract PROLOG machine and its application to partial evaluation,”Linkoping Studies in Science and Technology Dissertations, N. 69, Linkoping University, Sweden, 1981.
Komorowski, H. J., “Partial evaluation as a means for inferencing data structures in an applicative language: A theory and implementation in the case of PROLOG,”Ninth ACM Symp. on Principles of Programming Languages, Albuquerque, New Mexico, pp. 255–267, 1982.
Lakhotia, A. and Sterling, L., “Composing logic programs with clausal join,”Workshop on Partial Evaluation and Mixed Computation (D. Bjørner, A. P. Ershov and N. D. Jones, eds.), Gl. Avernaes, Denmark, October, 1987. [to appear inNew Generation Computing]
Levi, G., Modesti, M. and Kouloumdjian, J., “Status and evolution of the Epsilon prototype,”Proc. ESPRIT Technical Week, Bruxelles, Belgium, 1987.
Levi, G. and Sardu, G., “Meta-level definition and compilation of inference engines in Epsilon,”ESPRIT Project Epsilon (P 530) deliverable 14a, October, 1987.
O’Keefe, R. A., “On the treatment of cuts in Prolog source-level tools,”Proc. Int’l Symp. on Logic Programming, Boston, Mass., 1985.
Safra, S., “Partial evaluation of Concurrent Prolog and its implications,”Master’s Thesis, Weizmann Institute of Science, Rehovot, Israel, July CS86-24, 1986.
Safra, S. and Shapiro, E., “Meta-interpreters for real,” inInformation Processing 86 (H.-J. Kugler, ed.), Dublin, Ireland, North-Holland, pp. 271–278, 1986.
Shapiro, E., “Concurrent Prolog: A progress report,”Computer, Vol. 19, No. 8, pp. 44–58, 1986.
Sterling, L., “Meta-interpreters for expert systems,”CAISR TR 134-85, Case Western Reserve University, 1985.
Sterling, L. and Beer, R. D., “Incremental flavor-mixing of meta-interpreters for expert system construction,”Proc. 3rd Symp. on Logic Programming, Salt Lake City, Utah, pp. 20–27, 1986.
Takeuchi, A. and Furukawa, K., “Partial evaluation of PROLOG programs and its application to metaprogramming,”ICOT Tech. Report, 1985.
Takeuchi, A. and Furukawa, K., “Partial evaluation of PROLOG programs and its application to metaprogramming,” inInformation Processing 86 (H.-J. Kugler, ed.), Dublin, Ireland, North-Holland, pp. 415–420, 1986.
Takeuchi, A., “Affinity between metainterpreters and partial evaluation,” inInformation Processing 86 (H.-J. Kugler, ed), Dublin, Ireland, North-Holland, pp. 279–282, 1986.
Venken, R., “A PROLOG meta-interpreter for partial evaluation and its application to source-to-source transformation and query optimization, inECAI-84: Advances in Artificial Intelligence (T. O’Shea, ed.), Pisa, Italy, North-Holland, pp. 91–100, 1984.
Venken, R. and Demoen, B., “A partial evaluation system for PROLOG: Theoretical and practical considerations,” inWorkshop on Partial Evaluation and Mixed Computation (D. Bjørner, A. P. Ershov and N. D. Jones, eds.), Gl. Avernaes, Denmark, October, 1987. [to appear inNew Generation Computing]
Author information
Authors and Affiliations
Additional information
Partially supported by ESPRIT, project 530 (EPSILON).
About this article
Cite this article
Levi, G., Sardu, G. Partial evaluation of metaprograms in a “multiple worlds” logic language. New Gener Comput 6, 227–247 (1988). https://doi.org/10.1007/BF03037139
Received:
Issue Date:
DOI: https://doi.org/10.1007/BF03037139