Open ftc opened 7 years ago
@ftc, cc @sllam: the specification for [CI] [t] android.os.CountDownTimer android.os.CountDownTimer.start()
does not include the return value, while the start method in the trace actually does (it should be # = [CI] [t] android.os.CountDownTimer android.os.CountDownTimer.start()
)
Now the tool does not look at the semantic of the return type (e.g. void or Int) in the name of the method, but it tests if the return value was used in the specification (i.e. a callin or a callback that does not have the return variable, [CB] [t] void method()
instead of retval = [CB] [t] int method()
)
If there is no return value, then the method is assumed to not return a value (void).
If you change the spec in SPEC TRUE[*]; # = [CI] [t] android.os.CountDownTimer android.os.CountDownTimer.start() |+ [CB] [t] void android.os.CountDownTimer.onFinish()
you get the expected result.
The question is, what is the most intuitive semantic if we just write [CB] [t] int method()
?
# = [CB] [t] int method()
)?I would be inclined to adopt 3:
Option 3 sounds good to me. I think 2 would be the behavior I would initially expect but perhaps we could have it throw an exception if you have a non void method which doesn't specify a return value?
For the specification:
And the trace
nocrashsequence.zip
running the verifier with the following arguments:
The second rule does not ground the call to start to anything.
However start appears to be in the trace: