Skip to content

Property reporting utilities [blocks: 3584] #3583

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

Conversation

peterschrammel
Copy link
Member

@peterschrammel peterschrammel commented Dec 16, 2018

Based on #3579, 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).
  • [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.

@peterschrammel peterschrammel changed the title Property reporting utilities [depends: 3579] Property reporting utilities [depends: 3579, 3580] Dec 16, 2018
@peterschrammel peterschrammel changed the title Property reporting utilities [depends: 3579, 3580] Property reporting utilities [depends: 3579, 3580, blocks: 3584] Dec 16, 2018
@peterschrammel peterschrammel force-pushed the property-reporting-utils branch from 67ad462 to 7943da0 Compare December 17, 2018 10:39
@@ -59,6 +59,11 @@ class goto_checkert
/// This builds and returns the counterexample
virtual goto_tracet build_error_trace() const = 0;

/// This outputs an error witness
virtual void output_error_witness(const goto_tracet &) = 0;
/// This outputs an proof
Copy link
Collaborator

Choose a reason for hiding this comment

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

s/an/a/

/// This outputs an error witness
virtual void output_error_witness(const goto_tracet &) = 0;
/// This outputs an proof
virtual void output_proof() = 0;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are there actually no users of goto_checkert at this point (I've partly lost sight of which commits are or aren't currently on the stack)? Otherwise some implementation would have to be added to make sure things compile even with just this commit.

// collect properties in a vector
std::vector<propertiest::const_iterator> sorted_properties;
for(auto p_it = properties.begin(); p_it != properties.end(); p_it++)
sorted_properties.push_back(p_it);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe we should introduce sorted ranges (i.e., add a sort alongside concat, filter)?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Just to confirm as discussed out of band: this was just an idea while reading this code, no need for changes in here.

@peterschrammel peterschrammel force-pushed the property-reporting-utils branch from 7943da0 to a312377 Compare January 13, 2019 15:00
@peterschrammel peterschrammel changed the title Property reporting utilities [depends: 3579, 3580, blocks: 3584] Property reporting utilities [blocks: 3584] Jan 13, 2019
@peterschrammel peterschrammel force-pushed the property-reporting-utils branch from a312377 to 3330164 Compare January 13, 2019 15:30
To count how many properties have a certain status.
This will be used in property reporting.
Plain text, XML and JSON output for property results.
Prints the property report in plain text, JSON or XML.
@peterschrammel peterschrammel force-pushed the property-reporting-utils branch from 3330164 to 519fb98 Compare January 13, 2019 16:37
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: 519fb98).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/97168198

}
log.status() << "\n** "
<< count_properties(properties, property_statust::FAIL)
<< " of " << properties.size() << " failed" << 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.

Should we really print this unconditionally?

Copy link
Member Author

Choose a reason for hiding this comment

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

That's what is happening at the moment: https://github.com/diffblue/cbmc/blob/develop/src/cbmc/all_properties.cpp#L246
Which condition do you have in mind?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah, yes, I had missed that.

{
xmlt xml_result("result");
xml_result.set_attribute("property", id2string(property_id));
xml_result.set_attribute("status", as_string(property_info.status));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Missing description

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

It still seems wrong.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Filed as #3798.

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.

3 participants