Skip to content

added function call to working queue in the full-slicer #702

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

Closed

Conversation

lucasccordeiro
Copy link
Contributor

After building the CFG data structure, function calls must be added to the working queue in the full-slicer for not slicing incorrectly programs that contain only function prototypes.

status() << "Adding CPROVER library" << eom;
// add the library
status() << "Adding CPROVER library ("
<< config.ansi_c.arch << ")" << eom;
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is a very useful change, but I'd appreciate if it could be placed in a separate PR - it's entirely unrelated to the topic of this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Implemented as suggested. I have just created another PR to handle this change: #703

@@ -402,6 +402,8 @@ void full_slicert::operator()(
const exprt &s=to_code_dead(e_it->first->code).symbol();
decl_dead[to_symbol_expr(s).get_identifier()].push(e_it->second);
}
else if(e_it->first->is_function_call())
add_to_queue(queue, e_it->second, e_it->first);
Copy link
Collaborator

Choose a reason for hiding this comment

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

This implies that all function calls are preserved, even when not on any path to the actual slicing criterion. I do agree that a variant of this is required for soundness (a major improvement would require changes as found, e.g., in Jens Krinke's PhD thesis), but ideally that would be limited to only those function calls on the call graph where the criterion can possibly be reached.

@lucasccordeiro
Copy link
Contributor Author

This is a duplicate of #898, which addresses a similar issue.

owen-mc-diffblue pushed a commit to owen-mc-diffblue/cbmc that referenced this pull request Jul 10, 2017
Note the tests are marked THOROUGH as they take a little too long.
This should be solved by diffblue#702.
tautschnig pushed a commit that referenced this pull request Jul 14, 2017
Note the tests are marked THOROUGH as they take a little too long.
This should be solved by #702.
tautschnig pushed a commit that referenced this pull request Jul 17, 2017
Note the tests are marked THOROUGH as they take a little too long.
This should be solved by #702.
tautschnig pushed a commit that referenced this pull request Aug 7, 2017
Note the tests are marked THOROUGH as they take a little too long.
This should be solved by #702.
tautschnig pushed a commit that referenced this pull request Aug 23, 2017
Note the tests are marked THOROUGH as they take a little too long.
This should be solved by #702.
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.

2 participants