FreeRTOS-Kernel/verification/verifast
Tobias Reinhard e800ebd293 Exposed node owners in all predicates related to nodes. Adapted proofs to new predicates.
Changed predicates:
- `xLIST_ITEM`
- `DLS`
- `xLIST`
- `readyLists_p`
- `List_array_p`
2022-11-30 09:44:25 -05:00
..
custom_build_scripts_RP2040 Added info about available tasks to lock predicate. 2022-11-16 10:28:31 -05:00
demos Update SMP demo submodule. 2022-10-14 13:10:53 -04:00
problems Added minimal example for VF bug involving testing for macro defines in headers. 2022-10-13 09:16:54 -04:00
proof Exposed node owners in all predicates related to nodes. Adapted proofs to new predicates. 2022-11-30 09:44:25 -05:00
proof_setup Nightly build of Nov 14, 2022 broke old proof for vTaskCreate. Ignoring these proofs for now. 2022-11-15 09:31:56 -05:00
sdks Dumped new version of pico sdk submodule. 2022-10-13 10:02:31 -04:00
.gitignore Added preprocessing out dir to .gitignore. 2022-11-11 15:11:44 -05:00
README.md Added documentation. 2022-11-29 15:55:27 -05:00
start-vfide--original.sh Added VF startup script for preprocessed tasks.c. 2022-10-14 13:37:30 -04:00
start-vfide--preprocessed.sh Commented old opening and closing lemmas out and switched back from Z3 to VF standard SMT solver 2022-11-28 12:20:30 -05:00

FreeROTS VeriFast Proofs

This directory contains an unbounded proof memory safety and thread safety proof for the core of the task scheduler: vTaskSwitchContext The proof ensures that no call to vTaskSwitchContext that complies with the specified precondition results in unsafe memory accesses. It also ensures that concurrent instances of vTaskSwitchContext running on diffierent cores are mutually thread safe.

Proof Directory Structure

FreeRTOS-Kernel
│
│
│
├── tasks.c files
│   The base directory contains the source files, in particular `tasks.c`.
│   `tasks.c` has been annotated with the VeriFast proof steps necessary to
│   prove memory safety and thread safety of `vTaskSwitchContext`.
│   The proof uses many specifications and lemmas residing in 
│   `verification/verifast/proof_setup` and `verifcation/verifast/proofs`.
│
│
├── include
│   Contains the header files. Some of the header files have been annotated with
│   VeriFast contracts and proofs.
│
│
├── portable
│   └── Thirdparty
│       └── GCC
│           └── RP2040
│               Contains the Raspberry Pi Pico setup.
│
│
└── verification
    └── verifast
        ├── custom_build_scripts_RP2040
        │   Contains scripts to preprocess and rewrite the source code.
        │
        ├── demos
        │   Contains the FreeRTOS SMP demo. Our proofs use some of its 
        │   configuartion files.
        │
        ├── proof
        │   Contains the VeriFast proof files.
        │   │
        │   ├── *.h files
        │   │   Headers containing VeriFast formalizations and proofs.
        │   │
        │   ├── README.md
        │   │   Contains more details about the proof.
        │   │
        │   ├── single_core_proofs
        │   │   Contains the old list formalization and proofs written by
        │   │   Aalok Thakkar and Nathan Chong in 2020 for the single-core 
        │   │   setup.
        │   │
        │   └── single_core_proofs_extended
        │       Contains new proofs extending the single-core list
        │       formalization.
        │
        ├── proof_setup
        │   Contains config files for the proof. The proof assumes a setup for
        │   RP2040.
        │
        └── sdks
            Contains SDKs referenced by the proof setup.
            Some files are annotated with VeriFast contracts.

Proof Setup

The VeriFast proofs assume a setup for the Raspberry Pi Pico, i.e., RP2040.