Skip to main content

Modules for Prolog Revisited

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 4079))

Abstract

Module systems are an essential feature of programming languages as they facilitate the re-use of existing code and the development of general purpose libraries. Unfortunately, there has been no consensual module system for Prolog, hence no strong development of libraries, in sharp contrast to what exists in Java for instance. One difficulty comes from the call predicate which interferes with the protection of the code, an essential task of a module system. By distinguishing the called module code protection from the calling module code protection, we review the existing syntactic module systems for Prolog. We show that no module system ensures both forms of code protection, with the noticeable exceptions of Ciao-Prolog and XSB. We then present a formal module system for logic programs with calls and closures, define its operational semantics and formally prove the code protection property. Interestingly, we also provide an equivalent logical semantics of modular logic programs without calls nor closures, which shows how they can be translated into constraint logic programs over a simple module constraint system.

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

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Abreu, S., Diaz, D.: Objective: in minimum context. In: Proceedings of ICLP 2003, International Conference on Logic Programming, Mumbai, India. MIT Press, Cambridge (2003)

    Google Scholar 

  2. Aggoun, A., et al.: ECLiPSe User Manual Release 5.2 (1993–2001)

    Google Scholar 

  3. Brogi, A., Mancarella, P., Pedreschi, D., Turini, F.: Meta for modularising logic programming. In: Pettorossi, A. (ed.) META 1992. LNCS, vol. 649, pp. 105–119. Springer, Heidelberg (1992)

    Google Scholar 

  4. Bueno, F., Gras, D.C., Carro, M., Hermenegildo, M.V., Lopez-Garca, P., Puebla, G.: The ciao Prolog system. reference manual. Technical Report CLIP 3/97-1.10#5, University of Madrid (1997-2004)

    Google Scholar 

  5. Bugliesi, M., Lamma, E., Mello, P.: Modularity in logic programming. Journal of Logic Programmming 19/20, 443–502 (1994)

    Article  MathSciNet  Google Scholar 

  6. Cabeza, D.: An Extensible, Global Analysis Friendly Logic Programming System. PhD thesis, Universidad Politécnica de Madrid (August 2004)

    Google Scholar 

  7. Cabeza, D., Hermenegildo, M.: A New Module System for Prolog. In: Palamidessi, C., Moniz Pereira, L., Lloyd, J.W., Dahl, V., Furbach, U., Kerber, M., Lau, K.-K., Sagiv, Y., Stuckey, P.J. (eds.) CL 2000. LNCS (LNAI), vol. 1861, pp. 131–148. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  8. Cabeza, D., Hermenegildo, M., Lipton, J.: Hiord: A type-free higher-order logic programming langugae with predicate abstraction. In: Proceedings of ASIAN 2004, Asian Computing Science Conference, pp. 93–108. Springer, Heidelberg (2004)

    Google Scholar 

  9. Chen, W.: A theory of modules based on second-order logic. In: The fourth IEEE. International Symposium on Logic Programming, pp. 24–33 (1987)

    Google Scholar 

  10. Fages, F., Ruet, P., Soliman, S.: Linear concurrent constraint programming: operational and phase semantics. Information and Computation 165(1), 14–41 (2001)

    Article  MATH  MathSciNet  Google Scholar 

  11. Haemmerlé, R.: SiLCC is linear concurrent constraint programming (doctoral consortium). In: Gabbrielli, M., Gupta, G. (eds.) ICLP 2005. LNCS, vol. 3668. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  12. Holzbaur, C.: Oefai clp(q,r) manual rev. 1.3.2. Technical Report TR-95-09, Österreichisches Forschungsinstitut für Artificial Intelligence, Wien (1995)

    Google Scholar 

  13. International Organization for Standardiztion. Information technology – Programming languages – Prolog – Part 1: General core, 1995. ISO/IEC 13211-1

    Google Scholar 

  14. International Organization for Standardiztion. Information technology – Programming languages – Prolog – Part 2: Modules, 2000. ISO/IEC 13211-2

    Google Scholar 

  15. Jaffar, J., Lassez, J.-L.: Constraint logic programming. In: Proceedings of the 14th ACM Symposium on Principles of Programming Languages, Munich, Germany, pp. 111–119. ACM Press, New York (1987)

    Google Scholar 

  16. Miller, D.: A logical analysis of modules in logic programming. Journal of Logic Programming, 79–108 (1989)

    Google Scholar 

  17. Miller, D.: A proposal for modules in lambda prolog. In: Dyckhoff, R. (ed.) ELP 1993. LNCS, vol. 798, pp. 206–221. Springer, Heidelberg (1994)

    Google Scholar 

  18. Monterio, L., Porto, A.: Contextual logic programming. In: Proceedings of ICLP 1989 International Conference on Logic Programming, pp. 284–299 (1989)

    Google Scholar 

  19. Moura, P.: Logtalk, http://www.logtalk.org

  20. Moura, P.: Logtalk - Design of an Object-Oriented Logic Programming Language. PhD thesis, Department of Informatics, University of Beira Interior, Portugal (September 2003)

    Google Scholar 

  21. O’Keefe, R.A.: Towards an algebra for constructing logic programs. In: Symposium on Logic Programming, pp. 152–160. IEEE, Los Alamitos (1985)

    Google Scholar 

  22. Sagonas, K., et al.: The XSB System Version 2.5 - Volume 1: Programmer’s Manual (1993 – 2003)

    Google Scholar 

  23. Sannella, D.T., Wallen, L.A.: A calculus for the construction of modular Prolog programs. Journal of Logic Programming, 147–177 (1992)

    Google Scholar 

  24. Schrijvers, T., Warren, D.S.: Constraint Handling Rules and Tabled Execution. In: Demoen, B., Lifschitz, V. (eds.) ICLP 2004. LNCS, vol. 3132, pp. 120–136. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  25. Swedish Institute of Computer Science. SICStus Prolog v3 User’s Manual. The Intelligent Systems Laboratory, PO Box 1263, S-164 28 Kista, Sweden (1991–2004)

    Google Scholar 

  26. Swedish Institute of Computer Science. Quintus Prolog v3 User’s Manual. The Intelligent Systems Laboratory, PO Box 1263, S-164 28 Kista, Sweden (2003)

    Google Scholar 

  27. Costa, R.R.V.S., Damas, L., Diaz, R.A.: YAP user’s manual (1989–2000)

    Google Scholar 

  28. Warren, D.H.D.: Higher-order extensions to Prolog: Are they needed? In: Machine Intelligence. Lecture Notes in Mathematics, vol. 10, pp. 441–454 (1982)

    Google Scholar 

  29. Wielemaker, J.: SWI Prolog 5.4.1 Reference Manual (1990– 2004)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2006 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Haemmerlé, R., Fages, F. (2006). Modules for Prolog Revisited. In: Etalle, S., Truszczyński, M. (eds) Logic Programming. ICLP 2006. Lecture Notes in Computer Science, vol 4079. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11799573_6

Download citation

  • DOI: https://doi.org/10.1007/11799573_6

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-36635-5

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

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics