A semantics and implementation of a causal logic programming language

The increasingly widespread availability of multicore and manycore computers demands new programming languages that make parallel programming dramatically easier and less error prone. This paper describes a semantics for a new class of declarative programming languages that support massive amounts of implicit parallelism. The key idea is that rather than writing low-level imperative programs that define a sequence of state updates, we write a set of high-level rules that are all executed in parallel, acting on a global database of facts. A simple declarative semantics is possible, because rules can add new tuples to the database but cannot modify existing tuples, and because abstract timestamps are used to record causality relationships between tuples. It turns out that negation and garbage collection are the two crucial features that enable us to recover the efficient mutable updates that are possible in imperative languages. This paper develops the semantics of negation, using a direct least-fix-point (LFP) construction, and shows that this semantics agrees with the well-founded, perfect and stable semantics. The paper develops an efficient bottom-up execution algorithm based directly on the LFP construction. It also gives a declarative formulation of the problem of garbage collection and describes an algorithm for doing garbage collection. Finally it is claimed that the programming language described can form the basis of a practical general purpose programming language.

[1]  John G. Cleary,et al.  Tabling Structures for Bottom-Up Logic Programming , 2002, LOPSTR.

[2]  Adrian Walker,et al.  Towards a Theory of Declarative Knowledge , 1988, Foundations of Deductive Databases and Logic Programming..

[3]  Samuel Williams,et al.  The Landscape of Parallel Computing Research: A View from Berkeley , 2006 .

[4]  Jeffrey D. Ullman,et al.  Principles of Database and Knowledge-Base Systems, Volume II , 1988, Principles of computer science series.

[5]  E. F. Codd,et al.  A relational model of data for large shared data banks , 1970, CACM.

[6]  A. Tarski A LATTICE-THEORETICAL FIXPOINT THEOREM AND ITS APPLICATIONS , 1955 .

[7]  Ehud Y. Shapiro,et al.  Algorithmic program diagnosis , 1982, POPL '82.

[8]  R. M. Fujimoto,et al.  Parallel discrete event simulation , 1989, WSC '89.

[9]  Benjamin C. Pierce,et al.  Types and programming languages: the next generation , 2003, 18th Annual IEEE Symposium of Logic in Computer Science, 2003. Proceedings..

[10]  Teodor C. Przymusinski On the Declarative Semantics of Deductive Databases and Logic Programs , 1988, Foundations of Deductive Databases and Logic Programming..

[11]  Ion Stoica,et al.  Implementing declarative overlays , 2005, SOSP '05.

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

[13]  David R. Jefferson,et al.  Virtual time , 1985, ICPP.

[14]  Brian A. Davey,et al.  An Introduction to Lattices and Order , 1989 .

[15]  Mark Utting,et al.  Verification of Starlog Programs , 2001 .

[16]  Roger Clayton,et al.  Compilation of bottom-up evaluation for a pure logic programming language , 2005 .

[17]  Robert A. Kowalski,et al.  Algorithm = logic + control , 1979, CACM.

[18]  Josep Francesc Silva Galiana Debugging techniques for declarative languages: profiling, program slicing and algorithmic debugging , 2007 .

[19]  Allen Van Gelder,et al.  The Alternating Fixpoint of Logic Programs with Negation , 1993, J. Comput. Syst. Sci..

[20]  Alberto Pettorossi,et al.  Rules and strategies for transforming functional and logic programs , 1996, CSUR.

[21]  Teodor C. Przymusinski Every logic program has a natural stratification and an iterated least fixed point model , 1989, PODS.

[22]  Mengchi Liu,et al.  Deductive database languages: problems and solutions , 1999, CSUR.

[23]  Robert A. Kowalski,et al.  Predicate Logic as Programming Language , 1974, IFIP Congress.

[24]  E. F. CODD,et al.  A relational model of data for large shared data banks , 1970, CACM.

[25]  Pascal Hitzler,et al.  A uniform approach to logic programming semantics , 2002, Theory and Practice of Logic Programming.

[26]  Wlodzimierz Drabent,et al.  Proving correctness and completeness of normal programs - a declarative approach , 2005, Theory Pract. Log. Program..

[27]  François Gobert,et al.  Towards putting abstract interpretation of prolog into practice: design, implementation, and evaluation of a tool to verify and optimise prolog programs , 2008 .

[28]  Mark Oskin,et al.  The revolution inside the box , 2008, CACM.

[29]  David Chu,et al.  Evita raced: metacompilation for declarative networks , 2008, Proc. VLDB Endow..

[30]  H. Przymusinska,et al.  Weakly stratified logic programs , 1990 .