Skip to content
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

update_bits_exprt #8182

Merged
merged 3 commits into from
Feb 5, 2024
Merged

update_bits_exprt #8182

merged 3 commits into from
Feb 5, 2024

Conversation

kroening
Copy link
Member

@kroening kroening commented Feb 4, 2024

  • 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.
  • n/a 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.
  • n/a White-space or formatting changes outside the feature-related changed lines are in commits of their own.

Copy link

codecov bot commented Feb 4, 2024

Codecov Report

Attention: 52 lines in your changes are missing coverage. Please review.

Comparison is base (592bbb9) 79.69% compared to head (133c09f) 79.68%.
Report is 1 commits behind head on develop.

❗ Current head 133c09f differs from pull request most recent head cefb96a. Consider uploading reports for the commit cefb96a to get more accurate results

Files Patch % Lines
src/util/bitvector_expr.h 0.00% 18 Missing ⚠️
src/util/bitvector_expr.cpp 0.00% 16 Missing ⚠️
src/solvers/flattening/boolbv_with.cpp 71.05% 11 Missing ⚠️
src/solvers/smt2/smt2_conv.cpp 16.66% 5 Missing ⚠️
src/solvers/flattening/boolbv_update_bits.cpp 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #8182      +/-   ##
===========================================
- Coverage    79.69%   79.68%   -0.02%     
===========================================
  Files         1680     1681       +1     
  Lines       195256   195296      +40     
===========================================
+ Hits        155617   155625       +8     
- Misses       39639    39671      +32     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kroening kroening force-pushed the update_bits_exprt branch 2 times, most recently from a472554 to 133c09f Compare February 4, 2024 19:56
@kroening kroening marked this pull request as ready for review February 4, 2024 20:52
@@ -10,6 +10,7 @@ Author: Daniel Kroening, kroening@kroening.com
#ifndef CPROVER_SOLVERS_SMT2_SMT2_CONV_H
#define CPROVER_SOLVERS_SMT2_SMT2_CONV_H

#include <util/bitvector_expr.h>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Include-what-you-use suggests that this header file isn't required here. I am pretty sure you can get away with class update_bits_exprt; instead.

This replaces op1/op2 by identifiers that clearly state the purpose of the
operand.
This introduces update_bits_exprt, which allows replacing parts of a
bit-vector identified by a (potentially variable) index by a given
bit-vector.

This supersedes with_exprt in the case of single-bit operands.
This replaces the conversion of the 'with' expression on bit-vectors by
using update_bits_exprt.
@kroening kroening removed their assignment Feb 5, 2024
Copy link
Collaborator

@martin-cs martin-cs left a comment

Choose a reason for hiding this comment

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

Seems a reasonable way of adding a bit more structure to the handling of unstructured things.

@martin-cs martin-cs removed their assignment Feb 5, 2024
@kroening kroening merged commit e8728fc into develop Feb 5, 2024
38 checks passed
@kroening kroening deleted the update_bits_exprt branch February 5, 2024 17:46
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.

5 participants