-
Notifications
You must be signed in to change notification settings - Fork 285
Fix --string-non-empty option #2909
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
Fix --string-non-empty option #2909
Conversation
d7f2bf9 to
aef2b66
Compare
tautschnig
left 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.
Let's please stop doing any command-line option parsing in the language front-end. Undocumented command-line options are a no-go.
| safe_string2size_t(cmd.get_value("max-nondet-string-length")); | ||
| } | ||
| if(cmd.isset("string-non-empty")) | ||
| object_factory_parameters.min_nondet_string_length = 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.
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.
While I remain unhappy it seems that #2908 is not currently progressing so I won't further block on this.
| /// Maximum value for the non-deterministically-chosen length of a string. | ||
| size_t max_nondet_string_length=MAX_NONDET_STRING_LENGTH; | ||
|
|
||
| /// Maximum value for the non-deterministically-chosen length of a string. |
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.
🚫 ⛏️ Typo: Minimum
aef2b66 to
5d57dcd
Compare
b25adc2 to
0e36b4d
Compare
0e36b4d to
2d7e636
Compare
|
@thk123 @tautschnig this is ready for review |
thk123
left 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.
Test is missing one assertion status - please add. Also, any reason to have a binary flag rather than just a min-string-length option?
jbmc/regression/jbmc-strings/string-non-empty-option/test_non_empty.desc
Show resolved
Hide resolved
tautschnig
left 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 from my point of view, except the *.desc files as noted below. The where-to-parse-command-line-options is postponed.
| assertion.* line 13 function java::Test.checkMinLength.*: FAILURE | ||
| assertion.* line 17 function java::Test.checkMinLength.*: FAILURE | ||
| assertion.* line 19 function java::Test.checkMinLength.*: FAILURE | ||
|
|
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.
No blank lines here please, it confuses test runs on Windows. The same applies to the other *.desc files in this commit.
| safe_string2size_t(cmd.get_value("max-nondet-string-length")); | ||
| } | ||
| if(cmd.isset("string-non-empty")) | ||
| object_factory_parameters.min_nondet_string_length = 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.
While I remain unhappy it seems that #2908 is not currently progressing so I won't further block on this.
2d7e636 to
72350c2
Compare
72350c2 to
cf123f0
Compare
No particular reason, I'm just fixing the previously existing feature that was broken, but it could be replaced by a min-string-length option in the future. |
allredj
left 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.
This PR failed Diffblue compatibility checks (cbmc commit: 0e36b4d).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/86575976
Status will be re-evaluated on next push.
Please contact @peterschrammel, @thk123, or @allredj for support.
Common spurious failures:
- the cbmc commit has disappeared in the mean time (e.g. in a force-push)
- the author is not in the list of contributors (e.g. first-time contributors).
allredj
left 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.
This PR failed Diffblue compatibility checks (cbmc commit: 2d7e636).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/86578648
Status will be re-evaluated on next push.
Please contact @peterschrammel, @thk123, or @allredj for support.
Common spurious failures:
- the cbmc commit has disappeared in the mean time (e.g. in a force-push)
- the author is not in the list of contributors (e.g. first-time contributors).
allredj
left 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.
This PR failed Diffblue compatibility checks (cbmc commit: 72350c2).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/86579860
Status will be re-evaluated on next push.
Please contact @peterschrammel, @thk123, or @allredj for support.
Common spurious failures:
- the cbmc commit has disappeared in the mean time (e.g. in a force-push)
- the author is not in the list of contributors (e.g. first-time contributors).
allredj
left 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.
Passed Diffblue compatibility checks (cbmc commit: cf123f0).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/86580449
This was broken and the option had no effect