
terms.pl -- Term manipulationCompatibility library for term manipulation predicates. Most predicates in this library are provided as SWI-Prolog built-ins.
term_size(@Term, -Size) is det?- A = a(1,2,3), term_size(A,S). S = 4. ?- A = a(1,2,3), term_size(a(A,A),S). S = 7. ?- term_size(a(a(1,2,3), a(1,2,3)), S). S = 11.
Note that small objects such as atoms and small integers have a size 0. Space is allocated for floats, large integers, strings and compound terms.
variant(@Term1, @Term2) is semidetTerm1 =@= Term2.
subsumes_chk(@Generic, @Specific)
subsumes(+Generic, @Specific)
term_subsumer(+Special1, +Special2, -General) is det
term_factorized(+Term, -Skeleton, -Substiution)?- X = a(X), term_factorized(b(X,X), Y, S). Y = b(_G255, _G255), S = [_G255=a(_G255)].
The following predicates are exported, but not or incorrectly documented.