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

Overhaul of Inequality Theory #99

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Conversation

FredrikTaquist
Copy link
Collaborator

This RP completely reworks the Inequality Theory from the ground up to make it more intuitive and to fix various bugs related to guard merging. It also introduces closed intervals to the IntervalGuard to enable <= and >= guards.

In addition, this RP adds support for suffix optimization to the Inequality Theory and fixes various bugs related to suffix optimization in general.

@kostis kostis requested a review from fhowar March 27, 2025 10:19
Copy link
Member

@fhowar fhowar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you write some documentation on merging in the code? And find better names? mergeWith and canUse are very generic.

What happens during a merge, what are the parameters and outcome?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need right closed and left closed? Can't this be modelled in the type DataValue? We could introduce -infty and +infty (not sure of the implications) but using two field for either side begs for inconsistency issues

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The right closed and left closed booleans are to allow guards such as r1 <= s1 <= r2. I am unsure how this can be modeled using -infty and +infty in a simple and straightforward way. Could you elaborate on what inconsistency issues you foresee?

* @param renaming - the conditions to apply to other
* @param solver - a constraint solver
*/
public boolean isSemanticallyEquivalent(SDT other, Expression<Boolean> renaming, NativeZ3Solver solver) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renaming should have a better name

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

Successfully merging this pull request may close these issues.

3 participants