Documentation on Logic Programming in Oz

Marcelo Aragao m.aragao at cs.man.ac.uk
Mon Feb 18 12:42:55 CET 2002


Hi,
    
    I am moving to Oz from a Prolog background, and
I need to translate a design (involving non-deterministic search) 
that otherwise would suit to a Prolog implementation.
    The program fragment in Tutorial of Oz (Section 12.7.6 
Dynamic Predicates) seem to be relevant to me.
However it is not documented yet.
    I assuming that something should be added so as to be able to run 
the example code there and get some answers. Reading the paper 
"Logic programming with Oz with Mozart",  I tried to add a 'search
object' 
(I don't know if this is really necessary), thus I tried out something
like:

declare
... ** the procedures and class definitions there **
in
EdgeP = {Dynamic}
{Show EdgeP}
{ForAll
[edge(1 2)
 edge(2 1)   % Cycle
 edge(2 3)
 edge(3 4)
 edge(2 5)
 edge(5 6)      
 edge(4 6)
 edge(6 7)
 edge(6 8)
 edge(1 5)
 edge(5 1)  % Cycle
]
proc {$ I}{Assert EdgeP I} end 
}
Q = {New Search.object script(proc {$ X}{Query EdgeP X}end)}
{Show {Q next($)}}
{Show {Q next($)}}

and still I could get no answer.
    Could anyone please help understanding and completing the
fragment there so as to have a working code that I could 
build upon?
    Many thanks in advance,
    Marcelo Aragao.
-
Please send submissions to users at mozart-oz.org
and administriva mail to users-request at mozart-oz.org.
The Mozart Oz web site is at http://www.mozart-oz.org/.





More information about the mozart-users mailing list