|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jmlspecs.samples.misc.Proof
A class that demonstrates Floyd-Hoare-style proofs using JML notation. This was originally used as an exercise for a class at the University of Iowa.
| Field Summary | |
protected int |
min
A variable to keep track of the minimum. |
private int |
res
The index where the element occurs for exercise 2. |
| Constructor Summary | |
Proof()
|
|
| Method Summary | |
void |
find(int[] a,
int x)
Exercise 2: find the index of an integer in an array. |
void |
find_min(int[] a)
Exercise 1: find the minimum element in an array. |
int |
getRes()
Return the value of res |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected int min
private int res
| Constructor Detail |
public Proof()
| Method Detail |
public void find_min(int[] a)
public int getRes()
public void find(int[] a,
int x)
|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||