Skip to content

introduce 'called_function' into goto traces [blocks: #3126] #3276

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 3 commits into from
Nov 7, 2018

Conversation

kroening
Copy link
Member

@kroening kroening commented Nov 5, 2018

This will support removing the function identifier from goto instructions.

  • 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.
  • 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.
  • White-space or formatting changes outside the feature-related changed lines are in commits of their own.

Copy link
Collaborator

@tautschnig tautschnig left a comment

Choose a reason for hiding this comment

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

Looks ok to me except clang-format will have it's complaints.

Copy link
Contributor

@smowton smowton left a comment

Choose a reason for hiding this comment

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

A few nitpicks

@@ -483,7 +485,7 @@ void show_full_goto_trace(
function_depth--;
if(options.show_function_calls)
{
out << "\n#### Function return: " << step.function_identifier
out << "\n#### Function return"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not step.function?

Copy link
Member Author

Choose a reason for hiding this comment

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

ok

@@ -86,6 +86,8 @@ class goto_trace_stept
enum class assignment_typet { STATE, ACTUAL_PARAMETER };
assignment_typet assignment_type;

// the instruction that created this step
Copy link
Contributor

Choose a reason for hiding this comment

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

Clarify that calls are outside a function and returns inside it?

Copy link
Member Author

Choose a reason for hiding this comment

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

ok

"display_name", id2string(symbol.display_name()));
xml_function.set_attribute(
"identifier", id2string(symbol.name));
xml_function.new_element()=xml(symbol.location);
Copy link
Contributor

Choose a reason for hiding this comment

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

style (here and below)

xmlt &xml_function=xml_call_return.new_element("function");
xml_function.set_attribute(
"display_name", id2string(symbol.display_name()));
xml_function.set_attribute(
"identifier", id2string(step.function_identifier));
"identifier", id2string(symbol.name));
Copy link
Contributor

Choose a reason for hiding this comment

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

step.function a little clearer?

Copy link
Member Author

Choose a reason for hiding this comment

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

ok

@kroening kroening force-pushed the called_function branch 8 times, most recently from 94624ae to cac61bb Compare November 6, 2018 16:19
@tautschnig tautschnig changed the title introduce 'called_function' into goto traces introduce 'called_function' into goto traces [blocks: #3126] Nov 7, 2018
Daniel Kroening added 3 commits November 7, 2018 11:57
The previous 'function_identifier' is now 'called_function', which is a
better name as it denotes the identifier of the function that is called.
@kroening kroening merged commit 1063983 into develop Nov 7, 2018
@kroening kroening deleted the called_function branch November 7, 2018 13:17
Copy link
Contributor

@allredj allredj left a 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: 05eb134).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/90559178
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).

The incompatibility may have been introduced by an earlier PR. In that case merging this
PR should be avoided unless it fixes the current incompatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants