Part of the book series:Lecture Notes in Computer Science ((LNPSE,volume 4079))
Included in the following conference series:
513Accesses
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 thecall 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 to check access.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Abreu, S., Diaz, D.: Objective: in minimum context. In: Proceedings of ICLP 2003, International Conference on Logic Programming, Mumbai, India. MIT Press, Cambridge (2003)
Aggoun, A., et al.: ECLiPSe User Manual Release 5.2 (1993–2001)
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)
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)
Bugliesi, M., Lamma, E., Mello, P.: Modularity in logic programming. Journal of Logic Programmming 19/20, 443–502 (1994)
Cabeza, D.: An Extensible, Global Analysis Friendly Logic Programming System. PhD thesis, Universidad Politécnica de Madrid (August 2004)
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)
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)
Chen, W.: A theory of modules based on second-order logic. In: The fourth IEEE. International Symposium on Logic Programming, pp. 24–33 (1987)
Fages, F., Ruet, P., Soliman, S.: Linear concurrent constraint programming: operational and phase semantics. Information and Computation 165(1), 14–41 (2001)
Haemmerlé, R.: SiLCC is linear concurrent constraint programming (doctoral consortium). In: Gabbrielli, M., Gupta, G. (eds.) ICLP 2005. LNCS, vol. 3668. Springer, Heidelberg (2005)
Holzbaur, C.: Oefai clp(q,r) manual rev. 1.3.2. Technical Report TR-95-09, Österreichisches Forschungsinstitut für Artificial Intelligence, Wien (1995)
International Organization for Standardiztion. Information technology – Programming languages – Prolog – Part 1: General core, 1995. ISO/IEC 13211-1
International Organization for Standardiztion. Information technology – Programming languages – Prolog – Part 2: Modules, 2000. ISO/IEC 13211-2
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)
Miller, D.: A logical analysis of modules in logic programming. Journal of Logic Programming, 79–108 (1989)
Miller, D.: A proposal for modules in lambda prolog. In: Dyckhoff, R. (ed.) ELP 1993. LNCS, vol. 798, pp. 206–221. Springer, Heidelberg (1994)
Monterio, L., Porto, A.: Contextual logic programming. In: Proceedings of ICLP 1989 International Conference on Logic Programming, pp. 284–299 (1989)
Moura, P.: Logtalk,http://www.logtalk.org
Moura, P.: Logtalk - Design of an Object-Oriented Logic Programming Language. PhD thesis, Department of Informatics, University of Beira Interior, Portugal (September 2003)
O’Keefe, R.A.: Towards an algebra for constructing logic programs. In: Symposium on Logic Programming, pp. 152–160. IEEE, Los Alamitos (1985)
Sagonas, K., et al.: The XSB System Version 2.5 - Volume 1: Programmer’s Manual (1993 – 2003)
Sannella, D.T., Wallen, L.A.: A calculus for the construction of modular Prolog programs. Journal of Logic Programming, 147–177 (1992)
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)
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)
Swedish Institute of Computer Science. Quintus Prolog v3 User’s Manual. The Intelligent Systems Laboratory, PO Box 1263, S-164 28 Kista, Sweden (2003)
Costa, R.R.V.S., Damas, L., Diaz, R.A.: YAP user’s manual (1989–2000)
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)
Wielemaker, J.: SWI Prolog 5.4.1 Reference Manual (1990– 2004)
Author information
Authors and Affiliations
Projet Contraintes – INRIA Rocquencourt, France
Rémy Haemmerlé & François Fages
- Rémy Haemmerlé
You can also search for this author inPubMed Google Scholar
- François Fages
You can also search for this author inPubMed Google Scholar
Editor information
Editors and Affiliations
University of Twente, The Netherlands
Sandro Etalle
Department of Computer Science, University of Kentucky, 40506, Lexington, KY, USA
Mirosław Truszczyński
Rights 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
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)
Share this paper
Anyone you share the following link with will be able to read this content:
Sorry, a shareable link is not currently available for this article.
Provided by the Springer Nature SharedIt content-sharing initiative