Skip to content

Commit

Permalink
feat: emptyZero
Browse files Browse the repository at this point in the history
  • Loading branch information
QGarchery committed Jul 11, 2024
1 parent 26ef413 commit 76a0d1d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions certora/specs/DllFifo.spec
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ definition hasNoNextIsTail(address addr) returns bool =
isInDll(addr) && getNext(addr) == 0 => addr == getTail();

function safeAssumptions() {
requireInvariant emptyZero();
requireInvariant emptyEquiv();
requireInvariant headWellFormed();
requireInvariant tailWellFormed();
Expand All @@ -62,6 +63,9 @@ function safeAssumptions() {
// or even all of the public functions (in that last case they are still relevant for proving
// the property at initial state).

invariant emptyZero()
! isInDll(0);

invariant emptyEquiv()
isEmptyEquiv()
{ preserved remove(address id) {
Expand Down
3 changes: 3 additions & 0 deletions certora/specs/DllSimple.spec
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ function safeAssumptions() {
// or even all of the public functions (in that last case they are still relevant for proving
// the property at initial state).

invariant emptyZero()
! isInDll(0);

invariant emptyEquiv()
isEmptyEquiv()
{ preserved remove(address id) {
Expand Down

0 comments on commit 76a0d1d

Please sign in to comment.