Composing Programs in a Rewriting Logic for Declarative Programming

Constructor-Based Conditional Rewriting Logic is a general framework for integrating first-order functional and logic programming which gives an algebraic semantics for nondeterministic functional-logic programs. In the context of this formalism, we introduce a simple notion of program module as an open program which can be extended together with several mechanisms to combine them. These mechanisms are based on a reduced set of operations. However, the high expressiveness of these operations enable us to model typical constructs for program modularization like hiding, export/import, genericity/instantiation, and inheritance in a simple way. We also deal with the semantic aspects of the proposal by introducing an immediate consequence operator, and studying several alternative semantics for a program module, based on this operator, in the line of logic programming: the operator itself, its least fixpoint (the least model of the module), the set of its pre-fixpoints (term models of the module), and some other variations in order to find a compositional and fully abstract semantics w.r.t. the set of operations and a natural notion of observability.

[1]  Bernhard Möller On the algebraic specification of infinite objects — ordered and continuous models of algebraic types , 2004, Acta Informatica.

[2]  H. Hussmann Nondeterminism in Algebraic Specifications and Algebraic Programs , 1993, Progress in Theoretical Computer Science.

[3]  Samson Abramsky,et al.  Domain theory , 1995, LICS 1995.

[4]  Krzysztof R. Apt,et al.  Logic Programming , 1990, Handbook of Theoretical Computer Science, Volume B: Formal Models and Sematics.

[5]  Juan Miguel Molina Bravo Modularidad en programación lógico-funcional de primer orden , 2000 .

[6]  MeseguerJosé Conditional rewriting logic as a unified model of concurrency , 1992 .

[7]  Antonio Brogi,et al.  Fully Abstract Composition Semantics for an Algebra of Logic Programs , 1995, Theor. Comput. Sci..

[8]  Max Bramer Logic Programming with Prolog , 2005, Springer London.

[9]  Heinrich Hussmann,et al.  Nondeterminism in Algebraic Specifications and Algebraic Programs , 1993 .

[10]  M. Hanus,et al.  Curry: An Integrated Functional Logic Language , 2003 .

[11]  Joseph A. Goguen,et al.  Institutions: abstract model theory for specification and programming , 1992, JACM.

[12]  Jean-Marie Jacquet,et al.  Introduction to Logic Programming , 1993, ICLP Workshop on Construction of Logic Programs.

[13]  Giorgio Levi,et al.  A Model-Theoretic Reconstruction of the Operational Semantics of Logic Programs , 1993, Inf. Comput..

[14]  Paolo Mancarella,et al.  An Algebra of Logic Programs , 1988, ICLP/SLP.

[15]  Antonio Brogi,et al.  Modular logic programming , 1994, TOPL.

[16]  Fernando Orejas Structuring and Modularity , 1999, Algebraic Foundations of Systems Specification.

[17]  T. Broadbent,et al.  Module Algebra , 1970, Nature.

[18]  J. C. Gonz Alez-Moreno,et al.  An Approach to Declarative Programming Based on a Rewriting Logic , 2022 .

[19]  Martin Wirsing,et al.  Algebraic Specification , 1991, Handbook of Theoretical Computer Science, Volume B: Formal Models and Sematics.

[20]  Ernesto Pimentel,et al.  Modularity in Functional-Logic Programming , 1997, ICLP.

[21]  Hartmut Ehrig,et al.  Institutions for Logic Programming , 1997, Theor. Comput. Sci..

[22]  Evelina Lamma,et al.  Modularity in Logic Programming , 1994, J. Log. Program..

[23]  Michael Hanus,et al.  The integration of functions into logic programming: a survey , 1994 .

[24]  Francisco Javier López-Fraguas,et al.  An Approach to Declarative Programming Based on a Rewriting Logic , 1999, J. Log. Program..

[25]  Dale Miller,et al.  A Theory of Modules for Logic Programming , 1986, SLP.

[26]  Hartmut Ehrig,et al.  Fundamentals of Algebraic Specification 2: Module Specifications and Constraints , 1990 .

[27]  Michael Hanus,et al.  The Integration of Functions into Logic Programming: From Theory to Practice , 1994, J. Log. Program..