Vicenç Gomez wrote: > Dear all, > > I've experienced the following problem when upgrading to version 6: > Using the following code: > > ... > prob: eplex_solver_setup(min( X1_2*C1_2 + ... + X93_4*C93_4)), > ... > > where I ommited part of the string I pass as argument to the min predicate, > I get this error : > > Goal failed unexpectedly: current_content(hash(256, 263, [a(151) -> 431, > a(152) -> 432, a(153) -> 433, a(154) -> 434, a(155) -> 435, a(156) -> 436, > a(157) -> 437, a(158) -> 438, a(159) -> 439, a(160) -> 440, a(161) -> 441, > a(162) -> 442, a(163) -> 443, a(164) -> 444, a(165) -> 445, a(...) -> 446, > ... -> ..., ...]), a(3), _699378) > Aborting execution ... > > Looks like the length of the string passed as argument to min is too large > (it has more than 3000 characters) since after proper shortening > everything goes fine again. > > Is there a maximum length for the argument string? This error didn't > occur in the previous version of Eclipse and I don't know how to make the > string shorter while keeping all the constraints. Hi Vicenç, the ECLiPSe 6 compiler is still lacking some overflow handling when the compiled code needs too many registers. This tends to be only a problem when compiling generated code like yours. The quickest workaround for you is probably to declare the offending predicate as dynamic, i.e. :- dynamic remeses/3. In general, I would recommend against generating such large flat models (i.e. with all variables mentioned explicitly) as ECLiPSe source code: it is complicated to generate, slow to compile, and only executed once. A better way is to use a structure similar to http://www.eclipse-clp.org/examples/apc_lp.ecl.txt i.e. have a piece of generic (data-independent) code to set up the model (model/5), and generate only the data part (data/3, which contains only numbers, not variables). The variables are then only generated as arrays or lists at runtime. -- JoachimReceived on Tue Jan 05 2010 - 07:36:15 CET
This archive was generated by hypermail 2.2.0 : Thu Feb 02 2012 - 02:31:58 CET