Skip to main content

The mathematics of set predicates in Prolog

  • Invited Papers
  • Conference paper
  • First Online:
Book cover Computational Logic and Proof Theory (KGC 1993)

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

Included in the following conference series:

Abstract

We provide a logical specification of set predicates findall and bagof of Prolog. The specification is given in proof theoretic terms, and pertains to any SLD-resolution based language. The order dependent aspects, relevant for languages embodying a sequential proof search strategy (possibly with side effects), can be added in an orthogonal way. The specification also allows us to prove that bagof cannot be defined by SLD-resolution alone. We show the correctness, wrt to our specification, of Demoen's definition of bagof for Prolog in Prolog. The specification of bagof allows us to throw some light on the logical problems with setof.

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.

References

  1. K.R.Apt, Logic Programming, in: J. van Leeuwen (ed.), Formal Models and Semantics. Handbook of Theoretical Computer Science, Vol.B, Elsevier 1990, pp. 493–574

    Google Scholar 

  2. H.P.Barendregt, The Lambda Calculus, Elsevier 1984

    Google Scholar 

  3. E.Börger, D.Rosenzweig, A Formal Specification of Prolog by Tree Algebras, in: V.Čerić et.al. (eds.), Proceedings of The Third International Conference on Information Technology Interfaces, SRCE, Zagreb 1991, pp. 513–518

    Google Scholar 

  4. E.Börger, D.Rosenzweig, The WAM-Definition and Compiler Correctness, Technical report TR-14/92, Dipartimento di Informatica, Università di Pisa 1992

    Google Scholar 

  5. B.Demoen, Code and Comments Regarding bagof/3, in: PROLOG. Paris papers 2, ISO/IEC JTC1 SC22 WG17 N.80, pp. 85–86

    Google Scholar 

  6. A.Dodd, The Predicates bagof/3 and setof/3, a Proposal, in: PRO-LOG. Paris papers 2, ISO/IEC JTC1 SC22 WG17 N.80, pp. 75–84

    Google Scholar 

  7. R.A.O'Keefe, The Craft of Prolog, MIT Press 1990

    Google Scholar 

  8. L.M.Pereira, A.Porto, All Solutions, in: Logic Programming Newsletter 2, 1981, pp. 9–10

    Google Scholar 

  9. K.Ueda, Making Exhaustive Search Programs Deterministic, in: Proceedings of the 3rd International Conference on Logic Programming, pp. 270–282

    Google Scholar 

  10. K.Ueda, Making Exhaustive Search Programs Deterministic, Part 2, in: Proceedings of the 4th International Conference on Logic Programming, pp. 356–375

    Google Scholar 

  11. D.H.D.Warren, Higher Order Extensions to Prolog: Are they Needed?, in: Machine Intelligence 10(1982), pp. 441–454

    Google Scholar 

  12. PROLOG. Part 1, General Core, Committee Draft 1.0, ISO/IEC JTC1 SC22 WG17 N.92

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Georg Gottlob Alexander Leitsch Daniele Mundici

Rights and permissions

Reprints and permissions

Copyright information

© 1993 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Börger, E., Rosenzweig, D. (1993). The mathematics of set predicates in Prolog. In: Gottlob, G., Leitsch, A., Mundici, D. (eds) Computational Logic and Proof Theory. KGC 1993. Lecture Notes in Computer Science, vol 713. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0022547

Download citation

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

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-57184-1

  • Online ISBN: 978-3-540-47943-7

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics