Increase test coverage of constraint libraries
triska opened this issue · 0 comments
Due to the many possibilities regarding instantiations and variable aliasings, testing constraint libraries requires a lot of thought and computational resources. Experience has shown that obvious mistakes in even widely used constraints can remain undetected for many years in some cases. Luckily, the mistakes can often be demonstrated with comparatively small test cases:
Users who are interested in contributing to this roadmap item should first think about which invariants must hold about a given constraint, and then exhaustively test these invariants up to a given term depth.
An example of such an invariant is that for any pure goal G
(such as a constraint like dif/2
), the following must hold:
If ?- G, X=Y.
succeeds unconditionally, then ?- X=Y, G.
does not fail.
Note that exchanging the goals may raise an exception or lead to nontermination.
From such systematic cases, issues like the one reported above should be readily detected.
Please contact me if you want to work on this item and have any questions. All contributions are welcome!