/
Equivalence Checking By Logic Relaxation Equivalence Checking By Logic Relaxation

Equivalence Checking By Logic Relaxation - PowerPoint Presentation

calandra-battersby
calandra-battersby . @calandra-battersby
Follow
345 views
Uploaded On 2019-06-20

Equivalence Checking By Logic Relaxation - PPT Presentation

Eugene Goldberg FMCAD Mountain View CA USA October 36 2016 Outline Introduction Equivalence checking by logic relaxation Experimental results and conclusions Motivation Equivalence Checking ID: 759184

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "Equivalence Checking By Logic Relaxation" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

Equivalence Checking By Logic Relaxation

Eugene Goldberg

FMCAD,

Mountain View, CA, USA

October 3-6, 2016

Slide2

Outline

Introduction

Equivalence checking by logic relaxation

Experimental results and conclusions

Slide3

Motivation

Equivalence Checking (

EC

) is an important part of

formal verification

Any progress in EC empowers

logic synthesis

Short EC proofs for structurally similar circuits

Ideas of EC of combinational circuits can be re-used in EC of sequential circuits and software

Slide4

Solving EC

N

'

X

'

z

'

N

"

X

"

z"

EQ

(X',X" )

where

G

rlx = FN'  FN"

P

rove

EQ  Grlx  (z'  z"),

This reduces to proving EQ  Grlx  ~(z' z") UNSAT

EQ

(

x

'

,

x

"

) = 1, iff

x

'

=

x

"

Slide5

Cut Image

Let Imgcut specify the cut image

Imgcut(q',q")=0, iff there is no input (x',x"), x' = x" for which N',N" produce (q',q")

x

'

x

"

N

'

N

"

q

'

q

"

EQ

(

X',X" )

Cut

Let

Cut

= {

z

'

,

z

"

}.

N

'

and

N

"

are equivalent iff

Img

cut

 (

z

'

z

"

),

Slide6

Problem To Solve: Finding an Inductive Proof Of Equivalence

X

'

z

'

X

"

z

"

Cut

i

Cut

k

Cut

0

Given combin. circuits

N

'

and N", find formulas Hi such that

A simple inductive proof should exist if

N' and N" are struct. similar

Img

i

H

i

, 0 ≤

i <

k

H

i

are

as simple as

possible

H

i

can be derived from

H

i-1

H

k

Img

k

(

z

'

,

z

"

)

Slide7

Some Background

Building inductive proofs of equivalenceBerman, Trevillyan 1988Brand 1993Kuehlmann, Krohm 1996Goldberg, Prasad, Brayton 2001Mishchenko,Chatterjee,Brayton,Een 2006

Proofs are based on derivation of

pre-defined

relations e.g. equivalences

Slide8

Outline

Introduction

Equivalence checking by logic relaxation

Experimental results and conclusions

Slide9

Structure Of Cut Image

Assignments excluded from cut image: Sexcl = Srlx U Simp

X

'

z

'

X

"

z

"

Cut

EQ

(

X',X" )

q'

q"

S

rlx

= {(q',q") | only relaxed inputs (x',x") where x' ≠ x" can produce (q',q") }Simp = {(q',q") | no input (x',x") can produce (q',q") }

(

q

'

,

q

"

) 

S

imp

iff

q

'

cannot be produced in

N

'

and/or

q

"

cannot be produced in

N

"

Slide10

Definition Of Boundary Formulas

Boundary formula Hcut :If (q',q")  Srlx , then Hcut(q',q") = 0If (q',q")  Simp , then Hcut(q',q") can take an arbitrary valueImgcut  Hcut

EC by Logic Relaxation:

“replace”

Img

cut

with boundary formula

H

cut

Slide11

Boundary Formula for Cut = {z',z" }

X

'

z

'

X

"

z

"

Cut

EQ

(

X

'

,X" )

N'

N"

Assume that

N' and N" are not constants

H

cut  Imgcut

Testing if N' is a constant:

two easy SAT checks

Sexcl = Srlx

Simp= 

Slide12

Boundary Formula And Partial Quantifier Elimination

x

'

x

"

N

'

N

"

EQ

(

X

'

,X" )

Cut

Hcut  W [ FM]  W [ EQ FM]

Complete

Quantif. Elimin.Imgcut  W [ EQ FM] W = Vars(FM) \ Vars(Cut)

Partial Quantif. Elimin.

M

EQ

Grlx  ~(z'  z") is equisat. with Hcut  Grlx  ~(z'  z")

where G

rlx

=

F

N

'

F

N

"

Slide13

Contrasting Cut Image And Boundary Formulas

N

'

N

"

M

EQ

(

X

'

,

X

"

)

Cut

Img

cut

N

'

N

"

M

EQ

(

X

'

,

X

"

)

Cut

H

cut

Slide14

Boundary Formulas Of Structurally Similar Circuits

x

'

x

"

N

'

N

"

EQ

(

X

'

,X" )

Suppose,

 v  Cut' v = gv(Lv) where Lv  Cut"

Cut

Cut'

Cut"

Let

Maxcut be the largest value of Lv , v  Cut'

Then

H

cut

can be built from

(

Max

cut

+ 1)-literal clauses

Slide15

EC By Logic Relaxation

X

'

z

'

X

"

z

"

where H

0

= EQ

(X',X" )

Cut

i

Cut

k

Compute

H0,..,Hk

Cut

0

If Hk  (z'  z"), N' and N" are equivalent

H

i  Wi [ FMi ]  Wi [Hi-1  FMi]

Wi = Vars(FMi ) \ Vars(Cuti)

Mi

Cut0 = X' X",...,Cutk={z',z“ }

If, say,

H

k

(

z

'

=0,

z

"

=1)=1 and

N

'

,

N

"

can produce 0 and 1, they are inequivalent

Slide16

Outline

Introduction

Equivalence checking by logic relaxation

Experimental results and conclusions

Slide17

Non-Trivial Example Of EC

Mlp

s computes a median bit of an s-bit multiplier

h is an additional input variable

If h=1, then N' and N" compute Mlpsif h=0, then N' and N" evaluate to 0

Operands A and B where

A

={

a

1

,..,

a

s

},

B

={

b

1

,...,

b

s

}

Slide18

Comparison With ABC

val. of sin Mlps#cutsEC by LoR (s.)ABC (s.)10374.51011417.1381245111421349167571453253,66715574011,237166170 > 6 h

Partial Quantifier Elimination (a variation of HVC-14 algorithm) is based on machinery of D-sequents (FMCAD-12 , FMCAD-13)ABC is a high-quality tool developed at UC, Berkeley

Hi  Wi [ FMi ]  Wi [Hi-1  FMi]

Formulas Hi were comp-uted approximately

FMi specifies logic below i-th cut

Only a subset of clauses of FMi was used

Slide19

Proving Inequivalence

Form. type#solvedtotaltime (s)mediantime (s)95> 3,4904.2 1001,0301.0

Sat-solver : Minisat 2.0, Time limit: 600 s

Formula  EQ(X',X")  FN'  FN"  ~(z' z")

Formula  H3  FN'  FN"  ~(z' z")

Formula H3 was computed precisely

Slide20

Conclusions

Relative_complexity(

N

'

,

N

"

)

<< Absolute_complexity

(

N

'

,

N

"

)

EC by logic

relaxation gives a

general solution

It can be

extended to sequential circuits/programs

Efficient

partial quantifier elimination is of great

value