Skip to content

value_sets now have function identifiers [blocks: #3126] #3865

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
Jan 30, 2019

Conversation

tautschnig
Copy link
Collaborator

We are working towards removing the "function" field from
goto_programt::instructionst::instructiont, and thus need to pass the identifier
of the function whenever it actually is required.

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

@tautschnig tautschnig changed the title value_sets now have function identifiers [blocks: #3126] value_sets now have function identifiers [depends-on: #3863, blocks: #3126] Jan 21, 2019
@danpoe danpoe closed this Jan 21, 2019
@danpoe danpoe reopened this Jan 21, 2019
@tautschnig
Copy link
Collaborator Author

No, in the latest incarnation there isn't actually a member - where needed the function_id is passed in.

@danpoe
Copy link
Contributor

danpoe commented Jan 21, 2019

@tautschnig Sounds good! Sorry, I accidentally closed the PR when I tried to comment.

new_data = state.transform(ns, t, l_next) || new_data;
bool new_data =
state.transform(ns, calling_function, l_call, f_it->first, r);
new_data = state.transform(ns, f_it->first, r, f_it->first, t) || new_data;
Copy link
Contributor

Choose a reason for hiding this comment

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

While you're editing this code, might be sensible to annotate these as "callsite -> head of function" and "callsite -> callsite successor" and so on, explaining the different function names we're passing in

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

L_M_ARG(const goto_functionst::goto_functiont &goto_function)
goto_programt &goto_program,
goto_programt &goto_program,
Copy link
Contributor

Choose a reason for hiding this comment

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

dodgy indent

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch! I've added a clang-format off/on.

@tautschnig tautschnig force-pushed the function-value_sets branch 2 times, most recently from ded3d24 to 5f4bb28 Compare January 21, 2019 16:31
@tautschnig tautschnig self-assigned this Jan 23, 2019
@tautschnig tautschnig changed the title value_sets now have function identifiers [depends-on: #3863, blocks: #3126] value_sets now have function identifiers [blocks: #3126] Jan 23, 2019
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.

✔️
Passed Diffblue compatibility checks (cbmc commit: 5671835).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/98383672

@tautschnig tautschnig force-pushed the function-value_sets branch 2 times, most recently from cf046ed to 56d5cbb Compare January 26, 2019 20:44
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.

✔️
Passed Diffblue compatibility checks (cbmc commit: d3576d4).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/98730684

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.

I think this does what is claimed. I'm still not sure I see why removing the function field is needed but I recognise that this is part of a larger effort.

fixedpoint(goto_functions);
initialize(goto_program);
goto_functionst goto_functions;
fixedpoint(function_id, goto_program, goto_functions);
Copy link
Member

Choose a reason for hiding this comment

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

What are the goto_functions used for?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

They are used to resolve function calls in do_function_call_rec (though in this case it will just fail to resolve any function calls). That said, I have cleaned up the patch so that this change doesn't even show up anymore, because it was only an artefact of reordering functions in the file.

@peterschrammel peterschrammel removed their assignment Jan 28, 2019
@tautschnig tautschnig assigned tautschnig and unassigned kroening Jan 29, 2019
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: cb1aeae).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/98945145
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.

We are working towards removing the "function" field from
goto_programt::instructionst::instructiont, and thus need to pass the identifier
of the function whenever it actually is required.
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.

✔️
Passed Diffblue compatibility checks (cbmc commit: 61557dc).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/99077405

@tautschnig tautschnig merged commit 04fac41 into diffblue:develop Jan 30, 2019
@tautschnig tautschnig deleted the function-value_sets branch January 30, 2019 07:48
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.

8 participants