Skip to content

Conversation

peterschrammel
Copy link
Member

Based on #3585, only review last 4 commits

  • 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 changed the title Multi path symex-only checker [depends: 3585] Multi-path symex-only checker [depends: 3585, blocks: 3795] Jan 13, 2019
@peterschrammel peterschrammel force-pushed the multi-path-symex-only-checker branch from b322f1e to 8253fa4 Compare January 13, 2019 20:31
get_memory_model(options, ns);
memory_model->set_message_handler(ui_message_handler);
(*memory_model)(equation);
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think this is of any use for this checker?

Copy link
Member Author

Choose a reason for hiding this comment

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

It won't have any impact on the property status, but I'd like still want to see the entire SSA.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, but doing unnecessary work should at least be explicitly documented via comments.

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: 8253fa4).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/97176111

@peterschrammel peterschrammel force-pushed the multi-path-symex-only-checker branch from 8253fa4 to b197d35 Compare January 13, 2019 22:45
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: b197d35).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/97179981

@peterschrammel peterschrammel force-pushed the multi-path-symex-only-checker branch from b197d35 to ac60c6c Compare January 14, 2019 00:47
@tautschnig tautschnig changed the title Multi-path symex-only checker [depends: 3585, blocks: 3795] Multi-path symex-only checker [blocks: 3795] Jan 14, 2019
@tautschnig tautschnig changed the title Multi-path symex-only checker [blocks: 3795] Multi-path symex-only checker [depends-on: 3585, blocks: 3795] Jan 14, 2019
@tautschnig
Copy link
Collaborator

The depended-on PRs have been merged, this needs a rebase and possibly further work to make CI pass.

@tautschnig tautschnig changed the title Multi-path symex-only checker [depends-on: 3585, blocks: 3795] Multi-path symex-only checker [blocks: 3795] Jan 14, 2019
@peterschrammel peterschrammel force-pushed the multi-path-symex-only-checker branch 3 times, most recently from a6bb072 to 92f74e4 Compare January 14, 2019 12:12
@peterschrammel peterschrammel force-pushed the multi-path-symex-only-checker branch 2 times, most recently from 1f510d2 to 7bf4d12 Compare January 20, 2019 16:01
@peterschrammel peterschrammel changed the title Multi-path symex-only checker [blocks: 3795] Multi-path symex-only checker [depends: 3860, blocks: 3795] Jan 20, 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: 7bf4d12).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/97960133

@peterschrammel peterschrammel force-pushed the multi-path-symex-only-checker branch from 7bf4d12 to 2061df5 Compare January 20, 2019 23:02
@peterschrammel peterschrammel changed the title Multi-path symex-only checker [depends: 3860, blocks: 3795] Multi-path symex-only checker [blocks: 3795] Jan 20, 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: 2061df5).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/97972656

}
else
{
property_infot &property_info = properties.at(property_id);
Copy link
Contributor

Choose a reason for hiding this comment

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

Repeated lookup should probably be replaced with

auto emplace_result = properties.emplace(
  property_id, property_infot{step.source.pc, step.comment, status});
if(emplace_result.second)
{
  ...
}
else
{
  property_infot &property_info = emplace_result.first->second;
  ...
}


for(auto &property_pair : properties)
{
if(property_pair.second.status == property_statust::NOT_CHECKED)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a chance the status was PASS before the loop above changed it to NOT_CHECKED, and therefore we might spuriously note it as changed? I think that can't happen because it's hard to imagine that |=result with either UNKNOWN or PASS on the RHS would turn PASS -> NOT_CHECKED, but just want to check I've understood.

Copy link
Member Author

@peterschrammel peterschrammel Jan 21, 2019

Choose a reason for hiding this comment

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

No, cannot happen. |= is supposed to be monotonic, i.e. once you have a PASS, you cannot go back to something undetermined anymore.

const optionst &,
ui_message_handlert &);

/// Sets property status to PASS or FAIL for properties whose
Copy link
Contributor

Choose a reason for hiding this comment

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

Does it? It appears to only set properties to PASS

: multi_path_symex_only_checkert(options, ui_message_handler, goto_model)
{
// unwinds <clinit> loops to number of enum elements
if(options.get_bool_option("java-unwind-enum-static"))
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe factor this code with the identical code in jbmc?

Copy link
Member Author

Choose a reason for hiding this comment

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

Factored out into separate file. The instance of the code in jbmc_parse_options will disappear with the do_language_agnostic_bmc call.

@peterschrammel peterschrammel force-pushed the multi-path-symex-only-checker branch from 2061df5 to ad11373 Compare January 21, 2019 23:31
They are not inlined using goto_partial_inline anymore.
Updates the property infos with properties
created by goto-symex and sets the status
of already determined properies.
multi_path_symex_only_checkert is a
bounded model checking algorithm that determines the
status of properties through symbolic execution and
constant propagation.
I.e. it doesn't call the SAT solver.

If desired CBMC could expose this to support a symex-only
BMC algorithm.

For now, this is used to implement show-vcc and program-only
(which are rather orthogonal to the BMC algorithm used,
but currently assume symex-only).
@peterschrammel peterschrammel force-pushed the multi-path-symex-only-checker branch from ad11373 to 3809454 Compare January 22, 2019 13:50
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: 3809454).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/98183898
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.

@peterschrammel peterschrammel merged commit f23f4f3 into diffblue:develop Jan 22, 2019
@peterschrammel peterschrammel deleted the multi-path-symex-only-checker branch January 22, 2019 16:33
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.

5 participants