-
Notifications
You must be signed in to change notification settings - Fork 46
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
#420: More operations in string theory #422
Conversation
Unicode characters were not handled in the same way in SMT solvers. Z3, CVC4, and CVC5 require proper escaping. Z3 also supports Java-based Unicode characters. Princess only allows 16bit-sized Unicode, i.e., up to 0x0FFFF, which misses surrogate pairs up to 0x2FFFF as defined in SMTLIB.
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! There is some overlap with #412, but I think it's fine to do it as part of this pull request.
And I think we still need to add the new operations to FunctionDeclarationKind
for the visitor?
src/org/sosy_lab/java_smt/basicimpl/AbstractStringFormulaManager.java
Outdated
Show resolved
Hide resolved
src/org/sosy_lab/java_smt/basicimpl/AbstractStringFormulaManager.java
Outdated
Show resolved
Hide resolved
@@ -300,6 +300,8 @@ public enum FunctionDeclarationKind { | |||
STR_IN_RE, | |||
STR_TO_INT, | |||
INT_TO_STR, | |||
STR_FROM_CODE, | |||
STR_TO_CODE, | |||
STR_LT, |
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 added the mentioned operations already here.
And Junit tests assure that the operations are visited correctly.
This PR adds support for conversion between strings and integers based on code points.
See #420 for the requirement of this API extension in String theory.
Open issues from here: