Closed rgrig closed 6 years ago
A call x.foo(a,b,c)
should be given a hint iff the property has a pattern of the form r.foo(...)
; that is, (i) the method name matches and (ii) there is a guard on argument 0 (i.e. the receiver object).
Partially addressed by https://github.com/rgrig/topl/commit/ffcccc2abd96b2e76d924a07dee145a45266b028 JVM seems happy with the new bytecode (not thoroughly tested, though). Infer, however, stops printing Postconditions (in the PrePost pairs). We need to figure out why.
The pre/post problem was unrelated: https://github.com/facebook/infer/issues/831
When calling a monitored method, we need to tell Infer that the receiver object (and perhaps the arguments?) could be aliased to one of the TOPL monitor registers. Otherwise, in some situations, Infer uses a heuristic that the receiver object is not aliased to anything else known to be on the heap, which includes TOPL registers.
It is easy to give such hints, using
if
statements. For example: