Skip to content

Set declaring_class for string solver implemented methods #4478

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

Conversation

thomasspriggs
Copy link
Contributor

@thomasspriggs thomasspriggs commented Apr 1, 2019

The declaring class was not previously set for methods which are
implemented by the string solver. This PR ensures that the declaring class
is set for these method symbols. This is required for downstream repositories
which need to be able to get the declaring class for any method symbol.

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

The declaring class was not previously set for methods which are
implemented by the string solver. This commit sets the declaring class
for the initially empty valued method symbols. INVARIANTs are used to
check that the declaring class is still set once the value of the symbol
has been provided for the methods implemented by the string solver. The
non violation of this INVARIANT is tested by all `strings-smoke-tests`
which call such methods. For example the tests in
`regression/strings-smoke-tests/java_int_to_string` will check that the
INVARIANT holds for `Integer.toString`.
All symbols for methods should have a `declaring_class`  after
conversion. This commit adds INVARIANTs for this condition on returning
from `java_bytecode_languaget::convert_single_method`, in order to
demonstrate that this condition holds.
@thomasspriggs thomasspriggs force-pushed the tas/declarator_of_solver_methods branch from 71acf6b to 4bc0680 Compare April 2, 2019 10:46
Copy link
Contributor

@allredj allredj left a comment

Choose a reason for hiding this comment

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

✔️
Passed Diffblue compatibility checks (cbmc commit: 4bc0680).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/106717166

@thomasspriggs thomasspriggs merged commit 9b85315 into diffblue:develop Apr 2, 2019
@thomasspriggs thomasspriggs deleted the tas/declarator_of_solver_methods branch April 2, 2019 12:41
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.

4 participants