a suite of hard acl2 theorems arising in refinement based
play

A Suite of Hard ACL2 Theorems Arising in Refinement-Based Processor - PowerPoint PPT Presentation

A Suite of Hard ACL2 Theorems Arising in Refinement-Based Processor Verification Panagiotis (Pete) Manolios Sudarshan Srinivasan Georgia Institute of Technology 1 Introduction Hardware verification is an area of strength for ACL2.


  1. A Suite of Hard ACL2 Theorems Arising in Refinement-Based Processor Verification Panagiotis (Pete) Manolios Sudarshan Srinivasan Georgia Institute of Technology 1

  2. Introduction Hardware verification is an area of strength for ACL2. Efficiently executable microprocessor models. Various levels of abstraction, including bit- & cycle-accurate. Floating point verification. We identify a class of “naturally arising” hardware verification problems that are hard for ACL2. But , other tools (UCLID) easily handle the problems. Our goal is to stimulate research on improving ACL2. We propose an approach on integrating decision procedures and want feedback. 2

  3. Outline Processor Models. Refinement. Refinement in ACL2. UCLID System. Results. Integrating UCLID with ACL2. Conclusions and Future Work. 3

  4. Processor Model Register ALU File ALU BP Exception Decoding Logic Misprediction PC Interrupt Instruction Data Memory Memory IF1 IF2 ID EX M1 M2 WB 4

  5. Refinement, the Picture ISA-Abstract Formal connection RF PC DM between different IM abstraction levels. MA-Abstract Compositional. RF PC DM Avoid “Leaky IM Abstractions.” MA-Abstract2 r RF s w DM r DM IM MA-Bit-Level u v r 32 RF 32 DM rank.v < rank.w 32 32 32 32 32 32 DM IM 5

  6. Processor Model: Commitment Register ALU File ALU BP Exception Decoding Logic Misprediction PC Interrupt Instruction Data Memory Memory IF1 IF2 ID EX M1 M2 WB 6

  7. Processor Model: Commitment Register ALU File ALU BP Exception Decoding Logic Misprediction PC Interrupt Instruction Data Memory Memory IF1 IF2 ID EX M1 M2 WB 7

  8. Processor Model: Commitment Register ALU File ALU BP Exception Decoding Logic Misprediction PC Interrupt Instruction Data Memory Memory IF1 IF2 ID EX M1 M2 WB 8

  9. Processor Model: Commitment Register ALU File ALU BP Exception Decoding Logic Misprediction PC Interrupt Instruction Data Memory Memory IF1 IF2 ID EX M1 M2 WB 9

  10. Processor Model: Commitment Register ALU File ALU BP Exception Decoding Logic Misprediction PC Interrupt Instruction Data Memory Memory IF1 IF2 ID EX M1 M2 WB 10

  11. Processor Model: Commitment Register ALU File ALU BP Exception Decoding Logic Misprediction PC Interrupt Instruction Data Memory Memory IF1 IF2 ID EX M1 M2 WB 11

  12. Processor Model: Commitment Register ALU File ALU BP Exception Decoding Logic Misprediction PC Interrupt Instruction Data Memory Memory IF1 IF2 ID EX M1 M2 WB 12

  13. Refinement Maps Commitment. Partially executed instructions are invalidated. Roll back the MA to the last committed instruction. Requires an invariant that characterizes the reachable states that we call the “Good MA” invariant. Flushing. Dual of commitment, partially executed instructions are flushed. Safety proof for our examples similar to Burch and Dill notion of correctness. No invariant required. Refinement maps and the Good MA invariant are implemented by stepping the processor model. 13

  14. Refinement Theorems in ACL2 (defthm WEB_CORE (Rank_V (rank_a (implies (g 'mwWRT (g 'impl ST34)) (and (g 'emWRT (g 'impl ST34)) (integerp fdpPC0) (g 'deWRT (g 'impl ST34)) (integerp depPC0) (booleanp deRegWrite0) (g 'fdWRT (g 'impl ST34)) …) ZERO)) (let* ((ST0 (initialize fdpPC0 depPC0 ...)) (S_pc1 (g 'sPC (g 'speci ST35))) (ST1 (simulate ST0 nil pc0 nil nil pc0 (S_rf1 (g 'sRF (g 'speci ST35))) ..)) (S_dmem1 (g 'sDMem (g 'speci ST35)))) ... (Good_MA_V (Good_MA_a (and Equiv_MA_0 Good_MA_V Equiv_MA_1 (or Equiv_MA_2 (not Equiv_MA_3 Equiv_MA_4)) (and … (equal S_pc0 I_pc0) (equal S_dmem0 I_dmem0))) …) 14

  15. Refinement Theorems in ACL2 Historical perspective. Considerable effort expended in automating refinement in ACL2. Even so, refinement proofs of simple machines took >1,000 secs. E.g., correctness of 5 stage pipeline (translated from UCLID) took 15.5 days for ACL2 to prove. UCLID took 3 secs to prove the same theorem! Our suite consists of refinement theorems translated from UCLID specifications. While far from perfect, the translator is reasonable. Model written for ACL2: 130 secs. Model translated from UCLID: 430 secs. 15

  16. UCLID System Decision Procedure for CLU. UCLID CLU: Counter arithmetic, Specification restricted lambda expressions, and Uninterpreted functions. CLU Symbolic Formula Simulation Propositional Decision Formula Procedure SAT Valid/ Solver Counter Example 16

  17. Theorems and Results UCLID [sec] CNF CNF Theorems ACL2 [sec] Vars Clauses UCLID Siege Total 5S-Part 5,285 15,457 1 2 3 1,339,200 5S-SL 5,285 15,457 1 2 3 1,339,200 CXS-SL 12,495 36,925 3 29 32 14,284,800 CXS-BP-SL 23,913 70,693 5 300 305 136,152,000 CXS-BP-EX-SL 24,149 71,350 5 233 238 106,243,200 CXS-BP-EX-INP-SL 24,478 72,322 6 263 269 120,081,600 FXS-SL 53,441 159,010 15 160 175 78,120,000 FXS-BP-SL 71,184 211,723 16 187 203 90,619,200 FXS-BP-EX-SL 74,591 221,812 17 163 180 80,352,000 FXS-BP-EX-INP-SL 81,121 241,345 19 170 189 84,369,600 17

  18. Integrating UCLID with ACL2 Core refinement theorem is CLU expressible. Limitations of UCLID: Abstract models. Models not executable. We ultimately want bit-level verification. Restricted logic and specification language. � Polluted models. � Full refinement theorem not expressible. Our approach: coarse grained integration. 18

  19. Integrating UCLID with ACL2 Automated proof: UA implies A A UA Translation from Translation from ACL2 to UCLID to UCLID UCLID U embedding in ACL2 A : ACL2 theorem U : UCLID formula UA : Translation of U, using the embedding of UCLID in ACL2 19

  20. Conclusions and Future Work Presented a class of “naturally occurring” problems that ACL2 has difficulty handling. We hope to stimulate research in improving ACL2. Future work: Integrating decision procedures (UCLID) with ACL2. 20

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend