Just correcting MyCond which was written in a bit of haste. I also add an
example application. Notice that MyCond must be applied in a space, otherwise
{Space.waitStable} will block forever.
declare
proc {MyCond P0 P1 P2}
S0 = {Space.new P0}
in
{Space.waitStable}
if {Space.askVerbose S0} == failed then {P2}
else {P1 {Space.merge S0}} end
end
X = {Space.new proc {$ _}
A = {FD.decl}
proc {P0 X} A = 1 X = 'then' end
proc {P2} {Browse 'else'} end
in
{MyCond P0 Browse P2}
{Browse A}
end}
proc {MyCond P0 P1 P2}
S0 = {Space.new P0}
in
{Space.waitStable}
if {Space.askVerbose S0} == failed then {P2}
else {P1 {Space.merge S0}} end
end
Cheers,
Jorge.
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users