Synthesis of Protocol Converter Using Timed Petri-Nets Anh Dang Balaji Krishnamoorthy Manoj Iyer...

Post on 26-Mar-2015

215 views 1 download

Tags:

Transcript of Synthesis of Protocol Converter Using Timed Petri-Nets Anh Dang Balaji Krishnamoorthy Manoj Iyer...

Synthesis of Protocol Synthesis of Protocol Converter Using Timed Petri-Converter Using Timed Petri-

NetsNets

Anh DangAnh Dang

Balaji KrishnamoorthyBalaji Krishnamoorthy

Manoj IyerManoj Iyer

Presented by:

MotivationMotivation

• Heterogeneous, distributed networksHeterogeneous, distributed networks– Protocol converters allow communication Protocol converters allow communication

among incompatible network protocolsamong incompatible network protocols

• The authors of this paper describe a The authors of this paper describe a new synthesis technique used in new synthesis technique used in protocol converter design and protocol converter design and modelingmodeling

Service and Protocol Service and Protocol ConceptsConcepts

Communication services (to users) is Communication services (to users) is organized as a stack of layers. Each layer organized as a stack of layers. Each layer offers services to the next higher layer offers services to the next higher layer – High-level abstraction: providing a number of High-level abstraction: providing a number of

communication services to users (service communication services to users (service level)level)

– Low-level abstraction: number of cooperating Low-level abstraction: number of cooperating protocol entities (PEs) exchange protocol protocol entities (PEs) exchange protocol messages called protocol data units (PDUs) messages called protocol data units (PDUs) (protocol level)(protocol level)

Converter Design Converter Design ApproachesApproaches

• Top-down:Top-down:service-level conversionservice-level conversion– Easy to implement, Easy to implement,

tends to be “passive”tends to be “passive”• Bottom-up:Bottom-up:

protocol-level conversionprotocol-level conversion– Very powerful, very Very powerful, very

complexcomplex• Hybrid: combination of Hybrid: combination of

Top-down and Bottom-upTop-down and Bottom-up

Converter PropertiesConverter Properties

• SafetySafety– Free from deadlock or livelock, and is Free from deadlock or livelock, and is

completecomplete

• LivenessLiveness– Performs the required functionalityPerforms the required functionality

• TimelinessTimeliness– Satisfies the timing of both protocolsSatisfies the timing of both protocols

Converter Design CriteriaConverter Design Criteria

• Modeling formalismModeling formalism– CFSM, Petri Nets, etc.CFSM, Petri Nets, etc.

• Design approachDesign approach– Service level, protocol level, or hybridService level, protocol level, or hybrid

• Design methodologyDesign methodology– Analytic: trial-and-error iterationsAnalytic: trial-and-error iterations– Synthetic: systematic, safe generationSynthetic: systematic, safe generation

Design Criteria (con’t)Design Criteria (con’t)

• Information transfer issuesInformation transfer issues– Direct: no buffers, messages transmitted Direct: no buffers, messages transmitted

immediately to each protocolimmediately to each protocol– Indirect: messages stored in non-FIFO Indirect: messages stored in non-FIFO

buffer, re-ordered, and transmittedbuffer, re-ordered, and transmitted

• Synchronization issuesSynchronization issues– Mapping of messages (traces) to ensure Mapping of messages (traces) to ensure

compatibilitycompatibility

Design Criteria (con’t)Design Criteria (con’t)

• TimelinessTimeliness– Internal timing and protocol requirementsInternal timing and protocol requirements– Data loss and recoveryData loss and recovery

• DynamicityDynamicity– Self-induced, active communicationSelf-induced, active communication

• ConcurrencyConcurrency

• ComplexityComplexity

Timed Petri Net ModelTimed Petri Net Model

• Standard Petri net with predicated Standard Petri net with predicated and timed transitionsand timed transitions

• New notationsNew notations– Input/Output actions marked with +/-Input/Output actions marked with +/-

– Parallel composition: PNParallel composition: PN11 || PN || PN22

– Trace “schuffling”: tTrace “schuffling”: t11 t t22

– Complement of a trace: ~tComplement of a trace: ~t

• Some more for petri netSome more for petri net

Synthesis TechniqueSynthesis Technique

• Greatest common service Greatest common service definitiondefinition

• Trace generation and collectionTrace generation and collection

• Trace synchronizationTrace synchronization

• Synthesis of Petri Net modelSynthesis of Petri Net model

Greatest Common ServiceGreatest Common Service

• Start with both Start with both service descriptionsservice descriptions– I/O operations are I/O operations are

service primitivesservice primitives

• Map equivalent Map equivalent primitives into a primitives into a service interface service interface converter (SIC)converter (SIC)

• Remove primitives Remove primitives not mapped in SICnot mapped in SIC )||||(}_,_{ MNMupperNupper SSICSPGCSD

Example: GCSDExample: GCSD

?

Trace GenerationTrace Generation

• Interested in traces of each separate Interested in traces of each separate network which contribute to the GCSDnetwork which contribute to the GCSD

• Can be found with following analysis:Can be found with following analysis:– Let Let TTNN be set of traces at {lower,upper}_ be set of traces at {lower,upper}_NN– Find Find N’N’, a pruning with contributions to S’, a pruning with contributions to S’NN

– Find us_Find us_NN, composition of lower services , composition of lower services and communication channeland communication channel

– TTNN = = N’N’ || us_ || us_NN

Example: Trace GenerationExample: Trace Generation

TTABPABP = ={{ACCEPT ACCEPT ––DATA(bit) DATA(bit) (+(+ACK(~bit) –DATA(bit))* +ACK(bit),ACK(~bit) –DATA(bit))* +ACK(bit),+DATA(bit) (-ACK(~bit) +DATA(bit))* DELIVER -ACK(bit),+DATA(bit) (-ACK(~bit) +DATA(bit))* DELIVER -ACK(bit),+DATA(bit) DELIVER (-ACK(~bit) +DATA(bit))* -ACK(bit),+DATA(bit) DELIVER (-ACK(~bit) +DATA(bit))* -ACK(bit),++DATA(bit) (+DATA(bit))* DELIVER -ACK(bit),DATA(bit) (+DATA(bit))* DELIVER -ACK(bit),++DATA(bit) DELIVERDATA(bit) DELIVER (+ (+DATA(bit))* -ACK(bit)}DATA(bit))* -ACK(bit)}

TTPEPE = ={SEND +poll (-data SEND) (-data SEND)* -end,{SEND +poll (-data SEND) (-data SEND)* -end,++poll SEND poll SEND (-(-data SEND) (data SEND) (--data SEND)* -enddata SEND)* -end,,(+(+poll)*,poll)*,-poll (+data RECEIVE) (+data RECEIVE)* +end-poll (+data RECEIVE) (+data RECEIVE)* +end,,(-(-poll)*}poll)*}

Trace SynchronizationTrace Synchronization

• For trace sets TFor trace sets TNN and T and TMM found above: found above:

– Prune the protocol components TRPrune the protocol components TRNN, TR, TRMM

– Take complements to get TCTake complements to get TCNN

– Schuffle the complements (TCSchuffle the complements (TCNN TC TCMM))

• 14 rules for ordering data, confirmation, 14 rules for ordering data, confirmation, ack, and nack messages safelyack, and nack messages safely– (N+m,N-c) (N+m,N-c) (M-m) = (N+m,M-m,N-c) (M-m) = (N+m,M-m,N-c)

Example: Trace Example: Trace SynchronizationSynchronization

TCTCABPABP = { = {lower_ABP} ~lower_ABP} ~TCTCABPABP = ={{--DATA(bit) (DATA(bit) (++ACK(~bit) ACK(~bit) --DATA(bit))* DATA(bit))* ++ACK(bit),ACK(bit),++DATA(bit) (DATA(bit) (--ACK(~bit) ACK(~bit) ++DATA(bit))* DATA(bit))* --ACK(bit),ACK(bit),--DATA(bit) (DATA(bit) (--DATA(bit))* DATA(bit))* ++ACK(bit)}ACK(bit)}

TCTCPEPE = { = {lower_ABP} ~lower_ABP} ~TCTCABPABP = ={{--poll (poll (++data SEND) (data SEND) (++data SEND)* data SEND)* ++end,end,((--poll)*,poll)*,++poll poll ((--data SEND) (data SEND) (--data SEND)* data SEND)* --endend,, ( (++poll)*}poll)*}

TC = TCABP TCPE

Result (after PN synthesis)Result (after PN synthesis)

Example: Alternating Bit (pick Example: Alternating Bit (pick one)one)

Example: Poll-End (pick one)Example: Poll-End (pick one)

SummarySummary

• Hybrid approachHybrid approach– Starts with service specification, but Starts with service specification, but

performs all synthesis on protocolsperforms all synthesis on protocols

• Timed Petri net modelTimed Petri net model– Can incorporate timing in specificationCan incorporate timing in specification– Models concurrency and comes with well-Models concurrency and comes with well-

known analysis algorithmsknown analysis algorithms

• Resulting converter is safe and Resulting converter is safe and functionalfunctional