Closures are Needed for Closed Module Systems - Inria - Institut national de recherche en sciences et technologies du numérique Accéder directement au contenu
Rapport (Rapport De Recherche) Année : 2005

Closures are Needed for Closed Module Systems

Francois Fages

Résumé

In a classical paper of D.H.D. Warren, the higher-order extensions of Prolog were questioned as they do not really provide more expressive power than meta-programming predicates. Without disputing this argumentation in the context of a logic programming system without modules, we show that the situation is different in a closed module system. By closed we mean the property that the module system is able to prevent any call to the private predicates of a module from the other modules, in particular through meta-programming predicates. We show that this property necessitates to distinguish the execution of a term (meta-programming predicate call) from the execution of a closure (higher order). We propose a module system for Constraint Logic Programming with a notion of closures inspired from Linear Concurrent Constraint programming. This module system is quite simple and pretty independent of a precise language (it is currently implemented for GNU-Prolog). Although this system can be seen as a simple layer of syntactic sugar, it does provide a discipline for naming predicates and hiding code, making possible the development of libraries and facilitating the safe re-use of existing code. Furthermore we provide the module system with logical and operational semantics. This formal setting is used in the paper to compare our approach to the other module systems proposed for Prolog, which generally do not ensure full code protection.
Fichier principal
Vignette du fichier
RR-5575.pdf (273.27 Ko) Télécharger le fichier
Loading...

Dates et versions

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

Identifiants

  • HAL Id : inria-00070431 , version 1

Citer

Rémy Haemmerlé, Francois Fages. Closures are Needed for Closed Module Systems. [Research Report] RR-5575, INRIA. 2005, pp.19. ⟨inria-00070431⟩
106 Consultations
155 Téléchargements

Partager

Gmail Facebook X LinkedIn More