forked from diffblue/cbmc
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request diffblue#1947 from romainbrenguier/dependency-grap…
…h/stop-adding-unecessary-constraints#TG-2608 [TG-2608] Use string dependencies to reduce the number of constraints
- Loading branch information
Showing
15 changed files
with
639 additions
and
262 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
class Test { | ||
void test(String s) { | ||
// Filter | ||
if(s == null) | ||
return; | ||
|
||
// Act | ||
|
||
// this matters for the final test | ||
String t = s.concat("_foo"); | ||
|
||
// these should be ignored by the solver as they | ||
// do not matter for the final test | ||
String u = s.concat("_bar"); | ||
String v = s.concat("_baz"); | ||
String w = s.concat("_fiz"); | ||
String x = s.concat("_buz"); | ||
|
||
// Assert | ||
assert t.endsWith("foo"); | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
CORE | ||
Test.class | ||
--refine-strings --string-max-length 1000 --string-max-input-length 100 --verbosity 10 Test.class --function Test.test | ||
^EXIT=0$ | ||
^SIGNAL=0$ | ||
assertion at file Test.java line 20 .*: SUCCESS | ||
string_refinement::check_axioms: 3 universal axioms | ||
-- | ||
-- | ||
We check there are exactly 3 universal formulas considered by the solver (2 for | ||
`t = s.concat("_foo")` and 1 for `t.endsWith("foo")`). | ||
The other concatenations should be ignored. |
This file contains 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 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 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
Oops, something went wrong.