I’m experiencing unexpected propagation behavior using the repair library. I would expect the following to say the ic constraint is in conflict as the tentative assignment should violate the constraint. It's as if the arithmetic operator + is being delayed/suspended. [eclipse 70]: [X,Y] :: 0..3, ic:(X #= Y + 1) r_conflict_prop cs, X tent_set 1, Y tent_set 1, conflict_constraints(cs,C). X = X{ic : 0 .. 3, repair : 1} Y = Y{ic : 0 .. 3, repair : 1} C = [] There are 6 delayed goals. Do you want to see them? (y/n) Delayed goals: repair : unify_to_tent_if_ground_args(X{ic : 0 .. 3, repair : 1}, X) repair : sum_update(1 * Y{ic : 0 .. 3, repair : 1}, 1, X{ic : 0 .. 3, repair : 1}, 'SUSP-_743-susp') repair : unify_to_tent_if_ground_args(X{ic : 0 .. 3, repair : 1}, Y{ic : 0 .. 3, repair : 1} + 1) monitor_conflict(ic : (X{ic : 0 .. 3, repair : 1} #= X)) monitor_tenable(X{ic : 0 .. 3, repair : 1}, s(yes)) monitor_tenable(Y{ic : 0 .. 3, repair : 1}, s(yes)) Yes (0.00s cpu) If I use r_conflict instead it behaves as expected: [eclipse 71]: [X,Y] :: 0..3, ic:(X #= Y + 1) r_conflict cs, X tent_set 1, Y tent_set 1, conflict_constraints(cs,C). X = X{ic : 0 .. 3, repair : 1} Y = Y{ic : 0 .. 3, repair : 1} C = [ic : (X{ic : 0 .. 3, repair : 1} #= Y{ic : 0 .. 3, repair : 1} + 1)] There are 7 delayed goals. Do you want to see them? (y/n) Delayed goals: repair : unify_to_tent_if_ground_args(X{ic : 0 .. 3, repair : 1}, X) repair : sum_update(1 * Y{ic : 0 .. 3, repair : 1}, 1, _766{2}, 'SUSP-_743-susp') monitor_tenable(_766{2}, s(yes)) repair : unify_to_tent_if_ground_args(_766{2}, Y{ic : 0 .. 3, repair : 1} + 1) monitor_conflict(ic : (X{ic : 0 .. 3, repair : 1} #= _766{2})) monitor_tenable(X{ic : 0 .. 3, repair : 1}, s(yes)) monitor_tenable(Y{ic : 0 .. 3, repair : 1}, s(yes)) Yes (0.00s cpu) If I simplify the constraint to #\= and use r_conflict_prop it behaves as expected: [eclipse 72]: [X,Y] :: 0..3, ic:(X #\= Y) r_conflict_prop cs, X tent_set 1, Y tent_set 1, conflict_constraints(cs,C). X = X{ic : 0 .. 3, repair : 1} Y = Y{ic : 0 .. 3, repair : 1} C = [ic : (X{ic : 0 .. 3, repair : 1} #\= Y{ic : 0 .. 3, repair : 1})] There are 6 delayed goals. Do you want to see them? (y/n) Delayed goals: repair : unify_to_tent_if_ground_args(X{ic : 0 .. 3, repair : 1}, X) repair : unify_to_tent_if_ground_args(Y{ic : 0 .. 3, repair : 1}, Y) monitor_conflict(ic : (X{ic : 0 .. 3, repair : 1} #\= Y{ic : 0 .. 3, repair : 1})) monitor_tenable(X{ic : 0 .. 3, repair : 1}, s(yes)) monitor_tenable(Y{ic : 0 .. 3, repair : 1}, s(yes)) -(Y{ic : 0 .. 3, repair : 1}) + X{ic : 0 .. 3, repair : 1} #\= 0 Yes (0.00s cpu) Any ideas? Thanks, Martin -- Martin Michalowski, Ph.D. Principal Research Scientist, Adventium Labs martin.michalowski_at_adventiumlabs.com http://www.adventiumlabs.com/staff/martin-michalowskiReceived on Mon Feb 10 2014 - 20:39:48 CET
This archive was generated by hypermail 2.2.0 : Sat Feb 15 2014 - 06:14:15 CET