Sindbad~EG File Manager
int unify2(struct term *t1, struct context *c1, struct term *t2, struct context *c2, struct trail **trp);
struct rel * unify_lambda(struct term *t1, struct context *c1,
struct term *t2, struct context *c2, struct trail **trp, struct trail *tpos);
int term_ident2(struct term *t1,struct term *t2, int depthflag); // used in match
void forbid(struct term *x, struct context *c1, struct term *y, struct context *c2);
int forbidden2(int vn, struct context *c1, int vn2, struct context *c2);
struct term *newvar(struct context *c1, struct context *c2);
struct term *newvar2(struct context *c1, struct context *c2);
void split_or(struct clause *);
void split_and(struct clause *);
void split_not_or(struct clause *);
void split_not_and(struct clause *);
int max_vars(struct clause *c, struct term *t);
void undo_forbidden(struct trail *tp);
void fix_forbidden(int i, struct context *c1, int j, struct context *c2, struct trail *tr);
void restore_vars(struct context *c1, struct context *c2, int saveit1, int saveit2);
void free_int_list(struct int_ptr *p);
void free_forbidden(struct context *c);
void validate_context(struct context *c); // for debugging only
#define V(c1,c2) {validate_context(c1); validate_context(c2);}
int distinct_free_vars(struct clause *c);
int match2(struct term *t1,struct context *c1,struct term *t2,struct trail **trp);
int occur_check2(int varnum, struct context *c1, struct term *t, struct context *c2);
int binding_depth(struct clause *c);
void rename3(struct term *t, struct context *c);
/* restrictdata is defined as int_ptr, so each entry forbidden[varnum]
in a context is a linked list of integers. Each entry in that list represents
a variable or a constant forbidden to varnum in that context. The entry in
that list is manipulated using the following macros. (We use a list of
integers instead of a list of more structured objects to avoid modifying
McCune's Otter files any more than necessary.)
*/
// in these macros, "F" for "Forbidden"
#define FISVAR(x) (((x) & (1UL << 31)) ? 1 : 0)
#define FSETVAR(x) (int)(( (x) |= (1UL << 31)))
#define FSETCONSTANT(x) ( (x) &= 0x7ffffffU)
#define FSYMNUM(x) ((x) & 0x7ffffff) // for storing sym_num of a constant
#define FSETSYMNUM(x,y) ( x = ((y) & 0x7ffffff))
#define FVARNUM(x) ((x) & 0x3f) // six nonzero bits, since varnums are < 64
#define FSETVARNUM(x,y) ( x = (int) ((unsigned)x & (1UL << 31)) | (((unsigned)x) & 0xffffffc0) | (y))
#define FMULTIPLIER(x) ((int)(((unsigned)((x) & 0x7fffffc0)) >> 6)) // 25 bits, omitting the most significant and the 6 least significant.
// used for storing the context multiplier of a variable
#define FSETMULTIPLIER(x,y) (x = (((y) << 6) | (((unsigned) x) & (1UL << 31)) | (((unsigned) x) & 0x3f)))
/* context multipliers stored in the forbidden list must not be longer than 25 bits then */
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists