-
Notifications
You must be signed in to change notification settings - Fork 6
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
Support for str.<
and str.<=
#109
Conversation
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.
Looks good to me. I will approve when the discussions are resolved.
if(!this->m_conversion_todo.empty()) { | ||
return false; | ||
} |
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.
What does this do?
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.
It means that underapproximation will not turn on if we have any to_code/from_code/to_int/from_int
. Is there any reason we want to turn it off? If yes, add a comment.
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.
Ok, when I thought about it, it seems to me that it should work for the conversions.
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.
I think it does not work correctly yet, did you try it on any examples?
* x < y & x != eps -> x = u.v1.w1 | ||
* x < y & x != eps -> v1 in re.allchar | ||
* x < y & x != eps -> v2 in re.allchar | ||
* x < y & x != eps -> to_code(v1) + k = to_code(v2) & k >= 1 |
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.
This is overly convoluted, you can just do to_code(v1) < to_code(v2)
.
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.
Not really. There is some sad story inside the function.
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.
Well, that is weird. Maybe it becomes nonlinear because to_code
is a function? But still, does not make sense if your hack works.
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.
Yes, thats strange.
if(!this->m_conversion_todo.empty()) { | ||
return false; | ||
} |
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.
It means that underapproximation will not turn on if we have any to_code/from_code/to_int/from_int
. Is there any reason we want to turn it off? If yes, add a comment.
Co-authored-by: David Chocholatý <chocholaty.david@protonmail.com>
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.
Looks good to me.
Basic support for predicates
str.<
andstr.<=
. Implemented usingto_code
function.