This predicate is a more primitive version of copy_term/2 and does not imply a particular handling of metaterms. Instead it copies the metaterms as normal variables, and returns the MetaTerms list as a means to define the copying of metaterms separately. MetaTerms is a list of pairs [<metaterm>|<variable>] which maps the metaterms in OldTerm to the corresponding fresh variables in NewTerm. By processing this list, the variables can be instantiated to whatever the user defines as the copy of the metaterm.
Note that copy_term/2 is implemented as
copy_term(X, Y) :- copy_term(X, Y, Metas), apply_copy_term_handlers(Metas).
[eclipse 1]: set_flag(output_mode, "QPMV"). yes. [eclipse 3]: copy_term(s(a,X{a},Y, Z{b}), Copy, Metas). X = X_m234{a} Y = Y_g224 Z = Z_m212{b} Copy = s(a, _g282, Y_g288, _g292) Metas = [[Z_m212{b}|_g292], [X_m234{a}|_g282]] yes.