FreeRTOS-Kernel/FreeRTOS/Test/VeriFast/queue
Soren Ptak 3a2f6646f0
Use CI-CD-Github-Actions for spelling and formatting, add in the bot formatting action, update the CI-CD workflow files. Fix incorrect spelling and formatting on files. (#1083)
* Use new version of CI-CD Actions,  checkout@v3 instead of checkout@v2 on all jobs
* Use cSpell spell check, and use ubuntu-20.04 for formatting check
* Add in bot formatting action
* Update freertos_demo.yml and freertos_plus_demo.yml files to increase github log readability
* Add in a Qemu demo onto the workflows.
2023-09-06 12:35:37 -07:00
..
create.c Use CI-CD-Github-Actions for spelling and formatting, add in the bot formatting action, update the CI-CD workflow files. Fix incorrect spelling and formatting on files. (#1083) 2023-09-06 12:35:37 -07:00
prvCopyDataFromQueue.c Use CI-CD-Github-Actions for spelling and formatting, add in the bot formatting action, update the CI-CD workflow files. Fix incorrect spelling and formatting on files. (#1083) 2023-09-06 12:35:37 -07:00
prvCopyDataToQueue.c Use CI-CD-Github-Actions for spelling and formatting, add in the bot formatting action, update the CI-CD workflow files. Fix incorrect spelling and formatting on files. (#1083) 2023-09-06 12:35:37 -07:00
prvIsQueueEmpty.c Use CI-CD-Github-Actions for spelling and formatting, add in the bot formatting action, update the CI-CD workflow files. Fix incorrect spelling and formatting on files. (#1083) 2023-09-06 12:35:37 -07:00
prvIsQueueFull.c Use CI-CD-Github-Actions for spelling and formatting, add in the bot formatting action, update the CI-CD workflow files. Fix incorrect spelling and formatting on files. (#1083) 2023-09-06 12:35:37 -07:00
prvLockQueue.c Use CI-CD-Github-Actions for spelling and formatting, add in the bot formatting action, update the CI-CD workflow files. Fix incorrect spelling and formatting on files. (#1083) 2023-09-06 12:35:37 -07:00
prvUnlockQueue.c Use CI-CD-Github-Actions for spelling and formatting, add in the bot formatting action, update the CI-CD workflow files. Fix incorrect spelling and formatting on files. (#1083) 2023-09-06 12:35:37 -07:00
README.md Prove buffer lemmas (#124) 2020-07-21 09:51:20 -07:00
uxQueueMessagesWaiting.c Use CI-CD-Github-Actions for spelling and formatting, add in the bot formatting action, update the CI-CD workflow files. Fix incorrect spelling and formatting on files. (#1083) 2023-09-06 12:35:37 -07:00
uxQueueSpacesAvailable.c Use CI-CD-Github-Actions for spelling and formatting, add in the bot formatting action, update the CI-CD workflow files. Fix incorrect spelling and formatting on files. (#1083) 2023-09-06 12:35:37 -07:00
vQueueDelete.c Use CI-CD-Github-Actions for spelling and formatting, add in the bot formatting action, update the CI-CD workflow files. Fix incorrect spelling and formatting on files. (#1083) 2023-09-06 12:35:37 -07:00
xQueueGenericSend.c Use CI-CD-Github-Actions for spelling and formatting, add in the bot formatting action, update the CI-CD workflow files. Fix incorrect spelling and formatting on files. (#1083) 2023-09-06 12:35:37 -07:00
xQueueGenericSendFromISR.c Use CI-CD-Github-Actions for spelling and formatting, add in the bot formatting action, update the CI-CD workflow files. Fix incorrect spelling and formatting on files. (#1083) 2023-09-06 12:35:37 -07:00
xQueueIsQueueEmptyFromISR.c Use CI-CD-Github-Actions for spelling and formatting, add in the bot formatting action, update the CI-CD workflow files. Fix incorrect spelling and formatting on files. (#1083) 2023-09-06 12:35:37 -07:00
xQueueIsQueueFullFromISR.c Use CI-CD-Github-Actions for spelling and formatting, add in the bot formatting action, update the CI-CD workflow files. Fix incorrect spelling and formatting on files. (#1083) 2023-09-06 12:35:37 -07:00
xQueuePeek.c Use CI-CD-Github-Actions for spelling and formatting, add in the bot formatting action, update the CI-CD workflow files. Fix incorrect spelling and formatting on files. (#1083) 2023-09-06 12:35:37 -07:00
xQueuePeekFromISR.c Use CI-CD-Github-Actions for spelling and formatting, add in the bot formatting action, update the CI-CD workflow files. Fix incorrect spelling and formatting on files. (#1083) 2023-09-06 12:35:37 -07:00
xQueueReceive.c Use CI-CD-Github-Actions for spelling and formatting, add in the bot formatting action, update the CI-CD workflow files. Fix incorrect spelling and formatting on files. (#1083) 2023-09-06 12:35:37 -07:00
xQueueReceiveFromISR.c Use CI-CD-Github-Actions for spelling and formatting, add in the bot formatting action, update the CI-CD workflow files. Fix incorrect spelling and formatting on files. (#1083) 2023-09-06 12:35:37 -07:00

FreeRTOS queue proofs

In the queue predicates and proofs we use the following variable names.

  • Storage : The concrete queue storage of N*M bytes. The buffer predicate, defined in include/proof/queue.h allows us to treat the storage as a list contents of N items, each of which is M bytes.
  • N : queue length (i.e., the maximum number of items the queue can store)
  • M : size in bytes of each element
  • W : logical index of the write pointer, necessarily between 0..(N-1) such that the write pointer pcWriteTo == Storage + W * M.
  • R : logical index of the read pointer, necessarily between 0..(N-1) such that the read pointer pcReadFrom == Storage + R * M.
  • K : number of items currently in the queue corresponding to uxMessagesWaiting

The queue predicate, defined in include/proof/queue.h, relates the concrete queue storage to an abstract list abs of K items. More precisely, the key queue invariant is:

abs == take(K, rotate_left((R+1)%N, contents)) &*&
W == (R + 1 + K) % N

where (R+1)%N is the front of the queue, W is the back of the queue, rotate_left allows for the wraparound of queue storage, and take gives the first K elements.