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

Check if user state constraints make state unsatisfiable #452

Closed
offlinemark opened this issue Aug 12, 2017 · 1 comment
Closed

Check if user state constraints make state unsatisfiable #452

offlinemark opened this issue Aug 12, 2017 · 1 comment

Comments

@offlinemark
Copy link
Contributor

offlinemark commented Aug 12, 2017

This issue was initially reported by @murmus. Thank you!

The state.constrain() API enables a user to add additional, arbitrary constraints onto a State. If these constraints actually make the state infeasible, this will later manifest as a SolverException when attempts to concretize symbolic data are made in this state (i.e. state.solve_one). As a side note, that exception will have an error message that is likely cryptic to the typical user (Model is not available).

If a state has been made infeasible by a user constraint, it likely means that original state was not the state their constraints were intended to be applied to.

proposed solution:

  • on each constraint add, check whether added constraint make the state infeasible, if they do, abandon the state
  • log this fact at the same log level as state forking, and other state related messages

alternative ideas:

  • try to rollback the state and remove the constraints the user added and keep going?
@ehennenfent ehennenfent added this to the Validate Existing issues milestone Jan 23, 2019
@ehennenfent ehennenfent removed this from the Validate Existing issues milestone Feb 26, 2019
@ehennenfent
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants