2004-04-23 11:58:43 +01:00
|
|
|
#ifndef MGU
|
|
|
|
#define MGU
|
|
|
|
|
2004-07-24 20:07:29 +01:00
|
|
|
#include "term.h"
|
|
|
|
#include "termlist.h"
|
2004-04-23 11:58:43 +01:00
|
|
|
|
2004-05-15 17:43:20 +01:00
|
|
|
//! A special constant do denote failure.
|
|
|
|
/**
|
|
|
|
* \c NULL already denotes equality, so an extra signal is needed to
|
|
|
|
* denote that a unification fails.
|
|
|
|
* \todo Find a portable solution for this \c MGUFAIL constant:
|
|
|
|
* maybe a pointer to some special constant.
|
|
|
|
*/
|
2004-04-23 11:58:43 +01:00
|
|
|
#define MGUFAIL (Termlist) -1
|
|
|
|
|
2005-06-02 13:14:28 +01:00
|
|
|
void setMguMode (const int mgu);
|
2004-04-23 11:58:43 +01:00
|
|
|
Termlist termMguTerm (Term t1, Term t2);
|
2004-08-30 22:49:51 +01:00
|
|
|
int termMguInTerm (Term t1, Term t2, int (*iterator) (Termlist));
|
|
|
|
int termMguSubTerm (Term t1, Term t2, int (*iterator) (Termlist, Termlist),
|
2004-08-13 11:50:56 +01:00
|
|
|
Termlist inverses, Termlist keylist);
|
2004-08-11 15:09:12 +01:00
|
|
|
void termlistSubstReset (Termlist tl);
|
2007-01-29 13:15:35 +00:00
|
|
|
int checkRoletermMatch (Term t1, Term t2);
|
2004-04-23 11:58:43 +01:00
|
|
|
|
2006-02-27 16:08:17 +00:00
|
|
|
// The new iteration methods
|
|
|
|
int unify (Term t1, Term t2, Termlist tl, int (*callback) (Termlist));
|
|
|
|
int
|
|
|
|
subtermUnify (Term tbig, Term tsmall, Termlist tl, Termlist keylist,
|
|
|
|
int (*callback) (Termlist, Termlist));
|
2007-01-29 13:15:35 +00:00
|
|
|
|
2004-04-23 11:58:43 +01:00
|
|
|
#endif
|