Theory of Partial-Order Programming

Abstract This paper shows the use of partial-order program clauses and lattice domains for declarative programming. This paradigm is particularly useful for expressing concise solutions to problems from graph theory, program analysis, and database querying. These applications are characterized by a need to solve circular constraints and perform aggregate operations, a capability that is very clearly and efficiently provided by partial-order clauses. We present a novel approach to their declarative and operational semantics, as well as the correctness of the operational semantics. The declarative semantics is model-theoretic in nature, but the least model for any function is not the classical intersection of all models, but the greatest lower bound/least upper bound of the respective terms defined for this function in the different models. The operational semantics combines top-down goal reduction with memo-tables . In the partial-order programming framework, however, memoization is primarily needed in order to detect circular circular function calls. In general we need more than simple memoization when functions are defined circularly in terms of one another through monotonic functions. In such cases, we accumulate a set of functional-constraints and solve them by general fixed-point-finding procedure. In order to prove the correctness of memoization, a straightforward induction on the length of the derivation will not suffice because of the presence of the memo-table. However, since the entries in the table grow monotonically, we identify a suitable table invariant that captures the correctness of the derivation. The partial-order programming paradigm has been implemented and all examples shown in this paper have been tested using this implementation.

[1]  D. S. Parker Partial Order Programming. , 1989 .

[2]  Peter J. Stuckey,et al.  Semantics of Logic Programs with Aggregates , 1991, ISLP.

[3]  Allen Van Gelder,et al.  The well-founded semantics of aggregation , 1992, PODS.

[4]  David A. Plaisted,et al.  Programming with Equations, Subsets, and Relations , 1989, NACLP.

[5]  Jack Minker Foundations of deductive databases and logic programming , 1988 .

[6]  Elliott Mendelson,et al.  Introduction to Mathematical Logic , 1979 .

[7]  Catriel Beeri,et al.  Set Constructors in a Logic Database Language , 1991, J. Log. Program..

[8]  Patrick Suppes,et al.  Axiomatic set theory , 1969 .

[9]  Jürgen Dix,et al.  A Framework for Representing and Characterizing Semantics of Logic Programs , 1992, KR.

[10]  Mengchi Liu,et al.  Relationlog: A Typed Extension to Datalog with Sets and Tuples , 1998, J. Log. Program..

[11]  DONALD MICHIE,et al.  “Memo” Functions and Machine Learning , 1968, Nature.

[12]  Peter Buneman,et al.  Structural Recursion as a Query Language , 1992, DBPL.

[13]  Steffen Hölldobler,et al.  Foundations of Equational Logic Programming , 1989, Lecture Notes in Computer Science.

[14]  Bharat Jayaraman,et al.  Set Constructors, Finite Sets, and Logical Semantics , 1999, J. Log. Program..

[15]  Bharat Jayaraman Implementation of Subset-Equational Programs , 1992, J. Log. Program..

[16]  John Wylie Lloyd,et al.  Foundations of Logic Programming , 1987, Symbolic Computation.

[17]  Devashis Jana,et al.  Semantics of subset-logic languages , 1995 .

[18]  Divesh Srivastava,et al.  Extending the Well-Founded and Valid Semantics for Aggregation , 1993, ILPS.

[19]  Kyonghee Moon Implementation of subset logic languages , 1997 .

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

[21]  Peter Buneman,et al.  Workshop on Database Programming Languages , 1988 .

[22]  Kenneth A. Ross,et al.  Monotonic aggregation in deductive databases , 1992, J. Comput. Syst. Sci..

[23]  Agostino Dovier,et al.  Embedding extensional finite sets in CLP , 1993, ILPS.

[24]  Mauricio Osorio,et al.  Aggregation and Well-Founded Semantics , 1996, NMELP.

[25]  Serge Abiteboul,et al.  A rule-based language with functions and sets , 1991, TODS.

[26]  Mauricio Javier Osorio Semantics of logic programs with sets , 1996 .

[27]  David A. Plaisted,et al.  Functional programming with sets , 1987, FPCA.

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

[29]  Alfred V. Aho,et al.  Principles of Compiler Design , 1977 .