Question: From the following code, I get the following warnings, how do I get rid of them? A.java:16: warning: The prover cannot establish an assertion (Postcondition:

From the following code, I get the following warnings, how do I get rid of them?
A.java:16: warning: The prover cannot establish an assertion (Postcondition: A.java:13: ) in method main
return;
^
A.java:13: warning: Associated declaration: A.java:16:
//@ ensures j == 1;
^
A.java:10: warning: The prover cannot establish an assertion (Postcondition: A.java:7: ) in method setj
return;
^
A.java:7: warning: Associated declaration: A.java:10:
//@ ensures j == i;
^
A.java:9: warning: The prover cannot establish an assertion (Assignable: A.java:6: ) in method setj: k
k = i;
^
A.java:6: warning: Associated declaration: A.java:9:
//@ modifies j;
^
6 warnings
1 public class A 2 3 static/*@ spec_publick/ int j,k; 4 5 1/@ requiresi 0; 6 II@ modifies j //@ensures j public static void setj (int i) { 7 1; k=i; return; 10 12 13 //@ ensures j == 1; 14 public static void main(String[] args) 15 16 17 18 19 setj (3); return
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
