query - command and the difference
between accumulate and import directive
W. Nauber, 30.05.05
File m1_accumulates_m2.mod:
module m2.
type a, b, c o.
c:-a.
b.
module m1.
accumulate m2.
a:-b.
Terzo> #load "m1_accumulates_m2.mod".
module m1.
Terzo> #query m1.
?- a.
solved
?- b.
solved
?- c.
solved
?- #end.
Terzo> #quit.
File m1_imports_m2.mod:
module m2.
type a, b, c o.
c:-a.
b.
module m1.
import m2.
a:-b.
Terzo> #load "m1_imports_m2.mod".
module m1.
Terzo> #query m1.
?- a.
solved
?- b.
no
?- c.
no
?- #end.
Terzo> #query m2.
?- a.
no
?- b.
solved
?- c.
no
?- #end.
Terzo> #query m1, m2.
?- a.
solved
?- b.
solved
?- c.
solved
?- #end