Open niklasdewally opened 3 hours ago
Should be identical to div, yes.
@ozgurakgun should savilerow and conjure have the same modulo semantics? If not, which should I follow?
For these models, conjure and savile row give drastically different numbers of solutions:
(conjure: 21 solutions, savilerow 7)
language ESSENCE' 1.0
find x : int(5..7)
find y : int(0..3)
find z : int(0..4)
such that x % (y%z) != 3
(conjure: 60 solutions, savilerow: 1)
language ESSENCE' 1.0
find x : int(5..7)
find y : int(0..3)
find z : int(0..4)
$ variation on 04
such that !(x % (y%z) = 3)
Conjure and Savilerow agree on the div tests that these were based on.
Ignore the above: they agree with -S0!
I was about to ask what options you are passing, because Conjure basically just passes these through. Stick to -S0 indeed.
conjure solve -v
prints the SR command it runs (among other things) which might be useful.
Summary
Implement modulo operator and convert it to Minion. As with all other Minion rules, constraints targeting mod specifically should be provided in
minion_constraints
. These should include tests for neq, negated eq, and nested constraints.I imagine that this will work similarly to division (#454), and similar test cases could be used.
Tasks
Questions