Citation
Morales, J. and Hermenegildo, Manuel V. and Haemmerlé, R.
(2012).
Modular extensions for modular (Logic) languages.
In: "21th International Symposium on Logic-Based Program Synthesis and Transformation (LOPSTR'11)", 18-20 de julio de 2012, Odense, Dinamarca. ISBN 9783642322105.
Abstract
We address the problem of developing mechanisms for easily
implementing modular extensions to modular (logic) languages. By(language) extensions we refer to different groups of syntactic definitions and translation rules that extend a language. Our use of the concept of modularity in this context is twofold. We would like these extensions to
be modular, in the sense above, i.e., we should be able to develop different extensions mostly separately. At the same time, the sources and targets for the extensions are modular languages, i.e., such extensions may take as input sepárate pieces of code and also produce sepárate pieces of code. Dealing with this double requirement involves interesting challenges to ensure that modularity is not broken: first, combinations of extensions (as if they were a single extensión) must be given a precise meaning. Also, the sepárate translation of múltiple sources (as if they
were a single source) must be feasible. We present a detailed description of a code expansion-based framework that proposes novel solutions for these problems. We argüe that the approach, while implemented for Ciao, can be adapted for other Prolog-based systems and languages.