Skip to content

[Refactor] New SMT backend: Remove X-macro implementation from smt_bit_vector_theory #6615

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 8 commits into from
Feb 2, 2022

Conversation

NlightNFotis
Copy link
Contributor

@NlightNFotis NlightNFotis commented Jan 28, 2022

Hello,

The aim of this PR is to provide some structural changes and fixes to some issues identified
in the new SMT backend we have been working on for some time.

More explicitly:

  • Remove the X-macro based implementation of relational operators in the smt_bit_vector_theory, so that the implementation is consistent with the approach taken for the arithmetic operators.

Attention:

This PR has been based on #6614 and assumes that gets in first. As such, some of the earlier commits here don't correspond to the scope of the work being done.

  • 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.

@codecov
Copy link

codecov bot commented Jan 28, 2022

Codecov Report

Merging #6615 (290f022) into develop (57e7b2c) will increase coverage by 0.05%.
The diff coverage is 100.00%.

❗ Current head 290f022 differs from pull request most recent head 8e9a74a. Consider uploading reports for the commit 8e9a74a to get more accurate results
Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #6615      +/-   ##
===========================================
+ Coverage    76.65%   76.71%   +0.05%     
===========================================
  Files         1579     1577       -2     
  Lines       181294   181503     +209     
===========================================
+ Hits        138973   139232     +259     
+ Misses       42321    42271      -50     
Impacted Files Coverage Δ
...c/solvers/smt2_incremental/convert_expr_to_smt.cpp 48.99% <100.00%> (+12.26%) ⬆️
...solvers/smt2_incremental/smt_bit_vector_theory.cpp 100.00% <100.00%> (ø)
...t/solvers/smt2_incremental/convert_expr_to_smt.cpp 100.00% <100.00%> (ø)
...solvers/smt2_incremental/smt_bit_vector_theory.cpp 100.00% <100.00%> (ø)
src/util/exception_utils.cpp 90.56% <0.00%> (-3.78%) ⬇️
src/goto-programs/initialize_goto_model.cpp 83.13% <0.00%> (-2.41%) ⬇️
src/util/bitvector_expr.cpp 93.93% <0.00%> (-0.66%) ⬇️
src/util/bitvector_expr.h 92.60% <0.00%> (-0.40%) ⬇️
src/util/simplify_expr_int.cpp 84.86% <0.00%> (-0.23%) ⬇️
src/solvers/flattening/boolbv.cpp 80.39% <0.00%> (-0.12%) ⬇️
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 637f138...8e9a74a. Read the comment docs.

And substitute it for a concrete class in `smt_bit_vector_theory.cpp`.
And substitute it with a concrete class implementation.
And substitute it with a concrete class implementation.
…cro.

And substitute it with a concrete class implementation.
And substitute it with a concrete class implementation.
And substitute it with a concrete class implementation.
And substitute it with a concrete class implementation.
Copy link
Contributor

@thomasspriggs thomasspriggs left a comment

Choose a reason for hiding this comment

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

A few nit picks -

  • I would have separated the final removal of the .def and macro definitions into a separate commits, given that you already separated each of the individual operations.
  • Using the word "Remove" in the commit title misses the point of what the commits are doing. They are refactoring the implementation to not use macros, not removing functionality.
  • Needs the clang-format / linting failure fixing.

This all looks fine otherwise.

Given that this was the last macro definition in `smt_bit_vector_theory.def`,
also delete that file along with its usages in the header and implementation
file.
@NlightNFotis NlightNFotis merged commit 3c0d865 into diffblue:develop Feb 2, 2022
@NlightNFotis NlightNFotis deleted the remove_xmacro branch February 2, 2022 18:52
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