4.21 Analysing and Constructing Terms
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • Built-in Predicates
        • Analysing and Constructing Terms
          • functor/3
          • functor/4
          • arg/3
          • =../2
          • compound_name_arity/3
          • compound_name_arguments/3
          • numbervars/3
          • numbervars/4
          • var_number/2
          • term_variables/2
          • nonground/2
          • term_variables/3
          • term_singletons/2
          • is_most_general_term/1
          • copy_term/2
          • copy_term/4
          • copy_term_nat/4
          • term_factorized/3
          • term_factorized/4
          • term_minimal/2
          • term_automaton/2
          • automaton_minimal/2
          • automaton_minimal/3
          • Non-logical operations on terms
    • Packages
Availability:built-in
[det]term_factorized(+Term, -Skeleton, -Substitution, +Options)
As term_factorized/3, with the following options:
minimal(+Bool)
If true (default), subterms are the same when they are ==/2, as above. If false, only cells that are literally the same cell are shared. That is the sharing a term has in memory rather than the sharing implied by what it means, and it is what write_term/2 uses for the cycles option:
?- term_factorized(f(g(a),g(a)), S, B, [minimal(false)]).
S = f(g(a), g(a)),
B = [].
?- term_factorized(f(g(a),g(a)), S, B, [minimal(true)]).
S = f(_A, _A),
B = [_A=g(a)].
dollar_var(+Bool)
If true (default), '$VAR'(N) is left alone rather than taken apart, as it stands for a variable. See numbervars/3.