## A typed foundation for directional logic programming (1992)

Venue: | In Proc. Workshop on Extensions to Logic Programming |

Citations: | 12 - 1 self |

### BibTeX

@INPROCEEDINGS{Reddy92atyped,

author = {Uday S. Reddy},

title = {A typed foundation for directional logic programming},

booktitle = {In Proc. Workshop on Extensions to Logic Programming},

year = {1992},

pages = {199--222}

}

### Years of Citing Articles

### OpenURL

### Abstract

Abstract. A long standing problem in logic programming is how to impose directionality on programs in a safe fashion. The benefits of directionality include freedom from explicit sequential control, the ability to reason about algorithmic properties of programs (such as termination, complexity and deadlock-freedom) and controlling concurrency. By using Girard’s linear logic, we are able to devise a type system that combines types and modes into a unified framework, and enables one to express directionality declaratively. The rich power of the type system allows outputs to be embedded in inputs and vice versa. Type checking guarantees that values have unique producers, but multiple consumers are still possible. From a theoretical point of view, this work provides a “logic programming interpretation ” of (the proofs of) linear logic, adding to the concurrency and functional programming interpretations that are already known. It also brings logic programming into the broader world of typed languages and types-as-propositions paradigm, enriching it with static scoping and higher-order features.

### Citations

1913 |
Foundations of Logic Programming
- LLoyd
- 1987
(Show Context)
Citation Context ...uction Logic programming was heralded with the slogan [29]: Algorithm = Logic + Control While the “logic” part of the algorithm, formalized by declarative semantics, has been well-studied (see, e.g., =-=[35]-=-), procedural semantics—the semantics of control—has not progressed far. Since the theory offers only certain unreachable mechanisms for complete strategies [33], practical logic programming languages... |

1408 |
A Calculus of Communicating Systems
- Milner
- 1980
(Show Context)
Citation Context ...Variable − ( ) ⊥ : Variable + ∼ = Variable − : ( ) ⊥ If x is a variable in one of the subsets, then its image in the other subset is denoted x ⊥ . This is similar to the naming convention used in CCS =-=[39]-=-. The abstract syntax is given by p, q ∈ P attern t, u ∈ T erm θ, φ ∈ Command p ::= x | () | (p1, p2) | [ ] | [p1, p2] | case(inl p1 ⇒ θ1 | inr p2 ⇒ θ2) | 〈p1, 〉 | 〈 , p2〉 t ::= x | () | (t1, t2) | [ ... |

1151 |
G.: Linear and Nonlinear Programming
- Luenberger
- 1984
(Show Context)
Citation Context ...sometimes called “proofs as computations” correspondence. There is a large body of work in using this correspondence to interpret linear logic for declarative programming (including logic programming =-=[3, 24, 26, 30]-=- and concurrent systems [4, 6, 15, 22, 36]). On the other hand, as outlined in the previous paragraph, a deeper correspondence exists with constructive logics: types ←→ propositions programs ←→ proofs... |

977 |
Negation as Failure
- Clark
- 1978
(Show Context)
Citation Context ...e definition in Typed Prolog is of the form: P : pred (A1 × . . . × Ak) P (¯t1) ← φ1 . . P (¯tn) ← φn For our purpose, it will be better to work with iff-completions of the Horn clauses as defined in =-=[7]-=-: P (¯x) ⇐⇒ (∃¯y1, ¯z1. ¯x = ¯t1, φ1); . . . ; (∃¯yn, ¯zn. ¯x = ¯tn, φn)(¯yi are the variables of ¯ti and ¯zi are the variables of φi which do not occur in ¯ti). We will also use a similar iff-comple... |

639 |
The Art of Prolog
- Sterling, Shapiro
- 1994
(Show Context)
Citation Context ...r further discussion of the Curry-Howard correspondence. Directionality It is well-known that the selection of literals for resolution in logic programming crucially determines the search space. (See =-=[43, 50]-=- for a discussion). Take, for example, the list reversal program: reverse(nil, nil). reverse(a.x, y) ← reverse(x,z), append(z, a.nil, y). and the goal reverse(L, x) where L is a specific list. Using l... |

457 | Concurrent Constraint Programming
- Saraswat
- 1993
(Show Context)
Citation Context ...ne. 1 The concept of procedures is, in fact, present in most concurrent logic programming languages including Concurrent Prolog [49], Parlog [21], Janus [45] and other concurrent constraint languages =-=[46]-=-. Our notion of directional logic programming includes them and provides a theory for their well-formedness.The proofs in a constructive logic are recipes for computation, i.e., they are programs. Fo... |

374 |
Proofs and Types
- Girard, Lafont, et al.
- 1989
(Show Context)
Citation Context ...ess.The proofs in a constructive logic are recipes for computation, i.e., they are programs. For instance, functional programs are textual representations of the proofs of intuitionistic logic. (See =-=[2, 10, 20, 37, 52]-=-). The proofs of linear logic must similarly have a computational interpretation as programs. What kind of programs? It seems that the symmetries of linear logic permit a wide spectrum of interpretati... |

306 | Logic programming in a fragment of intuitionistic linear logic
- Hodas, Miller
- 1994
(Show Context)
Citation Context ...sometimes called “proofs as computations” correspondence. There is a large body of work in using this correspondence to interpret linear logic for declarative programming (including logic programming =-=[3, 24, 26, 30]-=- and concurrent systems [4, 6, 15, 22, 36]). On the other hand, as outlined in the previous paragraph, a deeper correspondence exists with constructive logics: types ←→ propositions programs ←→ proofs... |

288 | Computational interpretations of linear logic
- Abramsky
- 1993
(Show Context)
Citation Context ...ation of logic programming.In separate work, carried out independently from ours, Abramsky, Jagadeesan and Panangaden showed that the proofs of linear logic can be interpreted in a cc language. (See =-=[1]-=-). In addition, Lafont [30] seems to foresee many of our ideas. 8 Conclusion We have given a typed foundation for logic programs with input-output directionality. Our type system combines (what were p... |

279 |
P.: Constructive mathematics and computer programming
- Martin-Löf
- 1982
(Show Context)
Citation Context ...ess.The proofs in a constructive logic are recipes for computation, i.e., they are programs. For instance, functional programs are textual representations of the proofs of intuitionistic logic. (See =-=[2, 10, 20, 37, 52]-=-). The proofs of linear logic must similarly have a computational interpretation as programs. What kind of programs? It seems that the symmetries of linear logic permit a wide spectrum of interpretati... |

220 |
Combinatory Logic
- Curry, Feys
- 1958
(Show Context)
Citation Context ...pes ←→ propositions programs ←→ proofs computation ←→ proof normalization This correspondence is often called “propositions as types” correspondence or Curry-Howard isomorphism (following the work of =-=[11, 27]-=-). Here, programs are treated as purely recipes for computation and their potential declarative reading remains in the background. To emphasize this aspect—and to prevent confusion between the two cor... |

170 |
Interaction nets
- Lafont
- 1990
(Show Context)
Citation Context ...nd of programs? It seems that the symmetries of linear logic permit a wide spectrum of interpretations. Girard himself formulated a concurrent computation framework called proof nets [17, 19]. Lafont =-=[31]-=- uses similar structures called “interaction nets”. However, the abstract nature of this framework does not readily lend itself to use as a programming language. Abramsky [2] was the first to propose ... |

155 | Higher-order logic programming
- Nadathur, Miller
- 1986
(Show Context)
Citation Context ...n be made a legitimate term and treated as a first-class value. Note that adding higher-order features to directional logic programming does not involve higher-order “unification” as in Lambda Prolog =-=[38]-=-. We have procedure application, but not equality testing of procedures. 6.4 Conditions and functions We have deliberately avoided introducing functions into the language to keep it simple and “logic ... |

143 |
A polymorphic type system for Prolog
- Mycroft, O’Keefe
- 1984
(Show Context)
Citation Context ...k whether it is used consistently. A little thought reveals that a solution for this problem lies in considering types. The type reverse : Pred (List(t), List(t)) is polymorphic in the element type t =-=[23, 32, 40]-=-, i.e., reverse works uniformly for all types of list elements. If we combine mode information with types, thispolymorphism is enough to indicate that ground terms, unbound variables and all other ki... |

142 |
The structure of multiplicatives
- Danos, Regnier
- 1989
(Show Context)
Citation Context ...airs. Since the use of such pairs still assumes that the components may be connected, this is a safe loss of information. The easiest way to add such loss of information is via the so-called MIX rule =-=[12, 17]-=-: Γ ⊢ {θ} ∆ Γ ′ ⊢ {θ ′ } ∆ ′ MIX Γ, Γ ′ ⊢ {θ; θ ′ } ∆, ∆ ′ The command θ; θ ′ denotes the formal “joining together” of the separate computations θ and θ ′ . There can be no interactions between them. ... |

129 |
Algorithm = logic + control
- Kowalski
- 1979
(Show Context)
Citation Context ...ds Directionality, modes, types, concurrent logic programming, linear logic, Curry-Howard isomorphism, sequent calculus, logic variables. 1 Introduction Logic programming was heralded with the slogan =-=[29]-=-: Algorithm = Logic + Control While the “logic” part of the algorithm, formalized by declarative semantics, has been well-studied (see, e.g., [35]), procedural semantics—the semantics of control—has n... |

103 |
Towards a geometry of interaction
- Girard
- 1989
(Show Context)
Citation Context ...programs. What kind of programs? It seems that the symmetries of linear logic permit a wide spectrum of interpretations. Girard himself formulated a concurrent computation framework called proof nets =-=[17, 19]-=-. Lafont [31] uses similar structures called “interaction nets”. However, the abstract nature of this framework does not readily lend itself to use as a programming language. Abramsky [2] was the firs... |

102 | Type Theory and Functional Programming
- Thompson
- 1991
(Show Context)
Citation Context ...ess.The proofs in a constructive logic are recipes for computation, i.e., they are programs. For instance, functional programs are textual representations of the proofs of intuitionistic logic. (See =-=[2, 10, 20, 37, 52]-=-). The proofs of linear logic must similarly have a computational interpretation as programs. What kind of programs? It seems that the symmetries of linear logic permit a wide spectrum of interpretati... |

76 |
Un systeme de communication hommemachine en francais
- Colmerauer, Kanoui, et al.
- 1973
(Show Context)
Citation Context ...e mechanisms for complete strategies [33], practical logic programming languages have resorted to low-level operational mechanisms that are not entirely satisfactory. The sequential control of Prolog =-=[9]-=- and the read-only variables of Concurrent Prolog [49] are examples of such mechanisms. At the same time, the desire for higher-level declarative mechanisms for specifying control has been certainly p... |

69 |
Logic Programming. Systematic Program Development
- Deville
(Show Context)
Citation Context ...simple theory is not adequate to handle all logic programs of interest). Ideas similar to this proposal were used in Parlog [8, 21] and MU-Prolog [41] for controlling evaluation order, and by Deville =-=[13]-=- for reasoning about algorithmic properties of logic programs. However, the subset of programs treated by the simple modes is too weak, and all these applications found need for extensions which, unfo... |

67 |
From Petri nets to linear logic
- Martí-Oliet, Meseguer
- 1991
(Show Context)
Citation Context ...s” correspondence. There is a large body of work in using this correspondence to interpret linear logic for declarative programming (including logic programming [3, 24, 26, 30] and concurrent systems =-=[4, 6, 15, 22, 36]-=-). On the other hand, as outlined in the previous paragraph, a deeper correspondence exists with constructive logics: types ←→ propositions programs ←→ proofs computation ←→ proof normalization This c... |

63 |
Concurrent Prolog and its interpreter
- Shapiro
- 1983
(Show Context)
Citation Context ...logic programming languages have resorted to low-level operational mechanisms that are not entirely satisfactory. The sequential control of Prolog [9] and the read-only variables of Concurrent Prolog =-=[49]-=- are examples of such mechanisms. At the same time, the desire for higher-level declarative mechanisms for specifying control has been certainly present, as seen in the mode declarations of Parlog [21... |

56 |
Typed Prolog: A semantic reconstruction of the Mycroft-O’Keefe type system
- Lakshman, Reddy
- 1991
(Show Context)
Citation Context ...k whether it is used consistently. A little thought reveals that a solution for this problem lies in considering types. The type reverse : Pred (List(t), List(t)) is polymorphic in the element type t =-=[23, 32, 40]-=-, i.e., reverse works uniformly for all types of list elements. If we combine mode information with types, thispolymorphism is enough to indicate that ground terms, unbound variables and all other ki... |

55 |
Janus--A step towards distributed constraint programming
- Saraswat, Kahn, et al.
- 1990
(Show Context)
Citation Context ... that is able to go beyond the intuitionistic one. 1 The concept of procedures is, in fact, present in most concurrent logic programming languages including Concurrent Prolog [49], Parlog [21], Janus =-=[45]-=- and other concurrent constraint languages [46]. Our notion of directional logic programming includes them and provides a theory for their well-formedness.The proofs in a constructive logic are recip... |

48 |
A categorical linear framework for Petri nets, in
- Brown, Gum
- 1990
(Show Context)
Citation Context ...s” correspondence. There is a large body of work in using this correspondence to interpret linear logic for declarative programming (including logic programming [3, 24, 26, 30] and concurrent systems =-=[4, 6, 15, 22, 36]-=-). On the other hand, as outlined in the previous paragraph, a deeper correspondence exists with constructive logics: types ←→ propositions programs ←→ proofs computation ←→ proof normalization This c... |

47 | The uniform proof-theoretic foundation of linear logic programming
- Pym, Harland
- 1994
(Show Context)
Citation Context ...sometimes called “proofs as computations” correspondence. There is a large body of work in using this correspondence to interpret linear logic for declarative programming (including logic programming =-=[3, 24, 26, 30]-=- and concurrent systems [4, 6, 15, 22, 36]). On the other hand, as outlined in the previous paragraph, a deeper correspondence exists with constructive logics: types ←→ propositions programs ←→ proofs... |

41 |
Parallel Logic Programming in Parlog - The language and its
- Gregory
- 1987
(Show Context)
Citation Context ...49] are examples of such mechanisms. At the same time, the desire for higher-level declarative mechanisms for specifying control has been certainly present, as seen in the mode declarations of Parlog =-=[21]-=- and MU-Prolog [41].We believe that a formal approach to procedural semantics is necessary so that one can reason about algorithmic properties of programs such as termination, complexity and deadlock... |

36 |
clause programs with polymorphic types: semantics and resolution
- Horn
- 1991
(Show Context)
Citation Context ...k whether it is used consistently. A little thought reveals that a solution for this problem lies in considering types. The type reverse : Pred (List(t), List(t)) is polymorphic in the element type t =-=[23, 32, 40]-=-, i.e., reverse works uniformly for all types of list elements. If we combine mode information with types, thispolymorphism is enough to indicate that ground terms, unbound variables and all other ki... |

33 |
Transformation of Logic Programs into Functional Programs
- Reddy
- 1984
(Show Context)
Citation Context ...s directional logic programming. 1 Conventional logic programs can then be thought of as short hand notations which stand for multiple directional logic programs. Historically, this work was begun in =-=[42, 43]-=- where a “simple theory of directionality” was outlined. The qualifier “simple” signifies the fact that entire arguments of predicates are treated as inputs or outputs. (Undoubtedly, such a simple the... |

32 | Linear continuations
- Filinski
- 1992
(Show Context)
Citation Context ...gramming language. Abramsky [2] was the first to propose a concrete computational interpretation as a concurrent programming language in the framework of the “chemical abstract machine” [5]. Filinski =-=[14]-=- and Reddy [44] proposed functional programming interpretations in terms of continuations and “acceptors” respectively. It seems that the asymmetry between inputs and outputs present in functional pro... |

31 |
Normal process representatives
- Gehlot, Gunter
- 1990
(Show Context)
Citation Context ...s” correspondence. There is a large body of work in using this correspondence to interpret linear logic for declarative programming (including logic programming [3, 24, 26, 30] and concurrent systems =-=[4, 6, 15, 22, 36]-=-). On the other hand, as outlined in the previous paragraph, a deeper correspondence exists with constructive logics: types ←→ propositions programs ←→ proofs computation ←→ proof normalization This c... |

31 |
Negation and Control in Logic Programs
- Naish
- 1986
(Show Context)
Citation Context ... such mechanisms. At the same time, the desire for higher-level declarative mechanisms for specifying control has been certainly present, as seen in the mode declarations of Parlog [21] and MU-Prolog =-=[41]-=-.We believe that a formal approach to procedural semantics is necessary so that one can reason about algorithmic properties of programs such as termination, complexity and deadlock freedom etc. To ad... |

26 |
On the Relationship between Logic and Functional Languages," Draft of article to appear
- Reddy
- 1984
(Show Context)
Citation Context ...s directional logic programming. 1 Conventional logic programs can then be thought of as short hand notations which stand for multiple directional logic programs. Historically, this work was begun in =-=[42, 43]-=- where a “simple theory of directionality” was outlined. The qualifier “simple” signifies the fact that entire arguments of predicates are treated as inputs or outputs. (Undoubtedly, such a simple the... |

24 |
Nets as tensor theories
- Gunter, Gehlot
- 1989
(Show Context)
Citation Context ...is need for two forms of failure mechanisms. The first is a way to escape from an erroneous case. For this purpose, we use an error command: ERROR Γ ⊢ {error} ∆ with the equivalence: error, θ = error =-=(22)-=- We often abbreviate case(inl p ⇒ error | inr q ⇒ θ) to case(inr q ⇒ θ) (and, similarly for error in the inr case). The second mechanism is an explicit failure command for terminating backtracking. (S... |

24 | Linear logic
- Lincoln
- 1992
(Show Context)
Citation Context ..., weakening and contraction respectively. In !R, the notation !Γ (?∆) means a sequence all of whose formulas are of the form !X (?Y ). The reason for this requirement is explained in Section 6.1. See =-=[34, 47]-=- for informal introductions to linear logic and [2, 17] for fuller treatments. 3 Towards directional logic programming In this section, we informally motivate the concepts of directional logic program... |

15 |
The collected papers of Gerhard Gentzen, edited and translated into English by M.E. Szabo
- Gentzen
- 1969
(Show Context)
Citation Context ...e A is an output of type A ⊥ and an output of type A is an input of type A ⊥ . Thus, input-output modes are incorporated into types. The best way to study linear logic proofs is by a sequent calculus =-=[16, 18, 20, 51]-=-. A derivation of a sequent Γ ⊢ ∆ represents a proof of (the disjunction of) the conclusions ∆ from (the conjunction of) the hypotheses Γ . In a logic with involutive negation, it is not strictly nece... |

14 |
Parlog: A parallel logic programming language
- Clark, Gregory
- 1983
(Show Context)
Citation Context ...uments of predicates are treated as inputs or outputs. (Undoubtedly, such a simple theory is not adequate to handle all logic programs of interest). Ideas similar to this proposal were used in Parlog =-=[8, 21]-=- and MU-Prolog [41] for controlling evaluation order, and by Deville [13] for reasoning about algorithmic properties of logic programs. However, the subset of programs treated by the simple modes is t... |

13 |
Implicative formulae in the “proofs as computations” analogy
- Asperti, Ferrari, et al.
- 1990
(Show Context)
Citation Context |

13 |
Closure and fairness in the semantics of programming logic
- Lassen, Maher
- 1984
(Show Context)
Citation Context ...ics, has been well-studied (see, e.g., [35]), procedural semantics—the semantics of control—has not progressed far. Since the theory offers only certain unreachable mechanisms for complete strategies =-=[33]-=-, practical logic programming languages have resorted to low-level operational mechanisms that are not entirely satisfactory. The sequential control of Prolog [9] and the read-only variables of Concur... |

11 |
Proof theory, volume 81
- Takeuti
- 1987
(Show Context)
Citation Context ...e A is an output of type A ⊥ and an output of type A is an input of type A ⊥ . Thus, input-output modes are incorporated into types. The best way to study linear logic proofs is by a sequent calculus =-=[16, 18, 20, 51]-=-. A derivation of a sequent Γ ⊢ ∆ represents a proof of (the disjunction of) the conclusions ∆ from (the conjunction of) the hypotheses Γ . In a logic with involutive negation, it is not strictly nece... |

8 |
Proof Theory and Logical Complexity, Volume 1. bibliopolis
- Girard
- 1987
(Show Context)
Citation Context ...[2, 5]. The semantics of the constructs is defined by the following reduction rules: x ⇐ t, θ[x] T −→ θ[t] (15) p ⇐ x, θ[x] P −→ θ[p] (16) () ⇐ () −→ succ (17) (p1, p2) ⇐ (t1, t2) −→ p1 ⇐ t1, p2 ⇐ t2 =-=(18)-=- case(inl p ⇒ θ1 | inr q ⇒ θ2) ⇐ inl t −→ p ⇐ t, θ1 (19) case(inl p ⇒ θ1 | inr q ⇒ θ2) ⇐ inr u −→ q ⇐ u, θ2 (20) θ[x] T and θ[x] P denote commands that contain at least one occurrence of x as a term a... |

7 |
Communication with directed logic variables
- Kleinman, Moscowitz, et al.
- 1991
(Show Context)
Citation Context ...s, linearity means that each variable has a unique “producer” and a unique “consumer”. Similar restrictions are used in Doc [25] and Janus [45], and the “directed logic variables” of Kleinman et. al. =-=[28]-=-. Also, as in these languages, linear logic allows duplication operators (Section 6.1). By using a duplication operator as the consumer of a value, we obtain the effect that two copies of the value ar... |

5 |
Programming Language Doc and Its Self-Description or, X = X is Considered Harmful
- Hirata
- 1986
(Show Context)
Citation Context ...iable, one is an input occurrence and the other is an output occurrence. Thus, linearity means that each variable has a unique “producer” and a unique “consumer”. Similar restrictions are used in Doc =-=[25]-=- and Janus [45], and the “directed logic variables” of Kleinman et. al. [28]. Also, as in these languages, linear logic allows duplication operators (Section 6.1). By using a duplication operator as t... |

3 |
Computational interpretations of linear logic. Research Report DOC 90/20
- Abramsky
- 1990
(Show Context)
Citation Context |

2 | Acceptors as values: Functional programming in classical linear logic
- Reddy
- 1991
(Show Context)
Citation Context ...ge. Abramsky [2] was the first to propose a concrete computational interpretation as a concurrent programming language in the framework of the “chemical abstract machine” [5]. Filinski [14] and Reddy =-=[44]-=- proposed functional programming interpretations in terms of continuations and “acceptors” respectively. It seems that the asymmetry between inputs and outputs present in functional programming does n... |

1 |
Logic programming with linear logic
- Andreoli, Pareschi
- 1991
(Show Context)
Citation Context ...pletion. Treat each predicate definition as a rewrite rule. In addition, add the following reductions: x = t, φ[x] −→ x = t, φ[t] if x ̸∈ V (t) (1) x = x −→ (2) x = t −→ false if x ∈ V (t) and t ̸= x =-=(3)-=- (t1, . . . , tk) = (u1, . . . , uk) −→ t1 = u1, . . . , tk = uk (4) f t = f u −→ t = u (5) f t = g u −→ false if f ̸= g (6) false, φ −→ false (7) ∃x. φ −→ φ if x ̸∈ V (φ) (8) ∃x. x = t, φ −→ φ if x ̸... |

1 |
A brief guide to linar logic. Bulletin of the European Assoc. for Theoretical
- Scedrov
- 1990
(Show Context)
Citation Context ..., weakening and contraction respectively. In !R, the notation !Γ (?∆) means a sequence all of whose formulas are of the form !X (?Y ). The reason for this requirement is explained in Section 6.1. See =-=[34, 47]-=- for informal introductions to linear logic and [2, 17] for fuller treatments. 3 Towards directional logic programming In this section, we informally motivate the concepts of directional logic program... |