![]() |
YAP 7.1.0
|
class copy_term/2 |
copy_term(? TI,- TF)
defined in the ISO standard
Term TF is a variant of the original term TI, such that for each variable V in the term TI there is a new variable V' in term TF Notice that:
If you do not want any sharing to occur please use duplicate_term/2
class duplicate_term/2 |
duplicate_term(? TI,- TF)
Term _TF_ is a variant of the original term _TI_, such that for each variable _V_ in the term _TI_ there is a new variable _V'_ in term _TF_, and the two terms do not share any structure. All suspended goals and attributes for attributed variables in _TI_ are also duplicated. Also refer to @ref copy_term/2 .
class rational_tree_to_forest/4 |
rational_tree_to_forest(? TI,- TF, -Extras, ?More)
Copy the term, but loops within the term are broken up and added to a list of loopy assignments
The term TF is a forest representation (without cycles and repeated terms) for the Prolog term TI The term TF is the main term The difference list SubTerms-_MoreSubterms_ stores terms of the form V=T, where V is a new variable occuring in TF, and T is a copy of a sub-term from TI
class copy_term_nat/2 |
copy_term_nat(? TI,- TF)
As copy_term/2 Attributes however, are not copied but replaced by fresh variables
#define DEB_DOOB | ( | S | ) |
#define DEB_DOOBIN | ( | d0 | ) | (fprintf(stderr, "+++ %s ", __FUNCTION__), Yap_DebugPlWriteln(d0)) |
#define DEB_DOOBOUT | ( | d0 | ) | (fprintf(stderr, "--- "), Yap_DebugPlWriteln(d0)) |
Term CopyTermToArena | ( | Term | t, |
bool | share, | ||
bool | copy_att_vars, | ||
yap_error_number * | errp, | ||
Term * | arenap, | ||
Term *bindp | USES_REGS | ||
) |
void Yap_AllocateDefaultArena | ( | size_t | gsizeW, |
int | wid, | ||
void * | cs | ||
) |
Macros | |
#define | DEB_DOOBIN(d0) (fprintf(stderr, "+++ %s ", __FUNCTION__), Yap_DebugPlWriteln(d0)) |
#define | DEB_DOOBOUT(d0) (fprintf(stderr, "--- "), Yap_DebugPlWriteln(d0)) |
#define | DEB_DOOB(S) |
Functions | |
CELL * | Yap_ArenaLimit (Term arena) |
CELL * | Yap_ArenaPt (Term arena) |
UInt | Yap_ArenaSz (Term arena) |
Term | Yap_MkArena (CELL *ptr, CELL *max) |
bool | Yap_ArenaExpand (size_t sz, CELL *arenap) |
void | Yap_AllocateDefaultArena (size_t gsizeW, int wid, void *cs) |
Term | CopyTermToArena (Term t, bool share, bool copy_att_vars, yap_error_number *errp, Term *arenap, Term *bindp USES_REGS) |
Term | Yap_CopyTerm (Term inp) |
Term | Yap_CopyTermNoShare (Term inp) |
Term | Yap_TermAsForest (Term t1) |
void | Yap_InitCopyTerm (void) |