Strategies for Optimised STG Decomposition Mark Schaefer 1 Walter - - PowerPoint PPT Presentation

strategies for optimised stg decomposition
SMART_READER_LITE
LIVE PREVIEW

Strategies for Optimised STG Decomposition Mark Schaefer 1 Walter - - PowerPoint PPT Presentation

Strategies for Optimised STG Decomposition Mark Schaefer 1 Walter Vogler 1 Ralf Wollowski 2 Victor Khomenko 3 1 Institute of Computer Science, University of Augsburg, Germany 2 Hasso-Plattner-Institute, Potsdam, Germany 3 School of Computing


slide-1
SLIDE 1

Strategies for Optimised STG Decomposition

Mark Schaefer1 Walter Vogler1 Ralf Wollowski2 Victor Khomenko3

1Institute of Computer Science, University of Augsburg, Germany 2Hasso-Plattner-Institute, Potsdam, Germany 3School of Computing Science, University of Newcastle upon Tyne, UK

ACSD 2006

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 1 / 18

slide-2
SLIDE 2

Overview

1 STG Decomposition

STGs Decomposition

2 New Decomposition Strategies

Contraction Reordering Lazy Backtracking Tree Decomposition Results

3 Future Research

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 2 / 18

slide-3
SLIDE 3

STGs

Signal Transition Graphs are Petri nets Transitions are labelled with signal edges Modell for asynchronous circuits Input signal edge activated → circuit is ready to receive it from the environment Output/internal signal edge activated → circuit must produce this signal edge

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 3 / 18

slide-4
SLIDE 4

STGs

Ri+ Ri− Ro+ Ai+ Ai− Ro−

inputs

  • utputs

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 4 / 18

slide-5
SLIDE 5

STGs

Ri+ Ri− Ro+ Ai+ Ai− Ro−

inputs

  • utputs

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 4 / 18

slide-6
SLIDE 6

STGs

Ri+ Ri− Ro+ Ai+ Ai− Ro−

inputs

  • utputs

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 4 / 18

slide-7
SLIDE 7

STGs

Ri+ Ri− Ro+ Ai+ Ai− Ro−

inputs

  • utputs

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 4 / 18

slide-8
SLIDE 8

Motivation for Decomposition

Synthesising a ciruit from an STG N

Generate the reachability graph R of N → state explosion Derive an equation for each output signal from R Effort more than linear in |R| Quadratic for the na¨ ıve approach Better methods work with BDDs or SAT-solving

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 5 / 18

slide-9
SLIDE 9

Motivation for Decomposition

Synthesising a ciruit from an STG N

Generate the reachability graph R of N → state explosion Derive an equation for each output signal from R Effort more than linear in |R| Quadratic for the na¨ ıve approach Better methods work with BDDs or SAT-solving

Decomposition approach

Split an STG into components, each producing a subset of outputs Perform synthesis for the components Advantage: Smaller reachability graphs Overall performance improvement

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 5 / 18

slide-10
SLIDE 10

Motivation for Decomposition

Synthesising a ciruit from an STG N

Generate the reachability graph R of N → state explosion Derive an equation for each output signal from R Effort more than linear in |R| Quadratic for the na¨ ıve approach Better methods work with BDDs or SAT-solving

Decomposition approach

Split an STG into components, each producing a subset of outputs Perform synthesis for the components Advantage: Smaller reachability graphs Overall performance improvement

During decomposition reachability graphs must not be generated!

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 5 / 18

slide-11
SLIDE 11

Decomposition Outline

For a specification N, choose a partition of the output signals For each subset produce an initial component

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 6 / 18

slide-12
SLIDE 12

Decomposition Outline

For a specification N, choose a partition of the output signals For each subset produce an initial component

Copy of N Includes outputs Some minimal set of additional signals as inputs Other signals are lambdarised

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 6 / 18

slide-13
SLIDE 13

Decomposition Outline

For a specification N, choose a partition of the output signals For each subset produce an initial component

Copy of N Includes outputs Some minimal set of additional signals as inputs Other signals are lambdarised

Reduce the components seperately and non-deterministicly

Contract λ-labelled transition Delete redundant places and transitions

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 6 / 18

slide-14
SLIDE 14

Decomposition Outline

For a specification N, choose a partition of the output signals For each subset produce an initial component

Copy of N Includes outputs Some minimal set of additional signals as inputs Other signals are lambdarised

Reduce the components seperately and non-deterministicly

Contract λ-labelled transition Delete redundant places and transitions

If neccessary, backtracking:

Go back to initial component Delambdarise additional signal Start again

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 6 / 18

slide-15
SLIDE 15

Decomposition Outline

N

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 7 / 18

slide-16
SLIDE 16

Decomposition Outline

N

λ

= ⇒ N0

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 7 / 18

slide-17
SLIDE 17

Decomposition Outline

N

λ

= ⇒ N0

t0

− → N1

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 7 / 18

slide-18
SLIDE 18

Decomposition Outline

N

λ

= ⇒ N0

t0

− → N1

t1

− → N2

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 7 / 18

slide-19
SLIDE 19

Decomposition Outline

N

λ

= ⇒ N0

t0

− → N1

t1

− → N2

t2

− → N3

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 7 / 18

slide-20
SLIDE 20

Decomposition Outline

N

λ

= ⇒ N0

t0

− → N1

t1

− → N2

t2

− → N3

t3

− → · · ·

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 7 / 18

slide-21
SLIDE 21

Decomposition Outline

N

λ

= ⇒ N0

t0

− → N1

t1

− → N2

t2

− → N3

t3

− → · · · Nk

tk

− →

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 7 / 18

slide-22
SLIDE 22

Decomposition Outline

N

λ

= ⇒ N0

t0

− → N1

t1

− → N2

t2

− → N3

t3

− → · · · Nk

tk

− → ⇓ a = sig(tk) N ′

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 7 / 18

slide-23
SLIDE 23

Decomposition Outline

N

λ

= ⇒ N0

t0

− → N1

t1

− → N2

t2

− → N3

t3

− → · · · Nk

tk

− → ⇓ a = sig(tk) N ′

t ′

− → N ′

1 t ′

1

− → · · ·

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 7 / 18

slide-24
SLIDE 24

Decomposition Outline

N

λ

= ⇒ N0

t0

− → N1

t1

− → N2

t2

− → N3

t3

− → · · · Nk

tk

− → ⇓ a = sig(tk) N ′

t ′

− → N ′

1 t ′

1

− → · · · N ′

m t ′

m

− →

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 7 / 18

slide-25
SLIDE 25

Decomposition Outline

N

λ

= ⇒ N0

t0

− → N1

t1

− → N2

t2

− → N3

t3

− → · · · Nk

tk

− → ⇓ a = sig(tk) N ′

t ′

− → N ′

1 t ′

1

− → · · · N ′

m t ′

m

− → ⇓ a′ = sig(t ′

m)

N ′′

t ′′

− → · · · . . .

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 7 / 18

slide-26
SLIDE 26

Decomposition Outline

N

λ

= ⇒ N0

t0

− → N1

t1

− → N2

t2

− → N3

t3

− → · · · Nk

tk

− → ⇓ a = sig(tk) N ′

t ′

− → N ′

1 t ′

1

− → · · · N ′

m t ′

m

− → ⇓ a′ = sig(t ′

m)

N ′′

t ′′

− → · · · . . . · · · · · · C

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 7 / 18

slide-27
SLIDE 27

Transition Contraction

p3 p4 p2 p1

Ia− Ack+ Ia+ Ro+ Ro+

λ

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 8 / 18

slide-28
SLIDE 28

Transition Contraction

p3 p4 p2 p1

Ia− Ack+ Ia+ Ro+ Ro+

λ

Ro+ Ack+

p1p3 p2p4 p1p4

Ro+ Ia+

p2p3

Ia−

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 8 / 18

slide-29
SLIDE 29

Backtracking

Backtracking is performed if no more λ-transition can be contracted, because the contraction . . . is not defined (loops, arcweight ≥2) . . . is not-secure (langugage changed) . . . generates structural auto-conflict

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 9 / 18

slide-30
SLIDE 30

Auto-Conflicts

p4 p1

Ack+

p2

Ro+ Ro+ Ia−

p3

Ia+

λ

Ack+

p

1p3

p2p4 p

1p4

p2p3

Ro+ Ro+ Ia+ Ia−

Structural auto-conflict

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 10 / 18

slide-31
SLIDE 31

Auto-Conflicts

p4 p1

Ack+

p2

Ro+ Ro+ Ia−

p3

Ia+

λ

Ack+

p

1p3

p2p4 p

1p4

p2p3

Ro+ Ro+ Ia+ Ia−

Dynamic auto-conflict

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 10 / 18

slide-32
SLIDE 32

New Decomposition Strategies

Contraction reordering Lazy backtracking Tree decomposition

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 11 / 18

slide-33
SLIDE 33

Contraction Reordering

Contraction of ‘good’ transitions produces few new places

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 12 / 18

slide-34
SLIDE 34

Contraction Reordering

Contraction of ‘good’ transitions produces few new places

λ

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 12 / 18

slide-35
SLIDE 35

Contraction Reordering

Contraction of ‘good’ transitions produces few new places Contraction of ‘bad’ transitions produces many new places

λ λ

9

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 12 / 18

slide-36
SLIDE 36

Contraction Reordering

Contraction of ‘good’ transitions produces few new places Contraction of ‘bad’ transitions produces many new places Observation: Contracting ‘good’ transtions first, results in smaller intermediate STGs (important for looking for redundant places)

λ λ

9

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 12 / 18

slide-37
SLIDE 37

Contraction Reordering

Contraction of ‘good’ transitions produces few new places Contraction of ‘bad’ transitions produces many new places Observation: Contracting ‘good’ transtions first, results in smaller intermediate STGs (important for looking for redundant places) Sometimes, contracting ‘bad’ transitions first results in bigger final STGs Therefore, contract ‘good’ transitions first

λ λ

9

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 12 / 18

slide-38
SLIDE 38

Lazy Backtracking

Contract transitions grouped by former signals After a signal was completely contracted save the intermediate result When backtracking, don’t start at the beginning

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 13 / 18

slide-39
SLIDE 39

Lazy Backtracking

Contract transitions grouped by former signals After a signal was completely contracted save the intermediate result When backtracking, don’t start at the beginning N

λ

= ⇒ N0

a0

− → · · · · · · Nj−1

aj−1

− → Nj

aj

− →

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 13 / 18

slide-40
SLIDE 40

Lazy Backtracking

Contract transitions grouped by former signals After a signal was completely contracted save the intermediate result When backtracking, don’t start at the beginning N

λ

= ⇒ N0

a0

− → · · · · · · Nj−1

aj−1

− → Nj

aj

− → ⇓ aj N ′

j

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 13 / 18

slide-41
SLIDE 41

Lazy Backtracking

Contract transitions grouped by former signals After a signal was completely contracted save the intermediate result When backtracking, don’t start at the beginning N

λ

= ⇒ N0

a0

− → · · · · · · Nj−1

aj−1

− → Nj

aj

− → ⇓ aj ⇓ aj N ′

j−1

N ′

j

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 13 / 18

slide-42
SLIDE 42

Lazy Backtracking

Contract transitions grouped by former signals After a signal was completely contracted save the intermediate result When backtracking, don’t start at the beginning N

λ

= ⇒ N0

a0

− → · · · Nk−1

ak−1

− → Nk

ak

− → · · · Nj−1

aj−1

− → Nj

aj

− → ⇓ aj ⇓ aj ⇓ aj N ′

k

N ′

j−1

N ′

j

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 13 / 18

slide-43
SLIDE 43

Lazy Backtracking

Contract transitions grouped by former signals After a signal was completely contracted save the intermediate result When backtracking, don’t start at the beginning N

λ

= ⇒ N0

a0

− → · · · Nk−1

ak−1

− → Nk

ak

− → · · · Nj−1

aj−1

− → Nj

aj

− → ⇓ aj ⇓ aj ⇓ aj N ′

k

N ′

j−1

N ′

j

⇓ ak N ′′

k

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 13 / 18

slide-44
SLIDE 44

Lazy Backtracking

Contract transitions grouped by former signals After a signal was completely contracted save the intermediate result When backtracking, don’t start at the beginning N

λ

= ⇒ N0

a0

− → · · · Nk−1

ak−1

− → Nk

ak

− → · · · Nj−1

aj−1

− → Nj

aj

− → ⇓ aj ⇓ aj ⇓ aj N ′

k

N ′

j−1

N ′

j

⇓ ak, aj ⇓ ak N ′

k−1

N ′′

k

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 13 / 18

slide-45
SLIDE 45

Lazy Backtracking

Contract transitions grouped by former signals After a signal was completely contracted save the intermediate result When backtracking, don’t start at the beginning N

λ

= ⇒ N0

a0

− → · · · Nk−1

ak−1

− → Nk

ak

− → · · · Nj−1

aj−1

− → Nj

aj

− → ⇓ aj ⇓ aj ⇓ aj N ′

k

N ′

j−1

N ′

j

⇓ ak, aj ⇓ ak N ′

k−1

N ′′

k

⇓ ak−1 N ′′

k−1

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 13 / 18

slide-46
SLIDE 46

Lazy Backtracking

Contract transitions grouped by former signals After a signal was completely contracted save the intermediate result When backtracking, don’t start at the beginning N

λ

= ⇒ N0

a0

− → · · · Nk−1

ak−1

− → Nk

ak

− → · · · Nj−1

aj−1

− → Nj

aj

− → ⇓ aj ⇓ aj ⇓ aj N ′

k

N ′

j−1

N ′

j

⇓ ak, aj ⇓ ak N ′

k−1

N ′′

k

⇓ ak−1 N ′′

k−1 −

→ · · ·

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 13 / 18

slide-47
SLIDE 47

Tree Decomposition

Components are generated separately even if they are similar (nearly the same signals should be contracted) Tree decomposition:

Group contractions by former signals (as for lazy backtracking) Find an appropriate order of contractions Reuse intermediate results

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 14 / 18

slide-48
SLIDE 48

Tree Decomposition

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 15 / 18

slide-49
SLIDE 49

Tree Decomposition 1 2 3 2 3 4 3 4 5

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 15 / 18

slide-50
SLIDE 50

Tree Decomposition 2 3

  • 1 2 3

2 3 4 3 4 5

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 15 / 18

slide-51
SLIDE 51

Tree Decomposition 3

  • 2 3
  • 1 2 3

2 3 4 3 4 5

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 15 / 18

slide-52
SLIDE 52

Tree Decomposition 3

  • 2 3
  • 1 2 3

2 3 4 3 4 5

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 15 / 18

slide-53
SLIDE 53

Tree Decomposition 3

  • 2 3
  • 1 2 3

2 3 4 3 4 5

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 15 / 18

slide-54
SLIDE 54

Tree Decomposition 3

  • 2 3
  • 1 2 3

2 3 4 3 4 5

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 15 / 18

slide-55
SLIDE 55

Tree Decomposition 3

  • 2 3
  • 1 2 3

2 3 4 3 4 5

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 15 / 18

slide-56
SLIDE 56

Tree Decomposition 3

  • 2 3
  • 1 2 3

2 3 4 3 4 5

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 15 / 18

slide-57
SLIDE 57

Tree Decomposition 3

  • 2 3
  • 1 2 3

2 3 4 3 4 5

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 15 / 18

slide-58
SLIDE 58

Results

tree random STG t (sec) size t (sec) size 2pp.arb.nch.9.csc 2 227 58 4939 2pp.arb.nch.9 2 198 71 2398 2pp.arb.nch.12.csc 6 275 158 3083 3pp.arb.nch.9 4 350 281 13198 3pp.arb.nch.12.csc e 14 537 627 7289 3pp.arb.nch.12 15 422 632 7142 (More results and detailed discussion in the paper)

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 16 / 18

slide-59
SLIDE 59

Results

In most cases all new strategies perform much better than basic decomposition In most cases the components get smaller for every strategy Especially tree decomposition reduces runtimes while producing small components

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 17 / 18

slide-60
SLIDE 60

Future Research

Decomposition is fast enough now → improve the quality of the results Combine tree decomposition with CSC solving Combine decomposition with Handshakecircuits, e.g. generated by Balsa

Mark Schaefer (University of Augsburg) STG Decomposition Strategies ACSD 2006 18 / 18