FreeRTOS-Kernel/FreeRTOS/Test/VeriFast/queue
johnrhen 43defa566c
Apply release changes to main branch (#759)
* Update History.txt and README.md for December release (#744)

* Update History.txt and README.md for release

* Bump mbedtls submodule to v2.28.0 (#745)

* Patch project files for mbedtls (#751)

* Apply group 1 patches

* Apply patches for group 2

* Update project files for mbedTLS new version

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>

* Fix warnings in projects

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>

* Fix warnings in HTTP_S3_Download demo

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>

Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>

* Update changelog and history for corePKCS11 update (#752)

* Update submodule pointer and manifest.yml for corePKCS11 (#754)

* Update readme and history.txt to show that Sigv4 is a newly added library (#756)

* Revert update to v143 of VS toolset (#757)

* [AUTO][RELEASE]: Bump file header version to "202112.00"

* Update file headers to satisfy core checks

Co-authored-by: Muneeb Ahmed <54290492+muneebahmed10@users.noreply.github.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: johnrhen <johnrhen@users.noreply.github.com>
2021-12-23 10:16:27 -08:00
..
create.c Apply release changes to main branch (#759) 2021-12-23 10:16:27 -08:00
prvCopyDataFromQueue.c Apply release changes to main branch (#759) 2021-12-23 10:16:27 -08:00
prvCopyDataToQueue.c Apply release changes to main branch (#759) 2021-12-23 10:16:27 -08:00
prvIsQueueEmpty.c Apply release changes to main branch (#759) 2021-12-23 10:16:27 -08:00
prvIsQueueFull.c Apply release changes to main branch (#759) 2021-12-23 10:16:27 -08:00
prvLockQueue.c Apply release changes to main branch (#759) 2021-12-23 10:16:27 -08:00
prvUnlockQueue.c Apply release changes to main branch (#759) 2021-12-23 10:16:27 -08:00
README.md Prove buffer lemmas (#124) 2020-07-21 09:51:20 -07:00
uxQueueMessagesWaiting.c Apply release changes to main branch (#759) 2021-12-23 10:16:27 -08:00
uxQueueSpacesAvailable.c Apply release changes to main branch (#759) 2021-12-23 10:16:27 -08:00
vQueueDelete.c Apply release changes to main branch (#759) 2021-12-23 10:16:27 -08:00
xQueueGenericSend.c Apply release changes to main branch (#759) 2021-12-23 10:16:27 -08:00
xQueueGenericSendFromISR.c Apply release changes to main branch (#759) 2021-12-23 10:16:27 -08:00
xQueueIsQueueEmptyFromISR.c Apply release changes to main branch (#759) 2021-12-23 10:16:27 -08:00
xQueueIsQueueFullFromISR.c Apply release changes to main branch (#759) 2021-12-23 10:16:27 -08:00
xQueuePeek.c Apply release changes to main branch (#759) 2021-12-23 10:16:27 -08:00
xQueuePeekFromISR.c Apply release changes to main branch (#759) 2021-12-23 10:16:27 -08:00
xQueueReceive.c Apply release changes to main branch (#759) 2021-12-23 10:16:27 -08:00
xQueueReceiveFromISR.c Apply release changes to main branch (#759) 2021-12-23 10:16:27 -08: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.