Synthesis of Petri Nets Free-choice PN. Transition System. Burst-mode automata Model transformation. State encoded. Synthesis of asynchronous circuits

Similar documents
CS 491G Combinatorial Optimization Lecture Notes

Lecture 11 Binary Decision Diagrams (BDDs)

Counting Paths Between Vertices. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs

A Region-based Algorithm for Discovering Petri Nets from Event Logs

Lecture 6: Coding theory

CS 2204 DIGITAL LOGIC & STATE MACHINE DESIGN SPRING 2014

Necessary and sucient conditions for some two. Abstract. Further we show that the necessary conditions for the existence of an OD(44 s 1 s 2 )

Engr354: Digital Logic Circuits

2.4 Theoretical Foundations

Implication Graphs and Logic Testing

The DOACROSS statement

Nondeterministic Finite Automata

Unfoldings of Networks of Timed Automata

Automata and Regular Languages

I 3 2 = I I 4 = 2A

EE 108A Lecture 2 (c) W. J. Dally and P. Levis 2

Computing all-terminal reliability of stochastic networks with Binary Decision Diagrams

Particle Physics. Michaelmas Term 2011 Prof Mark Thomson. Handout 3 : Interaction by Particle Exchange and QED. Recap

NON-DETERMINISTIC FSA

Solutions for HW9. Bipartite: put the red vertices in V 1 and the black in V 2. Not bipartite!

Technology Mapping Method for Low Power Consumption and High Performance in General-Synchronous Framework

Petri Nets. Rebecca Albrecht. Seminar: Automata Theory Chair of Software Engeneering

Nondeterministic Automata vs Deterministic Automata

Behavior Composition in the Presence of Failure

CS311 Computational Structures Regular Languages and Regular Grammars. Lecture 6

Technische Universität München Winter term 2009/10 I7 Prof. J. Esparza / J. Křetínský / M. Luttenberger 11. Februar Solution

Laboratory for Foundations of Computer Science. An Unfolding Approach. University of Edinburgh. Model Checking. Javier Esparza

Automatic Synthesis of New Behaviors from a Library of Available Behaviors

CIT 596 Theory of Computation 1. Graphs and Digraphs

22: Union Find. CS 473u - Algorithms - Spring April 14, We want to maintain a collection of sets, under the operations of:

CSE 332. Sorting. Data Abstractions. CSE 332: Data Abstractions. QuickSort Cutoff 1. Where We Are 2. Bounding The MAXIMUM Problem 4

A Disambiguation Algorithm for Finite Automata and Functional Transducers

Exam Review. John Knight Electronics Department, Carleton University March 2, 2009 ELEC 2607 A MIDTERM

CS 573 Automata Theory and Formal Languages

A Primer on Continuous-time Economic Dynamics

Compression of Palindromes and Regularity.

Unit 4. Combinational Circuits

System Validation (IN4387) November 2, 2012, 14:00-17:00

On a Class of Planar Graphs with Straight-Line Grid Drawings on Linear Area

Mid-Term Examination - Spring 2014 Mathematical Programming with Applications to Economics Total Score: 45; Time: 3 hours

= state, a = reading and q j

Now we must transform the original model so we can use the new parameters. = S max. Recruits

CARLETON UNIVERSITY. 1.0 Problems and Most Solutions, Sect B, 2005

Hybrid Systems Modeling, Analysis and Control

Logic, Set Theory and Computability [M. Coppenbarger]

Data Structures LECTURE 10. Huffman coding. Example. Coding: problem definition

specication language which is used to describe the behavior of the protocol functions.

Surds and Indices. Surds and Indices. Curriculum Ready ACMNA: 233,

1 PYTHAGORAS THEOREM 1. Given a right angled triangle, the square of the hypotenuse is equal to the sum of the squares of the other two sides.

Model Reduction of Finite State Machines by Contraction

On the Spectra of Bipartite Directed Subgraphs of K 4

Lecture 2: Cayley Graphs

Minimal DFA. minimal DFA for L starting from any other

for all x in [a,b], then the area of the region bounded by the graphs of f and g and the vertical lines x = a and x = b is b [ ( ) ( )] A= f x g x dx

Transition systems (motivation)

Test Generation from Timed Input Output Automata

Behavior Composition in the Presence of Failure

18.06 Problem Set 4 Due Wednesday, Oct. 11, 2006 at 4:00 p.m. in 2-106

If the numbering is a,b,c,d 1,2,3,4, then the matrix representation is as follows:

where the box contains a finite number of gates from the given collection. Examples of gates that are commonly used are the following: a b

2 TO APPEAR IN THE APR. 999 ISSUE OF IEEE TRANSACTIONS ON AUTOMATIC CONTROL tiulrly interesting for the suessive evlution of lrge numer of sheules. Fo

C. C^mpenu, K. Slom, S. Yu upper boun of mn. So our result is tight only for incomplete DF's. For restricte vlues of m n n we present exmples of DF's

m2 m3 m1 (a) (b) (c) n2 n3

CS261: A Second Course in Algorithms Lecture #5: Minimum-Cost Bipartite Matching

Lecture 6. CMOS Static & Dynamic Logic Gates. Static CMOS Circuit. PMOS Transistors in Series/Parallel Connection

On the Revision of Argumentation Systems: Minimal Change of Arguments Status

Project 6: Minigoals Towards Simplifying and Rewriting Expressions

Algebra 2 Semester 1 Practice Final

CSC2542 State-Space Planning

Factorising FACTORISING.

Metodologie di progetto HW Technology Mapping. Last update: 19/03/09

Lecture 8: Abstract Algebra

Finite State Automata and Determinisation

Convert the NFA into DFA

Section 2.3. Matrix Inverses

A Short Introduction to Self-similar Groups

Subsequence Automata with Default Transitions

Momentum and Energy Review

COMPUTING THE QUARTET DISTANCE BETWEEN EVOLUTIONARY TREES OF BOUNDED DEGREE

Numbers and indices. 1.1 Fractions. GCSE C Example 1. Handy hint. Key point

INTRODUCTION TO AUTOMATA THEORY

F / x everywhere in some domain containing R. Then, + ). (10.4.1)

Coalgebra, Lecture 15: Equations for Deterministic Automata

Lecture Notes No. 10

Introduction to Olympiad Inequalities

Analysis of Temporal Interactions with Link Streams and Stream Graphs

(Lec 9) Multi-Level Min III: Role of Don t Cares

Discrete Structures Lecture 11

SOME COPLANAR POINTS IN TETRAHEDRON

arxiv: v2 [math.co] 31 Oct 2016

Section 2.1 Special Right Triangles

Proportions: A ratio is the quotient of two numbers. For example, 2 3

University of Sioux Falls. MAT204/205 Calculus I/II

Coding Techniques. Manjunatha. P. Professor Dept. of ECE. June 28, J.N.N. College of Engineering, Shimoga.

Common intervals of genomes. Mathieu Raffinot CNRS LIAFA

Logic Synthesis and Verification

Symbolic Automata for Static Specification Mining

Solutions to Problem Set #1

LIP. Laboratoire de l Informatique du Parallélisme. Ecole Normale Supérieure de Lyon

The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER MACHINES AND THEIR LANGUAGES ANSWERS

Transcription:

Petrify: tool for mnipulting onurrent speitions n synthesis of synhronous ontrollers Jori Cortell, Univ. Politeni e Ctluny, Brelon, Spin Mihel Kishinevsky, Alex Konrtyev, The University of Aizu, Jpn Luino Lvgno, Politenio i Torino, Itly Alex Ykovlev, University of Newstle upon Tyne, Unite Kingom Astrt Petrify is tool for (1) mnipulting onurrent speitions n (2) synthesis n optimiztion of synhronous ontrol iruits. Given Petri Net (PN), Signl Trnsition Grph (STG), or Trnsition System (TS) 1 it (1) genertes nother PN or STG whih is simpler thn the originl esription n (2) proues n optimize net-list of n synhronous ontroller in the trget gte lirry while preserving the speie input-output ehvior. An ility of k-nnotting to the speition level helps the esigner to ontrol the esign proess. For trnsforming speition petrify performs token ow nlysis of the initil PN n proues trnsition system (TS). In the initil TS, ll trnsitions with the sme lel re onsiere s one event. The TS is then trnsforme n trnsitions relele to fulll the onitions require to otin sfe irreunnt PN. For synthesis of n synhronous iruit petrify performs stte ssignment y solving the Complete Stte Coing prolem. Stte ssignment is ouple with logi minimiztion n spee-inepenent tehnology mpping to trget lirry. The nl net-list is gurntee to e spee-inepenent, i.e., hzr-free uner ny istriution of gte elys n multiple input hnges stisfying the initil speition. The tool hs een use for synthesis of PNs n PNs omposition, synthesis n re-synthesis of synhronous ontrollers n n e lso pplie in res relte with the nlysis of onurrent progrms. This pper provies n overview of petrify n the theory ehin its min funtions. 1 Introution Petri nets [31, 28] re wiespre formlism to moel onurrent systems. By leling trnsitions with symols from given lphet, trnsitions n e interprete s the ourrene of events or the exeution of tsks in system. Lele Petri Nets hve een use in numerous pplitions: esign n speitions of synhronous iruits [34, 7, 23, 20], resoure llotion prolem in operting systems n istriute omputtion [35], nlysis of onurrent progrms [32], performne nlysis n timing verition [19, 33], high-level esign [16]. Petri Nets re populr ue to their inherent ility to express oth onurrent n non-eterministi ehvior. Stte-se moels re ommon lnguges for forml speition n verition of omplex systems (FSMs [15, 22], Burst moe utomt [30]). Even the forml opertionl semntis for most of the event-se moels (CSP [18], CCS [24, 25]) is given y mens of sttes. The rwk 1 Trnsition system is irete grph with verties lele s sttes n rs lele with events. Trnsition system n e viewe s n strt stte grph. 1

of stte-se moels is tht they represent uslity, onurreny n onit reltions etween events in terms of stte sequenes or stte ongurtions (e.g., stte imons). This is n unesirle hrteristi for the esigner, who lwys wnts suint representtions of system tht expliitly represent its properties. Therefore, it is very importnt to ientify, strting from t stte-se representtion, the set of uslity reltions, onurrent events n onit onitions impliit in the representtion itself, euse they rry useful informtion for the esigner or/n esign lgorithms. Tool petrify implements metho whih, given nite stte moel, lle Trnsition System (TS) in the sequel, synthesizes sfe Petri Net with rehility grph tht is isimilr to the originl TS. In prtiulr, the rehility grph n e either isomorphi to the originl TS or isomorphi to minimize version of the originl TS. The synthesize PN is lwys pleirreunnt, i.e., it is not possile to remove ny ple from the net without hnging its ehvior. The synthesis tehnique is se on onstruting regions. A region in TS is set of sttes orresponing to ple in PN. Trnsitions in n out of this set of sttes \mimi" the PN ring ehvior (whih un-mrks preeessor ples n mrks suessor ples of trnsition). The notion of regions ws introue in [17] (n evelope in [29, 1, 3, 14, 26]) s si intermeite ojet etween stte-se n event-se speitions. This ppers hve een limite with the so-lle lss of elementry TSs whih llow for PN representtion with uniquely lele trnsitions (eh event hs only one ourrene in the PN). We hve shown [11] how theory of regions n e eiently use for synthesizing ple-irreunnt n ple-miniml PNs for elementry n non-elementry TSs. FSM CSP CCS Stte Grphs Petri Nets Synthesis of Petri Nets Trnsition System Free-hoie PN Sfe Petri Net Irreunnt PN Burst-moe utomt Moel trnsformtion gte lirries Stte enoe Trnsition System Asynhronous iruit (net-list) Synthesis of synhronous iruits Figure 1: Petrify's frmework for mnipulting speitions n for esigning of synhronous iruits 2

The metho for synthesis of PNs provies tehnique for trnsforming speitions. Given moel whih n e mppe into TS, we n erive PN whih is isimilr to the initil moel of the proess. In suh wy we n rete tool whih utomtilly trnsltes CSP, CCS, FSM, Burst-moe mhines n other moels into lele Petri Nets. Also, we n use this tool for the trnsformtion of Petri Nets ime t optimlity uner some riterion (ple ount, trnsition ount, numer of ples, PN grph omplexity, et.) or for eriving net elonging to given lss (pure, free hoie, unique hoie, et.). Suh n intertive tool llows esigner to ply with PN-like speition, performing equivlent trnsformtions of PNs, n/or trnsformtions of other speitions into PNs uner ierent esign onstrints n optimiztion riteri. Fig. 1 shows our frmework for synthesizing PNs n trnsforming speitions. In [8, 10, 9] we show tht regions re tightly onnete with the set of properties tht must e preserve ross the stte enoing n tehnology mpping proess for synhronous iruits. Hene, regions n their intersetions n e eiently use for stte signl insertion. Therefore, sets of sttes whih orrespon to ples (n trnsitions) of PNs re useful for eient synthesis tehniques of igitl iruits. For synthesis of synhronous iruits petrify performs stte ssignment y solving the Complete Stte Coing prolem [7, 23]. Stte ssignment is ouple with logi minimiztion n spee-inepenent tehnology mpping to trget lirry (Fig. 1). The nl net-list is gurntee to e spee-inepenent, i.e., hzr-free uner ny istriution of gte elys n multiple input hnges stisfying the initil speition. This pper is further orgnize s follows. Setion 2 esries wht petrify n o in more etils. Setion 3 esries how petrify mnipultes onurrent speitions. Setion 4 shows to synthesize synhronous ontrol iruits with petrify. Setion 5 onlues the pper n shows iretions for the future evelopment of the tool. 2 Wht is Petrify 2.1 Mnipulting PNs n TSs Petrify hs two si funtions tht llow mnipulting onurrent speitions: Synthesis of sfe Petri Nets or Signl Trnsition Grphs from given Trnsition System. STGs re PNs with trnsitions interprete s hnges of the iruit signls. They re wiely use in esign of synhronous iruits. TSs re strt stte grphs with lele rs. Stte Grphs re inry enoe TSs. An exmple of the trnsformtion performe y Petrify is shown in Fig. 2. Re-synthesis of Petri Nets n Signl Trnsition Grphs. Behvior-preserving trnsformtion of PNs n e ime t optimlity uner some riterion (ple ount, trnsition ount, numer of ples, PN grph omplexity, et.) or t eriving net elonging to given lss (sfe, Free-Choie, Unique-Choie, et.). Given oune PN (possily with weighte rs n inhiitor rs) petrify will generte n equivlent sfe ple-irreunnt PN. For exmple, given PN in Fig. 3(), whih orrespons to TS from Fig. 3() petrify will proue s n output ple-irreunnt (n pleminiml) sfe PN shown in Fig. 3(). 2.2 Synthesis of synhronous iruits 3

g g g ) e h e h f j f j Figure 2: Synthesis of PN s1 r0 r2 r0 r2 s2 s3 s4 e f s5 s6 s7 r3 r6 e r1 r8 r4 r7 f r5 r3 e r1 r8 r4 r7 f () () () Figure 3: () Trnsition system. () Miniml sturte n () ple-irreunnt nets. A user view of the iruit synthesis is illustrte y the exmple shown in Fig. 4. Given n initil STG speition (the left prt of the gure), the tool relizes tht the immeite onstrution of net-list is not possile. Inee, the property of Complete Stte Coing is not stise: ierent sttes of the system re enoe with the sme inry oe lthough they imply ontritory next vlues for t lest one of the output signls. To resolve this stte onit petrify utomtilly inserts new stte signl (s0). Trnsitions of this stte signl (s0? n s0+) re inserte in suh wy tht the resulting logi is optimize oring to selete ost-funtion. After inserting this stte signl no stte onits exists in the system n spee-inepenent iruit n e onstrute with C-elements 2 n omplex gtes (in the mile). However, these omplex gtes my not e ville in the gte lirry. Assume, for exmple, tht the lirry ontins only simple gtes with 2 inputs n C-elements. In suh se, petrify will utomtilly perform omintionl n sequentil eomposition of the logi, preserving spee-inepenent 2 C-element is n synhronous lth with next funtion = + +, where ; re inputs to the lth n is its output. 4

mp1+ mp3- x+ mp5+ + - x- y+ x+ y- y+ + + s0+ y- - - mp4+ mp5- mp3+ x- - y+ x+ y- x- mp1- s0- s0- - - y- s0+ x- - + y- + x- + + + + - y+ x- mp2+ mp2- x+ y- mp4- y+ x+ y+ x+ - No iruit (inomplete stte enoing) s0 s0 x Complex gtes x C y C mp1 s0 s0 mp2 mp4 s0 mp1 mp5 x y mp3 mp1 s0 C s0 C s0 Figure 4: Stte enoing n tehnology mpping properties n striving to minimize the logi. The nl logi net-list for this lirry n the orresponing Signl Trnsition Grph will e utomtilly erive y the tool (Fig. 4, the right prt). 3 Theory ehin Petrify The theory ehin petrify is presente in [11, 12]. Petrify strives to minimize the numer of ples, in orer to mke the nl Petri Net more unerstnle y the esigner. It either genertes 5

omplete set of miniml regions (whih re nlogous to prime implints in Boolen minimiztion) or further removes reunnt regions (whih is similr to generting prime irreunnt over in Boolen minimiztion). In the initil TS, ll trnsitions with the sme lel re onsiere s one event. Petrify solves the prolem of merging n splitting \equivlent" lels, i.e., those lels whih moel the sme event, ut must e split in orer to yiel vli Petri Net. Therefore, the synthesis metho is not limite to elementry TSs, whih re quite restrite; we n hnle the full lss of TSs y mens of lel splitting. In the following setions we will riey n informlly review the theory ehin petrify. 3.1 Bsi moels: Petri Nets n Trnsition Systems Informlly, TS ([29]) n e represente s n r-lele irete grph. A simple exmple of TS is shown in Fig.2 (the left prt). A TS is lle eterministi if for eh stte s n eh lel there n e t most one stte s 0 suh tht s! s 0. A TS is lle ommuttive if whenever two tions n e exeute from some stte in ny orer, then their exeution lwys les to the sme stte, regrless of the orer. For the purpose of synthesis of synhronous iruits we re minly intereste only in eterministi n ommuttive TSs. A Petri Net is quruple N = (P; T; F; m 0 ), where P is nite set of ples, T is nite set of trnsitions, F (P T ) [ (T P ) is the ow reltion, n m 0 is the initil mrking. A trnsition t 2 T is enle t mrking m 1 if ll its input ples re mrke. An enle trnsition t my re, prouing new mrking m 2 with one less token in eh input ple n one more t token in eh output ple (enote m 1! m 2 ). The right hlf of Fig.2 presents PN expressing the sme ehvior s the TS shown in the left hlf of the sme gure. Tokens represent the initil mrking whih orrespons to the top left stte of the TS. The set of ll mrkings rehle in N from the initil mrking m 0 is lle its Rehility Set. The grph with verties orresponing to the mrkings of PN n with rs onneting mrkings rehle in one trnsition is lle the Rehility Grph (RG) of the PN. A Signl Trnsition Grph (STG, [6, 34]) is Petri net with trnsitions lele with up n own trnsitions of signls (enote y x + n x? for signl x). A PN is lle sfe if no more thn one token n pper in ple in ny rehle mrking, free-hoie if for eh ple p with more thn one output trnsition eh of this trnsitions hs extly one input ple { ple p, i.e., the enling onition of oniting trnsitions epens only on the mrking of single ple. ple-irreunnt if removing ny ple from the PN will hnge the set of possile sequenes of ring trnsitions (i.e., ehvior of the net will e isture). A PN in Fig.2 is sfe, free-hoie n ple-irreunnt. 3.2 Regions n Exittion Regions Let S 1 e suset of the sttes of TS, S 1 S. If s 62 S 1 n s 0 2 S 1, then we sy tht trnsition s! s 0 enters S 1. If s 2 S 1 n s 0 62 S 1, then trnsition s! s 0 exits S 1. Otherwise, trnsition s! s 0 oes not ross S 1. A region is suset of sttes with whih ll trnsitions lele 6

with the sme event e hve extly the sme \entry/exit" reltion. This reltion will eome the preeessor/suessor reltion in the Petri net. Let us onsier the TS shown in Fig.3(). The set of sttes r 2 = fs 2 ; s 3 ; s 5 g is region, sine ll trnsitions lele with n with enter r 2, n ll trnsitions lele with exit r 2. Trnsitions lele with o not ross r 2. On the other hn, fs 2 ; s 3 g is not region sine trnsition s 3! s 4 enters this set, while nother trnsition lso lele with, s 5! s 6, oes not. A region r is pre-region of event e if there is trnsition lele with e whih exits r. A region r is post-region of event e if there is trnsition lele with e whih enters r. The set of ll pre-regions n post-regions of e is enote with e n e respetively. While regions in TS re relte to ples in the orresponing PN, n exittion region for event is mximl set of sttes in whih trnsition is enle. Therefore, exittion regions re relte to trnsitions of the PN. More formlly, set of sttes is lle generlize exittion region (enote y GER()) for event if it is mximl set of sttes ( set of sttes with given property is mximl if it is not suset of ny other set with this property) suh tht for every stte s 2 GER() there is trnsition s!. Sometimes it is more onvenient to onsier onnete susets of GERs. A set of sttes is lle n exittion region (enote y ER j ()) if it is mximl onnete set of sttes suh tht for every stte s 2 ER j () there is trnsition s!. Sine ny event n hve severl seprte ERs, n inex j is use to istinguish etween ierent onnete ourrenes of in the TS. In the TS from Fig.3() there re two exittion regions for event : ER 1 () = fs 3 g n ER 2 () = fs 5 g, while GER() = fs 3 ; s 5 g. 3.3 Deriving PNs se on the exittion losure Given set of ll miniml regions ( region is lle miniml if it is not superset of ny other region) let us uil PN following four rules: For eh event e of the TS trnsition lele with e is generte in the PN; For eh miniml region r ple r is generte; Ple r ontins token in the initil mrking i the orresponing region r ontins the initil stte of the TS; The ow reltion of the PN is s follows: trnsition lele with e is n output trnsition for ple r i r is pre-region of event e in the TS n e is n input trnsition of r i region r is post-region of e. As shown in [11], if the following two onitions hol then PN erive y the four rules ove is isimilr to the originl TS. Bisimilr [25] mens tht ehvior of the TS n the PN nnot e istinguishe y the externl oserver who n only see the events of these two moels. Exittion losure: For eh event e the intersetion of pre-regions is equl to its generlize exittion region. Event eetiveness: For eh event e there is t lest one pre-region. Moreover, one my remove regions still preserving ehvior of the PN until exittion losure is violte. By removing regions from the set of ll miniml regions while still keeping the exittion losure onition petrify genertes ple-irreunnt PN. By further merging of the miniml regions ple-miniml net n e generte. 7

GER()={s2,s5} : exit, out s1 exit s3,s6 no ross s1,s7 s1 s7 s2 s3 s5 s6 {s2,s3,s5,s6} is region {s1,s2,s5,s7} : enter, in, out : enter, in, out no ross s4 {s1,s2,s4,s5,s7} : enter, in s7 s2 1 s3 1 s5 s6 2 s4 () () no ross s3,s6 {s1,s2,s3,s4,s5,s6,s7} is region 2 s4 () r1 r3 r4 s1 s2 s5 (1) r5 s3 s6 () r2 (2) s4 (e) Figure 5: () TS, () expnsion tree for pre-regions of event, () exittion lose TS, () PN, (e) rehility grph of the PN 3.4 Generting miniml regions n lel splitting The set of miniml pre-regions of n event e is lulte y grully expning its generlize exittion region to otin sets of sttes tht o not violte the \entry-exit" reltionship. When the exittion losure is not fullle, i.e. \ r 6= GER(e) r2 some events must e split to stisfy this onition. The strtegy to split events is expline y the exmple shown in Fig.5 for the pre-regions of event. Initilly, GER() = fs 2 ; s 5 g is tken for expnsion. Event violtes the region onitions, sine two trnsitions lele with exit fs 2 ; s 5 g n two other trnsitions lele with re outsie fs 2 ; s 5 g. Next, two possile legliztions for event re onsiere: Two input sttes for trnsitions of, whih re not yet inlue into the onstrute set of sttes, s3 n s6, re e into the set. Now event exits set fs 2 ; s 3 ; s 5 ; s 6 g. Sine no other violtions of region onitions re foun this set is region. Two output sttes for trnsitions of, fs 1 ; s 7 g, whih re not yet inlue into the set re e to the set in the ttempt to mke non-rossing. This ttempt fils sine more 8

violtions of the region onitions re foun n further expnsions re pplie until ll rnhes of the serh tree n region. The exmple illustrtes how ll rnhes will eventully e prune, in the worst se, when overing the whole set of sttes. Let us ll r 0 the intersetion of the regions foun in the expnsion. We hve r 0 = fs 1 ; s 2 ; s 3 ; s 4 ; s 5 ; s 6 ; s 7 g \ fs 2 ; s 3 ; s 5 ; s 6 g = fs 2 ; s 3 ; s 5 ; s 6 g The strtegy for lel splitting will tke ll those explore sets r suh tht fs 2 ; s 5 g r r 0 All three sttes explore efore ning regions re goo nites. However, the set fs 2 ; s 5 g is the est one y the ft tht only one event violtes the rossing onitions n it mkes the intersetion of pre-regions smller (loser to GER). Thus, event is split into two new events ( 1 n 2 ) for fs 2 ; s 5 g to eome region. The new TS is equivlent to the originl (up to renming of the split events). The orresponing PN is shown in Fig.5() n its RG in Fig.5(e). Note tht it ontins one stte less thn the originl TS, ue to the impliit minimiztion for equivlent sttes s4 n s7 (sttes s4 n s7 re equivlent sine there is only one output trnsition for eh of them, lele with, n eh of these trnsitions enter stte s1). 3.5 Internl representtion of the ojets p3 p4 t mrking: p 1 p 2 p 3 p 4 p 5 p1 p2 p5 region, set of sttes: p 1, p 2 p 5 ow reltion (for t): (p 2 p 5 p 3 p 4 ) (q 2 q 5 q 3 q 4 ) (p 1, q 1 ) Figure 6: Symoli representtion of Petri net ojets in petrify The propose metho requires ro explortion of sets of sttes of TS. Moreover, opertions suh s intersetion, inlusion n equlity mong the explore sets must e exeute often. An eient representtion of the TS n its sttes is thus ruil to ope with the omplexity of suh opertions. Given n pproprite enoing of the sttes of the TS, we hve hosen to use Orere Binry Deision Digrms [4] to represent sets of sttes (y mens of hrteristi funtions) n the TS (y mens of the isjuntion of trnsition reltions, one for eh lel). The lgorithms to mnipulte the sets of sttes of the TS re se on symoli tehniques for verition of sequentil mhines [13]. For eriving TS from the initil PN petrify performs token ow nlysis of the initil STG n proues trnsition system in symoli form, using Binry Deision Digrms. The ltter represent oolen hrteristi funtions of mrkings, sttes, sets of sttes n the ow reltion s shown in Fig.6. 9

4 Theory ehin synhronous iruit synthesis 4.1 Asynhronous iruits n spee-inepenene An synhronous iruit is n ritrry interonnetion of logi gtes suh tht no two gte outputs re onnete together ([36, 27]). Eh logi gte is hrterize y Boolen eqution esriing the gte output s funtion of the gte inputs n (if the gte is sequentil, rther thn omintionl) of the gte output. The ehvior of iruit n e ompletely hrterize y using TS with one stte for eh Boolen vetor representing the vlues of the gte outputs n of the primry inputs of the iruit (olletively lle signls). An exmple of n synhronous iruit is given in Fig. 4. Roughly speking, iruit is ene to e spee-inepenent if its ehvior remins orret uner ny hnges of gte elys. No hzrs re possile in spee-inepenent iruits uner ny input hnges (possily multiple input hnges in non-funmentl moe) [23, 20]. 4.2 Property-preserving event insertion Event insertion is informlly seen s n opertion on TS whih selets suset of sttes, splits eh stte in it into two sttes n retes, on the sis of these new sttes, n exittion n swithing region for new event. Fig. 7 shows the hosen insertion sheme, nlogous to tht use y most uthors in the re, in the three min ses of insertion with respet to the position of the sttes in the insertion set, enote ER(x) (entrne to, exit from or insie ER(x)). SR(x) x x x x ER(x) ER(x) S ER(x) S ER(x) Figure 7: Event insertion sheme Stte signl insertion must lso preserve the spee-inepenene of the originl speition, tht is require for the existene of hzr-free synhronous iruit implementtion. Let TS hs set of events E n set of trnsitions T. An event of the TS is si to e persistent in suset S 0 of sttes of S i 8s1 2 S 0 ; 2 E : [s1! ^(s1! s2) 2 T ] ) s2!. An event is si to e persistent if it is persistent in S. For inry enoe TS, eterminism, ommuttivity n output event persisteny gurntee spee-inepenene of its iruit implementtion. Insertion sets shoul e hosen in suh wy tht persisteny n ommuttivity of the originl events re not violte. The following property of insertion sets, se on theory evelope in [8], provies rtionle for our pproh. Property 4.1 Regions, exittion regions n intersetions of pre-regions n e use s insertion sets in ommuttive n eterministi TS. This property suggests tht the goo nites for insertion sets shoul e sought on the sis of regions n their intersetions. Sine ny isjoint union of regions is lso region, this gives n importnt orollry tht nie sets of sttes n e uilt very eiently, from \riks" (regions) rther thn \sn" (sttes). 10

4.3 Seleting exittion regions for new signls Assume tht the set of sttes S in TS is prtitione into two susets whih re to e enoe y mens of n itionl signl. This new signl n e e either in orer to stisfy the CSC onition, or to rek up omplex gte into set of smller gtes. In the ltter se, new signl is e to represent the output of the intermeite gtes e to the iruit n the spee-inepenent implementility of the eompose speition is heke gin ([5]). Let r n r = S? r enote the loks of suh prtition. In orer to implement suh n enoing, we nee to insert pproprite trnsitions of the new signls in the orer sttes etween the two susets. Petrify onsiers the so-lle exit orer (EB) of prtition lok r, enote y EB(r), whih is informlly suset of sttes of r with trnsitions exiting r. We ll EB(r) well-forme if there re no trnsitions leing from sttes in EB(r) to sttes in r? EB(r). Symmetrilly, input orers n e hnle. Fig. 8 illustrtes the notions of exit n input orers. Input orer Exit orer r Figure 8: Exit n input orers Note tht we nee eh new signl x to orerly yle through sttes in whih it hs vlue 0, 0, 1 n 1. We n formlize this requirement with the notion of I-prtition ([37] use similr enition). An I-prtition ivies set of ll sttes of TS into four loks: S 0, S 1, S + n S?. S 0 (S 1 ) enes the sttes in whih x will hve the vlue 0 (1). S + (S? ) enes GER(x+) (GER(x?)). For onsistent enoing of x, the only llowe events rossing ounries of the loks re the following: S 0! S +! S 1! S?! S 0, S +! S? n S?! S + (the ltter two woul use persisteny violtion, though). The prolem of ning n I-prtition is reue to ning iprtition S n is one in four steps: 1. Fin iprtition of sttes f; g 2. Clulte EB() n EB() (similrly for input orers) 3. Exten EBs to well-forme EBs y kwr losure 4. Chek tht persisteny onition is not violte Three rst steps re shown in Fig. 9. 4.4 Gte-level spee-inepenene onitions Neessry n suient onitions for spee-inepenent implementtion using unoune fnin n gtes (with unlimite input inversions), oune fnin or gtes n C elements were given in [21] (extening previous result of [2]). Petrify uses si implementtion rhiteture, lle 11

Figure 9: From iprtition to I-prtition the stnr-c rhiteture (Fig. 10). Contrry to the previous tools inste of unoune fnin gtes for the rst level, petrify n serh for implementle gtes, tht is gtes whih exist in the hosen lirry. 1 R( T f +) 1 R( T f +) Sf S f N f 2 R( T f +) 2 R( T f +) () N f R f C R( T f ) R f R( T f ) N f () () Figure 10: The stnr-c rhiteture extene for omplex gtes The si ie of the stnr-c implementtion rhiteture is tht every rst-level gte implements n up or own trnsition of the user-speie signl ehvior. In orer to ensure spee-inepenent opertion, numer of onstrints tht re olletively lle the monotonous poly-term over onitions ([21]) must e stise. In the following we will onsier prtitions of the set of exittion regions of given signl into joint exittion regions ER j ( ). The wor "joint" here inites tht few exittion regions n e joine together n implemente with one logi gte in the iruit. The joint quiesent region QR j ( ) of given signl trnsition with joint exittion region ER j ( ) is mximl set of sttes s suh tht: is stle in s, n s is rehle from ER j ( ) only through sttes in whih is stle, n s is not rehle from ny other ER k ( ) suh tht k 6= j without going through ER j ( ). Similrly, the kwr region BR j ( ) is mximl set of sttes s suh tht: is stle in s, n ER j ( ) is rehle from s only through sttes in whih is stle, n no other ER k ( ) suh tht k 6= j is rehle from s without going through ER j ( ). 12

Let C j ( ) enote one of the rst-level gtes in the stnr-c rhiteture. C j ( ) is orret monotonous poly-term over for the joint exittion region ER j ( ) if: 1. C j ( ) overs (i.e., its Boolen eqution evlutes to 1) ll sttes of ER j ( ). 2. C j ( ) overs only sttes of ER j ( ) [ QR j ( ) [ BR j ( ). 3. If C j ( ) overs some stte s of BR j ( ), then s is lso overe y some other C k ( ) suh tht n re omplementry (up n own or own n up, respetively) n s 2 j k BR j ( ) \ QR k ( ). 4. C j ( ) hs extly one up n one own trnsition in ny sequene of sttes within ER j ( )[ QR j ( ) [ BR j ( ). Uner these onitions, it is possile to show tht the outputs of the rst-level gtes re one-hot enoe, n tht mens tht ny vli Boolen eomposition of the seon-level or gtes will e spee-inepenent. The hosen rhiteture is generl enough to over the se in whih signl in the speition mits omintionl implementtion, euse in tht se the set n reset network re the omplement of eh other, n the C element with ientil inputs n e simplie to wire. 4.5 Strtegy for tehnology mpping The strtegy for tehnology mpping whih is implemente in the proeure for seleting the est I-prtitions n in the ost funtion is se on two itertive steps: Comintionl eomposition n extrtion of set n reset funtions If no vli omintionl eomposition n e foun, then itionl stte signls re inserte preserving spee-inepenene to inrese the on't re set n to simplify the logi. Speil onitions for orret spee-inepenent eomposition must e preserve, sine eh signl trnsition t the eompose gte must e knowlege y some other gte in the speeinepenent iruit. Contrry to onitions from [5] petrify llows gte shring n t well in our region-se prtitioning of the sttes. The simple gte iruit shown in Fig. 4 is otine from the omplex gte iruit y omintionl eomposition. Note tht some of the C-elements were eliminte. 5 Conlusions Petri nets hve shown to e n pproprite formlism to esrie the ehvior of systems with onurreny, uslity n onits etween events. For this type of systems, the metho presente in this pper llows to trnsform ierent moels (CSP, CCS, FSMs, PNs) into unique formlism for whih synthesis, nlysis, omposition n verition tools n e uilt. Synthesizing Petri nets from stte-se moels is tsk of reverse engineering tht strts the temporl imension from t esription of the sequenes of events proue y the system. The synthesis metho isovers the tul temporl reltions etween the events. The symiosis mong the notions of TS, region n exittion region in the sme metho hs een ruil to erive eient lgorithms oth for mnipulting onurrent speitions n lgorithms for synthesis n optimiztion of synhronous iruits. For the future iretions we onsier extening petrify for hnling: 13

unsfe, generl PNs; synthesis of synhronous prllel ontrollers; pplitions to hrwre/softwre oesign of retive ontrollers. How to get n use Petrify You n get the tool from the following www ress: http://www..up.es/~vlsi/petrify/petrify.html. There is mn pge there esriing the syntx for representing input PNs, STGs n TSs n possile options for petrify. Referenes [1] E. Bouel, L. Bernrinello, n Ph. Droneu. Polynomil lgorithms for the synthesis of oune nets. Tehnil Report 2316, INRIA, RENNES Ceex, Frne, 1994. [2] P. A. Beerel n T. H-Y. Meng. Automti gte-level synthesis of spee-inepenent iruits. In Proeeings of the Interntionl Conferene on Computer-Aie Design, Novemer 1992. [3] L. Bernrinello, G. De Mihelis, K. Petruni, n S. Vign. On synhroni struture of trnsition systems. Tehnil report, Universit i Milno, Milno, 1994. [4] Rnl Brynt. Symoli oolen mnipultion with orere inry-eision igrms. ACM Computing Surveys, 24(3):293{318, Septemer 1992. [5] S. Burns. Generl onitions for the eomposition of stte holing elements. In Interntionl Symposium on Avne Reserh in Asynhronous Ciruits n Systems, Aizu, Jpn, Mrh 1996. [6] T.-A. Chu. On the moels for esigning VLSI synhronous igitl systems. Integrtion: the VLSI journl, 4:99{113, 1986. [7] T.-A. Chu. Synthesis of Self-time VLSI Ciruits from Grph-theoreti Speitions. PhD thesis, MIT, June 1987. [8] J. Cortell, M. Kishinevsky, A. Konrtyev, L. Lvgno, n A. Ykovlev. Complete stte enoing se on the theory of regions. In Interntionl Symposium on Avne Reserh in Asynhronous Ciruits n Systems, pges 36{47, Mrh 1996. [9] J. Cortell, M. Kishinevsky, A. Konrtyev, L. Lvgno, n A. Ykovlev. Coupling tehnology mpping, logi optimiztion n stte enoing. Tehnil report, Universitt Politeni e Ctluny, 1996. [10] J. Cortell, M. Kishinevsky, A. Konrtyev, L. Lvgno, n A. Ykovlev. Methoology n tools for stte enoing in synhronous iruit synthesis. In Proeeings of the Design Automtion Conferene, June 1996. to pper. [11] J. Cortell, M. Kishinevsky, L. Lvgno, n A. Ykovlev. Synthesizing Petri nets from stte-se moels. In Pro. of ICCAD'95, pges 164{171, Novemer 1995. [12] J. Cortell, M. Kishinevsky, L. Lvgno, n A. Ykovlev. Synthesizing Petri nets from stte-se moels. Tehnil Report RR 95/09 UPC/DAC, Universitt Politeni e Ctluny, April 1995. [13] O. Couert, C. Berthet, n J. C. Mre. Verition of sequentil mhines using oolen funtionl vetors. In L. Clesen, eitor, Pro. IFIP Int. Workshop on Applie Forml Methos for Corret VLSI Design, pges 111{128, Leuven, Belgium, Novemer 1989. [14] J. Desel n W. Reisig. The synthesis prolem of Petri nets. Tehnil Report TUM-I9231, Tehnishe Universitt Munhen, Septemer 1992. 14

[15] D.L. Dill. Tre Theory for Automti Hierrhil Verition of Spee-Inepenent Ciruits. The MIT Press, Cmrige, Mss., 1988. An ACM Distinguishe Disserttion 1988. [16] D. Drusinsky. Extene stte igrms n retive systems. Dr.Do's Journl, pges 72{80,106{107, Otoer 1994. [17] A. Ehrenfeuht n G. Rozenerg. Prtil (Set) 2-Strutures. Prt I, II. At Informti, 27:315{368, 1990. [18] C. A. R. Hore. Communiting Sequentil Proesses. In Communitions of the ACM, pges 666{677, August 1978. [19] Henrik Hulgr n Steven M. Burns. Boune ely timing nlysis of lss of CSP progrms with hoie. In Pro. Interntionl Symposium on Avne Reserh in Asynhronous Ciruits n Systems, pges 2{11, Novemer 1994. [20] M. Kishinevsky, A. Konrtyev, A. Tuin, n V. Vrshvsky. Conurrent Hrwre: The Theory n Prtie of Self-Time Design. John Wiley n Sons, Lonon, 1993. [21] A. Konrtyev, M. Kishinevsky, B. Lin, P. Vnekergen, n A. Ykovlev. Bsi gte implementtion of spee-inepenent iruits. In Proeeings of the Design Automtion Conferene, pges 56{62, June 1994. [22] R. P. Kurshn. Anlysis of isrete event oorintion. In Leture Notes in Computer Siene. Springer- Verlg, 1990. [23] L. Lvgno n A. Sngiovnni-Vinentelli. Algorithms for synthesis n testing of synhronous iruits. Kluwer Aemi Pulishers, 1993. [24] Roin Milner. A lulus of ommunition systems. In Leture Notes in Computer Siene, volume 92. Springer-Verlg, 1980. [25] Roin Milner. Communition n Conurreny. Prentie-Hll, 1989. [26] M. Mukun. Petri nets n step trnsition systems. Int. Journl of Fountions of Computer Siene, 3(4):443{478, 1992. [27] D. E. Muller n W. C. Brtky. A theory of synhronous iruits. In Annls of Computing Lortory of Hrvr University, pges 204{243, 1959. [28] T. Murt. Petri nets: Properties, nlysis n pplitions. Proeeings of IEEE, 77(4):541{580, April 1989. [29] M. Nielsen, G. Rozenerg, n P.S. Thigrjn. Elementry trnsition systems. Theoretil Computer Siene, 96:3{33, 1992. [30] S. M. Nowik n D. L. Dill. Automti synthesis of lolly-loke synhronous stte mhines. In Proeeings of the Interntionl Conferene on Computer-Aie Design, Novemer 1991. [31] C. A. Petri. Kommuniktion mit Automten. PhD thesis, Bonn, Institut fur Instrumentelle Mthemtik, 1962. (tehnil report Shriften es IIM Nr. 3). [32] M. Pezze, R. N. Tylor, n M. Young. Grph moels for rehility nlysis of onurrent progrms. ACM Trnstions on Softwre Engineering n Methoology, 4(2):171{213, 1995. [33] T. G. Rokiki. Representing n Moeling Digitl Ciruits. PhD thesis, Stnfor University, 1993. [34] L. Y. Rosenlum n A. V. Ykovlev. Signl grphs: from self-time to time ones. In Interntionl Workshop on Time Petri Nets, Torino, Itly, 1985. [35] D.C. Tsihritzis n P.A. Bernstein. Operting Systems. Aemi Press, Lonon, 1974. [36] S. H. Unger. Asynhronous Sequentil Swithing Ciruits. Wiley Intersiene, 1969. [37] P. Vnekergen, B. Lin, G. Goossens, n H. De Mn. A generlize stte ssignment theory for trnsformtions on Signl Trnsition Grphs. In Proeeings of the Interntionl Conferene on Computer- Aie Design, pges 112{117, Novemer 1992. 15