scryer-prolog icon indicating copy to clipboard operation
scryer-prolog copied to clipboard

Correct and optimize setof/3 and bagof/3

Open mthom opened this issue 1 month ago • 0 comments

Use variant hashing and equivalence checking in Rust to replace the special purpose constant variable keysort, which produced incorrect solutions for #3151 and #3187 as @jjtolton showed in #3176. Performance is now much faster, a factor of O(N) in the solution size (#3186).

A variable safety bug was exposed in the course of implementing these corrections, which this PR also corrects.

mthom avatar Dec 14 '25 01:12 mthom