-
Notifications
You must be signed in to change notification settings - Fork 9
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
Automatic conjunct/disjunct simplification #23
Comments
This is tricky. Making Merging nodes can also drastically increase the sentence size, at least in contrived cases and possibly even in useful cases. Consider this sentence: But it may be reasonable and feasible (though tricky) to restructure Maybe other methods could be adjusted as well. It would definitely be nice to be able to handle sentences of unlimited depth. |
Fair enough -- this issue, along with some of the others that have come up, stem from my first medium scale encoding task with the library. It occurs to me that we might want custom functionality for building theories destined for a SAT solver.
I'm also thinking of a set of decorators to turn arbitrary object oriented code into SAT encodings, that would make sense in such a library. Think it makes sense as part of |
Unless there's major objections, I think we'll move forward with a companion library that focuses on advanced techniques for modelling. It will build heavily on |
Making A higher level companion library sounds like a great idea. |
Not sure if this should be optional or the default, but a common pattern in building theories has raised an issue...
This ends up creating a theory
T
such asAnd(<constraint 1>, And(<constraint 2>, And ( ... )))
. With any moderately sized theory, the recursion depth is hit in a variety of ways (checking height, simplifying, etc). The workaround was to just store the constraints in a list ofconjuncts
and then wrap asAnd(conjuncts)
, but something like the following might be reasonable behaviour:And
of two theories withAnd
as their root, return theAnd
of their children. I.e.,And(T1.children, T2.children)
T1
) is anAnd
, add the other theory as a child of it. I.e.,And(T1.children, T2)
And
, do as normal. I.e.,And(T1, T2)
The text was updated successfully, but these errors were encountered: