Formal Equivalence Check Verification

© All Rights Reserved

0 views

Formal Equivalence Check Verification

© All Rights Reserved

- Sentence Connectors
- Assignment 6
- UT Dallas Syllabus for se3306.001 06f taught by Gopal Gupta (gupta)
- dynamic programming examples
- Handbook of Philosophical Logic Vol 1
- Answers_pt1.pdf
- Heuristic Search (6 page)
- ELCT201_lecture3
- Introduction to Logic
- 04pres
- How to Write a Critique (1)
- LOGIC Advanced 1994
- Bbc
- IFCA-2017-T01 Ex1
- Suture by Alain Miller
- Repawrt
- Fall 2013 EH 346 Syllabus
- Harman. Kulkarni-inducción
- THE CONCEPT OF LOGICAL CONSEQUENCE.docx
- Logical Thinking L1

You are on page 1of 31

Satisfiability (SAT) Solver

F SAT Solver

CNF

boolean variables that makes the formula true!

The solver reports

if F is satisfiable or unsatisfiable.

if satisfiable, at least one assignment is reported.

Almost all modern SAT solver operates on CNF

f = ( a + c ) ( b + c ) (¬a + ¬b + ¬c )

CNF for Characteristic Representation

(CNF_CR)

Consider an inverter: y = x

yx

= (y x ) ( x y)

=( y x ) (x y)

CNF for Characteristic Representation

(CR)

c ab

= (c ab ) (ab c)

=( c ab ) ( a b c)

=( c a) ( c b ) ( a b c)

CNFs for Characteristic Representation

Summary: Gates in CNF_CR

CNF for Characteristic Representation

c = ab

c ab

= (c ab ) (ab c)

=(c ab ) (a b c)

=(c a) (c b ) (a b c)

e = abcd

e abcd

= (e abcd ) (abcd e)

=(e abcd ) ((abcd) e)

= (e ab ) (e cd) ((abcd) e)

= (e a ) (e b) (e c ) (e d) (abcde)

How to get the CNF: POS?

m3 m5 m6 m7 (3,5,6,7)

F(A,B, C) A B C A B C A B C A B C

M0 M1 M2 M4 (0,1,2,4)

SOP POS? AB AC BC

F(A,B, C) A B C A B C A B C A B C

m3 m5 m6 m7 (3,5,6,7) M0 M1 M2 M4 (0,1,2,4)

9

Example: 4-Input AND Gate

a b c d e N

a b c d e

0 0 0 0 0 1

0 0 0 0 0

0 0 0 1 0 1

0 0 0 1 0

0 0 1 0 0 1

0 0 1 0 0

0 0 1 1 0 1

0 0 1 1 0

0 1 0 0 0 1

0 1 0 0 0

0 1 0 1 0 1

0 1 0 1 0

0 1 1 0 0 1

0 1 1 0 0

0 1 1 1 0 1

0 1 1 1 0

1 0 0 0 0 1

1 0 0 0 0

1 0 0 1 0 1

1 0 0 1 0

1 0 1 0 0 1

1 0 1 0 0

1 0 1 1 0 1

1 0 1 1 0

1 1 0 0 0 1

1 1 0 0 0

1 1 0 1 0 1

1 1 0 1 0

1 1 1 0 0 1

1 1 1 0 0

1 1 1 1 1 1

1 1 1 1 1

0

Example: Express N in CNF ?

a b c d e N

0 0 0 0 0 1

0 0 0 1 0 1

0 0 1 0 0 1

0 0 1 1 0 1

0

0

1

1

0

0

0

1

0

0

1

1

F(a, b, c, d, e) (????)

0 1 1 0 0 1

0 1 1 1 0 1

1 0 0 0 0 1

1 0 0 1 0 1

1 0 1 0 0 1

1 0 1 1 0 1

1 1 0 0 0 1

1 1 0 1 0 1 (a+e’)(b+e’)(c+e’)(d+e’)(a’+b’+c’+d’+e)

1 1 1 0 0 1

1 1 1 1 1 1

0

Convert Any Boolean Formula into CNF

Without introducing new variables, the size of the resulting formula will

grow exponentially

Not practical

By introducing intermediate variables, the size of the resulting formula

can grow linearly. How?

Number of intermediate variable equal to the number of Boolean

operations

The resulting formula will have the same satisfiability as the original

one

Tseitin’s Encoding: Conversion to CNF

in exponential time and space with the same set of atoms

in linear time and space if new variables are added.

The original and converted formulas are “equi-satisfiable”.

This technique is called Tseitin’s encoding.

(a1 (Aa2)) = (a1 A) (a1 a2) (a1 A a2)

(a2 (B C)) = (a2 B) (a2 C) (a2 B C)

Equivalence Checking as Validity Problem

C1=C2 means

for all values for inputs of C1 and C2, we have o1=o2.

The equivalence problem is a validity problem:

I. C1=C2

The Validity Problem by SAT Solvers

Validity: I. F=1 satisfiable or unsatisfiable.

but non-valid formulas

formula

G F < --- > F G

Example

C1 C2

x

a c1 a c2

Negation of the problem: a. c1≠c2 (= c1c2 + c1c2)

The problem for satisfiability:

c1≠c2 = CR(C1)CR(C2) (c1c2 + c1c2)

=(ac1+ac1) [(ax +ax) (xc2+xc2)] (c1c2+c1c2)

=axc1c2 + ax c1c2

Satisfiable: (a=0, x=1, c1=1, c2=0); (a=1, x=0, c1=0, c2=1).

Example

C1 C2

x y

a c1 a c2

Negation of the problem: a. c1≠c2 (= c1c2 + c1c2)

The problem for satisfiability:

c1≠c2 = CR(C1)CR(C2) (c1c2 + c1c2)

=(ac1+ac1)[(ax+ax)(xy+xy)(yc2+yc2)] (c1c2+c1c2)

=0

Unsatisfiable !

Conclusion: a. c1=c2

Solve Validity Problem by SAT Solver?

(I. C1=C2)

I. C1=C2 I. (C1 C2)

Negation

Negation

I. C1C2

( I. (C1 C2) )

Solve Validity Problem by SAT Solver?

I. C1=C2

2 Negations

Method 1

Method 1:

CNF_CR(C1)CNF_CR(C2) CNF [(o1=o2)]

=CNF_CR(C1)CNF_CR(C2) (o1+o2) (o1+o2)

CNF_CR(…) =Characteristic function in CNF (…)

Method 2: Use a Miter Circuit (XOR)

M=CNF_CR(C1)CNF_CR(C2) CNF_CR() of should be

satisfiable.

However, if M is unsatisfiable, then C1=C2

Method 2: Use a Miter Circuit (XOR)

For a Boolean formula F, we can discover that F=0 for all

values for all the variables in F (unsatisfiability).

C1=C2 CNF_CR(C1)CNF_CR(C2)CNF_CR()of is unsatisfiable!

Example

c1

a y

c2

CR(C1)=a’c1+ac1’

CR(C2)=a’c2+ac2’

CR(XOR)=c1’c2’y’+c1’c2y+c1c2’y+c1c2y’

P=CR(C1)CR(C2)CR(XOR)=a’c1c2y’+ac1’c2’y’

c1≠c2: y

P y = 0 (unsatisfiable)

Example

c1

a y

c2

CR(C1)=a’c1+ac1’

CR(C2)=a’c2’+ac2

CR(XOR)=c1’c2’y’+c1’c2y+c1c2’y+c1c2y’

P=CR(C1)CR(C2)CR(XOR)=a’c1c2’y+ac1’c2y

c1≠c2: y

P y = a’c1c2’y+ac1’c2y (satisfiable)

Equivalence Checking as SAT problem

Equivalence Checking as SAT problem

Method 1 Method 2

CR(xor(a, b, c)) c (Method 2)

= CR[(a=b)] (Method 1)

=(a’b + ab’)

So the two methods are the same.

Method 1 Method 2

XOR(a,b,c)=a’b’c’+a’bc+ab’c+abc’

a ≠ b= a’b+ab’ =c

XOR(a,b,c)c=a’b+ab’

Combinational Equivalence Checking

(Boolean functions B1 and B2)

How can we prove that C1 is/isn’t equivalent to C2,

in a reasonable amount of time?

Combinational Equivalence Checking

(Boolean functions B1 and B2)

How can we prove that C1 is/isn’t equivalent to C2,

in a reasonable amount of time?

References

Press, 1999.

M. Huth, M. Ryan, “Logic in Computer Science: Modeling and

Reasoning about Systems”, Cambridge University Press, 2000.

William K. Lam, “Hardware Design Verification: Simulation and

Formal Method-Based Approaches”, Prentice Hall, 2005.

- Sentence ConnectorsUploaded byThendral Sri
- Assignment 6Uploaded bynaim_puterakatak
- UT Dallas Syllabus for se3306.001 06f taught by Gopal Gupta (gupta)Uploaded byUT Dallas Provost's Technology Group
- dynamic programming examplesUploaded byHunegnaw Melkamu
- Handbook of Philosophical Logic Vol 1Uploaded byangel21znerolf
- Answers_pt1.pdfUploaded byJason Scheller
- Heuristic Search (6 page)Uploaded byScout St
- ELCT201_lecture3Uploaded byMostafa Gaafar
- Introduction to LogicUploaded byAlexander Black
- 04presUploaded byRishi N Rishi N
- How to Write a Critique (1)Uploaded byTina Sioufi
- LOGIC Advanced 1994Uploaded bynaksap
- BbcUploaded byIfta Khirul
- IFCA-2017-T01 Ex1Uploaded byParham
- Suture by Alain MillerUploaded byJulien Sorel
- RepawrtUploaded byElizabeth Jordan
- Fall 2013 EH 346 SyllabusUploaded byTanya Sasser
- Harman. Kulkarni-inducciónUploaded byCuirocampos
- THE CONCEPT OF LOGICAL CONSEQUENCE.docxUploaded byCainã Silva Coutinho
- Logical Thinking L1Uploaded byhawku
- section1-PresentationDevelopmentUploaded byBianca Vasconcellos
- Scimakelatex.6727.Greenlinery.codeneryUploaded byramrayssablue
- narrativewritingassignmentterm1-organizationsentencestructure-lauracull 1Uploaded byapi-339420112
- 40-76-1-PBUploaded bylodeynikov
- Choosing Your Nonmonotonic Logic a ShoppUploaded byJohn Gibbins
- From Rules to Meanings - New Essays on InferenceUploaded byJohn Gibbins
- Liz02Uploaded byAnonymous 8erOuK4i
- LizSetUploaded byAnonymous 8erOuK4i
- Functions.pptUploaded byCy Borg
- 3 Operations on FunctionsUploaded byjeffrey

- SAT / ACT / PSAT Word List - 04Uploaded byaehsgo2college
- Tutorial LSIUploaded byrahul
- laskin_MASc_thesis.pdfUploaded byMohamed Megahed
- Characterization of Comonational LogicUploaded byrahul
- Air Handling UnitsUploaded byrahul
- OrbitsUploaded byrahul
- Students Required DoumentsUploaded byrahul
- Barrons 333 High Freq Words With MeaningsUploaded byapi-3764413
- Letter of RecommnendationUploaded byrahul

- technologylessonplan 1Uploaded byapi-269480697
- Can God find a place in physics? St. Augustine's philosophy meets general relativity (E. Minguzzi)Uploaded byfgijonh
- Kamasutra Lulu Cover1Uploaded bypanaiyaram panaiyaram
- Basic approaches used to improve productivityUploaded byAdeel Jatt
- Romanticism in FrankenstineUploaded byAsmaa Elsayed
- CORRELATION_BETWEEN_EXTRAVERSION_PERSONALITY_AND_ENGLISH_W….pdfUploaded byTri Murwanto
- Abrami.docxUploaded byAJ Dueñas
- full english essayUploaded byapi-249715315
- ANALYZING REGULATION AND MARKETING ETHICS.pptxUploaded byJemson Gatchalian
- JIA Saving FaceUploaded byIain Cowie
- Engaging With the Natural EnvironmentUploaded byElena Oprea
- 0000-0150, AA VV, Vetera Testimonia de Jesu Christo, GR-En-LTUploaded bySahaquiel
- Electromagnetic Field MappingUploaded byLim Hui Wen
- itle brochure individual assignment 1Uploaded byapi-465713851
- System DynamicsUploaded byJuan Colombo
- MSC ADAMS SOLVER.pdfUploaded bymilind9897
- Journal of Vacation Marketing 2012 Hvass 93 103Uploaded bymarketing2008
- DIY LED ProjectorUploaded by11u2j7+3d1uwbpw0jo0
- p3 Teachnical ArticlesUploaded byFalah Ud Din Sheryar
- cikguUploaded byCollagen Beau
- sivasankari 20.1.12Uploaded bySiva Sankari
- The International Journal of Psychoactive Mushrooms - TEO-August-2006-Uploaded byLuis Alejandro Diaz Arce
- Comparative Analysis of a Special Education Teacher Interview and ObservationsUploaded bygoshen99
- Kotler Pom15 Im 02Uploaded byMuhammad Umair
- Extreme Value Theory Introduction DeHaanFerreiraUploaded byxcavier
- Critical Approaches - Literary Theory PowerPointUploaded byMissGlen Dimalaluan Parilla
- Gulshan-i Raz Tr. WhinfieldUploaded byzernazan
- Waggin' Train - The Death of NikkiUploaded byJohn Sibley
- Tabel Panjang Gelombang -SPM1984Uploaded byIqbal Jatmiko Putra
- Action Research Basic Elements and StepsUploaded byFitria Fajriani

## Much more than documents.

Discover everything Scribd has to offer, including books and audiobooks from major publishers.

Cancel anytime.