Skip to content

writeable_object and live_object #7125

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 2 commits into from
Sep 13, 2022
Merged

writeable_object and live_object #7125

merged 2 commits into from
Sep 13, 2022

Conversation

kroening
Copy link
Member

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

kroening and others added 2 commits September 12, 2022 10:22
This adds three predicates to the C frontend, for the benefit of the CHC
encoder.  They indicate 1) doubly-linked dynamically allocated
null-terminated lists, 2) doubly-linked dynamically allocated cyclic lists,
and 3) doubly-linked lists with dynamically allocated inner nodes and head
and tail sentinel nodes.
This adds C syntax for writeable_object_exprt and live_object_exprt.
@codecov
Copy link

codecov bot commented Sep 12, 2022

Codecov Report

Merging #7125 (b14cd4f) into develop (047c065) will decrease coverage by 0.04%.
The diff coverage is 6.93%.

@@             Coverage Diff             @@
##           develop    #7125      +/-   ##
===========================================
- Coverage    77.91%   77.86%   -0.05%     
===========================================
  Files         1576     1576              
  Lines       181662   181779     +117     
===========================================
+ Hits        141542   141551       +9     
- Misses       40120    40228     +108     
Impacted Files Coverage Δ
src/ansi-c/expr2c.cpp 67.18% <ø> (ø)
src/util/pointer_expr.h 82.56% <0.00%> (-5.67%) ⬇️
src/ansi-c/c_typecheck_expr.cpp 74.17% <7.44%> (-2.75%) ⬇️
.../goto-instrument/goto_instrument_parse_options.cpp 71.14% <0.00%> (+0.06%) ⬆️

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

@kroening kroening marked this pull request as ready for review September 12, 2022 20:57

return live_object_expr;
}
else if(identifier == CPROVER_PREFIX "WRITEABLE_OBJECT")
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm starting to wonder: to what extent is this different from __CPROVER_w_ok(p, 1)?

Copy link
Member Author

Choose a reason for hiding this comment

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

Very. The idea is to define w_ok(p, s) = writeable ∧ live ∧ offset+s≤object_size.
This won't work in CBMC without major changes, so this will be CHC only for now.

@tautschnig tautschnig merged commit ef7291c into develop Sep 13, 2022
@tautschnig tautschnig deleted the writeable_object branch September 13, 2022 11:34
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.

2 participants