-
Notifications
You must be signed in to change notification settings - Fork 273
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
remove java_method_typet::final/native #4492
base: develop
Are you sure you want to change the base?
Conversation
The string table test will work again if #4493 is merged before. |
@@ -431,7 +430,7 @@ void java_bytecode_convert_methodt::convert( | |||
// to the symbol later. | |||
java_method_typet method_type = | |||
to_java_method_type(symbol_table.lookup_ref(method_identifier).type); | |||
method_type.set_is_final(m.is_final); | |||
method_type.set(ID_C_class, class_symbol.name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suspect this is a mis-merge; this is now done by set_declaring_class
above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed!
64cafa2
to
d752fcf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR failed Diffblue compatibility checks (cbmc commit: d752fcf).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/107442981
Status will be re-evaluated on next push.
Common spurious failures include: the cbmc commit has disappeared in the mean time (e.g. in a force-push); the author is not in the list of contributors (e.g. first-time contributors); compatibility was already broken by an earlier merge.
Removed my blocking flag but not approved pending @thk123 or similar checking if especially |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Access, final, native should be attached to symbolt instead of the type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm afraid this requires suggested fix and a goto-binary version bump.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think I fully understand the comment "they are field modifiers". Currently methods are not stored as fields, and native
and final
are method modifiers:
- A final method is a method that can't be overriden
- a native method is one whose implementation is not in Java.
I guess they would live on the symbol annotations in the perfect world (like the owning class), but currently these annotations are stored on the method type.
Both these methods are currently used in test-gen, hence adding the tests in CBMC
d752fcf
to
abc4eac
Compare
@peterschrammel No, the access modifiers are not part of the method symbol either. They are properties of the field of the class. |
abc4eac
to
0fcc497
Compare
0fcc497
to
5d1d024
Compare
@thk123 @peterschrammel Let me ping you on this one. Note that we do have the methods in the class, including access, final, native. This matches what a JVM would do pretty well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR failed Diffblue compatibility checks (cbmc commit: 5d1d024).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/116035526
Status will be re-evaluated on next push.
Common spurious failures include: the cbmc commit has disappeared in the mean time (e.g. in a force-push); the author is not in the list of contributors (e.g. first-time contributors); compatibility was already broken by an earlier merge.
Codecov Report
@@ Coverage Diff @@
## develop #4492 +/- ##
===========================================
- Coverage 69.29% 69.29% -0.01%
===========================================
Files 1306 1306
Lines 108263 108242 -21
===========================================
- Hits 75023 75007 -16
+ Misses 33240 33235 -5
Continue to review full report at Codecov.
|
@kroening
Re-read your new comment - I see your suggesting getting this info out of the class type. This could work - I'll have a look how much work it would be. |
Note that this would create some consistency in the approach: one would do the same for fields and for methods. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This information does not appear to be available via java_class_typet
methods()
yet. methods()
is empty.
This line
https://github.com/diffblue/cbmc/pull/4492/files#diff-985ab35118d62c4f1961c30173211fb6L2245
(and this test
https://github.com/diffblue/cbmc/pull/4492/files#diff-4831c2334c252ee2ff67d6334690fb09L172)
contains important information in test-gen for mocking.
5d1d024
to
2c3cb15
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR failed Diffblue compatibility checks (cbmc commit: 2c3cb15).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/121239512
Status will be re-evaluated on next push.
Common spurious failures include: the cbmc commit has disappeared in the mean time (e.g. in a force-push); the author is not in the list of contributors (e.g. first-time contributors); compatibility was already broken by an earlier merge.
This removes four methods from java_method_typet. They do not belong there, as neither 'native' nor 'final' are part of the type of the method (they are field modifiers). They are never read.
2c3cb15
to
6abaf25
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR failed Diffblue compatibility checks (cbmc commit: 6abaf25).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/121878421
Status will be re-evaluated on next push.
Common spurious failures include: the cbmc commit has disappeared in the mean time (e.g. in a force-push); the author is not in the list of contributors (e.g. first-time contributors); compatibility was already broken by an earlier merge.
This removes four methods from
java_method_typet
. They do not belong there,as neither 'native' nor 'final' are part of the type of the method (they are
field modifiers). They are never read.