Skip to content

Extend support for binding expressions beyond quantifiers #6810

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

Conversation

tautschnig
Copy link
Collaborator

Symex special-cased some code for quantifiers when really all binding
expressions have to be treated that way. To support this, add
can_cast_expr<binding_exprt>, and make sure all subclasses of
binding_exprt are covered by this cast.

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

@codecov
Copy link

codecov bot commented Apr 15, 2022

Codecov Report

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

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

❗ Current head 4a15cf0 differs from pull request most recent head 6f8a7b8. Consider uploading reports for the commit 6f8a7b8 to get more accurate results

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #6810   +/-   ##
========================================
  Coverage    77.99%   77.99%           
========================================
  Files         1619     1619           
  Lines       187184   187189    +5     
========================================
+ Hits        145999   146004    +5     
  Misses       41185    41185           
Impacted Files Coverage Δ
src/goto-symex/symex_clean_expr.cpp 93.16% <100.00%> (ø)
src/goto-symex/symex_dereference.cpp 89.89% <100.00%> (+0.10%) ⬆️
src/util/std_expr.h 93.15% <100.00%> (+0.01%) ⬆️

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 mentioned this pull request Apr 15, 2022
5 tasks
@kroening
Copy link
Member

It may be appropriate to consider what the code is doing when dealing with a binding -- my understanding is that all it does is disabling the caching of dereferenced expressions, right?

@tautschnig
Copy link
Collaborator Author

It may be appropriate to consider what the code is doing when dealing with a binding -- my understanding is that all it does is disabling the caching of dereferenced expressions, right?

Yes, because there's a risk of having to deal with bound variables that the code is not prepared to deal with.

@kroening
Copy link
Member

Note that there are also let_exprt -- unfortunately these aren't derived from binding_exprt (since they don't satisfy the invariants of these).

kroening added a commit that referenced this pull request Apr 24, 2022
As identified in #6810, to_binding_expr could also cover array_comprehension
expressions.
kroening added a commit that referenced this pull request Apr 25, 2022
As identified in #6810, to_binding_expr could also cover array_comprehension
expressions.
@tautschnig tautschnig self-assigned this May 6, 2022
@tautschnig
Copy link
Collaborator Author

Note that there are also let_exprt -- unfortunately these aren't derived from binding_exprt (since they don't satisfy the invariants of these).

I have now added a check for these when computing is_binding_expression.

@tautschnig tautschnig assigned kroening and unassigned tautschnig Oct 13, 2022
Symex special-cased some code for quantifiers when really all binding
expressions have to be treated that way. To support this, add
can_cast_expr<binding_exprt>, and make sure all subclasses of
binding_exprt are covered by this cast.
@tautschnig tautschnig merged commit 7a82951 into diffblue:develop Nov 15, 2022
@tautschnig tautschnig deleted the bugfixes/binding branch November 15, 2022 15:02
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.

3 participants