Skip to content

Conversation

@kroening
Copy link
Collaborator

Goto programs are intended as an internal representation that is independent
of the specific input programming language. This commit switches the debug
output for the instructions of goto programs to format(...), which is also
designed to be language independent.

  • 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/
  • n/a 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.

@kroening kroening force-pushed the goto_program_use_format branch 7 times, most recently from b82dd0b to 809fd7e Compare July 25, 2021 07:54
Goto programs are intended as an internal representation that is independent
of the specific input programming langauge.  This commit switches the debug
output for the instructions of goto programs to format(...), which is also
designed to be language independent.
@kroening kroening force-pushed the goto_program_use_format branch from 809fd7e to 75a16c7 Compare July 25, 2021 10:46
@codecov
Copy link

codecov bot commented Jul 25, 2021

Codecov Report

Merging #6251 (75a16c7) into develop (5dd2519) will decrease coverage by 0.02%.
The diff coverage is 89.58%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #6251      +/-   ##
===========================================
- Coverage    76.22%   76.19%   -0.03%     
===========================================
  Files         1482     1482              
  Lines       161866   161886      +20     
===========================================
- Hits        123383   123350      -33     
- Misses       38483    38536      +53     
Impacted Files Coverage Δ
src/solvers/flattening/boolbv.h 76.19% <ø> (ø)
src/ansi-c/parser.y 79.26% <87.50%> (ø)
src/goto-instrument/contracts/contracts.cpp 91.93% <88.67%> (ø)
src/goto-programs/goto_program.cpp 68.39% <90.32%> (+1.43%) ⬆️
src/ansi-c/c_typecheck_code.cpp 78.43% <100.00%> (ø)
src/ansi-c/expr2c.cpp 64.95% <0.00%> (-4.23%) ⬇️
jbmc/src/java_bytecode/expr2java.cpp 86.19% <0.00%> (-0.42%) ⬇️
src/util/format_expr.cpp 89.16% <0.00%> (+6.85%) ⬆️
... and 1 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 d5c9ef8...75a16c7. Read the comment docs.

@kroening kroening marked this pull request as ready for review July 25, 2021 12:39
case FUNCTION_CALL:
out << "CALL ";
{
auto &call = instruction.get_function_call();
Copy link
Member

Choose a reason for hiding this comment

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

Is this the only place where we print codet? It might be worth moving the formatting into a util/format_code.h (not in this PR) otherwise.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The idea is to get rid of the use of codet in goto functions altogether; function calls are in fact the only instruction that doesn't have an alternative API yet.

@kroening kroening merged commit 026738b into develop Jul 27, 2021
@kroening kroening deleted the goto_program_use_format branch July 27, 2021 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants