Updated predicate xLIST_ITEM to jeep up with breaking VF change.

VeriFast now ensures that no uninitialised values are read. `x |-> _` is interpreted as "uninitialised", `x |-> ?v` is interpreted as "initialised".
This commit is contained in:
Tobias Reinhard 2022-11-22 07:14:21 -05:00
parent 35aef80072
commit 2fd6bcc2d7

View file

@ -128,19 +128,40 @@
} List_t; } List_t;
#endif /* VERIFAST_SINGLE_CORE */ #endif /* VERIFAST_SINGLE_CORE */
/*@ #ifndef VERIFAST_SINGLE_CORE
predicate xLIST_ITEM( /* Reason for deletion:
struct xLIST_ITEM *n, * Breaking change in VeriFast. VeriFast now ensures that no uninitialised
TickType_t xItemValue, * values are read. `x |-> _` is interpreted as "uninitialised",
struct xLIST_ITEM *pxNext, * `x |-> ?v` is interpreted as "initialised".
struct xLIST_ITEM *pxPrevious, */
struct xLIST *pxContainer;) = /*@
n->xItemValue |-> xItemValue &*& predicate xLIST_ITEM(
n->pxNext |-> pxNext &*& struct xLIST_ITEM *n,
n->pxPrevious |-> pxPrevious &*& TickType_t xItemValue,
n->pvOwner |-> _ &*& struct xLIST_ITEM *pxNext,
n->pxContainer |-> pxContainer; struct xLIST_ITEM *pxPrevious,
@*/ struct xLIST *pxContainer;) =
n->xItemValue |-> xItemValue &*&
n->pxNext |-> pxNext &*&
n->pxPrevious |-> pxPrevious &*&
n->pvOwner |-> ?gOwner &*&
n->pxContainer |-> pxContainer;
@*/
#else
/*@
predicate xLIST_ITEM(
struct xLIST_ITEM *n,
TickType_t xItemValue,
struct xLIST_ITEM *pxNext,
struct xLIST_ITEM *pxPrevious,
struct xLIST *pxContainer;) =
n->xItemValue |-> xItemValue &*&
n->pxNext |-> pxNext &*&
n->pxPrevious |-> pxPrevious &*&
n->pvOwner |-> _ &*&
n->pxContainer |-> pxContainer;
@*/
#endif /* VERIFAST_SINGLE_CORE */
/* Ferreira et al. (STTT'14) doubly-linked list segment (DLS). */ /* Ferreira et al. (STTT'14) doubly-linked list segment (DLS). */
/*@ /*@