HAL will be down for maintenance from Friday, June 10 at 4pm through Monday, June 13 at 9am. More information
Skip to Main content Skip to Navigation
Reports

Modules for Prolog Revisited

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.
Document type :
Reports
Complete list of metadata

https://hal.inria.fr/inria-00070157
Contributor : Rapport de Recherche Inria Connect in order to contact the contributor
Submitted on : Friday, May 19, 2006 - 7:16:49 PM
Last modification on : Thursday, February 3, 2022 - 11:18:13 AM
Long-term archiving on: : Sunday, April 4, 2010 - 8:21:03 PM

Identifiers

  • HAL Id : inria-00070157, version 1

Collections

Citation

Rémy Haemmerlé, Francois Fages. Modules for Prolog Revisited. [Research Report] RR-5869, INRIA. 2006, pp.17. ⟨inria-00070157⟩

Share

Metrics

Record views

58

Files downloads

178