Modules for Prolog Revisited - Inria - Institut national de recherche en sciences et technologies du numérique Access content directly
Reports (Research Report) Year : 2006

Modules for Prolog Revisited

Francois Fages

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.
Fichier principal
Vignette du fichier
RR-5869.pdf (277.67 Ko) Télécharger le fichier

Dates and versions

inria-00070157 , version 1 (19-05-2006)

Identifiers

  • HAL Id : inria-00070157 , version 1

Cite

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

Share

Gmail Facebook Twitter LinkedIn More