AFAIK you cannot simply turn on occurs check in standard unifications,
but it seems easy to write a simple package to do it by "peeling off"
(i.e., normalizing) clauses and using unify_with_occurs_check/2
instead of =/2:
-------------------------------------------------------------
:- use_package(use_occurs_check).
p(f(a), X, b) :-
...
-------------------------------------------------------------
==>
-------------------------------------------------------------
p(A1, X, A3) :-
unify_with_occurs_check(A1,f(a)),
unify_with_occurs_check(A3,b),
...
-------------------------------------------------------------
You may also be able to work out a slightly smarter transformation
that preserves indexing. If you do develop such a package please add
it to the repository!
Cheers --Manuel H
--
----------------------- The Ciao System Development Team --------------------
The CLIP Group | Technical University of Madrid
ciao(a)clip.dia.fi.upm.es | University of New Mexico
http://www.cliplab.org /
http://www.ciaohome.org
-----------------------------------------------------------------------------
==============================================================================
Message: Address: Action:
help majordomo(a)clip.dia.fi.upm.es Info. on useful commands
subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list
unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this list
<whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list
-----------------------------------------------------------------------------
Archived messages:
http://www.clip.dia.fi.upm.es/Mail/ciao-users/
-----------------------------------------------------------------------------