mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-12-15 16:15:08 -05:00
Renamed predicates to comply with naming conventions
This commit is contained in:
parent
014acb9a00
commit
e8b8234416
3 changed files with 41 additions and 44 deletions
|
|
@ -32,9 +32,6 @@ predicate coreLocalInterruptInv_p() =
|
|||
//pubTCB_p(currentTCB, 0) &*&
|
||||
integer_(&xYieldPendings[coreID_f], sizeof(BaseType_t), true, _) &*&
|
||||
coreLocalSeg_TCB_p(currentTCB, ?gCriticalNesting);
|
||||
|
||||
|
||||
predicate coreLocalLocked(uint32_t coreID);
|
||||
@*/
|
||||
|
||||
|
||||
|
|
@ -43,7 +40,7 @@ predicate coreLocalLocked(uint32_t coreID);
|
|||
*/
|
||||
|
||||
/*@
|
||||
predicate locked(list< pair<real, int> > lockHistory);
|
||||
predicate locked_p(list< pair<real, int> > lockHistory);
|
||||
@*/
|
||||
|
||||
|
||||
|
|
@ -56,11 +53,11 @@ predicate locked(list< pair<real, int> > lockHistory);
|
|||
fixpoint int taskLockID_f();
|
||||
|
||||
// Represents an acquired task lock.
|
||||
predicate taskLock();
|
||||
predicate taskLock_p();
|
||||
|
||||
// Represents the invariant associated with the the task lock, i.e.,
|
||||
// access permissions to the resources protected by the lock.
|
||||
predicate taskLockInv();
|
||||
predicate taskLockInv_p();
|
||||
@*/
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
|
@ -71,11 +68,11 @@ predicate taskLockInv();
|
|||
fixpoint int isrLockID_f();
|
||||
|
||||
// Represents an unacquired ISR lock.
|
||||
predicate isrLock();
|
||||
predicate isrLock_p();
|
||||
|
||||
// Represents the invariant associated with the the ISR lock, i.e.,
|
||||
// access permissions to the resources protected by the lock.
|
||||
predicate isrLockInv();
|
||||
predicate isrLockInv_p();
|
||||
@*/
|
||||
|
||||
|
||||
|
|
@ -87,7 +84,7 @@ predicate isrLockInv();
|
|||
/*@
|
||||
fixpoint int taskISRLockID_f();
|
||||
|
||||
predicate taskISRLockInv() =
|
||||
predicate taskISRLockInv_p() =
|
||||
integer_((void*) &uxSchedulerSuspended, sizeof(UBaseType_t), false, _) &*&
|
||||
integer_(&xSchedulerRunning, sizeof(BaseType_t), true, _)
|
||||
&*&
|
||||
|
|
@ -101,18 +98,18 @@ predicate taskISRLockInv() =
|
|||
|
||||
|
||||
lemma void produce_taskISRLockInv();
|
||||
requires locked(?heldLocks) &*&
|
||||
requires locked_p(?heldLocks) &*&
|
||||
heldLocks == cons(?i, cons(?t, nil)) &*&
|
||||
i == pair(?f_isr, isrLockID_f()) &*&
|
||||
t == pair(?f_task, taskLockID_f());
|
||||
ensures locked( cons( pair(_, taskISRLockID_f()), heldLocks) ) &*&
|
||||
taskISRLockInv();
|
||||
ensures locked_p( cons( pair(_, taskISRLockID_f()), heldLocks) ) &*&
|
||||
taskISRLockInv_p();
|
||||
|
||||
|
||||
lemma void consume_taskISRLockInv();
|
||||
requires locked( cons( pair(_, taskISRLockID_f()), ?otherLocks) ) &*&
|
||||
taskISRLockInv();
|
||||
ensures locked(otherLocks);
|
||||
requires locked_p( cons( pair(_, taskISRLockID_f()), ?otherLocks) ) &*&
|
||||
taskISRLockInv_p();
|
||||
ensures locked_p(otherLocks);
|
||||
@*/
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -54,26 +54,26 @@ void VF__portRESTORE_INTERRUPTS(uint32_t ulState);
|
|||
#undef portGET_TASK_LOCK
|
||||
#define portGET_TASK_LOCK VF__portGET_TASK_LOCK
|
||||
void VF__portGET_TASK_LOCK();
|
||||
//@ requires [?f]taskLock() &*& locked(nil);
|
||||
//@ ensures taskLockInv() &*& locked( cons( pair(f, taskLockID_f()), nil) );
|
||||
//@ requires [?f]taskLock_p() &*& locked_p(nil);
|
||||
//@ ensures taskLockInv_p() &*& locked_p( cons( pair(f, taskLockID_f()), nil) );
|
||||
|
||||
#undef portRELEASE_TASK_LOCK
|
||||
#define portRELEASE_TASK_LOCK VF__portRELEASE_TASK_LOCK
|
||||
void VF__portRELEASE_TASK_LOCK();
|
||||
//@ requires taskLockInv() &*& locked( cons( pair(?f, taskLockID_f()), nil) );
|
||||
//@ ensures [f]taskLock() &*& locked(nil);
|
||||
//@ requires taskLockInv_p() &*& locked_p( cons( pair(?f, taskLockID_f()), nil) );
|
||||
//@ ensures [f]taskLock_p() &*& locked_p(nil);
|
||||
|
||||
#undef portGET_ISR_LOCK
|
||||
#define portGET_ISR_LOCK VF__portGET_ISR_LOCK
|
||||
void VF__portGET_ISR_LOCK();
|
||||
//@ requires [?f]isrLock() &*& locked(?heldLocks);
|
||||
//@ ensures isrLockInv() &*& locked( cons( pair(f, isrLockID_f()), heldLocks) );
|
||||
//@ requires [?f]isrLock_p() &*& locked_p(?heldLocks);
|
||||
//@ ensures isrLockInv_p() &*& locked_p( cons( pair(f, isrLockID_f()), heldLocks) );
|
||||
|
||||
#undef portRELEASE_ISR_LOCK
|
||||
#define portRELEASE_ISR_LOCK VF__portRELEASE_ISR_LOCK
|
||||
void VF__portRELEASE_ISR_LOCK();
|
||||
//@ requires isrLockInv() &*& locked( cons( pair(?f, isrLockID_f()), ?heldLocks) );
|
||||
//@ ensures [f]isrLock() &*& locked(heldLocks);
|
||||
//@ requires isrLockInv_p() &*& locked_p( cons( pair(?f, isrLockID_f()), ?heldLocks) );
|
||||
//@ ensures [f]isrLock_p() &*& locked_p(heldLocks);
|
||||
|
||||
|
||||
#endif /* VERIFAST_PORT_CONTRACTS_H */
|
||||
Loading…
Add table
Add a link
Reference in a new issue