Skip to main content

Oracle semantics for Prologa

  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 632))

Abstract

This paper proposes to specify semantic definitions for Prolog in terms of an oracle which provides information on which clauses are to be applied to resolve a given goal. The approach is quite general. It is applicable to pure Prolog to define both operational and declarative semantics; and can be viewed as a basis for both sequential and parallel implementations.

Previous semantic definitions for Prolog typically attempt to encode the sequential depth-first search of the language into various mathematical frameworks. A clause is applied in such semantics only if it is chosen under the search strategy. We prefer instead to specify in a more declarative way the condition upon which a clause is to be applied. The decision whether or not to apply a clause may be viewed as a query to an oracle which may be specified from within the semantics or reasoned about from outside. This approach results in simple and concise semantic definitions which are more useful for arguing the correctness of program transformations and providing the basis for abstract interpretations than previous proposals.

This work has been supported by “Progetto Finalizzato Sistemi Informatici e Calcolo Parallelo” of C.N.R. under grant n. 9100880.PF69 and by the Esprit Basic Research Action 3012 — Compulog.

This is a preview of subscription content, log in via an institution.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. K. R. Apt, R. N. Bol, and J.W. Klop. On the safe termination of PROLOG programs. In G. Levi and M. Martelli, editors, Proc. Sixth Int'l Conf. on Logic Programming, pages 353–368. The MIT Press, Cambridge, Mass., 1989.

    Google Scholar 

  2. K. R. Apt and D. Pedreschi. Studies in Pure Prolog: Termination. In J. W. Lloyd, editor, Computational Logic, pages 150–176. Springer-Verlag, Berlin, 1990.

    Google Scholar 

  3. K. R. Apt and D. Pedreschi. Proving Termination of General Prolog Programs. In T. Ito and A.R. Meyer, editors, Proc. of Int. Conf. on Theoretical Aspects of Computer Software, volume 526 of Lecture Notes in Computer Science, pages 265–289, Sendai, Japan, 1991.

    Google Scholar 

  4. B. Arbab and D.M. Berry. Operational and Denotational Semantics of Prolog. Journal of Logic Programming, 4:309–330, 1987.

    Google Scholar 

  5. R. Barbuti, M. Codish, R. Giacobazzi, and G. Levi. Modelling Prolog Control. In Proc. Nineteenth Annual ACM Symp. on Principles of Programming Languages, pages 95–104. ACM Press, 1992.

    Google Scholar 

  6. E. Börger. A logical operational semantics of full prolog. In E.Börger, H. Kleine, H. Büning, and M. Richter, editors, CSL 89. 3rd workshop on Computer Science Logic, volume 440 of Lecture Notes in Computer Science. Springer-Verlag, Berlin, 1990.

    Google Scholar 

  7. A. Bossi, M. Gabbrielli, G. Levi, and M. C. Meo. Contributions to the Semantics of Open Logic Programs. In Proceedings of the International Conference on Fifth Generation Computer Systems 1992, 1992. To appear.

    Google Scholar 

  8. A. de Bruin and E. de Vink. Continuation semantics for Prolog with cut. In J. Diaz and F. Orejas, editors, Proc. CAAP 89, volume 351 of Lecture Notes in Computer Science, pages 178–192. Springer-Verlag, Berlin, 1989.

    Google Scholar 

  9. S. K. Debray and P. Mishra. Denotational and Operational Semantics for Prolog. In M. Wirsing, editor, Formal Description of Programming Concepts III, pages 245–269. North-Holland, Amsterdam, 1987.

    Google Scholar 

  10. M. Falaschi and G. Levi. Finite failures and partial computations in concurrent logic languages. Theoretical Computer Science, 75:45–66, 1990.

    Google Scholar 

  11. M. Falaschi, G. Levi, M. Martelli, and C. Palamidessi. Declarative Modeling of the Operational Behavior of Logic Languages. Theoretical Computer Science, 69(3):289–318, 1989.

    Google Scholar 

  12. M. Gabbrielli and M. C. Meo. Fixpoint Semantics for Partial Computed Answer Substitutions and Call Patterns. In H. Kirchner and G. Levi, editors, Proceedings of Third International Conference on Algebraic and Logic Programming, Lecture Notes in Computer Science. Springer-Verlag, Berlin, 1992. In this Proceedings.

    Google Scholar 

  13. H. Gaifman and E. Shapiro. Fully abstract compositional semantics for logic programs. In Proc. Sixteenth Annual ACM Symp. on Principles of Programming Languages, pages 134–142. ACM, 1989.

    Google Scholar 

  14. J. Jaffar and J.-L. Lassez. Constraint Logic Programming. In Proc. Fourteenth Annual ACM Symp. on Principles of Programming Languages, pages 111–119. ACM, 1987.

    Google Scholar 

  15. J. Jaffar, S. Michaylov, P. Stuckey, and R. Yap. The CLP(R) Language and System. ACM Transactions on Programming Languages and Systems, 1991. To appear.

    Google Scholar 

  16. N. D. Jones and A. Mycroft. Stepwise Development of Operational and Denotational Semantics for Prolog. In Sten-Åke Tärnlund, editor, Proc. Second Int'l Conf. on Logic Programming, pages 281–288, 1984.

    Google Scholar 

  17. G. Levi. Models, Unfolding Rules and Fixpoint Semantics. In R. A. Kowalski and K. A. Bowen, editors, Proc. Fifth Int'l Conf. on Logic Programming, pages 1649–1665, The MIT Press, Cambridge, Mass., 1988.

    Google Scholar 

  18. J. W. Lloyd. Foundations of Logic Programming. Springer-Verlag, Berlin, 1987. Second edition.

    Google Scholar 

  19. N.D.Jones and H.Søndergaard. A Semantics-based Framework for the Abstract Interpretation of Prolog. In S. Abramsky and C. Hankin, editors, Abstract Interpretation of Declarative Languages, pages 123–142. Ellis Horwood Ltd, 1987.

    Google Scholar 

  20. M. H. van Emden and R. A. Kowalski. The semantics of predicate logic as a programming language. Journal of the ACM, 23(4):733–742, 1976.

    Google Scholar 

  21. T. Vasak and J. Potter. Characterization of Terminating Logic Programs. In Proc. Third IEEE Int'l Symp. on Logic Programming, pages 140–147. IEEE Comp. Soc. Press, 1986.

    Google Scholar 

  22. K. Vershaetse and D. De Shreye. Deriving Termination Proofs for Logic Programs, Using Abstract Procedures. In K. Furukawa, editor, Proc. Eighth Int'l Conf. on Logic Programming, pages 301–315. The MIT Press, Cambridge, Mass., 1991.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Hélène Kirchner Giorgio Levi

Rights and permissions

Reprints and permissions

Copyright information

© 1992 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Barbuti, R., Codish, M., Giacobazzi, R., Maher, M. (1992). Oracle semantics for Prologa. In: Kirchner, H., Levi, G. (eds) Algebraic and Logic Programming. ALP 1992. Lecture Notes in Computer Science, vol 632. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0013822

Download citation

  • DOI: https://doi.org/10.1007/BFb0013822

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-55873-6

  • Online ISBN: 978-3-540-47302-2

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics