Now I stepped over an interesting predicate in formerly SB Prolog,
now by the name XSB Prolog. Any support via SWI-Prolog for it?
- unnumbervars(+Term, +FirstN, ?Copy)
This predicate is a partial inverse of predicate numbervars/3. It creates a copy of Term in which all subterms of the form ‘$VAR’(<int>) where <int> is not less than FirstN are uniformly replaced by variables. ‘$VAR’’ subterms with the same integer are replaced by the same variable. Also a version unnumbervars/2 is provided which calls unnumbervars/3 with the second parameter set to 0.
https://xsb.sourceforge.net/manual1/manual1.pdf
The predicate unnumbervars/2
has a stint in this write-up:
BoostRLR: The beauty of Prolog for statistical relational learning
Felix Weitkämper - 09. Aug 2024
https://www.informatik.uni-wuerzburg.de/fileadmin/10030600/2024/KI_2004_paper_174.pdf