Skip to content

Configure bits_per_byte in byte_extract/byte_update expression #6009

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 15, 2022

Conversation

tautschnig
Copy link
Collaborator

Semantically evaluating a byte_extract/byte_update expression requires
knowledge of the number of bits that a byte is composed of. This,
however, is a configuration parameter known to the front-end that
created the expression in the first place. The back-end should not need
to consult configuration information to evaluate the expression.

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

@tautschnig tautschnig self-assigned this Apr 3, 2021
@tautschnig tautschnig force-pushed the byte-operator-bits-per-byte branch 4 times, most recently from 5f7915f to d4081c2 Compare April 3, 2021 21:50
@codecov
Copy link

codecov bot commented Apr 3, 2021

Codecov Report

Base: 77.99% // Head: 78.00% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (a8631c5) compared to base (9baef8f).
Patch coverage: 99.04% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #6009   +/-   ##
========================================
  Coverage    77.99%   78.00%           
========================================
  Files         1619     1619           
  Lines       187184   187248   +64     
========================================
+ Hits        145999   146062   +63     
- Misses       41185    41186    +1     
Impacted Files Coverage Δ
unit/util/expr_cast/expr_cast.cpp 100.00% <ø> (ø)
src/solvers/flattening/boolbv_byte_extract.cpp 69.73% <75.00%> (-0.40%) ⬇️
src/util/simplify_expr.cpp 83.87% <96.66%> (+0.09%) ⬆️
...de/java_trace_validation/java_trace_validation.cpp 100.00% <100.00%> (ø)
src/analyses/goto_rw.cpp 66.59% <100.00%> (ø)
src/goto-symex/symex_assign.cpp 81.42% <100.00%> (+0.13%) ⬆️
src/solvers/flattening/boolbv_byte_update.cpp 100.00% <100.00%> (ø)
src/solvers/lowering/byte_operators.cpp 92.75% <100.00%> (+0.14%) ⬆️
src/util/byte_operators.cpp 90.00% <100.00%> (+1.11%) ⬆️
src/util/byte_operators.h 92.72% <100.00%> (+2.02%) ⬆️
... and 4 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@tautschnig tautschnig force-pushed the byte-operator-bits-per-byte branch from d4081c2 to b68ddd2 Compare April 6, 2021 13:50
@tautschnig tautschnig force-pushed the byte-operator-bits-per-byte branch from b68ddd2 to 9c017d7 Compare April 6, 2021 14:02
@tautschnig tautschnig marked this pull request as ready for review April 6, 2021 14:02
@tautschnig tautschnig assigned kroening and unassigned tautschnig Apr 6, 2021
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.

I like obscure architectures but ... you have a use-case for this, right?

@tautschnig tautschnig force-pushed the byte-operator-bits-per-byte branch from 9c017d7 to 2a26e7a Compare April 7, 2021 10:56
@tautschnig
Copy link
Collaborator Author

I like obscure architectures but ... you have a use-case for this, right?

While I do know of an organisation that had a use case, I'm not sure they are still using CBMC. Either way, I'd like to get rid of all magic numbers.

@tautschnig tautschnig force-pushed the byte-operator-bits-per-byte branch from 2a26e7a to 7b059a6 Compare April 7, 2021 16:23
@tautschnig tautschnig self-assigned this May 7, 2021
@tautschnig tautschnig force-pushed the byte-operator-bits-per-byte branch from 7b059a6 to 5a19700 Compare May 10, 2021 11:28
@tautschnig tautschnig removed their assignment May 10, 2021
@tautschnig tautschnig force-pushed the byte-operator-bits-per-byte branch from 5a19700 to 33eb105 Compare May 19, 2021 11:54
@tautschnig tautschnig force-pushed the byte-operator-bits-per-byte branch from 33eb105 to 4b6c927 Compare August 13, 2021 11:16
@tautschnig tautschnig force-pushed the byte-operator-bits-per-byte branch from 4b6c927 to 1b3a39d Compare October 26, 2021 11:44
Semantically evaluating a byte_extract/byte_update expression requires
knowledge of the number of bits that a byte is composed of. This,
however, is a configuration parameter known to the front-end that
created the expression in the first place. The back-end should not need
to consult configuration information to evaluate the expression.
Copy link
Member

@peterschrammel peterschrammel left a comment

Choose a reason for hiding this comment

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

🎉

@tautschnig tautschnig merged commit 98f8c57 into diffblue:develop Oct 15, 2022
@tautschnig tautschnig deleted the byte-operator-bits-per-byte branch October 15, 2022 18:22
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.

4 participants