Dear Dmitry,
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).
Best
Torsten
On Aug 18, 2009, at 10:23 AM, Dmitry Negius wrote:
In my program I need to implement answers quantitative questions
from user.
Domain variables are not known in the design time and will be
obtained at
the runt-time from the user questions and it will be very many
variables
in the constraints system. Constraints system will be constructed
at the
run-time. Is it possible to create and load Oz program source
fragment at the run-time?
2009/8/18 Torsten Anders <[email protected]>
Dear Dmitry,
I don't quite understand your system, do you mean a constraint
problem like the following?
{Browse
{SearchOne
proc {$ Sol}
%% variable domain declaration
A = {FD.decl}
B = {FD.int 0#1}
in
Sol = unit(a:A b:B)
%% constraint application
A <: 1000
{FD.impl (A >: 255) B 1}
{FD.impl {FD.nega B} {FD.nega (A >: 255)} 1}
%% and so forth
%%
%% distribution strategy (variable ordering)
{FD.distribute ff Sol}
end}}
Best
Torsten
On Aug 17, 2009, at 6:58 PM, Dmitry Negius wrote:
Excuse me but I want to ask: "Does mozart-oz solves logicaly-
algebral constraints - the mix of logical and algebral operations
over variables? System NUT for example solves only algebral
constraints in the form of algebraic equations (formula = formula).
For my AI project I need to solve constraints like this:
A>255 => B.
not B.
?- A<1000.
Of couse this is mo intelligent then to solve only algebraic
constraints and has better application.
Manually this constaints system can be solved in the next way:
A>255 => B
-------------------
not B => not (A>255)
-------------------------------
not B => (A=<255) not B
----------------------------------------------------
A=<255
255<1000
-------------------------
A<1000
--
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