Hello,
I have an idea how to generate test data for a parser that I may need
to create for a Java based parser generator. This process would involve
using what I have learned about relational programming in the CTM book.
However, I am running into a problem with the program blocking on the {Solve
F} construct in a sample program that I have created. The program should
print out the following strings: ab, ac, ba, bc, ca, cb. The code for the
program is given below:
declare
fun {Pick} choice a [] b [] c end end
fun {DiffPair}
P1 P2
in
P1 = {Pick}
P2 = {Pick}
if P1==P2 then fail else P1#P2 end
end
fun {SolveAll F}
L={Solve F}
proc {TouchAll L}
if L==nil then skip else {TouchAll L.2} end
end
in
{TouchAll L}
L
end
{Browse {SolveAll DiffPair}}
Thanks,
Craig
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users