FD.distribute
Luis Quesada
l.quesada at 4c.ucc.ie
Thu Jun 7 18:22:22 CEST 2007
Dear all,
I just realized that FD.distribute, when used with
generic(procedure:Proc), does not apply Proc right after reaching
stability. It does it after choosing the next variable to label. Have a
look at the following code:
proc {FdDistribute RawSpec Vec}
case {PreProcessSpec RawSpec}
of opt(value:SelVal order:SelVar) then
{Wait {FDP.distribute FddOptVarMap.SelVar FddOptValMap.SelVal Vec}}
[] gen(value: SelVal
order: Order
select: Select
filter: Fil
procedure: Proc) then
if {Width Vec}>0 then
proc {Do Xs}
{Space.waitStable}
E|Fs={ChooseAndRetFiltVars Xs Order Fil}
in
if E\=unit then
V={Select E}
D={SelVal V}
in
if Proc\=unit then
{Proc}
{Space.waitStable}
end
choice {FdInt D V}
[] {FdInt compl(D) V}
end
{Do Fs}
end
end
in
{Do {VectorToList Vec}}
end
end
end
I was expecting Proc to be called right after the first call of
Space.waitStable. Is this a bug or an intended behavior?
Cheers,
Luis
More information about the mozart-hackers
mailing list