Skip to content

simplify_exprt::simplify_bitwise is now independent of bitvector representation #3105

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
Oct 8, 2018

Conversation

kroening
Copy link
Member

@kroening kroening commented Oct 6, 2018

  • Each commit message has a non-empty body, explaining why the change was made.
  • My contribution is formatted in line with CODING_STANDARD.md.
  • Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • 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.

Copy link
Collaborator

@tautschnig tautschnig 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 a unit test that evaluates the performance differences is necessary to show that it does not have a negative impact. The code path modified here might not be as hot as #3106, but care must be taken. Taking apart mp_integers is very expensive. The fast path in binary2integer is in place for good reasons.

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

@kroening
Copy link
Member Author

kroening commented Oct 6, 2018

Now with new approach that works on the representation directly!

@kroening kroening force-pushed the hex-bitvectors6 branch 3 times, most recently from 272fd5c to 910b5f6 Compare October 6, 2018 21:02
/// perform a binary bit-wise operation, given as a functor,
/// on a bit-vector representation
/// \param f: the functor
irep_idt bitvector_bitwise_op(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Missing documentation of the other parameters, which trips up Doxygen.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

const std::size_t width,
std::function<bool(bool, bool)>);

/// perform a unnary bit-wise operation, given as a functor,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Typo: s/unnary/unary/, but also this documentation should go with the definition, not the declaration.

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

for(std::size_t i = 0; i < width; i++)
{
const bool bit_a = a[i] == '1';
const bool bit_b = b[i] == '1';
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this become get_bitvector_bit?

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, can do once #3106 is merged.

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: 855b35e).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/87130249

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: 2a5599a).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/87134978
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).

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: 3db8644).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/87139343

@kroening kroening merged commit 3d23ab4 into develop Oct 8, 2018
@kroening kroening deleted the hex-bitvectors6 branch October 8, 2018 06:49
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.

3 participants