Skip to main content

Specialization in logic programming: From horn clause logic to prolog and concurrent prolog

  • Technical Contributions
  • Conference paper
  • First Online:
Stepwise Refinement of Distributed Systems Models, Formalisms, Correctness (REX 1989)

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

Abstract

ABSTRACT. A Prolog or a Concurrent Prolog program can be seen as a specialization or refinement of a program in Horn Clause Logic: In addition to the logic component a Prolog or Concurrent Prolog program contains information about the flow of control. In Prolog we have the cut statement and a leftmost depth first search strategy, in Concurrent Prolog we have read-only variables and commits. In this paper we study the flow of control of these languages by giving transition systems for abstract versions of Prolog, Horn Clause Logic and Concurrent Prolog. On the basis of these transition systems we define operational semantics for all three languages. Three basic sets (success set, finite failure set and the infinite failure set or divergence set) can be derived from the operational semantics. A comparison is made between the different sets: for Prolog we show that the success set and the finite failure sets of a Prolog program are smaller than the corresponding sets of a Horn Clause Logic program. The infinite failure sets are incomparable. A similar comparison is made between the success set and the finite failure sets for Horn Clause Logic and Concurrent Prolog. These comparisons give some feeling what happens if we put extra logical information in Horn Clause Logic programs.

Remark: part of the work was carried out in the ESPRIT Basic Research Action Integration.

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

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Similar content being viewed by others

References

  1. B. Arbab and D.M. Berry. Operational and denotational semantics of prolog. Journal of Logic Programming, 4:309–330, 1987.

    Google Scholar 

  2. K.R. Apt and M.H. van Emden. Contributions to the theory of logic programming. JACM, 29(3):841–862, 1982.

    Article  Google Scholar 

  3. A. de Bruin and E. de Vink. Continuation semantics for prolog with cut. In J. Diaz and F. Orejas, editors, Proceedings CAAP 89, volume 351 of Lecture Notes in Computer Science, pages 178–192, 1989.

    Google Scholar 

  4. J.W. de Bakker and J.N. Kok. Uniform abstraction, atomicity and contractions in the comparative semantics of concurrent prolog. In Proc. Fifth Generation Computer Systems (FGCS 88), pages 347–355, Tokyo, Japan, 1988. Extended Abstract, full version available as CWI report CS-8834.

    Google Scholar 

  5. J.W. de Bakker and J.N. Kok. Comparative semantics for concurrent prolog. Theoretical Computer Science, 1989. To appear.

    Google Scholar 

  6. F.S. de Boer, J.N. Kok, C. Palamidessi, and J.J.M.M. Rutten. From failure to success: Comparing a denotational and a declarative semantics for horn clause logic. Technical Report CS-R89.., Centre for Mathematics and Computer Science, Amsterdam, 1989.

    Google Scholar 

  7. 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, 1987.

    Google Scholar 

  8. M. Hennessy and G.D. Plotkin. Full abstraction for a simple parallel programming language. In J. Becvar, editor, Proceedings Mathematical Foundations of Computer Science (MFCS 79), volume 74 of Lecture Notes in Computer Science, pages 108–120. Springer Verlag, 1979.

    Google Scholar 

  9. N.D. Jones and A. Mycroft. Stepwise development of operational and denotational semantics for prolog. In Proceedings International Symposium on Logic Programming (ICLP 84), pages 281–288. IEEE, 1984.

    Google Scholar 

  10. P. Knijnenburg and J.N. Kok. A compositional semantics for the finite and infinite failures of a language with atomized statements. Technical report, University of Utrecht, 1989. To appear in proceedings CSN 89.

    Google Scholar 

  11. J.W. Lloyd. Foundations of Logic Programming. Springer Verlag, 1987. Second edition.

    Google Scholar 

  12. G. Levi, M. Martelli, and C. Palamidesssi. A logic programming semantics scheme. Technical report, Dipartimento di Informatica, Università di Pisa, 1989.

    Google Scholar 

  13. G.D. Plotkin. A structural approach to operational semantics. Technical Report DAIMI FN-19, Aarhus Univ., Comp.Sci.Dept., 1981.

    Google Scholar 

  14. V.A. Saraswat. Concurrent Constraint Programming Languages. PhD thesis, Carnegie-Mellon University, 1989.

    Google Scholar 

  15. E.Y. Shapiro. Concurrent Prology: Collected Papers, volume 1–2. MIT press, 1988.

    Google Scholar 

  16. E.Y. Shapiro. The family of concurrent logic programming languages. Technical Report CS 89-09, Department of Applied Mathematics and Computer Science, The Weizmann Institute of Science, Rehovot 76100, Israel, 1989.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

J. W. de Bakker W. -P. de Roever G. Rozenberg

Rights and permissions

Reprints and permissions

Copyright information

© 1990 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Kok, J.N. (1990). Specialization in logic programming: From horn clause logic to prolog and concurrent prolog. In: de Bakker, J.W., de Roever, W.P., Rozenberg, G. (eds) Stepwise Refinement of Distributed Systems Models, Formalisms, Correctness. REX 1989. Lecture Notes in Computer Science, vol 430. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-52559-9_73

Download citation

  • DOI: https://doi.org/10.1007/3-540-52559-9_73

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-52559-2

  • Online ISBN: 978-3-540-47035-9

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics