Closures are Needed for Closed Module Systems

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

Cited literature [1 references]  Display  Hide  Download

https://hal.inria.fr/inria-00070431
Contributor : Rapport de Recherche Inria <>
Submitted on : Friday, May 19, 2006 - 8:28:31 PM
Last modification on : Friday, May 25, 2018 - 12:02:03 PM
Long-term archiving on : Sunday, April 4, 2010 - 9:12:14 PM

Identifiers

  • HAL Id : inria-00070431, version 1

Collections

Citation

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

Share

Metrics

Record views

287

Files downloads

238