Refinement checking of pure methods does not work reliably. E.g., checking
{{{
//@ ensures \result >= 0;
public /* pure @*/ int n() {
return 0;
}
}}}
against
{{{
n: INTEGER
ensure
Result >= 0;
Result /= Void;
end
}}}
results in the warning
{{{
TestClass.java:24: n@testpackage.TestClass expected QUERY but found MIXED.
bon_skeleton.bon:9: n@TEST_CLASS expected MIXED but found QUERY.
1 Java errors, 0 Java warnings, 0 JML errors and 2 JML warnings found.
}}}
Refinement checking of pure methods does not work reliably. E.g., checking {{{ //@ ensures \result >= 0; public /* pure @*/ int n() { return 0; } }}} against {{{ n: INTEGER ensure Result >= 0; Result /= Void; end }}} results in the warning {{{ TestClass.java:24: n@testpackage.TestClass expected QUERY but found MIXED. bon_skeleton.bon:9: n@TEST_CLASS expected MIXED but found QUERY. 1 Java errors, 0 Java warnings, 0 JML errors and 2 JML warnings found. }}}