A declarative approach for first-order built-in's of Prolog

  • Krzysztof R. Apt
  • Elena Marchiori
  • Catuscia Palamidessi
Article

Abstract

We provide here a framework for studying Prolog programs with various built-in's that include arithmetic operations, and such metalogical relations likevar andground. To this end we propose a new, declarative semantics and prove completeness of the Prolog computation mechanism w.r.t. this semantics. We also show that this semantics is fully abstract in an appropriate sense. Finally, we provide a method for proving termination of Prolog programs with built-in's which uses this semantics. The method is shown to be modular and is illustrated by proving termination of a number of programs including the unify program of Sterling and Shapiro [17].

Keywords

Prolog programs Builtin's Declarative semantics Termination 

1991 Mathematics Subject Classification

68Q40 68T15 

1991 CR Categories

F.3.2 F.4.1 H.3.3 I.2.3 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Apt, K. R.: Logic Programming. In: van Leeuwen, J. (ed.) Handbook of Theoretical Computer Science. Vol. B. Elsevier 1990Google Scholar
  2. 2.
    Apt, K. R., Bezem, M.: Acyclic Programs. New Generation Comput.9, 335–363 (1991)Google Scholar
  3. 3.
    Apt, K. R., Doets, H. C.: A new definition of SLDNF-resolution. Tech. Rep. CS-R9242. CWI, Amsterdam, NL (1992)Google Scholar
  4. 4.
    Apt, K. R., Marchiori, E., Palamidessi, C.: A declarative approach for first-order built-in's of Prolog. Tech. Rep. CS-R9246. CWI, Amsterdam, NL (1992)Google Scholar
  5. 5.
    Apt, K. R., Pedreschi, D.: Studies in pure Prolog: termination. In: Lloyd, J. W. (ed.) Symposium on Compuational Logic. Berlin, Heidelberg, New York: Springer (1990)Google Scholar
  6. 6.
    Bezem, M.: Characterizing termination of logic programs with level mappings. In: Lusk, E. L., Overbeek, R. A. (eds.) Proceedings of the North American Conference on Logic Programming, 69–80. The MIT Press (1989)Google Scholar
  7. 7.
    Börger, E.: A logical operational semantics of full Prolog, Part III: Built-in predicates for files, terms, arithmetic and input-output. In: Moschovakis Y. (ed.), Proceedings Workshop on Logic from Computer Science. Berlin, Heidelberg, New York: Springer MSRI Publications (1989)Google Scholar
  8. 8.
    Bossi, A., Cocco, N., Fabris, M.: Proving termination of logic programs by exploiting term properties. In: Proceedings of Tapsoft '91, pp. 153–180 (1991)Google Scholar
  9. 9.
    Cavedon, L.: Continuity, consistency, and completeness properties for logic programs. In: Levi, G., Martelli, M. (eds.) Proceedings of the Sixth International Conference on Logic Programming, pp. 571–584. The MIT Press (1989)Google Scholar
  10. 10.
    Clark, K. L.: Predicate logic as a computational formalism. Tech. Rep. DOC 79/59. ico, London, GB (1979)Google Scholar
  11. 11.
    Deransart, P., Ferrand, G.: An operational formal definition of Prolog. In: Proceedings of the 4th Symposium on Logic Programming, pp. 162–172. Computer Society Press (1987)Google Scholar
  12. 12.
    Falaschi, M., Levi, G., Martelli, M., Palamidessi, C.: Declarative modeling of the operational behaviour of logic languages. Theoret. Comput. Sci.69, 289–318 (1989)Google Scholar
  13. 13.
    Hill, P. M., Lloyd, J. W.: Analysis of meta-programs. In: Abramson, H. D., Rogers, M. H. (eds.) Proceedings of the Meta88 Workshop, pp. 23–52. MIT Press (1988)Google Scholar
  14. 14.
    Lloyd, J. W.: Foundations of Logic Programming. Second ed., Berlin, Heidelberg, New York: Springer 1987Google Scholar
  15. 15.
    Pieramico, C.: Metodi formali di ragionamento sulla terminazione di programmi prolog. Tech. Rep. Tesi di Laurea. Universitá degli Studi di Pisa. I (1991)Google Scholar
  16. 16.
    Plümer, L.: Automatic termination proofs for prolog programs operating on nonground terms. In: Proceedings of the 1991 International Logic Programming Symposium. San Diego (1991)Google Scholar
  17. 17.
    Sterling, L., Shapiro, E.: The Art of Prolog. MIT Press 1986Google Scholar
  18. 18.
    van Emden, M. H., Kowalski, R. A.: The semantics of predicate logic as a programming language. Journal of the ACM23, 733–742 (1976)Google Scholar

Copyright information

© Springer-Verlag 1994

Authors and Affiliations

  • Krzysztof R. Apt
    • 1
    • 2
  • Elena Marchiori
    • 1
  • Catuscia Palamidessi
    • 3
  1. 1.CWIGB AmsterdamThe Netherlands
  2. 2.Faculty of Mathematics and Computer ScienceUniversity of AmsterdamTV AmsterdamThe Netherlands
  3. 3.Dipartimento di Informatica e Scienze dell' InformazioneUniversità di GenevaGenovaItaly

Personalised recommendations