From: Ulrich Scholz <Ulrich.Scholz_at_...10...>

Date: Mon, 19 Jan 2009 13:39:01 +0100

Date: Mon, 19 Jan 2009 13:39:01 +0100

Dear all, it seems that ic on the order and kind of the constraints that are used. For example, why does ECLiPSe find the correct answer with "[eclipse 5]" but delays with "[eclipse 7]"? [eclipse 3]: integers([X]), ic:(X #>X). No (0.00s cpu) [eclipse 4]: integers([X,Y]), X #= Y, X #>Y. X = X{-1.0Inf .. 1.0Inf} Y = X{-1.0Inf .. 1.0Inf} Delayed goals: -(X{-1.0Inf .. 1.0Inf}) + X #> 0 Yes (0.00s cpu) [eclipse 5]: [X,Y] :: [0,100], X #= Y, X #> Y. No (0.00s cpu) [eclipse 7]: integers([X,Y]), X#>1, Y#>1, X#<100, Y#<100, X#=Y, X#>Y. X = X{2 .. 98} Y = X{2 .. 98} Delayed goals: -(X{2 .. 98}) + X #> 0 Yes (0.00s cpu) To get failure fast, I could use labeling as follows. Is there a better way? testVariables(Vars) :- setval(test, 0), ( labeling(Vars), setval(test, 1), fail ; true ), getval(test, 1). Thanks, UlrichReceived on Mon Jan 19 2009 - 12:39:19 CET

*
This archive was generated by hypermail 2.2.0
: Mon Jul 09 2018 - 02:05:29 CEST
*