Abstract
The current proposals for the inclusion of modules in the ISO Prolog standard are not very consensual. Since a program-structuring feature is required for a production programming language, several alternatives have been explored over the years.
In this article we recall and expand on the concepts of Contextual Logic Programming, a powerful and simple mechanism which addresses the general issue of modularity in Logic Programs. We claim that unit arguments are an essential addition to this programming model, illustrate the claim with examples and draw parallels with Object-Oriented programming. We argue that Contextual Logic Programming is an interesting and effective tool for the development of large-scale programs built upon the Contextual Logic Programming paradigm and argue that contexts with arguments actually provide a powerful, expressive and very convenient means of structuring large applications upon a Prolog basis. We substantiate our claims with examples taken mostly from a “real world” application, Universidade de Évora’s Academic Information System, which is currently being developed using the prototype implementation described in this article.
We sketch the most relevant aspects of a new implementation of Contextual Logic Programming, GNU Prolog/CX, focusing on the impact on performance of the features which were added to a regular Prolog system, highlighting the low overhead which is incurred in case these extensions are not used.
-
Categories:. D.2.2–Modules and interfaces, D.1.6–Logic Programming, D.1.5–Object-oriented Programming.
-
General Terms:. Contextual Logic Programming.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Abreu, S.: A Logic-based Information System. In: Pontelli, E., Santos Costa, V. (eds.) PADL 2000. LNCS, vol. 1753, pp. 141–153. Springer, Heidelberg (2000)
Abreu, S.: Isco: A practical language for heterogeneous information system construction. In: INAP 2001. INAP (2001)
Bugliesi, M.: A declarative view of inheritance in logic programming. In: Apt, K. (ed.) Proceedings of the Joint International Conference and Symposium on Logic Programming, Washington, USA, pp. 113–127. The MIT Press, Cambridge (1992)
Bugliesi, M., Ciampolini, A., Lamma, E., Mello, P.: Optimizing modular logic languages. ACM Computing Surveys (CSUR) 30(3es), 10 (1998)
Bugliesi, M., Lamma, E., Mello, P.: Modularity in Logic Programming. Journal of Logic Programming 19(20), 443–502 (1994)
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)
Denti, E., Lamma, E., Mello, P., Natali, A., Omicini, A.: Techniques for implementing contexts in Logic Programming. In: Lamma, E., Mello, P. (eds.) ELP 1992. LNCS, vol. 660, pp. 339–358. Springer, Heidelberg (1993)
Diaz, D., Codognet, P.: Design and implementation of the gnu prolog system. Journal of Functional and Logic Programming 2001(6) (October 2001)
Hill, P., Lloyd, J.: The Goedel Programming Language. MIT Press, Cambridge (1994) ISBN 0-262-08229-2
Lamma, E., Mello, P., Natali, A.: The design of an abstract machine for efficient implementation of contexts in logic programming. In: Levi, G., Martelli, M. (eds.) Proceedings of the Sixth International Conference on Logic Programming, Lisbon, pp. 303–317. The MIT Press, Cambridge (1989)
McCabe, F.G.: Logic and Objects. Prentice-Hall, Englewood Cliffs (1992)
Miller, D.: A logical analysis of modules in logic programming. The Journal of Logic Programming 6(1,2), 79–108 (1989)
Monteiro, L., Porto, A.: A Language for Contextual Logic Programming. In: Apt, K.R., de Bakker, J.W., Rutten, J.J.M.M. (eds.) Logic Programming Languages: Constraints, Functions and Objects, pp. 115–147. MIT Press, Cambridge (1993)
Moura, P.: Logtalk web site, http://www.logtalk.org/
Moura, P.: Logtalk 2.6 Documentation. Technical Report DMI 2000/1, University of Beira Interior, Portugal (2000)
Natali, A., Omicini, A.: Objects with State in Contextual Logic Programming. In: Penjam, J., Bruynooghe, M. (eds.) PLILP 1993. LNCS, vol. 714, pp. 220–234. Springer, Heidelberg (1993)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2003 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Abreu, S., Diaz, D. (2003). Objective: In Minimum Context. In: Palamidessi, C. (eds) Logic Programming. ICLP 2003. Lecture Notes in Computer Science, vol 2916. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-24599-5_10
Download citation
DOI: https://doi.org/10.1007/978-3-540-24599-5_10
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-20642-2
Online ISBN: 978-3-540-24599-5
eBook Packages: Springer Book Archive