## Bottom-up Evaluation and Query Optimization of Well-Founded Models (1995)

Venue: | Theoretical Computer Science |

Citations: | 26 - 1 self |

### BibTeX

@ARTICLE{Kemp95bottom-upevaluation,

author = {David B. Kemp and Divesh Srivastava and Peter J. Stuckey},

title = {Bottom-up Evaluation and Query Optimization of Well-Founded Models},

journal = {Theoretical Computer Science},

year = {1995},

volume = {146},

pages = {145--184}

}

### OpenURL

### Abstract

We present a bottom-up operational procedure for computing well-founded models of allowed programs with negation. This procedure provides a practical method of handling programs that involve unstratified negation in a manner that may be mixed with other evaluation approaches, such as semi-naive evaluation and various program transformations. We define classes of programs and sideways information passing strategies (sips) for which the magic sets transformation preserves well-founded models with respect to the query. The classes of programs and sips we consider strictly subsume those already considered in the literature, and include stratified programs (with any choice of sips), left-to-right modularly stratified programs (with leftto -right sips) and arbitrary programs (with well-founded sips). For these programs and sips, our procedure for computing well-founded models is applicable to the rewritten programs, thus allowing increased efficiency by specializing a program for a query. Fi...

### Citations

1559 | The stable model semantics for logic programming
- Gelfond, Lifschitz
- 1988
(Show Context)
Citation Context ...grams without negation is well understood, but when negation is introduced, the intended meaning of a program becomes less clear. Consider the following definition (adapted from the second example in =-=[19]-=-) of the predicate win. win(X) / move(X; Y ); :win(Y ): Its intuitive meaning is that X is a winning position iff some move from X leads to a non-winning position. If move represents an acyclic graph,... |

879 | The well-founded semantics for general logic programs
- Gelder, Ross, et al.
- 1991
(Show Context)
Citation Context ...posals for the semantics of programs involving negation agree with this intuitive model of the program. The most established of these are the stable model semantics [19] and the wellfounded semantics =-=[46]-=-. If however the move relation contains cycles, then these two semantic approaches no longer agree on the meaning of the program. For example, adding the extra edge move(c,a) leaves the program withou... |

735 | The semantics of predicate logic as a programming language
- Emden, Kowalski
- 1976
(Show Context)
Citation Context ...s a successor ordinal, ff = fi + 1 G # ff = " fi!ff G # fi where ff is a limit ordinal. Similarly, gfp(G) = G # ff for some ff. 3 Definition 3 The TP operator was introduced by Van Emden and Kowa=-=lski [43]-=- to describe the semantics of programs without negation. We extend the definition of the TP operator as follows: let M be a set of atoms. TP (M )(I) = fa j where there is a ground instance of a clause... |

634 | Towards a theory of declarative knowledge - Apt, Blair, et al. - 1988 |

314 | Magic sets and other strange ways to implement logic programs - Bancilhon, Maier, et al. - 1986 |

253 | On the power of magic
- Beeri, Ramakrishnan
- 1991
(Show Context)
Citation Context ...he query so that the evaluation will generate only tuples that are in some way "relevant" to answering the query. A common specialization technique is the magic sets transformation (see, for=-= example, [9]-=-), which is used to imitate top-down computations using bottom-up computation. After the transformation has been performed, bottom-up techniques can be applied to evaluate the transformed program. Whe... |

227 |
Old resolution with tabulation
- Tamaki, Sato
- 1986
(Show Context)
Citation Context ...en the procedure is guaranteed to terminate. Besides the bottom-up evaluation approaches that we focus on in this paper, there are other "memoing " techniques for computing answers (see, for=-= example, [16, 40, 47]-=-); these techniques perform almost the same computation as is done by combining the magic sets transformation with a differential evaluation [13]. An advantage that the magic sets transformation has o... |

223 |
Unfounded sets and well-founded semantics for general logic programs
- Gelder, Ross, et al.
- 1988
(Show Context)
Citation Context ...posals for the semantics of programs involving negation agree with this intuitive model of the program. The most established of these are the stable model semantics [19] and the wellfounded semantics =-=[46]-=-. If however the move relation contains cycles, then these two semantic approaches no longer agree on the meaning of the program. For example, adding the extra edge move(c,a) leaves the program withou... |

216 | The alternating fixpoint of logic programs with negation
- Gelder
- 1989
(Show Context)
Citation Context ...Our approach to computing the well-founded model of a program, the doubled program approach, which is based on Van Gelder's "alternating fixpoint" characterization of the well-founded model =-=semantics [45]-=-, uses definite (negation-free) versions of the program at each step of the bottom-up computation. This makes many of the existing bottom-up evaluation techniques for definite programs still applicabl... |

132 | Negation as failure using tight derivations for general logic programs - Gelder - 1988 |

102 | Modular stratification and magic sets for DATALOG programs with negation
- Ross
- 1990
(Show Context)
Citation Context .... 2 Several bottom-up evaluation techniques are known for restricted classes of programs with negation, such as stratified programs ([4], for instance) and left-to-right modularly stratified programs =-=[36, 38]-=-. classes of programs and sips we consider strictly subsume those already considered in the literature. We prove that the magic sets transformation of a left-to-right modularly stratified program with... |

101 |
Foundations of Logic Programming. Second, extended edition
- Lloyd
- 1987
(Show Context)
Citation Context ... with other approaches to computing well-founded models. Finally in Section 8 we indicate directions for future research. 2 Preliminaries We assume familiarity with logic programming terminology (see =-=[28]-=-). The alphabet of a language contains an (countably) infinite number of variables (often denoted by u; v; w; x; y or z); a finite number of constants 3 Some of this work originally appeared in [22] a... |

90 | Duality between alternative semantics of logic programs and nonmonotonic formalisms
- Baral, Subrahmanian
- 1991
(Show Context)
Citation Context ..." ff for some ordinal ff. The well-founded model of a program P is given by the least fixpoint W P of the operator WP . 3 We give a slightly different formulation from that of [45], closer to tha=-=t of [8]-=-, of the alternating fixpoint A P of a program P , which makes the connection with the doubled program (our technique for computing three-valued well-founded models, described in Section 4) clearer. F... |

72 | Bottom-up beats top-down for datalog - Ullman - 1989 |

69 |
On the declarative semantics of stratified deductive databases and logic programs
- Przymusinski
- 1988
(Show Context)
Citation Context ...any ordering of body literals. 2 5.3 Modularly Stratified Programs The class of modularly stratified programs was defined by Ross in [38]. This class includes the class of locally stratified programs =-=[34]-=-. Definition 10 Define the binary relation ?P over the strongly connected components of the atom call graph of a program P such that A ?P B if there is a path from an atom in A to an atom in B that co... |

68 |
A generalization of the differential approach to recursive query evaluation
- Balbin, Ramamohanarao
- 1987
(Show Context)
Citation Context ...p computation. This makes many of the existing bottom-up evaluation techniques for definite programs still applicable. These techniques include differential, or semi-naive evaluation and its variants =-=[5, 6, 10]-=-, and various program transformations. One of the main optimizations performed by a bottom-up query evaluation is the specialization of the program with respect to the query so that the evaluation wil... |

63 |
Query evaluation under the well-founded semantics
- Chen, Warren
- 1993
(Show Context)
Citation Context ...re effective for arbitrary DATALOG programs with negation have been presented. WELL! [12] extends the QSQR approach to computing the well-founded model of DATALOG programs, while XOLDTNF [14] and SLG =-=[15]-=- extend the OLDT approach. In this paper, we presented a bottom-up evaluation method for computing well-founded models of arbitrary programs. Leone and Rullo [27] also defined a bottom-up evaluation m... |

56 |
Query Evaluation in Recursive Databases: Bottom-Up and Top-Down Heconciled, Data Knowledge Eng
- Bry
- 1990
(Show Context)
Citation Context ...iques for computing answers (see, for example, [16, 40, 47]); these techniques perform almost the same computation as is done by combining the magic sets transformation with a differential evaluation =-=[13]-=-. An advantage that the magic sets transformation has over these other approaches is that it is easily combined with many other efficiency enhancing techniques. This includes other source to source tr... |

55 |
Extension tables: Memo relations in logic programming
- Dietrich
- 1987
(Show Context)
Citation Context ...en the procedure is guaranteed to terminate. Besides the bottom-up evaluation approaches that we focus on in this paper, there are other "memoing " techniques for computing answers (see, for=-= example, [16, 40, 47]-=-); these techniques perform almost the same computation as is done by combining the magic sets transformation with a differential evaluation [13]. An advantage that the magic sets transformation has o... |

55 | A Procedural Semantics for WellFounded Negation in Logic Programs
- Ross
- 1992
(Show Context)
Citation Context ... interpreter approach which can also be applied to modularly stratified programs (although this has not been shown formally). The original top-down derivation method for computing well-founded models =-=[37]-=- was not effective even for DATALOG (i.e., function-free) programs. Recently methods for top-down computation of wellfounded models that are effective for arbitrary DATALOG programs with negation have... |

51 | Pushing Constraint Selections - Srivastava, Ramakrishnan - 1993 |

49 |
Naive evaluation of recursively defined relation
- Bancilhon
- 1986
(Show Context)
Citation Context ...p computation. This makes many of the existing bottom-up evaluation techniques for definite programs still applicable. These techniques include differential, or semi-naive evaluation and its variants =-=[5, 6, 10]-=-, and various program transformations. One of the main optimizations performed by a bottom-up query evaluation is the specialization of the program with respect to the query so that the evaluation wil... |

41 | Rule Ordering in Bottom-Up Fixpoint Evaluation of Logic Programs
- Ramakrishnan, Srivastava, et al.
- 1990
(Show Context)
Citation Context ...niques. This includes other source to source transformations such as constraint propagation [20, 24, 31, 39], and various extensions to the differential techniques such as rule and predicate ordering =-=[35]-=-. The remainder of this paper is organized as follows. In the next section we give some preliminary notation and results. In Section 3 we informally introduce our bottom-up method for computing the we... |

34 | Design overview of the Aditi deductive database system
- Vaghani, Ramamohanarao, et al.
- 1991
(Show Context)
Citation Context ... the doubled program approach (DP) with the safe computation approach (SC) [27] and the magic sets interpreter (MSI). These approaches can all be implemented under the Aditi deductive database system =-=[42]-=- in development at the University of Melbourne. Each of them was implemented using hand written code in Aditi-RL --- a language which supports relational operations as well as constructs for iteration... |

32 | Magic sets and bottom-up evaluation of well-founded models
- Kemp, Stuckey, et al.
- 1991
(Show Context)
Citation Context ...e [28]). The alphabet of a language contains an (countably) infinite number of variables (often denoted by u; v; w; x; y or z); a finite number of constants 3 Some of this work originally appeared in =-=[22]-=- and [23] (often denoted by a; b or c); a finite number of functions of various arities; a finite number of predicates of various arities (often denoted by p; q; r; s or t). Variables and constants ar... |

31 | Controlling the search in bottom-up evaluation
- Ramakrishnan, Srivastava, et al.
- 1992
(Show Context)
Citation Context .... 2 Several bottom-up evaluation techniques are known for restricted classes of programs with negation, such as stratified programs ([4], for instance) and left-to-right modularly stratified programs =-=[36, 38]-=-. classes of programs and sips we consider strictly subsume those already considered in the literature. We prove that the magic sets transformation of a left-to-right modularly stratified program with... |

29 | Magic conditions
- MUMICK, FINKELSTEIN, et al.
- 1990
(Show Context)
Citation Context ...tion has over these other approaches is that it is easily combined with many other efficiency enhancing techniques. This includes other source to source transformations such as constraint propagation =-=[20, 24, 31, 39]-=-, and various extensions to the differential techniques such as rule and predicate ordering [35]. The remainder of this paper is organized as follows. In the next section we give some preliminary nota... |

27 | Déjà vu in fixpoints of logic programs - Maher, Ramakrishnan - 1989 |

27 | Argument Reduction by Factoring - Naughton, Ramakrishnan, et al. - 1995 |

24 | Propagating constraints in recursive deductive databases
- BALBIN, KEMP, et al.
- 1989
(Show Context)
Citation Context ...tion has over these other approaches is that it is easily combined with many other efficiency enhancing techniques. This includes other source to source transformations such as constraint propagation =-=[20, 24, 31, 39]-=-, and various extensions to the differential techniques such as rule and predicate ordering [35]. The remainder of this paper is organized as follows. In the next section we give some preliminary nota... |

24 | Efficient Evaluation of Right-, Left-, and Multi-Linear Rules - Naughton, Ramakrishnan, et al. - 1989 |

22 |
Efficient bottom-up computation of queries on stratified databases
- Balbin, Port, et al.
- 1991
(Show Context)
Citation Context ...tics is investigated as a semantics for deductive databases in [11]. 2 Several bottom-up evaluation techniques are known for restricted classes of programs with negation, such as stratified programs (=-=[4]-=-, for instance) and left-to-right modularly stratified programs [36, 38]. classes of programs and sips we consider strictly subsume those already considered in the literature. We prove that the magic ... |

22 |
An alternating fixpoint tailored to magic programs
- Morishita
- 1993
(Show Context)
Citation Context ...ely evaluable only for the class of connected DATALOG programs (as defined in [27]), and attempts to only compute relevant negative facts rather than all negative information. More recently Morishita =-=[30]-=- defined a special evaluation method based on the doubled program approach for evaluating magic sets transformed programs. The method, which is very similar to and is based upon the well-founded magic... |

21 |
Impacts of logic on data bases
- Gallaire
- 1981
(Show Context)
Citation Context ...espect to the well-founded model of the original program. 1 Introduction The idea of using predicate logic as a database language, that is a deductive database, has been around for more than a decade =-=[18]-=-. It has several advantages. ffl One can naturally view in logical (declarative) terms several database concepts of interest to users: queries, views, integrity constraints, as well as the data in the... |

16 |
Strict Completion of Logic Programs
- Drabent, Martelli
- 1991
(Show Context)
Citation Context ...) where p 0 does not appear in P . Then we double the entire program and in the copy replace atoms p(~s) everywhere by p 0 (~s) and vice versa. The doubled program transformation has been used before =-=[17, 48]-=- because it ensures the resulting program has a consistent (2-valued) completion. The use here is different, we treat the two halves of the program separately, rather than as a single program. We comp... |

16 | Query restricted bottom-up evaluation of normal programs
- Kemp, Srivastava, et al.
- 1992
(Show Context)
Citation Context ...The alphabet of a language contains an (countably) infinite number of variables (often denoted by u; v; w; x; y or z); a finite number of constants 3 Some of this work originally appeared in [22] and =-=[23]-=- (often denoted by a; b or c); a finite number of functions of various arities; a finite number of predicates of various arities (often denoted by p; q; r; s or t). Variables and constants are terms. ... |

14 | multi-linear rule transformations that maintain context information - Kemp, Ramamohanarao, et al. - 1990 |

14 |
Efficient query answering on stratified databases
- Kcrisit, Pugin
- 1988
(Show Context)
Citation Context ...fied program) has received considerable attention. Among the techniques to solve the problem are: predicate labelling [2, 3], a magic sets interpreter [4], rule ordering [10], and weak stratification =-=[25]-=-. As a consequence of the following result we have that any procedure for computing well-founded models can overcome the difficulties that arise when a magic sets transformation of a stratified progra... |

14 |
QSQ towards QoSaQ: Global optimization of recursive queries
- Vieille
- 1988
(Show Context)
Citation Context ...en the procedure is guaranteed to terminate. Besides the bottom-up evaluation approaches that we focus on in this paper, there are other "memoing " techniques for computing answers (see, for=-= example, [16, 40, 47]-=-); these techniques perform almost the same computation as is done by combining the magic sets transformation with a differential evaluation [13]. An advantage that the magic sets transformation has o... |

11 |
A query independent method for magic set computation on stratified databases
- Balbin, Meenakshi, et al.
- 1988
(Show Context)
Citation Context ... 3 The problem of evaluating an unstratified magic program (obtained from a stratified program) has received considerable attention. Among the techniques to solve the problem are: predicate labelling =-=[2, 3]-=-, a magic sets interpreter [4], rule ordering [10], and weak stratification [25]. As a consequence of the following result we have that any procedure for computing well-founded models can overcome the... |

11 |
Computation and implementation of non-monotonic deductive databases
- Bell, Nerode, et al.
- 1991
(Show Context)
Citation Context ...res that the well founded model of the program is preserved with respect to the query, in the transformed program. The 1 The stable semantics is investigated as a semantics for deductive databases in =-=[11]-=-. 2 Several bottom-up evaluation techniques are known for restricted classes of programs with negation, such as stratified programs ([4], for instance) and left-to-right modularly stratified programs ... |

11 |
Analysis based constraint query optimization
- Kemp, Stuckey
- 1993
(Show Context)
Citation Context ...tion has over these other approaches is that it is easily combined with many other efficiency enhancing techniques. This includes other source to source transformations such as constraint propagation =-=[20, 24, 31, 39]-=-, and various extensions to the differential techniques such as rule and predicate ordering [35]. The remainder of this paper is organized as follows. In the next section we give some preliminary nota... |

9 |
Well!: An evaluation procedure for all logic programs
- Bidoit, Legay
- 1990
(Show Context)
Citation Context ... for DATALOG (i.e., function-free) programs. Recently methods for top-down computation of wellfounded models that are effective for arbitrary DATALOG programs with negation have been presented. WELL! =-=[12]-=- extends the QSQR approach to computing the well-founded model of DATALOG programs, while XOLDTNF [14] and SLG [15] extend the OLDT approach. In this paper, we presented a bottom-up evaluation method ... |

7 |
Magic set computations for stratified databases
- Balbin, Port, et al.
- 1987
(Show Context)
Citation Context ... 3 The problem of evaluating an unstratified magic program (obtained from a stratified program) has received considerable attention. Among the techniques to solve the problem are: predicate labelling =-=[2, 3]-=-, a magic sets interpreter [4], rule ordering [10], and weak stratification [25]. As a consequence of the following result we have that any procedure for computing well-founded models can overcome the... |

7 |
Safe computation of the well-founded semantics of DATALOG queries
- Leone, Rullo
- 1992
(Show Context)
Citation Context ... programs, while XOLDTNF [14] and SLG [15] extend the OLDT approach. In this paper, we presented a bottom-up evaluation method for computing well-founded models of arbitrary programs. Leone and Rullo =-=[27]-=- also defined a bottom-up evaluation method for computing well-founded models called the safe computation approach. It is effectively evaluable only for the class of connected DATALOG programs (as def... |

6 |
Magic implementation of stratified programs
- Beeri, Ramakrishnan, et al.
- 1990
(Show Context)
Citation Context ...p computation. This makes many of the existing bottom-up evaluation techniques for definite programs still applicable. These techniques include differential, or semi-naive evaluation and its variants =-=[5, 6, 10]-=-, and various program transformations. One of the main optimizations performed by a bottom-up query evaluation is the specialization of the program with respect to the query so that the evaluation wil... |

6 |
A Goal Oriented Approach to Computing The Well-founded Semantics
- Chen, Warren
- 1993
(Show Context)
Citation Context ...models that are effective for arbitrary DATALOG programs with negation have been presented. WELL! [12] extends the QSQR approach to computing the well-founded model of DATALOG programs, while XOLDTNF =-=[14]-=- and SLG [15] extend the OLDT approach. In this paper, we presented a bottom-up evaluation method for computing well-founded models of arbitrary programs. Leone and Rullo [27] also defined a bottom-up... |

5 |
Tight, consistent, and computable completions for unrestricted logic programs
- Wallace
- 1993
(Show Context)
Citation Context ...) where p 0 does not appear in P . Then we double the entire program and in the copy replace atoms p(~s) everywhere by p 0 (~s) and vice versa. The doubled program transformation has been used before =-=[17, 48]-=- because it ensures the resulting program has a consistent (2-valued) completion. The use here is different, we treat the two halves of the program separately, rather than as a single program. We comp... |

1 | The expressive power of stratified programs Inf. Comput 90 - Kolaitis - 1991 |