deductive databases in Oz

Marian Babik marian.babik at gmail.com
Wed Feb 21 10:06:10 CET 2007


Hi,
I'm a newcomer to Oz and after reading CH9 of the CTM book about the
deductive database computations, I'd like to ask if someone has tried
to perform any real deductive database computations with Oz ?

What I mean is whether Mozart could support datalog inferences
(datalog is a subset of prolog - no negation, no functions) ? A
motivating example would be a sample datalog program doing transitive
closure on relations, i.e.:

p(X,Y) :- p(X,Z), p(Z,Y).
p(X,Y) :- a(X,Y).
a(1,2). a(1,3) a(2,3)

would it possible to translate this to Oz and answer query p(1,Y)
without going into infinite loop ? (with correct answers: p(1,2)
p(1,3) p(2,3) ). Or maybe even more simple example of equality between
relations ?

p(X,Y) :- q(X,Y)
q(X,Y) :- p(X,Y)
q(1,2). p(1,3)

and query: p(1,Y) ?

It should be noted, that these examples won't work  with regular
prolog engine (due to infinite loop). One needs prolog extensions to
support bottom-up inferencing (in prolog such extensions are called
semi-naive evaluation/magic-sets/tabling, etc.) These are basic
inferences for deductive database computations, which cover a large
area of applications. So, I was wondering if such inferences are
possible in Oz, or maybe if there is an alternative way of rewriting
these programs in Oz ? There is a possiblity that I have just
misunderstood the point of the section about deductive computations.

Cheers,
Marian


More information about the mozart-users mailing list