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

Improve the SMT generated for array lookups with symbolic indices #378

Merged
merged 1 commit into from
Dec 30, 2019

Conversation

travitch
Copy link
Contributor

What4 attempts to simplify array lookups of values with concrete indices. In
cases where the index to look up in symbolic, that fails and it instead
generates a huge mux over all possible indexes, which is very expensive and
counterproductive.

This commit removes the special handling of symbolic indices, allowing the
generated SMT to fall back on just issuing an SMT array lookup.

Fixes #371

What4 attempts to simplify array lookups of values with concrete indices.  In
cases where the index to look up in symbolic, that fails and it instead
generates a huge mux over all possible indexes, which is very expensive and
counterproductive.

This commit removes the special handling of symbolic indices, allowing the
generated SMT to fall back on just issuing an SMT array lookup.

Fixes #371
Copy link
Contributor

@andreistefanescu andreistefanescu left a comment

Choose a reason for hiding this comment

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

@travitch let's add a test, to prevent accidentally reintroducing the muxing

Copy link
Contributor

@robdockins robdockins left a comment

Choose a reason for hiding this comment

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

This just removes that Nothing case, right? Looks OK to me.

I agree it would be nice to test this somehow, but it isn't immediatly obvious the best way to do it...

@robdockins robdockins merged commit ce240b9 into master Dec 30, 2019
@travitch travitch deleted the fix/issue-371 branch May 20, 2020 06:15
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.

Poor SMT generation for array lookups with concrete indices
3 participants