mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-17 02:07:48 -04:00
Add VeriFast kernel queue proofs (#117)
This commit is contained in:
parent
d5fedeaa96
commit
529c481c39
31 changed files with 3702 additions and 1 deletions
40
FreeRTOS/Test/VeriFast/scripts/diff_files.md
Normal file
40
FreeRTOS/Test/VeriFast/scripts/diff_files.md
Normal file
|
@ -0,0 +1,40 @@
|
|||
# Generate diffs between FreeRTOS source and proofs
|
||||
|
||||
## Requirements
|
||||
|
||||
- python3
|
||||
- ctags 5.8
|
||||
- diff 3.4+
|
||||
- [diff2html](https://diff2html.xyz/)
|
||||
|
||||
## Instructions
|
||||
|
||||
The following will extract per-function files from the original FreeRTOS source
|
||||
implementation and the proof directory.
|
||||
|
||||
|
||||
```
|
||||
cd scripts
|
||||
./generate_diff_files.sh
|
||||
# will extract to ./FreeRTOS-Kernel/generated and ./queue/generated
|
||||
```
|
||||
|
||||
Then use `diff` for a side-by-side comparison. Note that the `--color=always`
|
||||
flag needs v3.4+:
|
||||
|
||||
```
|
||||
diff --color=always --width=$COLUMNS --suppress-common-lines --side-by-side FreeRTOS-Kernel/generated queue/generated | less -r
|
||||
```
|
||||
|
||||
Or generate a html report using `diff2html`:
|
||||
|
||||
```
|
||||
diff -u FreeRTOS-Kernel/generated queue/generated | diff2html -i stdin
|
||||
```
|
||||
|
||||
The expectation is that the proofs make minimal changes to the original source
|
||||
implementation in the form of:
|
||||
|
||||
- VeriFast annotations `/*@...@*/` and `//*...`
|
||||
- Additional comments explaining the proof `/*...*/`
|
||||
- Flagged changes within `#if[n]def VERIFAST`
|
Loading…
Add table
Add a link
Reference in a new issue