Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Underapproximating
to_int
/from_int
#117Underapproximating
to_int
/from_int
#117Changes from 1 commit
a3cb376
fbc35f3
a2558ce
f0f1018
cac9114
434888f
c0490a0
4ece46d
664b2e8
84c8ae7
624cfbe
a89cf58
c69c980
595d742
690c39d
4b23813
d13b34b
3b6cb6d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a future work, we could propagate the LIA solver here and check, if the formula
subst_var < 100
is valid. In that case we have a precise solution and we could setres_precision
toPRECISE
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
subst_var
is a string var, so we would have to check something else, probably you meant|subst_var| < 3
.But I am not sure if it would work.
I was thinking about doing something a bit similar, returning multiple formulae (one underapproximation, one something like overapproximation), but it is quite complicated and it is not that clear how it should work.
Anyway, for
stringfuzz
, the best thing would be to transformn = str.to_int(x)
on the input ton = str.to_int(x) & x ∈ 0*n
(and also do that for lenghts, i.e.n = str.len(x) & x ∈ .{n}
), I think that would solve everything.So doing something with overapproximation or something similar would only be helpful for
full_str_int
, and it is questionable how helpful.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from_int
? Is it possible at all in our setting? The replacement offrom_int
byto_int
is done in relevant_eh, right ?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from_int
is not replaced withto_int
, I do handle them in similar way during the LIA formula creation, but it is still important to know if I haveto_int
orfrom_int
(for handling invalid cases).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I wrote it confusedly. I though that the current problem (mainly for
full_str_int
) are constraints of the formw = from_int(x)
wherex
is some integer variable. Because we do not know about the possible values ofx
, we are not currently able to solve it, right? But if we find out thatx
is always smaller than 100, we can enumerate it quite easily.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I think I understand now. It can probably be somehow applied for it, I'll have to think about it.
Anyway, there are only 363 formulae with
from_int
infull_str_int
, so I don't think it's the main problem for this benchmark right now.You can see that the underapproximation, which is useful only for SAT cases (see how number of UNSAT cases did not change at all), already helped a lot with
unknown
s, however, most of them moved to TO/MO, so I think we also need to focus on simplifying the formula somehow.