Skip to content

goto-harness: create goto binary or C output #5821

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

Merged
merged 1 commit into from
Apr 1, 2021

Conversation

tautschnig
Copy link
Collaborator

It is not always necessary or desirable to produce C output. An ability
to produce goto binaries also avoids possible limitations of C and/or
dump-c (such as goto-harness creating initialisers for structs with bit
fields, which yield functions that take bit fields as parameters, which
isn't possible in C).

While at it, also clean up the help output to fix confusing language
about goto binaries when the output was actually C code.

  • Each commit message has a non-empty body, explaining why the change was made.
  • n/a Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • n/a My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • n/a White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@codecov
Copy link

codecov bot commented Feb 12, 2021

Codecov Report

Merging #5821 (af01532) into develop (e76d811) will decrease coverage by 1.07%.
The diff coverage is 40.24%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #5821      +/-   ##
===========================================
- Coverage    75.12%   74.04%   -1.08%     
===========================================
  Files         1435     1444       +9     
  Lines       156301   157310    +1009     
===========================================
- Hits        117416   116485     -931     
- Misses       38885    40825    +1940     
Impacted Files Coverage Δ
src/solvers/smt2/smt2_conv.h 100.00% <ø> (ø)
src/solvers/smt2/smt2_conv.cpp 59.95% <12.76%> (+0.56%) ⬆️
src/memory-analyzer/gdb_api.cpp 86.89% <50.00%> (ø)
src/goto-harness/goto_harness_parse_options.cpp 68.37% <60.00%> (-0.05%) ⬇️
unit/memory-analyzer/gdb_api.cpp 86.46% <94.73%> (ø)
src/goto-programs/link_goto_model.cpp 0.00% <0.00%> (-77.97%) ⬇️
src/ansi-c/literals/convert_character_literal.cpp 31.70% <0.00%> (-36.59%) ⬇️
...rc/ansi-c/c_typecheck_gcc_polymorphic_builtins.cpp 51.96% <0.00%> (-24.62%) ⬇️
src/goto-programs/remove_returns.cpp 74.84% <0.00%> (-24.53%) ⬇️
src/ansi-c/c_typecheck_base.cpp 55.37% <0.00%> (-22.87%) ⬇️
... and 55 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cee5acf...af01532. Read the comment docs.

Copy link
Collaborator

@martin-cs martin-cs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks to be an improvement.

Unhelpful suggestion : should it only ever generate goto binaries? If you want C then you can goto-instrument --dump-c output.gb. That would make the functionality more orthogonal. (But less user-friendly and would involve throwing away useful, working code, so, maybe not).

@tautschnig
Copy link
Collaborator Author

Unhelpful suggestion : should it only ever generate goto binaries? If you want C then you can goto-instrument --dump-c output.gb. That would make the functionality more orthogonal. (But less user-friendly and would involve throwing away useful, working code, so, maybe not).

Would probably be the better route forward, but we'd need to figure out a way of not breaking any customer's workflows. That seems hard to accomplish, I fear.

Copy link
Contributor

@chrisr-diffblue chrisr-diffblue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, and I'm happy for this to go in - with a personal-preference suggestion that you are totally free to ignore.

It is not always necessary or desirable to produce C output. An ability
to produce goto binaries also avoids possible limitations of C and/or
dump-c (such as goto-harness creating initialisers for structs with bit
fields, which yield functions that take bit fields as parameters, which
isn't possible in C).

While at it, also clean up the help output to fix confusing language
about goto binaries when the output was actually C code.

Fixes: diffblue#5351
@tautschnig tautschnig force-pushed the goto-harness-output branch from ecdd251 to af01532 Compare April 1, 2021 16:55
@tautschnig tautschnig merged commit 3cd4054 into diffblue:develop Apr 1, 2021
@tautschnig tautschnig deleted the goto-harness-output branch April 1, 2021 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants