-
Notifications
You must be signed in to change notification settings - Fork 54
Blacklist more SMTLIB keywords as variable/uf names and automatically escape all variable names that would be illegal #424
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
Open
daniel-raffler
wants to merge
16
commits into
master
Choose a base branch
from
blacklist_more_smtlib_keywords
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
f96547b
Add more reserved keywords to the list of forbidden variable/UF names…
daniel-raffler e767a9f
Remove "exit" from the list of legal variable names in VariableNamesTest
daniel-raffler 4cd4fd2
Explicitly blacklist all predefined bv functions as variable/uf names.
daniel-raffler 142f6ba
Rename a variable in one of the tests as its name "concat" is no long…
daniel-raffler a43cb6d
Add a translation layer to automatically escape/unescape variable and…
daniel-raffler b12fbad
Let Princess throw an IllegalArgumentException if a parsing error occ…
daniel-raffler e8c8997
Fix FormulaCreator.dequote for symbol names have a length < 2
daniel-raffler ad21694
In the Bitwuzla formula visitor remove symbol quotes when a free vari…
daniel-raffler f496000
Cleaned up ParserSymbolsEscapedTest an reduced the number of test inputs
daniel-raffler 0775ef8
Remove tests that use formerly illegal variable names and expect and …
daniel-raffler 51231a4
Rewrite VariableNamesTest as all variable names are now legal
daniel-raffler 07c0199
Simplify VariableNamesTest classes
daniel-raffler edf75a2
Add more failing test inputs
daniel-raffler e8639e5
Fix parsing for Princess and make sure that an IllegalArgumentExcepti…
daniel-raffler b1fa368
Blacklist remaining failed test cases
daniel-raffler bc047e0
Blacklist a Unicode test value as there seem to be some encoding issu…
daniel-raffler File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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.
String and Regex operations are matched via "startsWith" and not via String equality. Do we need these entries here?
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.
The keywords in
RESERVEDare used byVariableNamesTestand I've included these two entries as "examples" for the tests. Otherwise, they could be removed. Come to think of it,VariableNamesTestis already kind of slow and it might even need to test all the entries inRESERVED. Maybe one or two examples for each "kind" of reserved word would be sufficient? Then we could just include those test cases directly inVariableNamesTestand remove these two dummy keywords fromRESERVED.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 guess that it might be a good idea to split the tests into a full test run that only runs once in a while (e.g. weekly in the CI) and a subset of unit tests that run always, as this problem is also present in some other PRs. If @kfriedberger and @PhilippWendler agree i will create an issue.
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.
First, we already have split tests for all (slower) and some (fast) tests, that were introduced with the ARM-based CI.
Second, is the main issue here really, that the VariableNamesTests are slow individually, or just in general?
The tests only generate about 1000 variables (maybe a few more :-) ), and the issue is that we need to setup the whole JavaSMT context that often, e.g., we load the solver and initialize the managers several 1000 times, per solver.
Inlining the list of symbols into a simple loop might speedup the VariableNamesTests, with just loosing the granularity of reporting each symbol as individual test.