constants_in_term | tlist_member | tlist_union | |
tlist_copy | tlist_remove | zap_tlist |
Plist constants_in_term(Term t, Plist p);Given a term t, return a plist containing the set of constants in t.
Plist tlist_copy(Plist p);
BOOL tlist_member(Term t, Plist lst);This function checks if a term is a member of a Plist. The function term_ident(t1,t2) is used.
Plist tlist_remove(Term t, Plist p);Remove a term from a Plist. Term_ident() is used, and the term in the list is zapped.
Plist tlist_union(Plist a, Plist b);Return the union of two Plists of terms. If the inputs are sets, the output is a set. Do not refer the inputs after the call. Duplicates are zapped.
void zap_tlist(Plist p);Zap each term in the list and free the list. If you want to free the list only, without zapping the terms, use zap_plist(p) instead.
Note that there is another package, listterm, that does similar things, but constructing the lists from ordinary terms, as in Prolog.
These activities are projects of the Mathematics and Computer Science Division of Argonne National Laboratory.