Skip to content

Integrate fault localizer into goto checker [blocks: 4215] #3970

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 12 commits into from
Feb 20, 2019

Conversation

peterschrammel
Copy link
Member

@peterschrammel peterschrammel commented Jan 27, 2019

  • Each commit message has a non-empty body, explaining why the change was made.
  • 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).
  • 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.

@peterschrammel peterschrammel self-assigned this Jan 27, 2019
@tautschnig tautschnig changed the title [WIP] Integrate fault localizer into goto checker [depends: 3968] [WIP] Integrate fault localizer into goto checker Feb 2, 2019
@peterschrammel peterschrammel changed the title [WIP] Integrate fault localizer into goto checker Integrate fault localizer into goto checker Feb 17, 2019
@peterschrammel peterschrammel force-pushed the fault-localizer branch 2 times, most recently from dc881ce to eca9530 Compare February 18, 2019 21:21
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: eca9530).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/101371546

@peterschrammel peterschrammel changed the title Integrate fault localizer into goto checker Integrate fault localizer into goto checker [blocks: 4215] Feb 18, 2019
{
log.debug() << score_pair.first->source_location
<< "\n score: " << score_pair.second << messaget::eom;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use messaget::conditional_output to avoid doing a lot of work when it most likely won't be of any value.

log.status() << "Localizing fault" << messaget::eom;

// pick localization method
// if(options.get_option("localize-faults-method")=="TBD")
Copy link
Collaborator

Choose a reason for hiding this comment

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

I suppose this is copy&paste?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I am inclined to remove this option altogether as nobody has ever implemented any alternative method in 3 years.

if(solver() == decision_proceduret::resultt::D_SATISFIABLE)
return false;

return true;
Copy link
Collaborator

Choose a reason for hiding this comment

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

return solver() != decision_proceduret::resultt::D_SATISFIABLE;

v.resize(localization_points.size());

for(std::size_t i = 0; i < localization_points.size(); ++i)
v[i] = tvt(tvt::tv_enumt::TV_UNKNOWN);
Copy link
Collaborator

Choose a reason for hiding this comment

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

localization_points_valuet v(localization_points.size(), tvt::unknown());

{
PRECONDITION(!fault_location.scores.empty());

auto max_it = fault_location.scores.begin();
Copy link
Contributor

Choose a reason for hiding this comment

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

Use std::max and a comparator?

{
l.second->second++;
}
else if(solver.l_get(l.first).is_false() && l.second->second > 0)
Copy link
Contributor

Choose a reason for hiding this comment

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

l.second->second is a bit opaque -- comment on what that is?

if(properties.at(property_id).status == property_statust::FAIL)
{
// get correctly truncated error trace for property and store it
(void)traces.insert(
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these both expected to be insert-new-key? If so suggest cross-checking with a CHECK_RETURN that they are indeed new.

Copy link
Contributor

Choose a reason for hiding this comment

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

(If not, suggest inserting a dummy value and only calling the expensive build / localize functions if they really are new)

Copy link
Member Author

Choose a reason for hiding this comment

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

I've added an invariant in the trace storage.

Make sure a failed property only occurs once in updated_properties
so that storing its trace is only attempted once.
Utility function to freeze all guards, as e.g.
needed for fault localization.
Print information about the likely fault location.
Can be implemented by an incremental goto checker
to provide information about the likely fault location.
Requires prop_convt, symex_target_equationt and
frozen guards.
Uses goto_symex_fault_localizert to provide the functionality.
Variant that reports fault localization information.
Variant that reports fault localization information.
Available by using multi-path symex checker
Available by using multi-path symex checker
@peterschrammel peterschrammel merged commit f4dedec into diffblue:develop Feb 20, 2019
@peterschrammel peterschrammel deleted the fault-localizer branch February 20, 2019 17:37
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