On Aug 18, 2009, at 11:31 AM, Raphael Collet wrote:
On Tue, Aug 18, 2009 at 12:21 PM, Torsten Anders <[email protected]> wrote:
Is it possible to create and load Oz program source fragment at the run-time?

Oz is a highly dynamic language. You can construct (and then solve) constraint problems depending on user input. Depending on how much flexibility you need there are different approaches (e.g., in an extreme case, you can feed an Oz compiler arbitrary Oz code that is generated dynamically depending on user input).

My advice is not to generate Oz code depending on user input, but to make the search script generic instead.

Sure. Sorry, my comment could have been misleading, Dmitry. Check out

http://www.mozart-oz.org/documentation/fdt/ node24.html#chapter.scripts

Best
Torsten

Use some conventional data structures to specify the problem you want to solve, and let the script post the propagators following the data specifying the problem. The performance overhead is really small, because the "interpretation" of the problem by the script is only done at the very beginning of the constraint solving.

--
Torsten Anders
Interdisciplinary Centre for Computer Music Research
University of Plymouth
Office: +44-1752-586219
Private: +44-1752-558917
http://strasheela.sourceforge.net
http://www.torsten-anders.de
_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to