| Ross, K.R. Modular Stratification and Magic Sets for DATALOG Programs with Negation. In Proceedings of the ACM Symposium on Principles of Database Systems (1990), 161--171. |
....program and, therefore, have a total well founded model. This model can be computed e#ciently, using the greedy fixpoint procedure introduced in [10] see Section 3) However our technique can also be used for classes of weakly stratified programs [26] such as the modularly stratified class of [27] or the XY stratified class [40] We will assume that certain database predicates arguments called cost arguments can only take values from the cost domain, or a subset of this domain called a valid cost sub domain. In most examples of this paper, we will assume that the set of non negative ....
.... has suspect part(X) working(X, C) part(X, Y) has suspect part(X) fix time(X, C) has suspect part(X) working(Y, 0) basic part(X) fix(X, C) part(X, Y) fix(Y, C) The above program is not stratified, but, if the relation part is acyclic it is modularly stratified [27]. Also in this case the max predicate can be safely propagated. # Acknowledgement. The authors are grateful to the anonymous referees for their useful comments. ....
K. Ross. Modular Stratification and Magic Sets for Datalog Programs with Negation. Journal of ACM. 41(6), 1216-1266 (1994).
....of nonmonotonic reasoning in deductive databases. From the original idea in [1] of a static stratification based on predicate dependencies, stratified negation has been refined to deal with dynamic notions, as in the case of locally stratified programs [21] and modularly stratified programs [22]. Dynamic, or local, stratification has a close connection with temporal reasoning, as the progression of time points yields an obvious stratification of programs consider for instance Datalog 1S [5] It is therefore natural that non monotonic and temporal reasoning are combined in several ....
....of its approximating cliques. Notice that Lemma 1 holds for arbitrary programs, provided that a stratification into a hierarchy of cliques is given. In this sense, this result is more widely applicable than the various notions of stratified programs, such as that of modularly stratified programs [22], in which it is required that each clique Q red i is locally stratified. On the contrary, we do not require here that each clique is, in any sense, stratified. This is motivated by the objective of dealing with non determinism, and justifies why we adopt the (nondeterministic) stable model ....
K. A. Ross. Modular Stratification and Magic Sets for Datalog Program with Negation. Journal of ACM, 41(6):1216--1266, November 1994.
....eigenvector problems in Section 4. There we have that p 2 p 1 . 10 Notice that, if p 5 p 1 p 2 such that p 2 p 1 , then ground(p 2 , C) ground(p 1 , C) for every set of constants C; in particular, p 2 [D] p 1 [D] for every database D. 9 cf. Schlipf [1995b] Dix [1992] Ullman [1989] Ross [1994], and Lifschitz and Turner [1994] 10 Because of the lack of a designated constant for falsity, we make here the implicit assumption that each denial 4 l 1 , l m is rewritten using local fresh propositional atoms A and False (cf. Section 4) 384 . T. Eiter et al. ACM Transactions on ....
....the extension of Q may influence derivability of ground atoms on P;ifPand Q are mutually recursive, they ought to be computed in the same module. Guided by this intuition, we introduce a formal notion of program decomposition. A subset C of the rules of p is called a complete component of p (cf. Ross [1994]) if for every predicate P that occurs in the head of any rule from C, every rule from p belongs to C that has P in the head or some predicate Q mutually recursive with P. A predicate Q is defined by a complete component C,ifQoccurs in the head of some rule of C. The following proposition, which ....
[Article contains additional citation context not shown here]
ROSS, K. 1994. Modular stratification and magic sets for Datalog programs with negation. JACM 41, 6, 1216--1267.
....lack of this property as a drawback of the regular model semantics and discuss the main consequences of that. A final issue of this paper is the investigation of modularity properties that partial semantics for disjunctive programs fulfill. In particular, extending similar studies conducted in [39, 38, 33] for normal programs, and in [8, 12, 24] for disjunctive programs, we prove that both M stable and regular models for disjunctive programs are endowed with an appealing modularity property. This modularity property allows us to enlarge the class of programs on which M stable and regular models are ....
....Then, we apply the results to enlarge the class of programs on which M stable and regular models are known to coincide. Moreover, we also derive useful computational properties for both M stable and regular models. Similar modularity properties for normal programs have been considered in [39, 38, 33] and, for disjunctive programs, in [8] and [12, 24] Let LP 1 and LP 2 be programs. We write LP 2 . LP 1 iff no predicate occurring in LP 1 occurs in the head of any rule of LP 2 [12] Moreover, given an interpretation M for LP 1 , we denote by LP M 2 the program LP 2 [ fa j a 2 M g [ fa ....
[Article contains additional citation context not shown here]
K. Ross, Modular stratification and magic sets for datalog programs with negation, Journal of the ACM, 41:6 (1994) 1216--1267.
....for specifying the semantics of logic programs. Most approaches can be seen as either to restrict the class of programs to ensure that a canonical model for this restricted class exists, or to associate to a program a set of models. The first idea led to various forms of stratification semantics ([ABW88,CB94,Ros90,BF91]) The second idea led to the discovery of two quite dominant approaches: the wellfounded semantics WFS ( vGRS91] and the stable semantics STABLE ( GL88] The well founded semantics for logic programs with negation has received great interest since its introduction, because it has several ....
Kenneth A. Ross. Modular stratification and magic sets for DATALOG programs with negation. In Proc. of the Ninth ACM SIGACT-SIGMODSIGART Symposium on Principles of Database Systems (PODS'90), pages 161--171, 1990.
....P (A) is the program obtained from P (S ff ) Proof: The proof follows directly from Theorem 2.2.1 and the fact that M P is the only (threevalued) stable model of P . 2 Note that the SLG evaluation computing M P may require an infinite number of transformations. Modularly stratified programs [56] are defined as a refinement of stratified programs [3] where no predicate depends on itself through negation) and of locally stratified [48] programs (where no element of the Herbrand Base depends on itself in the Herbrand Instantiation of a program. Example 2.3.1 A standard example of a ....
....by C. A program P can be broken into recursive components following the partition of predicates. There is a natural partial ordering OE over components, where F 1 OE F 2 if some predicates in F 2 depends directly or indirectly on some predicates in F 1 . Definition 2.3. 2 (Modular Stratification[56]) Let P be a program and OE be the partial ordering over recursive components of P . P is modularly stratified if, for every recursive component F of P : ffl there is a total well founded model M for the union of all components F 0 OE F ; and ffl the quotient of F modulo M , F M , is ....
[Article contains additional citation context not shown here]
K.A. Ross. Modular stratification and magic sets for datalog programs with negation. In Proc. of 9th PODS, pages 161--171, 1990.
....model semantics based purely on logical implication, and so the meaning of a program is defined either as the result of some normal form computation, or as the set of facts in some intended model. Early approaches restricted the class of programs to those that are stratified in some fashion [ABW88, Prz88, Ros90, PP88]. More recent approaches, such as the well founded semantics [VRS91] the three valued stable model semantics [Prz90] and the valid semantics [BRSS92a] define semantics for all logic programs with negation and set grouping. Recently, there have been several proposals to extend the semantics to ....
....database system [RSS92b, RSSS93] provided only limited 4 While arguably we can define sum(X) 0:5 as a builtin aggregate operator, undoubtedly there will arise a need for aggregate operations that are not built in. 14 forms of negation, such as left to right modularly stratified negation [Ros90], are used) The idea behind the evaluation technique is to make subset generate only maximal two valued subsets; evaluation is therefore quite efficient. Programs in this class include most of the examples in [RS92] the company controls problem, the party invitation problem in Example 6.2 from ....
Kenneth Ross. Modular Stratification and Magic Sets for DATALOG programs with negation. In Proceedings of the ACM Symposium on Principles of Database Systems, pages 161--171, 1990.
.... [101] 52] 42] 43] 54] 93] 107] 108] 31] XSB, YAP, Lola, and others Optimizations [36] 5 Overview ffl Magic Sets and Related Research (e.g. Alexander Method) Formulation [102] 7] 111] 124] 20] 87] 85] 10] 70] 91] 117] 47] 60] 96] 11] 114] [104] [84] References are a little dated. Implementation and Systems [8] 25] 125] 97] 113] 130] 131] 44] 59] 63] 86] LDL, Aditi, Coral and others. Optimizations [95] 88] 105] 106] 103] 72] 116] 62] 61] 118] 15] 6 Overview ffl Practical and Research ....
K.A. Ross. Modular stratification and magic sets for datalog programs with negation. In JACM, pages 1216--1266, 1994.
....single exponential time in the worst case. Moreover, as the algorithm deals with one computation at a time, it runs in polynomial space. For some restricted classes of programs, including disjunction free programs that are locally stratified [49] weakly stratified [48] or modularly stratified [55], the problem of finding the set of stable models is known to be solvable in polynomial time. Our algorithm runs in polynomial time for each program P such that W P ( is a total interpretation. Indeed, W P ( is computed in polynomial time and, when W P ( is total, the algorithm ....
Ross, K.A. (1990), Modular Stratification and Magic Sets for Datalog Programs with Negation, in "Proc. ACM Symposium on Principles of Database Systems," pp.161-171.
....CHAPTER 6 : EXTENSIONS 88 lief valve ] is true. So the natural meaning of the program is failure[treatment call supervisor ] 2 To introduce this class of programs we first need some preliminary definitions. Our definition of m stratified is based on the definition of modular stratification [93]. We give the relevant revised definitions here to show how they are altered to deal with inheritance with overriding in Gulog rather than negation in Datalog. Definition A predicate or method p depends on a predicate or method q if there is a sequence of clauses r 0 ; r n Gamma1 with ....
....in S (which must be true) to leave a set of instantiated clauses RM (F ) which is the reduction of F modulo M. We now give a constructive definition of the class of m stratified Gulog programs. It is based on the construction of the well founded model of a program that is briefly described in [93]. CHAPTER 6 : EXTENSIONS 89 Definition Let OE be the dependency relation between components. We say that program P with respect to a set of declarations D is m stratified with associated model M P if, ffl for every component F i of P with respect to D, F 0 i = S F OEF i F is m stratified ....
[Article contains additional citation context not shown here]
K. A. Ross. Modular stratification and magic sets for DATALOG programs with negation. In Proc. of the ACM SIGMOD International Conference on the Management of Data, pages 161--171, 1990.
....of nonmonotonic reasoning in deductive databases. From the original idea in [1] of a static stratification based on predicate dependencies, stratified negation has been refined to deal with dynamic notions, as in the case of locally stratified programs [15] and modularly stratified programs [16]. Dynamic, or local, stratification has a close connection with temporal reasoning, as the progression of time points yields an obvious stratification of programs consider for instance Datalog 1S [5] It is therefore natural that non monotonic and temporal reasoning are combined in several ....
....of its approximating cliques. Notice that Lemma 1 holds for arbitrary programs, provided that a stratification into a hierarchy of cliques is given. In this sense, this result is more widely applicable than the various notions of stratified programs, such as that of modularly stratified programs [16], in which it is required that each clique Q red i is locally stratified. On the contrary, we do not require here that each clique is, in any sense, stratified. This is motivated by the objective of dealing with non determinism, and justifies why we adopt the (nondeterministic) stable model ....
[Article contains additional citation context not shown here]
K. A. Ross. Modular Stratification and Magic Sets for Datalog Program with Negation. Journal of ACM, 41(6):1216--1266, November 1994.
.... [82] 84] 106] 107] 93] 7] 21] 43] 44] 96] 121] 45] 83] 95] 92] Optimizations [30] 6 Motivation Magic Sets and Related Research (e.g. Alexander Method) Formulation [87] 5] 97] 111] 18] 69] 67] 8] 59] 73] 103] 39] 49] 79] 9] 101] [89] [66] Implementation and Systems [6] 24] 112] 80] 99] 118] 119] 37] 48] 52] 68] Optimizations [78] 70] 90] 91] 88] 61] 102] 51] 50] 104] 16] ffl Bibliography is incomplete: it considers only formulations of evaluation strategies and not general ....
.... demo(get best choices 3) not not demo(ust as good choice 3) 58 Negation: Towards WFS through stratification The basic idea of forming a dependency graph and checking for loops through negation is performed iteratively in the higher stratification classes such as modular stratification [89] and weak stratification [74] We consider the highest of these, Dynamic Stratification [76, 11] in detail. ffl The power of Dynamic stratification can be seen from the following theorem Theorem 2 [76] A program is Dynamically Stratified iff it has a two valued well founded model. 59 ....
K.A. Ross. Modular stratification and magic sets for datalog programs with negation. In JACM, pages 1216--1266, 1994.
....of r using a stratified predicate logic program Pr . Now, to be able to compute inheritability as stipulated in the definition of the r function (Definition 3.3) we present the following set of encoded rules Pr in Figure 11. Note that the rules involve negation and are locally stratifiable [67] since the underlying is a hierarchy is acyclic by assumption. Observe the dependency relation of predicates in Pr and in encode( i ) as depicted in Figure 12. Intuitively, it is easy to see that the parent relation supplies new tuples to the rules for conf lict and possible. 82 The rules for ....
K. Ross. Modular stratification and magic sets for DATALOG programs with negation. In Proceedings of the ACM Symposium on Principles of Database Systems, pages 161--171, 1990.
....added features of database evaluation to logic programming languages. Magic evaluation closely resembles tabling. Both magic and tabling combine top down goal orientation with bottom up redundancy checking. Indeed, for rangerestricted programs, they have been proven to be asymptotically equivalent [10, 8] under certain assumptions. Despite these well known equivalences, magic style systems have traditionally differed from tabling systems. Magic style systems, such as Aditi [15] CORAL [7] and LDL [3] are built upon set at a time semi naive engines, while tabling systems, such as XSB [9] use a ....
K.A. Ross. Modular stratification and magic sets for datalog programs with negation. JACM, 41(6):1216--1266, 1994.
....features of database evaluation to logic programming languages. Magic evaluation closely resembles tabling. Both magic and tabling combine top down goal orientation with bottom up redundancy checking. Indeed, for range restricted programs, they have been proven to be asymptotically equivalent [15, 13] under certain assumptions. Despite these well known equivalences, magic style systems have traditionally differed from tabling systems. Magic style systems, such as LDL [4] CORAL [12] Glue Nail [5] are built upon set at a time semi naive engines, while tabling systems, such as XSB [14] use a ....
K.A. Ross. Modular stratification and magic sets for datalog programs with negation. In JACM, pages 1216--1266, 1994.
....features of database evaluation to logic programming languages. Magic evaluation closely resembles tabling. Both magic and tabling combine top down goal orientation with bottom up redundancy checking. Indeed, for range restricted programs, they have been proven to be asymptotically equivalent [13, 11] under certain assumptions. Despite these well known equivalences, magic style systems have traditionally differed from tabling systems. Magic style systems, such as LDL [4] CORAL [10] Glue Nail [5] are built upon set at a time semi naive engines, while tabling systems, such as XSB [12] use a ....
K.A. Ross. Modular stratification and magic sets for datalog programs with negation. In JACM, pages 1216--1266, 1994.
....1 Introduction In recent years there has been much interest in defining semantics for deductive databases logic programs that use negation and aggregation. We call such programs extended logic programs. Early approaches restricted the class of programs to those that are stratified in some fashion [1, 8, 12]. More recent approaches, such as the well founded semantics [15] and the 0 The first author, on behalf of all those alphabetic order challenged, led a successful crusade to have the names in reverse alphabetical order. three valued stable model semantics [9] provided semantics for programs ....
....In The CORAL System A large class of programs that use the subset operator are containmentmonotonic. Such programs can be efficiently evaluated using the CORAL deductive database system [10, 11] provided only limited forms of negation, such as left to right modularly stratified negation [12], are used) Several such programs, including the company controls program, and a version of the party invitation program (Example 6.2 from [13] have been implemented on the CORAL system and run efficiently. Performance numbers will be presented in the full paper. The CORAL system can also be ....
K. Ross. Modular Stratification and Magic Sets for DATALOG programs with negation. In Procs. of the ACM Symp. on Principles of Database Systems, pages 161--171, 1990.
....search, such as an alternating fixpoint [18] Restricting the search space of evaluation strategies by maximizing the use of fixed order computation is of prime importance for efficient goal directed evaluation of the well founded semantics. Towards this end, the theory of modular stratification [13], formulates a subset of normal logic programs whose literals can be statically reordered so that the program can be evaluated using a fixed order computation rule. However, exploration of larger classes of stratified programs that can be evaluated in this manner has been left open in the ....
....In the Well Founded Ordered Search of [16] magic templates with Ordered Search [10] are used for the first phase, while an alternating fixpoint similar to that of [18] is used for the second. The limitations of fixed order computation 1 can be seen clearly in the following example. Example 1 [13]. Consider the following program and query p(a) p(X) t(X,Y,Z) p(Y) p(Z) p(b) t(a,b,a) t(a,a,b) The rule instance p(a) t(a,Y,Z) p(Y) p(Z) cannot be evaluated using any fixed computation rule. After t(a,b,a) has been resolved against the first literal of that rule instance, the ....
[Article contains additional citation context not shown here]
K. A. Ross. Modular Stratification and Magic Sets for Datalog programs with Negation. J. ACM, 41(6):1216--1266, November 1994.
....efficiently. The resulting strategy is called SLG resolution [5, 3] which is complete and finite for non floundering programs with finite models, whether they are stratified or not. 1 XSB s engine currently implements a version of SLG restricted to left to right modularly stratified programs [14]. A meta interpreter is provided to evaluate nonstratified programs according to the well founded semantics [21] or, equivalently, to the three valued stable model [11] semantics for that program. XSB s query engine is based on an extension of the WAM [25] Warren Abstract Machine) Being based on ....
K.A. Ross. Modular stratification and magic sets for datalog programs with negation. In Proc. of 9th PODS, pages 161--171, 1990.
....Work A problem similar to the one discussed in this paper, is doing magic sets transformation on datalog programs with stratified negation and ensuring that the negation remains stratified. Similarly, ensuring the same well founded semantics of a program before and after MST, has been treated in [Ros90, KSS91]. In [BPRM91] the authors describe a labeling algorithm and transformation on the programs to ensure that the MST of a stratified program is also stratified. The labeling algorithm identifies all negated predicates that also occur positively and fully replicates the negated instances, ....
K.R. Ross. Modular Stratification and Magic-Sets for Datalog Programs with Negation. In Proceedings of the Ninth Symposium on Principles of Database Systems (PODS), pages 161--171, 1990.
....et al. 5] also showed that the magic sets transformation of leftto right modularly stratified programs with left to right sips preserves query equivalence with respect to the well founded semantics. Note that there are left to right sips that are not well founded sips. We refer the reader to [10] for definitions of left to right modularly stratified programs. In this paper, we continue on this line of research and examine two classes of transformations for normal logic programs: 1. Transformations that preserve well founded models wrt the query for the same class of programs and sips as ....
Ross, K.R. Modular Stratification and Magic Sets for DATALOG Programs with Negation. In Proceedings of the ACM Symposium on Principles of Database Systems (1990), 161--171.
....programs. Furthermore, no simple syntactic check exists for deciding whether a program has a well founded model or a stable model; when such models exist their computation can be very expensive. Notions such as modularly stratified programs, represent a first step toward efficient execution [20] but leave other issues unresolved such as compile time decidability, and uniform treatment of negation and set aggregates. In this paper, we take a different approach the synthesis of our experience with concrete LDL applications [23] and classical optimization problems [5, 6] We focus on ....
K.A. Ross, Modular Stratification and Magic Sets for Datalog Programs, In Proceedings of the Ninth ACM Symposium on Principles of Database Systems, pages 160--171, 1990.
.... another containing a complete binary tree of height H (with 2 H 1 Gamma 1 tuples) and the other containing a cyclic linear list: 1,2) N 1,N) N,1) Execution times were provided in [13] for query win(1) in Glue Nail s implementations of Ross s method for modularly stratified programs [20] and Morishita s alternating fixpoint tailored to magic programs [13] We ran the meta interpreter implementation of SLG resolution on these programs using Quintus Prolog 3.1 on a Decstation 3100 (Ultrix V4.2A (Rev. 47) The timing information in each experiment was obtained using the builtin ....
Ross, K.A. Modular stratification and magic sets for datalog programs with negation. In ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems, pages 161--171, 1990.
....search, such as an alternating fixed point [28] Restricting the search space of evaluation strategies by maximizing the use of fixedorder computation is of prime importance for efficient goal directed evaluation of the wellfounded semantics. Towards this end, the theory of modular stratification [24], formulates a subset of normal logic programs whose literals can be statically reordered so that the program can be evaluated using a fixed order computation rule. The class of modularly stratified programs, however, is not closed under simple program transformations such as the HiLog ....
....Well Founded Ordered Search of [27] magic templates with Ordered Search [20] are used for the first phase, while an alternating fixed point similar to that of [28] is used for the second. The limitations of fixed order computation 1 can be seen clearly in the following example. Example 1. 1 ([24]) Consider the following program and query p(a) p(X) t(X,Y,Z) p(Y) p(Z) p(b) t(a,b,a) t(a,a,b) The rule instance p(a) t(a,Y,Z) p(Y) p(Z) cannot be evaluated using any fixed computation rule. After t(a,b,a) has been resolved against the first literal of that rule instance, the ....
[Article contains additional citation context not shown here]
K. A. Ross. Modular Stratification and Magic Sets for Datalog programs with Negation. Journal of the ACM, 41(6):1216--1266, November 1994.
....a predicate parent, we can test if a is not a parent of b by using not parent(a; b) Such a literal can be used in a query, or in the body of a rule. CORAL supports a class of programs with negation that properly contains the class of non floundering leftto right modularly stratified programs ( Ros90] A program is non floundering if all variables in a negated literal are ground before the literal is evaluated (in the left to right rule order) Intuitively, a modularly stratified program is such that in the answers and subgoals generated for the program, there should be no cycles through ....
....all variables in a negated literal are ground before the literal is evaluated (in the left to right rule order) Intuitively, a modularly stratified program is such that in the answers and subgoals generated for the program, there should be no cycles through negation. The following example from [Ros90] illustrates the use of modularly stratified negation in a program. Suppose we have a complex mechanism constructed out of a number of components that may themselves be constructed from smaller components. Let the component of relationship be expressed in the relation part. A component is known ....
Kenneth Ross. Modular Stratification and Magic Sets for DATALOG programs with negation. In Proceedings of the ACM Symposium on Principles of Database Systems, pages 161--171, 1990.
....model. 2 Corollary 6. 5 Given a program P , the valid model of P is equivalent to the following (under the special conditions mentioned in each case) 1) the weakly perfect model of P , if P is weaklystratified ( PP88] 2) the modularly stratified model of P , if P is modularly stratified ([Ros90]) 3) the perfect model of P , if P is locally stratified ( Prz88] and (4) the stratified model of P , if P is stratified ( ABW88] 2 The above semantics are also equivalent to well founded models under the special conditions mentioned in each case. The class of modularly stratified programs ....
Kenneth Ross. Modular Stratification and Magic Sets for DATALOG programs with negation. In Proceedings of the ACM Symposium on Principles of Database Systems, pages 161--171, 1990.
....Moreover, various subclasses of these programs that are computationally well behaved were identified and implemented. For instance, current database prototypes support the computation of well founded models for various classes of non stratified programs, which include modularly stratified programs [11, 10], XY stratification [12] and the closely related notion of explicitly locally stratified programs [3, 9] Furthermore, the notion of choice models [7] takes logic based semantics beyond the deterministic realm of well founded models; in fact it identifies a class of programs that always have ....
K. A. Ross. Modular Stratification and Magic Sets for Datalog Programs with Negation. Journal of ACM 41(6):1216--1266, 1994.
....model of P . There are programs with two valued well founded models that are not group stratified, magically stratified, monotonic or closed semi ring programs. Example 3. 6 The following program is modularly stratified through aggregation; a class of programs that is informally discussed in [14]. p(b) p(X) t(X, Y, Z) r(Y) r(Z) r(X) group by(p(X) X] 0 = count) t(a,b,a) t(a,a,b) The reader can verify that its well founded model (written as a set of literals) restricted to p and r is fp(b) r(b) p(a) r(a)g. 2 4 Stable models The most successful two valued approach to ....
Ross, K. A. Modular stratification and magic sets for DATALOG programs with negation. In Proceedings of the ACM Symposium on Principles of Database Systems (1990), pp. 161--171.
....case skip the second literal and evaluate the third in order to properly fail for p(a) 1 . This break from a fixed computation rule subtly undermines the goal orientation of techniques like tabling or magic since it introduces subgoals that need not be relevant to proving a query. Example 1. 1 [10] Consider the following program and query p(a) p(X) t(X,Y,Z) p(Y) p(Z) p(b) t(a,b,a) t(a,a,b) The rule p(X) t(X,Y,Z) p(Y) p(Z) cannot be evaluated in any fixed order. After t(a,b,a) has been resolved against the first literal or the rule, the second literal must be chosen before ....
....in this section and Section 2.1. Example 1.2 then can be used to show that the inclusion is proper. Proof of inclusion of left to right modularly stratified programs within LRW stratified programs is a straightforward application of the definitions given here together with definitions in [10]. 3 Transformations This section presents the formal definitions of SLG strat , a tabling method which will be shown to evaluate LRD stratified using a fixed order computation. We begin by reviewing definitions of SLG which are explained in detail in [2] Differences of SLG strat from SLG are ....
K. A. Ross. Modular Stratification and Magic Sets for Datalog programs with Negation. J. ACM, 41(6):1216--1266, November 1994.
....magic evaluation methods. SLG is complete for non floundering programs with finite models, whether they are stratified or not 1 . SLG has been partially implemented by the SLG WAM in the XSB logic programming system[19] This version of the SLG WAM is restricted to modularly stratified programs [17]. The SLG WAM appears to evaluate stratified queries much faster than current bottom up approaches, a claim that will 1 A program flounders if there is an atom whose truth cannot be proven without making a call to a non ground negative literal. be substantiated in section 6. XSB s ....
K.A. Ross. Modular stratification and magic sets for datalog programs with negation. In ACM SIGACT-SIGMOD-SIGART Symp. on Principles of Database Systems, pages 161--171, 1990.
..... To the best of our knowledge, CORAL is the only deductive database system, other than XSB [SSW93] to support non ground facts. 2. 4 Negation CORAL supports a class of programs with negation that properly contains the class of non floundering leftto right modularly stratified programs ( Bry89, Ros90] A program is non floundering if all variables in a negative literal are ground before the literal is evaluated (in the left to right rule order) Intuitively, a modularly stratified program is one in which the answers and sub queries generated during program evaluation involve no cycles ....
....fixpoint semantics. The keyword not is used as a prefix to indicate a negative body literal. For instance, given a predicate parent, we can test if a is not a parent of b by using not parent(a; b) Such a literal can be used in a query, or in the body of a rule. The following example from [Ros90] illustrates the use of modularly stratified negation in a program. Suppose we have a complex mechanism constructed out of a number of components that may themselves be constructed from smaller components. Let the component of relationship be expressed in the relation part. A component is known ....
[Article contains additional citation context not shown here]
Kenneth Ross. Modular Stratification and Magic Sets for DATALOG programs with negation. In Proceedings of the ACM Symposium on Principles of Database Systems, pages 161--171, 1990.
....V ) where V = fY g [ X. Consequently, we also use agg(p( X) to denote :p( X ) 2.3 The Herbrand base, stratification, and well founded models Here we review the definition of local and modular stratification. These terms are defined for programs containing negation in [23] and [25] respectively, and extended to programs containing aggregates in [22] We now try to make this extension more formal as we find some of these definitions useful when discussing our evaluation techniques. Definition 7 The Herbrand universe UL of a language L is the set of all variable free terms ....
.... examples given, such as the shortest path, company control, and party attendance problems, the monotonicity property relies on the EDB relations having certain properties (no negative edges, for example) There have been some proposals for the bottom up evaluation of modularly stratified programs [22, 25], but these involve maintaining sets of dependencies between atoms at run time, and the manipulation of non ground tuples even when the program is range restricted handling non ground tuples usually requires expensive subsumption testing. A top down approach to evaluating modularly ....
[Article contains additional citation context not shown here]
Ken A. Ross. Modular stratification and magic sets for DATALOG programs with negation. In Proceedings of the Ninth ACM PODS Symposium on Principles of Database Systems, pages 161--171, 1990. An extended version of this paper, containing new results, was obtained from the author.
.... may be omitted) ff T =ff F =ff I q(a 1 ; a k ) 7 Gamma ff T q(t; a 1 ; a k ) ff F q(f; a 1 ; a k ) ff I q(i; a 1 ; a k ) Our implementation of p4D is based on the pD system presented in [19] which uses the magic sets strategy for modular stratified programs ([20]) The relational algebra expressions resulting from the magic set transformed Datalog rules are evaluated according to the probabilistic relational algebra described in [10] Since the equivalences from relational algebra also hold for our probabilistic version, we can apply the corresponding ....
Ross K. Modular stratification and magic sets for datalog programs with negation. J. ACM, 41(6):1216--1266, November 1994.
.... In general, aggregates are nonmonotonic and subject to the same restrictions as negation (modulo exceptions [57, 41] Important classes of programs with nonstratified negation where stable models can be computed in polynomial time include locally stratified programs [35] whose wellfounded models [56, 40] can be derived by an alternating fixpoint procedure [55] and XY stratified programs [59, 22] Most Datalog languages also support functors, which are used to (i) store complex objects in the database, and (ii) in recursive rules to process structures of unbound length, as to achieve Turing ....
K. A. Ross. Modular Stratification and Magic Sets for Datalog Programs with Negation. Journal of ACM 41(6):1216--1266, 1994.
....evaluation methods. SLG is complete for non floundering programs with finite models, whether they are stratified or not 1 . SLG has been implemented in the XSB logic programming system. XSB s engine, the SLG WAM, currently implements a version of SLG restricted to modularly stratified programs [16]. A metainterpreter is provided to evaluate non stratified programs according to the well founded semantics [21] or, equivalently to the three valued stable model [12] semantics for that program. XSB appears to evaluate stratified queries much faster than current bottom up approaches, a claim that ....
K.A. Ross. Modular stratification and magic sets for datalog programs with negation. In ACM SIGACT-SIGMOD-SIGART Symp. on Principles of Database Systems, pages 161--171, 1990.
....the idea of stratification [Llo87] A program is stratified if there is no recursion through negation. Since not every program is stratified, this idea had to be extended in a number of ways, such as local stratification, weak stratification, modular stratification and effective stratification ([Ros90, BF91]) The stable semantics [GL88] and well founded semantics [vGRS91] are general approaches to assigning semantics to a logic program that generalize the approaches based on stratification. We will briefly describe the stable semantics (SM) and well founded semantics (WFS) for (possible) infinite ....
Kenneth A. Ross. Modular stratification and magic sets for DATALOG programs with negation. In Proc. of the Ninth ACM SIGACTSIGMOD -SIGART Symposium on Principles of Database Systems (PODS'90), pages 161--171, 1990.
....of programs called EMS programs. We demonstrate the power of these techniques by solving a complex problem the problem of vote counting in a preferential election system. 1 Introduction Efficient evaluation techniques have been developed for a class of programs that are modularly stratified [13] in a very explicit manner these are called EMS programs (Explicitly Modularly Stratified) 5] Although the syntactic conditions that EMS programs must satisfy are very strict, the conditions are independent of the extensional database (EDB) and, as shown by the large example given in Section ....
....4 Evaluation of EMS programs In this section, we consider evaluation methods for EMS programs. Details and proofs can be found in [5] Various query evaluation techniques have been developed for general programs (see for example [7] and for programs that are modularly stratified (see for example [13]) These techniques suffer from various problems. Some, such as those proposed in [7] only deal with programs containing negation, and they do not extend well to programs containing aggregation. Existing techniques that are specialized to modularly stratified programs, such as the techniques ....
[Article contains additional citation context not shown here]
Ken A. Ross. Modular stratification and magic sets for DATALOG programs with negation. In Proceedings of the Ninth ACM PODS Symposium on Principles of Database Systems, pages 161--171, 1990. An extended version of this paper, containing new results, was obtained from the author.
....too many magic facts true, and thus evaluate subgoals that are irrelevant. The improvement proposed by Morishita [13] alleviates this problem, but still generates many irrelevant magic facts in the initial stages of computing the alternating fixpoint. Example 5.1. The following program is from [19]. p(X) t(X; Y; Z) p(Y ) p(Z) p(X) p0(X) For query p(a) the corresponding magic program is: mp(a) mp(Y ) mp(X) t(X; Y; Z) mp(Z) mp(X) t(X; Y; Z) p(Y ) p(X) mp(X) t(X; Y; Z) p(Y ) p(Z) p(X) mp(X) p0(X) This program is in fact an example where the ....
.... another containing a complete binary tree of height H (with 2 H 1 Gamma 1 tuples) and the other containing a cyclic linear list: 1,2) N 1,N) N,1) Execution times were provided in [13] for query win(1) in Glue Nail s implementations of Ross s method for modularly stratified programs [19] and Morishita s alternating fixpoint tailored to magic programs [13] We ran the meta interpreter implementation of SLG resolution on these programs using Quintus Prolog 3.1 on a Decstation 3100 (Ultrix V4.2A (Rev. 47) The timing information in each experiment was obtained using the builtin ....
Ross, K.A. Modular stratification and magic sets for datalog programs with negation. In ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems, pages 161--171, 1990. 42
....problem similar to the one discussed in this paper, is doing magic sets transformation on datalog programs with stratified negation and ensuring that the negation remains stratified. Similarly, ensuring the same well founded semantics of a program before and after MST, has been treated in [KSS91] [Ros90]. In [BPRM91] the authors describe a labelling algorithm and transformation on the programs to ensure that the MST of a stratified program is also stratified. The labelling algorithm identifies all negated predicates that also occur positively and fully replicates the negated instances, ....
K.R. Ross. Modular Stratification and Magic-Sets for Datalog Programs with Negation. In Proceedings of the Ninth Symposium on Principles of Database Systems (PODS), pages 161--171, 1990.
....program. However, in the presence of negated literals, a program may not have a least model. Example 4.1 The program: p(a) Gamma :p(b) has two minimal models: fp(a)g and fp(b)g. 2 The meaning of a program with negation is usually given by some intended model ( CH85, ABW88, Prz88, PP88, GL88, Ros90, Prz90, VRS91] among others) 3 The challenge is to develop algorithms for choosing an intended model that: 1. Makes sense to the user of the rules, and 2. Allows us to answer queries about the model efficiently. In particular, it is desirable that it works well with the magic sets ....
....[Prz88] Intuitively, a program P is locally stratified for a given database if, when we substitute constants for variables in all possible ways, the resulting instantiated rules do not have any recursion through negation. Local stratification has been extended to modular stratification in [Ros90] see also [Bry89] A program P is said to be modularly stratified if each strongly connected component (SCC) of P is locally stratified after removing instantiated rules containing literals that are false in lower SCCs. Example 4.3 Consider the following program: r1 : even(0) r2 : even(s(X) ....
[Article contains additional citation context not shown here]
Kenneth Ross. Modular Stratification and Magic Sets for DATALOG programs with negation. In Proceedings of the ACM Symposium on Principles of Database Systems, pages 161--171, 1990.
....of stratified programs is the class of locally stratified programs [72] Intuitively, a program P is locally stratified if the (propositional) program Gr(P ) obtained by taking all ground instances of all rules in P is stratified. Local stratification has been extended to modular stratification in [85]. A program P is said to be modularly stratified if each strongly connected component (SCC) of P is locally stratified after removing instantiated rules containing literals that are false in lower SCCs. EXAMPLE 6.2. Consider the following program P 3: r1 : even(0) r2 : even(s(X) Gamma ....
....There are several approaches to relaxing the assumption of stratification. Several of the approaches used for negation carry over to set grouping. There are approaches based on weaker forms of stratification such as group stratification and magical stratification [57] or modular stratification [85]. Extensions of the well founded and stable models to deal with aggregates are considered in [44] Monotonic programs, where a derivation using an incomplete set does not affect the set of facts computed, are discussed in [25; 57] In certain contexts, an incomplete set may be used to generate ....
[Article contains additional citation context not shown here]
Kenneth Ross. Modular Stratification and Magic Sets for DATALOG programs with negation. In Proceedings of the ACM Symposium on Principles of Database Systems, pages 161--171, 1990.
....2 7 The language Noodle allows recursive view definitions, stratified aggregation [MPR90, Mum91] and stratified negation [VG86, ABW88] The negation must be safe in a manner to be defined later (Section 2. 7) We can easily extend our rules to allow modularly stratified negation and aggregation [Ros90]. 2.5.1 View Classes Orthogonality between stored and derived data is essential for modular design of queries. Tuples in view relations don t have object identifiers, and are therefore not interchangeable with stored objects. Contrast the situation with a relational system, where derived ....
Kenneth A. Ross. Modular stratification and magic sets for datalog programs with negation. In Proceedings of the Ninth Symposium on Principles of Database Systems (PODS), pages 161--171, Nashville, TN, April 2-4 1990. ACM SIGACT-SIGMOD-SIGART.
....extra truth value places an extra burden on the query evaluation procedure. In many cases, two truth values suffice to model the situation under consideration. So we desire a condition on the program, more general than stratification, that ensures that the well founded semantics is two valued. In [Ros90] the present author proposed such a class, which was termed the class of modularly stratified programs. For modularly stratified programs the well founded semantics is total (i.e. makes every ground literal either true or false) The well founded semantics and the stable model The research of ....
....Foundation Fellowship, and by a David and Lucile Packard Foundation Fellowship in Science and Engineering. semantics coincide for modularly stratified programs, a consequence of the fact that the well founded model is total. Modularly stratified programs also allow subgoal at a time evaluation [Ros90]. A program is modularly stratified if and only if its mutually recursive components are locally stratified once all instantiated rules with a false subgoal that is defined in a lower component are removed. Unfortunately, the definition of modular stratification is semantic rather than ....
[Article contains additional citation context not shown here]
K. A. Ross. Modular stratification and magic sets for Datalog programs with negation. In Proceedings of the Ninth ACM Symposium on Principles of Database Systems, 1990. Full version to appear in J.ACM.
....some form of stratification of predicates to ensure that there was no recursion through aggregation. Subsequent proposals allowed recursion through predicates defined using aggregation, but required other forms of stratification to ensure that no fact depended on itself through aggregation (e.g. [13]) However, there are many useful queries that cannot be easily (if at all) expressed using these semantics, and more recent semantics such as [7, 9, 14, 15, 16, 17] have relaxed or removed stratification requirements. In particular, the monotonic semantics of Ross and Sagiv [14] provides an ....
....sumhN i) S 0:3: This rule is not monotonic, and the presence of this rule makes the Magic Sets rewritten program non monotonic. We can define a sub class of monotonic programs that does not have this problem, in a fashion similar to the definition of left to right modularly stratified programs [13]. We refer to these programs as left to right monotonic programs, and show that the corresponding Magic Sets transformed programs are monotonic; details are presented in the full paper. A second problem arises if the sip strategy binds cost arguments of predicates. Such a sip strategy could result ....
K. Ross. Modular Stratification and Magic Sets for DATALOG programs with negation. In Proceedings of the ACM Symposium on Principles of Database Systems, pages 161--171, 1990.
....semantics (and hence the stable model semantics) described above are two valued, i.e. make nothing undefined. Stratification is such a condition, although not the most general. In any case, with variables in predicate names defining levels on predicates can be problematic. Recently, Ross [16] has described the class of modularly stratified programs which ensure a two valued semantics while allowing a broader class of programs than just the stratified ones. We generalize modular stratification to HiLog programs. This generalization cannot make use of the universal relation model ....
....make use of the universal relation model described above, since the universal relation transformation does not preserve the strongly connected components of the program. We show that modularly stratified HiLog programs have a two valued well founded semantics. We generalize the techniques of [16] to obtain a magic sets method for modularly stratified HiLog programs. This rewriting method allows the efficient evaluation of queries over a large class of HiLog programs. HiLog has applications in logic programming where, for example, it provides a declarative way to represent the call ....
[Article contains additional citation context not shown here]
K. A. Ross. Modular stratification and magic sets for Datalog programs with negation. In Proceedings of the Ninth ACM Symposium on Principles of Database Systems, 1990. Full version submitted for journal publication.
....the class identifiers C. The term avgSal AVG(S) in the select clause then computes the average S value amongst all the tuples in each group. 2 The syntax of the groupby clause is borrowed from SQL. The SWORD language will permit monotonic aggregation [MPR90] and modularly stratified aggregation [Ros90] Composition of Views and Negation A view can be used to define other views. As an example, consider a class employee defined as: persistent class personf string name; date birthdate; persistent person spouse; g; persistent class employee : public person f int salary; bonus; date year ....
....I2g, I = I1 I2 union select fI1g where employeefEg, E[ spouse W ] employeefWg, income viewfemp E;income I1g g 2 The atom :employeefWg is a negated atom. It succeeds if W is not a member of the collection employee. The SWORD language permits modularly stratified negation [Ros90] C Functions EXAMPLE 3.3 Continuing with the employee example, let manager be a subclass of employees, defined as: persistent class manager : public manager f string mgmt level; g; We define a view relation of senior employees. All managers are considered senior, and employees who have ....
[Article contains additional citation context not shown here]
Kenneth A. Ross. Modular stratification and magic sets for datalog programs with negation. In Proceedings of the Ninth Symposium on Principles of Database Systems (PODS), pages 161--171, Nashville, TN, April 2-4 1990.
No context found.
Ross, K.R. Modular Stratification and Magic Sets for DATALOG Programs with Negation. In Proceedings of the ACM Symposium on Principles of Database Systems (1990), 161--171.
No context found.
Kenneth A. Ross. "Modular Stratification and Magic Sets for Datalog Programs with Negation." Journal of the ACM, 41(6):1216--1266, November 1994.
No context found.
K. A. Ross. Modular stratification and magic sets for Datalog programs with negation. Journal of the ACM, 41(6):1216--1266, Nov. 1994.
No context found.
Ross, K.A. (1990), Modular Stratification and Magic Sets for Datalog Programs with Negation, In Proc. ACM Symposium on Principles of Database Systems, pp.161-171.
First 50 documents Next 50
Online articles have much greater impact More about CiteSeer.IST Add search form to your site Submit documents Feedback
CiteSeer.IST - Copyright Penn State and NEC