Magic sets and other strange ways to implement logic programs (extended abstract)

Author(s):  
Francois Bancilhon ◽  
David Maier ◽  
Yehoshua Sagiv ◽  
Jeffrey D Ullman
Keyword(s):  
2001 ◽  
Vol 1 (5) ◽  
pp. 497-538 ◽  
Author(s):  
STEFAN BRASS ◽  
JÜRGEN DIX ◽  
BURKHARD FREITAG ◽  
ULRICH ZUKOWSKI

We present a framework for expressing bottom-up algorithms to compute the well-founded model of non-disjunctive logic programs. Our method is based on the notion of conditional facts and elementary program transformations studied by BRASS and DIX (Brass and Dix, 1994; Brass and Dix, 1999) for disjunctive programs. However, even if we restrict their framework to nondisjunctive programs, their ‘residual program’ can grow to exponential size, whereas for function-free programs our ‘program remainder’ is always polynomial in the size of the extensional database (EDB). We show that particular orderings of our transformations (we call them strategies) correspond to well-known computational methods like the alternating fixpoint approach (Van Gelder, 1989; Van Gelder, 1993), the well-founded magic sets method (Kemp et al., 1995) and the magic alternating fixpoint procedure (Morishita, 1996). However, due to the confluence of our calculi (first noted in Brass and Dix, 1998), we come up with computations of the well-founded model that are provably better than these methods. In contrast to other approaches, our transformation method treats magic set transformed programs correctly, i.e. it always computes a relevant part of the well-founded model of the original program. These results show that our approach is a valuable tool to analyze, compare, and optimize existing evaluation methods or to create new strategies that are automatically proven to be correct if they can be described by a sequence of transformations in our framework. We have also developed a prototypical implementation. Experiments illustrate that the theoretical results carry over to the implemented prototype and may be used to optimize real life systems.


2013 ◽  
Vol 13 (4-5) ◽  
pp. 609-623 ◽  
Author(s):  
MIRJANA MAZURAN ◽  
EDOARDO SERRA ◽  
CARLO ZANIOLO

AbstractFS-rules provide a powerful monotonic extension for Horn clauses that supports monotonic aggregates in recursion by reasoning on the multiplicity of occurrences satisfying existential goals. The least fixpoint semantics, and its equivalent least model semantics, hold for logic programs with FS-rules; moreover, generalized notions of stratification and stable models are easily derived when negated goals are allowed. Finally, the generalization of techniques such as seminaive fixpoint and magic sets, make possible the efficient implementation of DatalogFS, i.e., Datalog with rules with Frequency Support (FS-rules) and stratified negation. A large number of applications that could not be supported efficiently, or could not be expressed at all in stratified Datalog can now be easily expressed and efficiently supported in DatalogFS and a powerful DatalogFS system is now being developed at UCLA.


1990 ◽  
Author(s):  
Chitta Baral ◽  
Jorge Lobo ◽  
Jack Minker
Keyword(s):  

1987 ◽  
Vol 10 (1) ◽  
pp. 1-33
Author(s):  
Egon Börger ◽  
Ulrich Löwen

We survey and give new results on logical characterizations of complexity classes in terms of the computational complexity of decision problems of various classes of logical formulas. There are two main approaches to obtain such results: The first approach yields logical descriptions of complexity classes by semantic restrictions (to e.g. finite structures) together with syntactic enrichment of logic by new expressive means (like e.g. fixed point operators). The second approach characterizes complexity classes by (the decision problem of) classes of formulas determined by purely syntactic restrictions on the formation of formulas.


1990 ◽  
Vol 13 (4) ◽  
pp. 465-483
Author(s):  
V.S. Subrahmanian

Large logic programs are normally designed by teams of individuals, each of whom designs a subprogram. While each of these subprograms may have consistent completions, the logic program obtained by taking the union of these subprograms may not. However, the resulting program still serves a useful purpose, for a (possibly) very large subset of it still has a consistent completion. We argue that “small” inconsistencies may cause a logic program to have no models (in the traditional sense), even though it still serves some useful purpose. A semantics is developed in this paper for general logic programs which ascribes a very reasonable meaning to general logic programs irrespective of whether they have consistent (in the classical logic sense) completions.


2002 ◽  
Vol 37 (3) ◽  
pp. 63-74
Author(s):  
Lunjin Lu

2018 ◽  
Vol 19 (2) ◽  
pp. 1-42
Author(s):  
Sebastian Binnewies ◽  
Zhiqiang Zhuang ◽  
Kewen Wang ◽  
Bela Stantic
Keyword(s):  

2021 ◽  
Vol 609 ◽  
pp. 413-441
Author(s):  
Lorenz Halbeisen ◽  
Norbert Hungerbühler ◽  
Salome Schumacher
Keyword(s):  

Sign in / Sign up

Export Citation Format

Share Document