1
A Suite of Hard ACL2 Theorems Arising in Refinement-Based Processor Verification
Panagiotis (Pete) Manolios Sudarshan Srinivasan
Georgia Institute of Technology
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
Georgia Institute of Technology
2
Efficiently executable microprocessor models. Various levels of abstraction, including bit- & cycle-accurate. Floating point verification.
3
4
PC Instruction Memory Decoding Logic Register File ALU Exception Interrupt Misprediction Data Memory IF1 IF2 ID EX M1 M2 WB BP ALU
5
rank.v < rank.w
PC RF IM DM PC RF IM DM
ISA-Abstract MA-Abstract MA-Abstract2 MA-Bit-Level
RF IM DM RF IM
32 32 32 32 32 32 32
DM
32
DM DM
6
PC Instruction Memory Decoding Logic Register File ALU Exception Interrupt Misprediction Data Memory IF1 IF2 ID EX M1 M2 WB BP ALU
7
PC Instruction Memory Decoding Logic Register File ALU Exception Interrupt Misprediction Data Memory IF1 IF2 ID EX M1 M2 WB BP ALU
8
PC Instruction Memory Decoding Logic Register File ALU Exception Interrupt Misprediction Data Memory IF1 IF2 ID EX M1 M2 WB BP ALU
9
PC Instruction Memory Decoding Logic Register File ALU Exception Interrupt Misprediction Data Memory IF1 IF2 ID EX M1 M2 WB BP ALU
10
PC Instruction Memory Decoding Logic Register File ALU Exception Interrupt Misprediction Data Memory IF1 IF2 ID EX M1 M2 WB BP ALU
11
PC Instruction Memory Decoding Logic Register File ALU Exception Interrupt Misprediction Data Memory IF1 IF2 ID EX M1 M2 WB BP ALU
12
PC Instruction Memory Decoding Logic Register File ALU Exception Interrupt Misprediction Data Memory IF1 IF2 ID EX M1 M2 WB BP ALU
13
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.
Dual of commitment, partially executed instructions are flushed. Safety proof for our examples similar to Burch and Dill notion
No invariant required.
14
(defthm WEB_CORE (implies (and (integerp fdpPC0) (integerp depPC0) (booleanp deRegWrite0) …) (let* ((ST0 (initialize fdpPC0 depPC0 ...)) (ST1 (simulate ST0 nil pc0 nil nil pc0 ..)) ... (Good_MA_V (Good_MA_a Equiv_MA_0 Equiv_MA_1 Equiv_MA_2 Equiv_MA_3 Equiv_MA_4)) … (Rank_V (rank_a (g 'mwWRT (g 'impl ST34)) (g 'emWRT (g 'impl ST34)) (g 'deWRT (g 'impl ST34)) (g 'fdWRT (g 'impl ST34)) ZERO)) (S_pc1 (g 'sPC (g 'speci ST35))) (S_rf1 (g 'sRF (g 'speci ST35))) (S_dmem1 (g 'sDMem (g 'speci ST35)))) (and Good_MA_V (or (not (and (equal S_pc0 I_pc0) (equal S_dmem0 I_dmem0))) …)
15
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!
Model written for ACL2: 130 secs. Model translated from UCLID: 430 secs.
16
17
19 17 16 15 6 5 5 3 1 1 UCLID UCLID [sec] 170 163 187 160 263 233 300 29 2 2 Siege 189 180 203 175 269 238 305 32 3 3 Total 1,339,200 15,457 5,285 5S-Part 1,339,200 15,457 5,285 5S-SL 84,369,600 241,345 81,121 FXS-BP-EX-INP-SL 80,352,000 221,812 74,591 FXS-BP-EX-SL 90,619,200 211,723 71,184 FXS-BP-SL 78,120,000 159,010 53,441 FXS-SL 120,081,600 72,322 24,478 CXS-BP-EX-INP-SL 106,243,200 71,350 24,149 CXS-BP-EX-SL 136,152,000 70,693 23,913 CXS-BP-SL 14,284,800 36,925 12,495 CXS-SL ACL2 [sec] CNF Clauses CNF Vars Theorems
18
Polluted models. Full refinement theorem not expressible.
19
Translation from ACL2 to UCLID Translation from UCLID to UCLID embedding in ACL2 Automated proof: UA implies A A : ACL2 theorem U : UCLID formula UA : Translation of U, using the embedding of UCLID in ACL2
20