Œuf: Minimizing the Coq Extraction TCB
Eric Mullen, Stuart Pernsteiner, James Wilcox, Zachary Tatlock, Dan Grossman
1
uf: Minimizing the Coq Extraction TCB Eric Mullen , Stuart - - PowerPoint PPT Presentation
uf: Minimizing the Coq Extraction TCB Eric Mullen , Stuart Pernsteiner, James Wilcox, Zachary Tatlock, Dan Grossman 1 Extraction 2 Extraction K coq 2 Extraction K coq 2 Extraction K coq Extraction 2 Extraction K coq Extraction K
Eric Mullen, Stuart Pernsteiner, James Wilcox, Zachary Tatlock, Dan Grossman
1
2
2
2
Extraction
2
Extraction
2
Extraction
2
Extraction
2
Extraction
2
Extraction
2
Extraction
2
Extraction
2
Extraction
2
Extraction
2
Extraction
Œuf
2
Extraction
Œuf
2
Extraction
Œuf
2
Extraction
Œuf CompCert
2
Extraction
Œuf
CompCert
2
Extraction
Œuf
CompCert
2
Extraction
Œuf
CompCert
Shim
2
Extraction
Œuf
CompCert
Shim Shim
2
3
Œuf
Shim
CompCert
3
Œuf
Shim
CompCert
3
Œuf
Shim
CompCert
4
4
Frontend Technique
4
Frontend Technique
shim reasoning
story
4
Frontend Technique
shim reasoning
story
Provides the compiler backend for Œuf (and CertiCoq)
5
6
7
8
9
Oeuf
CompCert
Shim
10
10
11
Reflect
11
Reflect
11
Reflect Denote
11
Reflect Denote
Serialize
11
Reflect Denote
Serialize
11
Reflect Denote
Serialize Deserialize
11
Reflect Denote
Serialize Deserialize KAST
11
Reflect Denote
Serialize Deserialize KAST Compile
11
Reflect Denote
Serialize Deserialize KAST Compile
11
Reflect Denote
Serialize Deserialize KAST Compile
11
Reflect Denote
Serialize Deserialize KAST Compile CompCert
11
Reflect Denote
Serialize Deserialize KAST Compile
CompCert
11
Reflect Denote
Serialize Deserialize KAST Compile
CompCert Link
11
Reflect Denote
Serialize Deserialize KAST Compile
CompCert Link
11
CompCert
Reflect Denote
Serialize Deserialize KAST Compile
CompCert Link
11
CompCert
Reflect Denote
Serialize Deserialize KAST Compile
CompCert Link
11
Reflect Denote
12
Reflect Denote
e ::= | x (var) | e e (application) | C e* (constructor) | E e* e (eliminator) | f e* (closure creation)
12
Reflect Denote
e ::= | x (var) | e e (application) | C e* (constructor) | E e* e (eliminator) | f e* (closure creation)
Remove Dep Types Pattern Matching -> Elims
12
Reflect Denote
e ::= | x (var) | e e (application) | C e* (constructor) | E e* e (eliminator) | f e* (closure creation)
Remove Dep Types Pattern Matching -> Elims
12
Theorem:
13
Denote
13
Denote
13
Denote
13
Denote
13
Denote
Serialize Deserialize KAST Compile
14
Serialize Deserialize KAST Compile
14
Serialize Deserialize KAST Compile
14
Serialize Deserialize KAST Compile
14
15
CompCert
15
CompCert
15
CompCert Link
15
CompCert Link
15
CompCert Link CompCert
15
CompCert Link
CompCert
15
CompCert Link
CompCert
15
16
17
18
18
18
18
18
18
18
18
*Cminor is Deterministic
18
Œuf
CompCert
19
Œuf
CompCert
19
Œuf
CompCert
Extraction
19
Œuf
CompCert
Extraction
19
Œuf
CompCert
Extraction
19
Œuf
CompCert
Extraction
Œuf Driver
19
Œuf
CompCert
Extraction
Œuf Driver
19
Œuf
CompCert
Extraction
Œuf Driver
19
Œuf
CompCert
Extraction
Œuf Driver
19
20
21
22
22
22
22
22
22
Program Input Size Default Boehm Slab OCaml list_max 100 items 0.03 s 0.04 s 0.01 s 0.00 s list_max 1000 items (OOM) 34.63 s 11.31 s 0.02 s SHA256 55 bytes 2.22 s 3.12 s 1.31 s 0.07 s SHA256 500 bytes (OOM) 24.44 s 10.75 s 0.58 s SHA256 5000 bytes (OOM) 246.94 s 107.06 s 5.85 s
23
Program Input Size Default Boehm Slab OCaml list_max 100 items 0.03 s 0.04 s 0.01 s 0.00 s list_max 1000 items (OOM) 34.63 s 11.31 s 0.02 s SHA256 55 bytes 2.22 s 3.12 s 1.31 s 0.07 s SHA256 500 bytes (OOM) 24.44 s 10.75 s 0.58 s SHA256 5000 bytes (OOM) 246.94 s 107.06 s 5.85 s
23
Verification of a Cryptographic Primitive,
24
Specification Size Lines of Code Œuf Specification
CompCert Specification
Total Specification
Total Code Size Lines of Code Gallina/ Vernacular LOC
Ltac LOC
Total LOC
25
Œuf
CompCert
https://oeuf.uwplse.org https://github.com/uwplse/oeuf