mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-15 01:07:47 -04:00
Remove or rework assumptions in queue proofs (#603)
This commit is paired with another to queue.c in the kernel. To accomodate changes in newer versions of CBMC, the --pointer-overflow-check is removed.
This commit is contained in:
parent
d9ddcc0134
commit
b6624fa44d
33 changed files with 57 additions and 124 deletions
|
@ -32,19 +32,14 @@
|
|||
#include "cbmc.h"
|
||||
|
||||
|
||||
void harness(){
|
||||
UBaseType_t uxQueueLength;
|
||||
UBaseType_t uxItemSize;
|
||||
uint8_t ucQueueType;
|
||||
void harness()
|
||||
{
|
||||
UBaseType_t uxQueueLength;
|
||||
UBaseType_t uxItemSize;
|
||||
uint8_t ucQueueType;
|
||||
|
||||
size_t uxQueueStorageSize;
|
||||
__CPROVER_assume(uxQueueStorageSize < (UINT32_MAX>>8));
|
||||
/* Allow CBMC to run in a reasonable amount of time. */
|
||||
__CPROVER_assume( ( uxQueueLength == QUEUE_LENGTH ) || ( uxItemSize == QUEUE_ITEM_SIZE ) );
|
||||
|
||||
// QueueGenericCreate does not check for multiplication overflow
|
||||
__CPROVER_assume(uxItemSize < uxQueueStorageSize/uxQueueLength);
|
||||
|
||||
// QueueGenericCreate asserts positive queue length
|
||||
__CPROVER_assume(uxQueueLength > ( UBaseType_t ) 0);
|
||||
|
||||
xQueueGenericCreate( uxQueueLength, uxItemSize, ucQueueType );
|
||||
xQueueGenericCreate( uxQueueLength, uxItemSize, ucQueueType );
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue