feat(SAT): implement negation -a for order encoding#1536
feat(SAT): implement negation -a for order encoding#1536Andrew-Mullan wants to merge 28 commits intomainfrom
-a for order encoding#1536Conversation
RustDoc CoverageReport: https://conjure-cp.github.io/conjure-oxide-reports/pr/1536/coverage-docs/index.html This PR: 43.24% documented, 3.43% with examples (35/441/1020) |
Code CoverageReport: https://conjure-cp.github.io/conjure-oxide-reports/pr/1536/coverage-code/index.html This PR: 74.72% lines (16924/22649) |
|
I wonder if we should add |
tests-integration/tests/integration/cnf/int_order/01-eq/config.toml
Outdated
Show resolved
Hide resolved
tests-integration/tests/integration/cnf/int_order/03-neg/config.toml
Outdated
Show resolved
Hide resolved
tests-integration/tests/integration/cnf/int_order/04-ineq/config.toml
Outdated
Show resolved
Hide resolved
|
|
||
| solver = [ | ||
| "minion", | ||
| # "sat-log", |
There was a problem hiding this comment.
just to confirm these are commented out on purpose?
There was a problem hiding this comment.
I may not be fully understanding: I was under the impression that since this is a test for int_order, that it should only use sat-order to solve. I suppose this is a side effect of the old tests naming, and we now aim to have each and every test pass with as many solvers as possible?
I have added log and direct with output as expected.
There was a problem hiding this comment.
we may be adding a test specifically to test a certain configuration, but want to also enable that test for all other configurations (unless there is a reason not to).
There was a problem hiding this comment.
That makes sense, thanks for clarifying
…cp/conjure-oxide into feat/sat/order_negation

Description
This PR implements the negation rule for order encoding in SAT and adds integration tests for the new rule. The new
neg_sat_orderfunction reverses the old bit vector, then pads with false at the front, then negates the bits.Example
Say we have domain D = [-3..2],$x = 1$ , so we want to find $y = -x = -1$ . Start with [1, 1, 1, 1, 1, 0]
New domain D' = [-2..3] and our target bitvector for y is [1, 1, 0, 0, 0, 0]
We now have an order representation for -1 as desired.
Related issues
Closes #1253
Key changes
neg_sat_orderinorder_int_ops.rsas above.cnf/int_order/03-negHow to test/review
Checkout branch
feat/sat/order_negation, run tests and/or solve with Essence model in directory shown above.@ozgurakgun fyi as requested