-
Notifications
You must be signed in to change notification settings - Fork 274
Add nondet initialisation of strings in goto-harness. #4285
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
Conversation
@@ -48,6 +48,9 @@ struct function_call_harness_generatort::implt | |||
std::set<irep_idt> function_parameters_to_treat_as_arrays; | |||
std::set<irep_idt> function_arguments_to_treat_as_arrays; | |||
|
|||
std::set<irep_idt> function_parameters_to_treat_as_cstrings; |
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.
FWIW I think we need to start more cleanly separating between what we get for command-line options and what things we generate as intermediates based on that.
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.
⛏ unordered_set
!
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.
❓ Also, given how this is used, I don't understand why aren't you using a map (param -> value)? It seems to me, keeping them as separate maps forces you to add more manual checks, while you could be relying on the type system to do that for you.
f178c76
to
7d57a85
Compare
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.
7d57a85
to
763b8d1
Compare
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 is nothing that alarms me about the changes compared to the array init work, but I do note that a lot of the comments that were made on that PR (in particular those by @LAJW) apply here as well and should be carefully considered.
Great work on the documentation. That's a significant amount of effort in terms of both structure and examples - and I appreciate how hard that can be. Marvellous. |
24785d4
to
73575b3
Compare
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.
Just some minor checks on the documentation.
73575b3
to
fdab393
Compare
@@ -48,6 +48,9 @@ struct function_call_harness_generatort::implt | |||
std::set<irep_idt> function_parameters_to_treat_as_arrays; | |||
std::set<irep_idt> function_arguments_to_treat_as_arrays; | |||
|
|||
std::set<irep_idt> function_parameters_to_treat_as_cstrings; |
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.
⛏ unordered_set
!
@@ -48,6 +48,9 @@ struct function_call_harness_generatort::implt | |||
std::set<irep_idt> function_parameters_to_treat_as_arrays; | |||
std::set<irep_idt> function_arguments_to_treat_as_arrays; | |||
|
|||
std::set<irep_idt> function_parameters_to_treat_as_cstrings; |
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.
❓ Also, given how this is used, I don't understand why aren't you using a map (param -> value)? It seems to me, keeping them as separate maps forces you to add more manual checks, while you could be relying on the type system to do that for you.
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: fdab393).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/102682997
Status will be re-evaluated on next push.
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).
-
the compatibility was already broken by an earlier merge.
fdab393
to
4fc128c
Compare
Add support for nondet-initialisation of strings in the function-call goto-harness leveraging pointer nondet initialisation. Co-authored-by: Fotis Koutoulakis <[email protected]> Co-authored-by: Hannes Steffenhagen <[email protected]>
4fc128c
to
ac740d6
Compare
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: ac740d6).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/102802228
for(const auto &pointer_to_treat_as_string_name : | ||
pointers_to_treat_as_cstrings) | ||
{ | ||
out << "\n " << pointer_to_treat_as_string_name << std::endl; |
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 should use join_strings
Add the capability to non-deterministically initialise strings in
goto-harness
call-function
harness generator.