> > > If you can collect the constraints in that way, this is probably the > > > best solution. You might not need to list all individual constraints, > > > you just need one goal that sets them all up: > > > > > > ?- setup_cstr(Vars), > > > copy_term(Vars-setup_cstr(Vars), VarsCopy-GoalCopy), > > > call(GoalCopy), > > > ... > > > > Ah, that is a sneak way of unifying some but not all variables of a term. > > ??? You may be misunderstanding something. > Yes, it seems as if I don't understand your code. setup_cstr(Vars) is a clause that sets up the constraints on Vars (a list of Varialbles). Why does copy_term(...) have setup_cstr(Vars) again? In my understanding, copy_term(OrigTerm-VariablestoBeUnified, GoalTerm-ListOfUnifiers) unfies the Variables in VariablesToBeUnified, which are Variables occuring in term OrigTerm, with the terms in ListOfUnifiers, eg copy_term([A,B,A]-[A], GoalTerm-[c]) yields T=[c,B,c] Your code looked similar. Uli -- Ulrich Scholz scholz@informatik.tu-darmstadt.de http://www.intellektik.informatik.tu-darmstadt.de/~scholzReceived on Thu May 01 15:38:01 2003
This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:23 PM GMT GMT