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

a suite of hard acl2 theorems arising in refinement based
SMART_READER_LITE
LIVE PREVIEW

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.


slide-1
SLIDE 1

1

A Suite of Hard ACL2 Theorems Arising in Refinement-Based Processor Verification

Panagiotis (Pete) Manolios Sudarshan Srinivasan

Georgia Institute of Technology

slide-2
SLIDE 2

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.

slide-3
SLIDE 3

3

Outline

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

slide-4
SLIDE 4

4

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

Processor Model

slide-5
SLIDE 5

5

Refinement, the Picture

Formal connection between different abstraction levels. Compositional. Avoid “Leaky Abstractions.” v s w u

rank.v < rank.w

r r r

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

slide-6
SLIDE 6

6

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

Processor Model: Commitment

slide-7
SLIDE 7

7

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

Processor Model: Commitment

slide-8
SLIDE 8

8

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

Processor Model: Commitment

slide-9
SLIDE 9

9

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

Processor Model: Commitment

slide-10
SLIDE 10

10

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

Processor Model: Commitment

slide-11
SLIDE 11

11

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

Processor Model: Commitment

slide-12
SLIDE 12

12

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

Processor Model: Commitment

slide-13
SLIDE 13

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

  • f correctness.

No invariant required.

Refinement maps and the Good MA invariant are implemented by stepping the processor model.

slide-14
SLIDE 14

14

Refinement Theorems in ACL2

(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))) …)

slide-15
SLIDE 15

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.

slide-16
SLIDE 16

16

UCLID System

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

slide-17
SLIDE 17

17

Theorems and Results

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

slide-18
SLIDE 18

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.

slide-19
SLIDE 19

19

A UA U

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

Integrating UCLID with ACL2

slide-20
SLIDE 20

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.