Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idea: Prune useless reifiers #116

Open
pvdz opened this issue Jul 8, 2016 · 0 comments
Open

Idea: Prune useless reifiers #116

pvdz opened this issue Jul 8, 2016 · 0 comments

Comments

@pvdz
Copy link
Contributor

pvdz commented Jul 8, 2016

This ticket has multiple parts;

  • When the result of reifier is unused elsewhere in the config it cannot affect the outcome of a search. As such those propagators should not be part of the solve space. The operation being checked is only enforced if the boolean is solved and if that never happens, the reifier will never do anything.

Note that while this appears to be worthwhile for or main case, it's unsafe to do so because you don't really know how the boolean vars are used externally. For example, they are used in markov matrix conditions and we can't really detect that easily. Let alone use cases really outside of finitedomain in a callback or something. So for now this vector is not pursued and must be fixed at call sites.

  • When the result of a reifier is declared as solved immediately, a regular propagator for given operation or inverse operation should be added depending on the solve value. The reifier itself should not become a propagator as it's only an extra layer of overhead. This layer can only affect the result var and since that's already done it is no longer needed.
  • When the either operand var is declared solved, the reifier should compile a propagator that matches the expected outcome. For example, an isEq(A, 1) is equal to isEq(A, 1, [0,1]) and means C=A==1?1:0, which we could simplify with an eq. Some mapping is in order for non-boolean-bound values.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant