Skip to Main Content
Foundations of Deductive Databases and Logic Programming
book

Foundations of Deductive Databases and Logic Programming

by Jack Minker
May 2014
Intermediate to advanced content levelIntermediate to advanced
752 pages
35h 3m
English
Morgan Kaufmann
Content preview from Foundations of Deductive Databases and Logic Programming
Chapter 12: Performance Evaluation of Logic Programs 477
V
=
V
h'^r = h
R
- h'
R9
and
Analysis
of the Query
Evaluation
Strategies
In this section, we analyze the performance of each strategy on the set of
sample queries.
Query
Form Ancestor.Μ
Rl a(X,Y):-p(X,Y).
R2 a(X,Y):-p(X,Z),a(Z,Y).
R3 query(X) :- a(john,X).
Naive
Evaluation
We begin the computation of the answer by firing Rl
(Step 1). The number of successful firings is the number of arcs in ρ (which is
the number of arcs of length 1 in the transitive closure of p). There are no suc-
cessful firings of R2 at this step since the relation α is empty. At the next step,
we fire Rl again, and
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Concepts and Semantics of Programming Languages 1

Concepts and Semantics of Programming Languages 1

Therese Hardin, Mathieu Jaume, Francois Pessaux, Veronique Viguie Donzeau-Gouge
Handbook of Constraint Programming

Handbook of Constraint Programming

Francesca Rossi, Peter van Beek, Toby Walsh

Publisher Resources

ISBN: 9781483221120