Dear Torsten,

When you clone a space, Mozart copies everything that is transitively reachable from the root of the space, except what belongs to outside the space. Variables and procedures defined outside the space are not copied, for instance. But records are copied, because they may transitively contain space-specific data. Threads and propagators created inside the space are cloned as well, if they are reachable (which is the case when they suspend on a reachable variable).

Therefore, if you put your constrained variables in hairy data structures, those data will be copied. One way to avoid this is to define a function that extracts the variables from the data structure, and returns them in a list or a record. Make the elements of the CSP refer to that one only. Then, you should process the results of the search, in order to put the variables back in the data structure.

It looks a bit like reformulating the CSP by removing every piece that is not essential to it. The CSP must be "naked".

Regarding the profiling question, it's a bit hard to make a diagnosis without looking at the patient... And I don't have my crystal ball in the office right now ;-)

I hope this might help.

Cheers,
raph

_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to