1 of 42

Enumerating All Boolean Matches

 

1

2 of 42

What is Boolean Matching?

  • Given two circuits, are they equivalent?

2

 

 

 

 

 

 

 

 

 

 

3 of 42

What is Boolean Matching?

 

3

 

 

 

 

 

 

 

 

1

 

 

0

4 of 42

What is Boolean Matching?

  • Given two circuits, are they matching (under permutation)?

4

 

 

 

 

 

 

 

 

 

 

5 of 42

What is Boolean Matching?

 

5

 

 

 

 

 

 

 

 

 

 

6 of 42

Our Motivation

 

6

7 of 42

Our Context

 

7

8 of 42

Previous Work - BooM

  • BooM: the only Boolean matching approach for enumerating all matches
  • We build upon BooM’s algorithm: the sifter – BooMS

  • BooMS uses two buckets (SAT Instances):
    • All Mappings – initialized with all the permutations (matches + mismatches)
    • Mismatches – initialized with only the mismatches
  • BooMS iteratively removes mismatches from “All Mappings” to get the matches
    • Each time, getting the next mismatch from the “Mismatches” bucket

8

[Lai, Jiang, Wang, ICCAD’10], [Lai, Jiang, Wang, DAC’10]

9 of 42

BooMS in High Level

9

All Mappings

(Mismatches and matches)

Mismatches Bucket

SAT instance

SAT instance

mismatches

mappings

10 of 42

BooMS in High Level

10

All Mappings

(Mismatches and matches)

Mismatches Bucket

SAT instance

SAT instance

mismatches

mappings

mismatch

11 of 42

BooMS in High Level

11

All Mappings

(Mismatches and matches)

Mismatches Bucket

SAT instance

SAT instance

mismatches

Generalization

mappings

multiple mismatches

mismatch

12 of 42

BooMS in High Level

12

All Mappings

(Mismatches and matches)

Mismatches Bucket

SAT instance

SAT instance

mismatches

Generalization

Block Mismatches

mappings

mismatch

multiple mismatches

13 of 42

BooMS in High Level

13

Mismatches Bucket

SAT instance

SAT instance

mismatches

mappings

All Matches!

 

No more mismatches!

14 of 42

BooMS in High Level

14

Mismatches Bucket

SAT instance

SAT instance

mismatches

mappings

All Matches!

Enumerate all matches

15 of 42

BooMS Limitations

The strength on BooMS lays in blocking multiple mismatches together

However:

  • Still needs to enumerate all the matches one-by-one
  • Generalization for NP-Equivalence is “outdated”
  • No generalization for P-Equivalence (with a good reason)

15

16 of 42

Our Contributions

  • Two new algorithms:
    • New picker algorithm EBatP that captures & block many matches at once
    • New “sift-and-pick” algorithm EBatC combining BooMS + EBatP
  • Better generalization for P- and NP-Equivalence:
    • Using new generalization techniques for NP-Equivalence
    • Brand new generalization for P-Equivalence
  • Novel mismatch-blocking for P-Equivalence
  • Open-source tool EBat, solves 3-4x more instances than BooMS (P/NP-Eq.)
    • BooMS reimplemented in EBat as the original wouldn’t work

16

17 of 42

Reusing BooM’s SAT Encoding

 

17

18 of 42

EBatP (Picker)

18

All Mappings

(Mismatches and matches)

Miter

(SAT instance)

19 of 42

EBatP (Picker)

19

All Mappings

(Mismatches and matches)

 

UnSAT(match)

SAT (mismatch)

Next map

Miter

(SAT instance)

20 of 42

EBatP (Picker)

20

All Mappings

(Mismatches and matches)

UnSAT(match)

SAT (mismatch)

New generalization

(P/NP-Equivalence)

 

New mismatch blocking

(P-Equivalence)

 

Next map

Miter

(SAT instance)

Performance breakthrough for P-Equivalence!

21 of 42

EBatP (Picker)

21

All Mappings

(Mismatches and matches)

UnSAT(match)

SAT (mismatch)

Strengthening(Core)

 

Block Match

Report

 

Next map

Miter

(SAT instance)

Performance breakthrough

for P/NP-Equivalence!

22 of 42

EBatP (Picker)

22

All Mappings

(Mismatches and matches)

 

No more mappings!

23 of 42

EBatC in High-Level

23

EBatP

All Mappings

(Mismatches and matches)

All Matches!

BooMS

24 of 42

EBatC vs EBatP

 

24

8/12/2025

25 of 42

Generalization in Boolean Matching

 

25

8/12/2025

[Fried, Nadel, Sebastiani, Shalmon, SAT’24]

26 of 42

Generalization under NP-Equivalence

26

8/12/2025

 

 

 

 

 

 

 

 

 

 

 

1

0

27 of 42

Generalization under NP-Equivalence

27

8/12/2025

Generalization

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

0

28 of 42

Generalization under P-Equivalence

 

28

8/12/2025

29 of 42

Experimental Results

  • In total, we tested 388 benchmarks originating from:
    • ITC’99 (used in BooM paper)
    • ICCAD’23 Contest
    • EPFL + ISCAS’85
  • We split multi-output circuits into single-output instances
  • We evaluated:
    • Solved instances (Timeout of 60s)
    • PAR-2 score (Run-time if solved; 2*Timeout if not solved)

  • We use IntelSAT for all SAT queries and CaDiCaL for UnSAT core extraction

29

30 of 42

Results

30

Algorithm

Witness-Extension

Strength(core)

Solved

PAR-2

NP-Equivalence

EBatC

BTS & MUC (new)

327

686

EBatC

BTS (baseline)

308

2932

EBatC

BTS & MUC (new)

99

27826

BooMS

BTS (baseline)

86

29466

New

P-Equivalence

EBatC

Alternation (new)

329

871

EBatC

Alternation (new)

115

26232

EBatC

None (baseline)

106

27460

BooMS

None (baseline)

90

29348

New

31 of 42

Results

31

Algorithm

Witness-Extension

Strength(core)

Solved

PAR-2

NP-Equivalence

EBatC

BTS & MUC (new)

327

686

EBatC

BTS (baseline)

308

2932

EBatC

BTS & MUC (new)

99

27826

BooMS

BTS (baseline)

86

29466

P-Equivalence

EBatC

Alternation (new)

329

871

EBatC

Alternation (new)

115

26232

EBatC

None (baseline)

106

27460

BooMS

None (baseline)

90

29348

32 of 42

Results

32

Algorithm

Witness-Extension

Strength(core)

Solved

PAR-2

NP-Equivalence

EBatC

BTS & MUC (new)

327

686

EBatC

BTS (baseline)

308

2932

EBatC

BTS & MUC (new)

99

27826

BooMS

BTS (baseline)

86

29466

P-Equivalence

EBatC

Alternation (new)

329

871

EBatC

Alternation (new)

115

26232

EBatC

None (baseline)

106

27460

BooMS

None (baseline)

90

29348

33 of 42

Conclusion & Future Work

  • We presented EBat, an open-source tool for All Boolean Matching:
    • New high-level algorithms and critical subroutines
    • Solves 3-4x more benchmarks than the baseline

Future work:

  • Handle multiple outputs and sequential circuits
  • Implement circuit preprocessing techniques

33

34 of 42

Thank you for listening

Questions?

35 of 42

Results

35

36 of 42

EBatC in High Level

36

All Mappings

(Mismatches and matches)

Mismatch Bucket

Miter

Generalization

 

 

Block Mis

EBatP

BoomS High-Level Flow

37 of 42

How BooMS works:

37

All Mappings

(Mismatches and matches)

Mismatches Bucket

Miter

38 of 42

How BooMS works:

38

All Mappings

(Mismatches and matches)

Mismatches Bucket

Miter

 

Next mismatch

39 of 42

How BooMS works:

39

All Mappings

(Mismatches and matches)

Mismatches Bucket

Miter

Generalization

 

 

Next mismatch

40 of 42

How BooMS works:

40

All Mappings

(Mismatches and matches)

Mismatches Bucket

Miter

Generalization

 

Block Mismatches

 

Next mismatch

41 of 42

How BooMS works:

41

All Matches!

Mismatches Bucket

Miter

 

No more mismatches!

42 of 42

How BooMS works:

42

Mismatches Bucket

Miter

 

Next ; Report

Block Match

All Matches!