[m-users.] unification of object terms

Christophe REY cjcrey at gmail.com
Fri Mar 4 21:05:05 AEDT 2016


Hi all,

I get some difficulties trying to use the predicate

unify_term(term(T)::in, term(T)::in, substitution(T)::in, substitution(T)::out)

from the term module.

Using term_io.read_term, I am able to read object terms, so I have two 
ground terms for the first two arguments of unify_terms.
When I call unify_term with the object terms p(X,foo) and p(bar,Y), then 
it fails. It seems that there cannot be (object) variables inside both 
terms to unify. When there are variables only inside one term, then it 
is ok.
Is it normal ?

Maybe this comes from the way I initialize the third argument of 
unify_term: I use the map.init predicate to create an empty substitution 
for this third term. Is it the right way to do this ?

Thanks for your help !

Christophe

-- 
___________________________________________________
Christophe Rey
  
MCF / Associate professor
Université Blaise Pascal Clermont 2

Email : christophe.rey at univ-bpclermont.fr
         rey at isima.fr
Web   : http://fc.isima.fr/~crey/

Laboratoire LIMOS
   Campus Universitaire des Cézeaux
   1 rue de la Chebarde TSA 60125 - CS 60026
   63178 AUBIERE cedex
   Tel : +33 (0)4 73 40 50 09
   Fax : +33 (0)4 73 40 50 01

IUT d'Allier, Dept MMI Vichy
   Pôle Universitaire
   1, av. des Célestins 03200 VICHY
   Tel : +33 (0)4 70 30 43 92
   Fax : +33 (0)4 70 30 43 78
___________________________________________________




More information about the users mailing list