Modularity in Functional-Logic Programming
Lee Naish · 1997
Constructor-Based Conditional Rewriting Logic is a general framework for integrating first-order functional and logic programming that has been investigated in [9] giving an algebraic semantics for programs. In this paper, we introduce an immediate consequence operator TR for each program R and a fixpoint semantics that coincides with the algebraic one. We also propose an extension of the formalism with constructs for modularization, that lets us express hiding, export/import and inheritance. The fixpoint semantics does not characterize these constructs well and hence we propose two alternative semantics for programs: the operator TR itself, and the set of all term models (TR-fixpoints). The former is compositional and the latter is compositional and fully abstract w.r.t. a natural notion of observability.