Next: , Previous: , Up: prolog-libraries   [Index]

16.13.8 Prolog Canonical Representation

In especially tablating, but also in other recursive datastructures like printing of these datastructures one need a canonical representation that conforms to a unique referential structure. One such is implemented in (logiv guile-log guile-prolog canon). To enable this feature in e.g. tablating one need to use,

prolog canonize(f,arg ...), this goal will apply the goal f to args arg ... so that any tablating operation or memo operation will be done using a canonical representation, it is also possible to use this goal function together with functorize, as a prolog functor. You may get a direct representation through,

prolog recursive_canonize(X,Out), which will produce as output a canonical representation of X.