uf minimizing the coq extraction tcb
play

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


  1. Œuf: Minimizing the Coq Extraction TCB Eric Mullen , Stuart Pernsteiner, James Wilcox, Zachary Tatlock, Dan Grossman 1

  2. Extraction 2

  3. Extraction K coq 2

  4. Extraction K coq 2

  5. Extraction K coq Extraction 2

  6. Extraction K coq Extraction K ocaml 2

  7. Extraction ? K coq Extraction K ocaml 2

  8. Extraction ? K coq Extraction K ocaml ocamlc 2

  9. Extraction ? K coq Extraction K ocaml ocamlc K asm 2

  10. Extraction ? ? K coq Extraction K ocaml ocamlc K asm 2

  11. Extraction ? ? Current: K coq Extraction K ocaml ocamlc K asm 2

  12. Extraction ? ? Current: K coq Extraction K ocaml ocamlc K asm Œuf: 2

  13. Extraction ? ? Current: K coq Extraction K ocaml ocamlc K asm Œuf: K coq 2

  14. Extraction ? ? Current: K coq Extraction K ocaml ocamlc K asm Œuf: K coq 2

  15. Extraction ? ? Current: K coq Extraction K ocaml ocamlc K asm Œuf: Œuf K coq 2

  16. Extraction ? ? Current: K coq Extraction K ocaml ocamlc K asm Œuf: Œuf K coq K Cminor 2

  17. Extraction ? ? Current: K coq Extraction K ocaml ocamlc K asm Œuf: Œuf K coq K Cminor 2

  18. Extraction ? ? Current: K coq Extraction K ocaml ocamlc K asm Œuf: Œuf K coq K Cminor CompCert 2

  19. Extraction ? ? Current: K coq Extraction K ocaml ocamlc K asm Œuf: Œuf K coq K Cminor CompCert K asm 2

  20. Extraction ? ? Current: K coq Extraction K ocaml ocamlc K asm Œuf: Œuf K coq K Cminor CompCert K asm 2

  21. Extraction ? ? Current: K coq Extraction K ocaml ocamlc K asm Shim Œuf: Œuf K coq K Cminor CompCert K asm 2

  22. Extraction ? ? Current: K coq Extraction K ocaml ocamlc K asm Shim Œuf: Œuf K coq K Cminor CompCert K asm Shim 2

  23. Extraction Œuf: Œuf K coq K Cminor CompCert K asm Shim 3

  24. Extraction 1.Novel frontend guarantees correct input Œuf: Œuf K coq K Cminor CompCert K asm Shim 3

  25. Extraction 1.Novel frontend guarantees correct input 2.Correctness theorem allows shim reasoning Œuf: Œuf K coq K Cminor CompCert K asm Shim 3

  26. Related Work 4

  27. Related Work • Built in HOL • Uses Di ff erent Frontend Technique 4

  28. Related Work • Built in HOL • Uses Di ff erent Frontend Technique • Aims to compile all of Gallina • Doesn’t support shim reasoning • No frontend trust story 4

  29. Related Work • Built in HOL • Uses Di ff erent CompCert Frontend Technique Provides the • Aims to compile all compiler of Gallina backend for • Doesn’t support Œuf (and shim reasoning CertiCoq) • No frontend trust story 4

  30. Outline Architecture Guarantee Evaluation 5

  31. Outline Architecture Guarantee Evaluation 6

  32. 7

  33. Outline Architecture Guarantee Evaluation 8

  34. Outline Architecture Guarantee Evaluation 9

  35. Architecture Oeuf K coq K Cminor CompCert K asm Shim 10

  36. Architecture K coq 10

  37. Architecture K coq 11

  38. Architecture Reflect K coq 11

  39. Architecture Reflect K coq K AST 11

  40. Architecture Reflect K coq K AST Denote 11

  41. Architecture Reflect K coq K AST Serialize Denote 11

  42. Architecture Reflect K coq K AST Serialize Denote 11

  43. Architecture Reflect K coq K AST Serialize Deserialize Denote 11

  44. Architecture Reflect Deserialize K AST K coq K AST Serialize Denote 11

  45. Architecture Reflect Deserialize K AST K coq K AST Serialize Denote Compile 11

  46. Architecture Reflect Deserialize K AST K coq K AST Serialize Denote Compile K Cminor 11

  47. Architecture Reflect Deserialize K AST K coq K AST Serialize Denote Compile K Cminor Shim 11

  48. Architecture Reflect Deserialize K AST K coq K AST Serialize Denote Compile K Cminor CompCert Shim 11

  49. Architecture Reflect Deserialize K AST K coq K AST Serialize Denote Compile K Cminor CompCert Shim S Cminor 11

  50. Architecture Reflect Deserialize K AST K coq K AST Serialize Denote Compile Link K Cminor CompCert Shim S Cminor 11

  51. Architecture Reflect Deserialize K AST K coq K AST Serialize Denote Compile Link K Cminor L Cminor CompCert Shim S Cminor 11

  52. Architecture Reflect Deserialize K AST K coq K AST Serialize Denote Compile Link K Cminor L Cminor CompCert CompCert Shim S Cminor 11

  53. Architecture Reflect Deserialize K AST K coq K AST Serialize Denote Compile Link K Cminor L Cminor CompCert L asm CompCert Shim S Cminor 11

  54. Frontend Reflect K coq K AST Denote 12

  55. Frontend Reflect e ::= K coq K AST | x (var) | e e (application) Denote | C e* (constructor) | E e* e (eliminator) | f e* (closure creation) 12

  56. Frontend Reflect e ::= K’ coq K AST | x (var) | e e (application) Denote | C e* (constructor) | E e* e (eliminator) Remove Dep Types Pattern Matching -> Elims | f e* (closure creation) K coq 12

  57. Frontend Reflect e ::= K’ coq K AST | x (var) | e e (application) Denote | C e* (constructor) | E e* e (eliminator) Remove Dep Types Pattern Matching -> Elims | f e* (closure creation) K coq Theorem: 12

  58. Frontend Language Restrictions K coq K AST Denote 13

  59. Frontend Language Restrictions K coq K AST Denote • No Fixpoints 13

  60. Frontend Language Restrictions K coq K AST Denote • No Fixpoints • No Pattern Matching 13

  61. Frontend Language Restrictions K coq K AST Denote • No Fixpoints • No Pattern Matching • No Dependent Types 13

  62. Frontend Language Restrictions K coq K AST Denote • No Fixpoints • No Pattern Matching • No Dependent Types • All Types built into Œuf 13

  63. Compiler Deserialize K AST Serialize Compile K Cminor 14

  64. Compiler Deserialize K AST Serialize Compile K Cminor 45 verified compilation passes 14

  65. Compiler Deserialize K AST Serialize Compile K Cminor 45 verified compilation passes 14

  66. Compiler Deserialize K AST Serialize Compile K Cminor 45 verified compilation passes 14

  67. Shim K Cminor Shim 15

  68. Shim K Cminor CompCert Shim 15

  69. Shim K Cminor CompCert Shim S Cminor 15

  70. Shim Link K Cminor CompCert Shim S Cminor 15

  71. Shim Link K Cminor L Cminor CompCert Shim S Cminor 15

  72. Shim Link K Cminor L Cminor CompCert CompCert Shim S Cminor 15

  73. Shim Link K Cminor L Cminor CompCert L asm CompCert Shim S Cminor 15

  74. Shim Link K Cminor L Cminor CompCert L asm CompCert Shim S Cminor 15

  75. Outline Architecture Guarantee Evaluation 16

  76. Outline Architecture Guarantee Evaluation 17

  77. Guarantee S Cminor 18

  78. Guarantee S Coq S Cminor 18

  79. Guarantee S Coq match S Cminor 18

  80. Guarantee 1) evaluate S Coq match S Cminor 18

  81. Guarantee 1) evaluate S Coq V Coq match S Cminor 18

  82. Guarantee 1) evaluate S Coq V Coq match 2) match S Cminor 18

  83. Guarantee 1) evaluate S Coq V Coq match 2) match S Cminor V Cminor 18

  84. Guarantee 1) evaluate S Coq V Coq match 2) match S Cminor V Cminor 3) steps* 18

  85. Guarantee 1) evaluate S Coq V Coq match 2) match S Cminor V Cminor 3) steps* *Cminor is Deterministic 18

  86. TCB Œuf: Œuf K coq K Cminor CompCert K asm Shim 19

  87. TCB Œuf: Œuf K coq K Cminor CompCert K asm Shim Œuf coq 19

  88. TCB Œuf: Œuf K coq K Cminor CompCert K asm Shim Extraction Œuf coq 19

  89. TCB Œuf: Œuf K coq K Cminor CompCert K asm Shim Extraction Œuf coq Œuf ocaml 19

  90. TCB Œuf: Œuf K coq K Cminor CompCert K asm Shim ? Extraction Œuf coq Œuf ocaml 19

  91. TCB Œuf: Œuf K coq K Cminor CompCert K asm Shim ? Extraction Œuf coq Œuf ocaml Œuf Driver 19

  92. TCB Œuf: Œuf K coq K Cminor CompCert K asm Shim ? Extraction Œuf coq Œuf ocaml ocamlc Œuf Driver 19

  93. TCB Œuf: Œuf K coq K Cminor CompCert K asm Shim ? Extraction Œuf coq Œuf ocaml ocamlc Œuf asm Œuf Driver 19

  94. TCB Œuf: Œuf K coq K Cminor CompCert K asm Shim ? ? Extraction Œuf coq Œuf ocaml ocamlc Œuf asm Œuf Driver 19

  95. Outline Architecture Guarantee Evaluation 20

  96. Outline Architecture Guarantee Evaluation 21

  97. Evaluation • Eliminate trust in parser • Provide API for shim reasoning • Verify the compiler • Works on real code • Performance? 22

  98. Evaluation • Eliminate trust in parser • Provide API for shim reasoning • Verify the compiler • Works on real code • Performance? 22

  99. Evaluation • Eliminate trust in parser • Provide API for shim reasoning • Verify the compiler • Works on real code • Performance? 22

  100. Evaluation • Eliminate trust in parser • Provide API for shim reasoning • Verify the compiler • Works on real code • Performance? 22

Recommend


More recommend