I have this class Course. I can prove the passed(int i) method when I use the contract for getBar(), not without it. Besides the contract of getBar() is also proven. Why can't I prove passed with inlining? I tried both Key 2.8 and Key 2.7.
public class Course {
/*@ spec_public @*/ private int bar;
/*@ spec_public @*/ private int time =100;
public boolean strict= true;
/*@ public normal_behaviour
@ requires this!=null;
@ ensures \result==bar;
@ assignable \nothing;
@*/
public int getBar() {
return this.bar;
}
/*@ public normal_behaviour
@ ensures \result==(getBar()<=i);
@*/
public boolean passed(int i) {
return this.getBar()<= i;
}
}