## A Theory of Modules for Logic Programming (1986)

### Cached

### Download Links

- [www.lix.polytechnique.fr]
- [www.lix.polytechnique.fr]
- DBLP

### Other Repositories/Bibliography

Venue: | In Symp. Logic Programming |

Citations: | 41 - 5 self |

### BibTeX

@INPROCEEDINGS{Miller86atheory,

author = {Dale Miller},

title = {A Theory of Modules for Logic Programming},

booktitle = {In Symp. Logic Programming},

year = {1986},

pages = {106--114}

}

### Years of Citing Articles

### OpenURL

### Abstract

Abstract: We present a logical language which extends the syntax of positive Horn clauses by permitting implications in goals and in the bodies of clauses. The operational meaning of a goal which is an implication is given by the deduction theorem. That is, a goal D ⊃ G is satisfied by a program P if the goal G is satisfied by the larger program P ∪ {D}. If the formula D is the conjunction of a collection of universally quantified clauses, we interpret the goal D ⊃ G as a request to load the code in D prior to attempting G, and then unload that code after G succeeds or fails. This extended use of implication provides a logical explanation of parametric modules, some uses of Prolog’s assert predicate, and certain kinds of abstract datatypes. Both a model-theory and proof-theory are presented for this logical language. We show how to build a possible-worlds (Kripke) model for programs by a fixed point construction and show that the operational meaning of implication mentioned above is sound and complete for intuitionistic, but not classical, logic. 1. Implications as Goals Let A be a syntactic variable which ranges over atomic formulas of first-order logic. Let G range over a class of formulas, called goal formulas, to be specified shortly. We shall assume, however, that this class always contains ⊤ (true) and all atomic formulas. The formulas represented by A and G may contain free variables. Given these two classes, we define definite clauses, denoted by the syntactic variable D, as follows: D: = G ⊃ A | ∀x D | D1 ∧ D2 A program is defined to be a finite set of closed definite clauses. P will be a syntactic variable for programs. A clause of the form ⊤ ⊃ A will often be written as simply A. Let P be a program. Define [P] to be the smallest set of formulas satisfying the following recursive definitions. (i) P ⊆ [P].

### Citations

381 | Bilattices and the semantics of logic programming
- Fitting
- 1991
(Show Context)
Citation Context ...r substitution claiming that x would get either a or b. The corresponding query in the logic presented here would be written as (p(a) ∧ p(b) ⊃ ⊥) ⊃ ∃x (p(x) ⊃ ⊥) and would not be provable. Fitting in =-=[6]-=- used classical logic to investigated an extension of Horn clauses which contained negations within the body of clauses. His model theory for such clauses used partial models (also attributed to Kripk... |

124 |
Metamathematical Investigations of Intuitionistic Arithmetic and Analysis
- Troelstra
- 1973
(Show Context)
Citation Context ...died, and we shall be concerned with two such logics, namely, minimal logic and intuitionistic logic. We can not present these logics in very much detail. The interested reader is referred to [14] or =-=[16]-=- for more information. Theorems in the rest of this paper will be stated without proof. Let ⊢C, ⊢I, ⊢M represent provability in, respectively, classical C, intuitionistic I, and minimal M logic. The d... |

115 |
Amalgamating language and metalanguage in logic programming
- Bowen, Kowalski
- 1982
(Show Context)
Citation Context ... Either approach could be used to make this a meaningful module. Given these two modules, a very sensible way to bring them together is illustrated in the following example. Consider sorting the list =-=[2,3,1]-=-. The following goal has a ⊢O-derivation, in which the substitution found for x would then be the desired sorted list. ⊢O lists ∧sort(<) ⊃ ∃x bsort([2,3,1],x) The module lists is needed here since the... |

100 |
EQLOG: equality, types and generic modules for logic programming
- Goguen, Meseguer
(Show Context)
Citation Context ...dule M3, defined below, instead of importing M1. module M3. import M1. p(X,Y) :- p(X,Y). q(X,Y) :- r(Y,X). Such a module roughly corresponds to one of O’Keefe’s breeze bricks. Goguen and Messequer in =-=[10]-=- presented a notion of module for a sorted theory of Horn clauses with equality. Their modules had associated with them Horn clauses and they provided a mechanism of module importing called enriching.... |

82 |
N-prolog: an extension of prolog with hypothetical implications. i
- Gabbay, Reyle
- 1984
(Show Context)
Citation Context ...eed to be marked as being either bound or free. This one difference would, in fact, cause several other changes to the way one looks at Prolog implementations. More discussion of this can be found in =-=[7]-=-. A simplified version of the tableau proof procedure presented by McCarty in [11] could also be used to implement an interpreter for this language. 6. Minimal Logic Negation Let us now introduce a ne... |

30 |
Investigations into logical deduction. In The Collected Papers of Gerhard Gentzen
- Gentzen
- 1969
(Show Context)
Citation Context ... atomic, P ⊢O A ∧ G if and only if P ⊢O A ∧ [A ⊃ G]. In the forward direction, this is trivial. The reverse direction requires a proof reminiscent of the cut elimination theorem for first-order logic =-=[9]-=-. This relation to cut elimination suggests that implications may be used in logic programs to actually shorten computations. This feature can be used to “memoize” a program’s execution, i.e., results... |

27 |
Applications of Kripke models
- Smorynski
(Show Context)
Citation Context ...en in [1]. The fixed point result in that paper can be viewed as special case of this fixed point theorem. The interpretations we have presented in this section are often referred to as Kripke models =-=[15]-=-. These models are frequently used to explain the semantics of modal and intuitionistic logic. Since we shall show in the next section that our logic is essentially a sublogic of intuitionistic logic,... |

3 |
Towards a programming environment for large prolog programs
- Chomicki, Minsky
- 1985
(Show Context)
Citation Context ...ges. For example, Bowen and Weinberg in [3] have extend the work of Bowen and Kowalski in [2] and presented several very interesting programs using a notion similar to modules. Chomicki and Minsky in =-=[4]-=- have shown the importance of introducing modularity into Prolog programs and developed a rule-based security system for controlling access among various fragments of code. Neither of these papers, ho... |

2 |
1982] Contributions to the Theory of
- Apt, Emden
(Show Context)
Citation Context ... Either approach could be used to make this a meaningful module. Given these two modules, a very sensible way to bring them together is illustrated in the following example. Consider sorting the list =-=[2,3,1]-=-. The following goal has a ⊢O-derivation, in which the substitution found for x would then be the desired sorted list. ⊢O lists ∧sort(<) ⊃ ∃x bsort([2,3,1],x) The module lists is needed here since the... |

1 |
Fixed Point Semantics and Tableau Proof Procedures for a Clausal Intuitionistic Logic
- McCarty
- 1986
(Show Context)
Citation Context ...t, cause several other changes to the way one looks at Prolog implementations. More discussion of this can be found in [7]. A simplified version of the tableau proof procedure presented by McCarty in =-=[11]-=- could also be used to implement an interpreter for this language. 6. Minimal Logic Negation Let us now introduce a new logical constant ⊥ to denote false. Formulas of the form B ⊃ ⊥ will be abbreviat... |

1 |
Towards an Algebra for Constructing Logic
- O’Keefe
(Show Context)
Citation Context ... these papers, however, provided a logical analysis of their respective notions of modules. The theoretical analysis in this paper should provide a basis for such an analysis. 15sThe paper by O’Keefe =-=[13]-=- presents a formal approach to developing modules for Prolog. Much of what he presents in that paper can be captured by the theory presented in this paper. For example, let M1 be a module containing t... |