Question regarding REPAIR

From: Ulrich Scholz <scholz_at_informatik.tu-darmstadt.de>
Date: Fri 14 Jan 2005 01:38:23 PM GMT
Message-ID: <20050114143823.A1956@informatik.tu-darmstadt.de>
Hi everybody.

Recently, I've started to look into the repair library and, of course,
I have some questions.  More specifically, I experimented with
tent_call/3 and wonder whether it is possible to have access to the
old tentative assignment.  But let me explain step by step:

1) Lets assume the following lines of code:

:- lib(repair).
:- lib(ic).

test :-
    [X,Y,Z] :: [1..inf],
    X tent_set 4,
    Y tent_set 3,
    Z tent_set 4,
    tent_call(X, Y, minlist([X,3],Y)),
    tent_call(Y, Z, minlist([Y,2],Z)),
    X tent_set 5.

Question: Does the final change of the tentative value of X wake the
second constraint?  I would hope not, as the tentative value of Y is
not changed.


2) Now, let's change this code a little bit.

:- lib(repair).
:- lib(ic).

test :-
    [X,Y,Z] :: [1..inf],
    X tent_set 4,
    Y tent_set 3,
    Z tent_set 4,
    tent_call(X, Y, my_minlist([X,3],Y)),
    tent_call(Y, Z, my_minlist([Y,2],Z)),
    X tent_set 5.

my_minlist(List, Min) :-
    minlist(List, Min).


Question: Now, I guess, the second constraint is woken.  Am I right?
Although the minimum does not change, the tentative value of Y gets
assigned - except if tent_call/3 compares the old tentative assignment
of Y with the new one.


3) To prevent this (and for other uses, too), I would like to have
    access to the old tentative assignment of Min in my_minlist.  Is
    that possible?





-- 
Ulrich Scholz

scholz@informatik.tu-darmstadt.de
http://www.intellektik.informatik.tu-darmstadt.de/~scholz
Received on Fri Jan 14 15:55:14 2005

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:33 PM GMT GMT