Skip to content

SMT2 backend: minus on void pointers #7338

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

Conversation

kroening
Copy link
Member

This adds support for p-q for void pointers p and q to the SMT2 backend.

  • Each commit message has a non-empty body, explaining why the change was made.
  • n/a 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.

This adds support for p-q for void pointers p and q to the SMT2 backend.
@codecov
Copy link

codecov bot commented Nov 13, 2022

Codecov Report

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

Coverage data is based on head (015396a) compared to base (d7dd40a).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #7338   +/-   ##
========================================
  Coverage    78.28%   78.28%           
========================================
  Files         1642     1642           
  Lines       189995   190000    +5     
========================================
+ Hits        148737   148742    +5     
  Misses       41258    41258           
Impacted Files Coverage Δ
src/solvers/flattening/boolbv_equality.cpp 63.63% <ø> (ø)
src/solvers/lowering/byte_operators.cpp 92.71% <ø> (-0.06%) ⬇️
src/util/byte_operators.h 92.72% <ø> (ø)
src/solvers/smt2/smt2_conv.cpp 66.43% <100.00%> (+0.04%) ⬆️
src/util/byte_operators.cpp 93.10% <100.00%> (+3.10%) ⬆️

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.

pointer_offset_size(to_pointer_type(expr.op0().type()).base_type(), ns);
CHECK_RETURN(element_size.has_value() && *element_size >= 1);
const auto &base_type = to_pointer_type(expr.op0().type()).base_type();
mp_integer element_size;
Copy link
Contributor

Choose a reason for hiding this comment

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

🤔 It might be nice if this code which works out the element_size were to be factored out into a separate function. This commit seems to be duplicating the code from pointer addition.

@peterschrammel peterschrammel removed their assignment Nov 15, 2022
@tautschnig tautschnig merged commit f761eed into develop Nov 15, 2022
@tautschnig tautschnig deleted the smt2_void_pointer_minus branch November 15, 2022 14:59
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.

7 participants