mirror of
https://github.com/supleed2/ELEC70056-HSV-CW1.git
synced 2024-12-22 21:55:48 +00:00
Add Dafny Task 1 missing comment (T1 answer)
This commit is contained in:
parent
a926e4e941
commit
a3883d573d
|
@ -33,6 +33,11 @@ method countsquares2(n:nat) returns (result:nat)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// countsquares was easier to verify than countsquares2 as the loop invariant
|
||||||
|
// was the same as the post-condition of the function, as the value of result
|
||||||
|
// after each loop iteration is simply the result of the function call with a
|
||||||
|
// smaller input value n.
|
||||||
|
|
||||||
predicate sorted(A:array<int>)
|
predicate sorted(A:array<int>)
|
||||||
reads A;
|
reads A;
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue