Removing term_iterate_deVar, which is now obsolete.
This commit is contained in:
parent
b6dab3c584
commit
fe1be9b3f0
@ -4,15 +4,10 @@
|
|||||||
3 unify mgu.c +233 ; mgu.c +247 ; mgu.c +281
|
3 unify mgu.c +233 ; mgu.c +247 ; mgu.c +281
|
||||||
1 iterateLocalToOther prune_theorems.c +108
|
1 iterateLocalToOther prune_theorems.c +108
|
||||||
1 term_iterate_leaves term.c +1145
|
1 term_iterate_leaves term.c +1145
|
||||||
1 term_iterate_deVar term.c +1544
|
|
||||||
|
|
||||||
term_iterate_deVar
|
|
||||||
term_iterate_state_deVar
|
|
||||||
|
|
||||||
term_iterate_leaves
|
term_iterate_leaves
|
||||||
term_iterate_state_leaves
|
term_iterate_state_leaves
|
||||||
|
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
|
|
||||||
iterateTermOther is called using makeDepend and addOther
|
iterateTermOther is called using makeDepend and addOther
|
||||||
@ -21,5 +16,4 @@ term_iterate_open_leaves is called using addsubterms
|
|||||||
unify is called using unify_combine_enc and unify_combined_tup, and a callback using the keys list? (which propagates back to subtermunify data)
|
unify is called using unify_combine_enc and unify_combined_tup, and a callback using the keys list? (which propagates back to subtermunify data)
|
||||||
iterateLocalToOther is called using checkTerm
|
iterateLocalToOther is called using checkTerm
|
||||||
term_iterate_leaves is called using testleaf
|
term_iterate_leaves is called using testleaf
|
||||||
term_iterate_deVar is not called?
|
|
||||||
|
|
||||||
|
70
src/term.c
70
src/term.c
@ -1044,72 +1044,6 @@ term_iterate (const Term term, int (*leaf) (Term t), int (*nodel) (Term t),
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Generic term iteration
|
|
||||||
int
|
|
||||||
term_iterate_deVar (Term term, int (*leaf) (Term t), int (*nodel) (Term t),
|
|
||||||
int (*nodem) (Term t), int (*noder) (Term t))
|
|
||||||
{
|
|
||||||
term = deVar (term);
|
|
||||||
if (term != NULL)
|
|
||||||
{
|
|
||||||
if (realTermLeaf (term))
|
|
||||||
{
|
|
||||||
// Leaf
|
|
||||||
if (leaf != NULL)
|
|
||||||
{
|
|
||||||
return leaf (term);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
int flag;
|
|
||||||
|
|
||||||
flag = true;
|
|
||||||
|
|
||||||
if (nodel != NULL)
|
|
||||||
flag = flag && nodel (term);
|
|
||||||
|
|
||||||
// Left part
|
|
||||||
if (realTermTuple (term))
|
|
||||||
flag = flag
|
|
||||||
&&
|
|
||||||
(term_iterate_deVar
|
|
||||||
(TermOp1 (term), leaf, nodel, nodem, noder));
|
|
||||||
else
|
|
||||||
flag = flag
|
|
||||||
&&
|
|
||||||
(term_iterate_deVar (TermOp (term), leaf, nodel, nodem, noder));
|
|
||||||
|
|
||||||
// Center
|
|
||||||
|
|
||||||
if (nodem != NULL)
|
|
||||||
flag = flag && nodem (term);
|
|
||||||
|
|
||||||
// right part
|
|
||||||
if (realTermTuple (term))
|
|
||||||
flag = flag
|
|
||||||
&&
|
|
||||||
(term_iterate_deVar
|
|
||||||
(TermOp2 (term), leaf, nodel, nodem, noder));
|
|
||||||
else
|
|
||||||
flag = flag
|
|
||||||
&&
|
|
||||||
(term_iterate_deVar
|
|
||||||
(TermKey (term), leaf, nodel, nodem, noder));
|
|
||||||
|
|
||||||
if (noder != NULL)
|
|
||||||
flag = flag && noder (term);
|
|
||||||
|
|
||||||
return flag;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Generic term iteration with state
|
//! Generic term iteration with state
|
||||||
int
|
int
|
||||||
term_iterate_state_deVar (Term term, int (*leaf) (),
|
term_iterate_state_deVar (Term term, int (*leaf) (),
|
||||||
@ -1639,7 +1573,7 @@ termSubstPrint (Term t)
|
|||||||
int
|
int
|
||||||
iterateTermOther (const int myrun, Term t, int (*callback) (Term t))
|
iterateTermOther (const int myrun, Term t, int (*callback) (Term t))
|
||||||
{
|
{
|
||||||
int testOther (Term t)
|
int testOther (Term t, int *state)
|
||||||
{
|
{
|
||||||
int run;
|
int run;
|
||||||
|
|
||||||
@ -1650,5 +1584,5 @@ iterateTermOther (const int myrun, Term t, int (*callback) (Term t))
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return term_iterate_deVar (t, testOther, NULL, NULL, NULL);
|
return term_iterate_state_deVar (t, testOther, NULL, NULL, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
@ -194,9 +194,6 @@ int termOrder (Term t1, Term t2);
|
|||||||
int term_iterate (const Term term, int (*leaf) (Term t),
|
int term_iterate (const Term term, int (*leaf) (Term t),
|
||||||
int (*nodel) (Term t), int (*nodem) (Term t),
|
int (*nodel) (Term t), int (*nodem) (Term t),
|
||||||
int (*noder) (Term t));
|
int (*noder) (Term t));
|
||||||
int term_iterate_deVar (Term term, int (*leaf) (Term t),
|
|
||||||
int (*nodel) (Term t), int (*nodem) (Term t),
|
|
||||||
int (*noder) (Term t));
|
|
||||||
int term_iterate_state_deVar (Term term, int (*leaf) (),
|
int term_iterate_state_deVar (Term term, int (*leaf) (),
|
||||||
int (*nodel) (),
|
int (*nodel) (),
|
||||||
int (*nodem) (),
|
int (*nodem) (),
|
||||||
|
Loading…
Reference in New Issue
Block a user