System Modeling Introduction Rugby Meta-Model Finite State Machines Petri Nets Untimed Model of Computation Synchronous Model of Computation Timed Model of Computation Integration of Computational Models Tightly Coupled Process Networks
System Modeling MoC Integration 1 Interfaces between MoC Domains ✓✏ ✓✏ ✓✏ ✓✏ MoC A MoC B I 1 ✒✑ ✒✑ ✒✑ ✒✑ ✜ ✜ ▲ ▲ ✓✏ ✓✏ ▲ ✜ ▲ ✜ ▲ ▲ ✜ ✜ ✒✑ ✒✑ I 2 If either MoC A or MoC B are synchronous or timed domains, the interfaces define the time relation between the two domains. A. Jantsch, KTH, Jan-Feb 2005
System Modeling MoC Integration 2 Interfaces between MoC Domains of the same Type intSup ( r, f ) = mapU (1 , f ) with length ( f (¯ e )) = r e ∈ ¯ E, r ∈ N ¯ intSdown ( r, f ) = mapU ( r, f ) with length ( f (¯ a )) = 1 a ∈ ¯ S, r ∈ N ¯ intTup = intSup intTdown = intSdown A. Jantsch, KTH, Jan-Feb 2005
System Modeling MoC Integration 3 Multiple Connected Domains ★✥ ★✥ r 1 MoC B MoC A ✧✦ ✧✦ ❙ ❙ ✡ ❙ ❙ ❙ ✡ ❙ r 3 ❙ ❙ ✡ ❙ r 2 ★✥ ❙ ❙ ✡ r 3 ❙ ❙ ❙ ✡ ❙ MoC C ✧✦ A. Jantsch, KTH, Jan-Feb 2005
System Modeling MoC Integration 4 Interfaces Between MoC Domains from/to Timed Synchronous Untimed Timed - stripT2S stripT2U Synchronous - insertS2T stripS2U Untimed - insertU2T insertU2S A. Jantsch, KTH, Jan-Feb 2005
System Modeling MoC Integration 5 Strip Based Interface Processes: Timed ⇒ Untimed and Synchronous ⇒ Untimed stripT2U () = p where p (ˆ s ) = ˙ s π ( ν, ˆ s ) = � ˆ e i � , ν ( i ) = 1 π ( ν ′ , ˙ s ) = � ˙ a i � � �� if ˙ e i = ⊔ a i = ˙ � ˙ e i � otherwise � 0 if ˙ e i = ⊔ ν ′ ( i ) = 1 otherwise stripS2U = stripT2U A. Jantsch, KTH, Jan-Feb 2005
System Modeling MoC Integration 6 Strip Based Interface Processes: Timed ⇒ Synchronous stripT2S ( λ ) = p where p (ˆ s ) = ¯ s π ( ν, ˆ s ) = � ˆ a i � , ν ( i ) = λ π ( ν ′ , ¯ e i � , ν ′ ( i ) = 1 s ) = � ¯ � ⊔ if strip (ˆ a i ) = �� e i = ¯ lastt (ˆ a i ) otherwise a ∈ ˆ s ∈ ¯ e i ∈ ¯ for λ ∈ N , ˆ E, i ∈ N 0 s, ˆ S, ¯ S, ¯ lastt (ˆ s ) denotes the last non-absent event in signal ˆ s A. Jantsch, KTH, Jan-Feb 2005
System Modeling MoC Integration 7 Insert Based Interface Processes: Untimed ⇒ Synchronous insertU2S ( λ ) = p where p ( ˙ s ) = ¯ s π ( ν, ˙ s ) = � ˙ e i � , ν ( i ) = 1 π ( ν ′ , ¯ a i � , ν ′ ( i ) = λ s ) = � ¯ e i � ⊕ �⊔� λ − 1 ¯ a i = � ˙ s ∈ ˙ a i ∈ ¯ e i ∈ ˙ for λ ∈ N , ˙ E, i ∈ N 0 S, ¯ s, ¯ S, ˙ A. Jantsch, KTH, Jan-Feb 2005
System Modeling MoC Integration 8 Insert Based Interface Processes: Synchronous ⇒ Timed insertS2T ( λ ) = p where p (¯ s ) = ˆ s π ( ν, ¯ s ) = � ¯ e i � , ν ( i ) = 1 π ( ν ′ , ˆ a i � , ν ′ ( i ) = λ s ) = � ˆ e i � ⊕ �⊔� λ − 1 a i = � ¯ ˆ s ∈ ¯ a ∈ ˆ e i ∈ ¯ for λ ∈ N , ¯ E, i ∈ N 0 S, ˆ s, ˆ S, ¯ A. Jantsch, KTH, Jan-Feb 2005
System Modeling MoC Integration 9 Hierarchical Model of Computation Definition: A Hierarchical Model of Computation (HMoC) is a 3-tuple HMoC = ( M, C, O ) , where M is a set of HMoCs or MoCs, each capable of instantiating processes; C is a set of process constructors, each of which, when given constructor specific parameters, instantiates a process; O is a set of process composition operators, each of which, when given processes as arguments, instantiates a new process. With process we mean either an elementary process or a process network. A. Jantsch, KTH, Jan-Feb 2005
System Modeling MoC Integration 10 The Integrated Model of Computation Definition: The Integrated Model of Computation (Integrated MoC) is defined as Integrated HMoC= ( M, C, O ) , where M = { U-MoC, S-MoC, T-MoC } C = { intSup , intSdown , intTup , intTdown , stripT2S , stripT2U , stripS2U , insertS2T , insertU2T , insertU2S } O = {� , ◦ , FB P } A. Jantsch, KTH, Jan-Feb 2005
System Modeling MoC Integration 11 Systems with Multiple Sub-domains S-MoC Domain insertU2T intSup U-MoC S-MoC stripS2U Domain Domain stripT2S insertS2T stripT2U T-MoC T-MoC Domain intTdown Domain Proper interfaces between domains are required. A. Jantsch, KTH, Jan-Feb 2005
System Modeling MoC Integration 12 A Digital Equalizer with two Sub-domains S−MoC Distortion 1 1 1 Button control control 1 1 1 1 stripS2U ◦ I insertU2S U−MoC 1 1 1 1 4096 4096 4096 Filter Analyzer A. Jantsch, KTH, Jan-Feb 2005
System Modeling MoC Integration 13 Connecting MoC Domains Relates Time Structures • Only U-MoC - U-MoC coupling does not couple time structures; • Connecting an U-MoC to a S-MoC imposes the S-MoC time structure on the U-MoC domain. • Interfaces can be modeled to define the time relation. • Interface delays can be modeled stochasticaly or nondeterministically ⋆ Channel behaviour becomes more realistic; ⋆ Time structure relation becomes complex; ⋆ Time structure coupling cannot be avoided; A. Jantsch, KTH, Jan-Feb 2005
System Modeling MoC Integration 14 MoC Interface Refinement Add time interface: to precisely define the time structure relation. The relation can be constant, cyclic, deterministic, or stochastic. Refine the protocol: Define and refine a protocol which allows for reliable communication across the domain boundary with the given time relation. Model the channel delay: If desirable, model the channel delay deterministically or stochastically. A. Jantsch, KTH, Jan-Feb 2005
System Modeling MoC Integration 15 MoC Interface Refinement Example Step 1 - Add time interface MoC A MoC B Q P MoC B MoC A I 1 intTup (3 , f 1 ) intTdown (2 , f 2 ) Q P A. Jantsch, KTH, Jan-Feb 2005
System Modeling MoC Integration 16 MoC Interface Refinement Example Step 2 - Refine the Protocol MoC B MoC A I 1 P 2 Q 2 Q 1 P 1 I 2 A. Jantsch, KTH, Jan-Feb 2005
System Modeling MoC Integration 17 MoC Interface Refinement Example Step 3 - Model the Channel Delay MoC B MoC A D [2 , 5] P 2 I 1 Q 2 Q 1 P 1 D [2 , 5] I 2 A. Jantsch, KTH, Jan-Feb 2005
System Modeling MoC Integration 18 Process Migration between MoC Domains Untimed Domain Synchronous Domain p 1 p 2 p insertU2S p 3 Untimed Domain Synchronous Domain p ′ p insertU2S p 1 p 3 2 A. Jantsch, KTH, Jan-Feb 2005
System Modeling MoC Integration 19 Process Migration Cases 1.a. Untimed to Synchronous/downwards P U ◦ P insertU2S ⇒ P insertU2S ◦ P S b. Synchronous to Untimed/Upwards P insertU2S ◦ P S ⇒ P U ◦ P insertU2S 2.a. Untimed to Timed/downwards P U ◦ P insertU2T ⇒ P insertU2T ◦ P T b. Timed to Untimed/upwards P insertU2T ◦ P T ⇒ P U ◦ P insertU2T 3.a. Synchronous to Timed/downwards P S ◦ P insertS2T ⇒ P insertS2T ◦ P T b. Timed to Synchronous/upwards P insertS2T ◦ P T ⇒ P S ◦ P insertS2T 4.a. Timed to Synchronous/downwards P T ◦ P stripT2S ⇒ P stripT2S ◦ P S b. Synchronous to Timed/upwards P stripT2S ◦ P S ⇒ P T ◦ P stripT2S 5.a. Timed to Untimed/downwards P T ◦ P stripT2U ⇒ P stripT2U ◦ P U b. Untimed to Timed/upwards P stripT2U ◦ P U ⇒ P T ◦ P stripT2U 6.a. Synchronous to Untimed/downwards P S ◦ P stripS2U ⇒ P stripS2U ◦ P U b. Untimed to Synchronous/upwards P stripS2U ◦ P U ⇒ P S ◦ P stripS2U A. Jantsch, KTH, Jan-Feb 2005
System Modeling MoC Integration 20 Helper Processes = mealyS ( g, f, �� ) par c � w ⊕ e if length ( w ) < c where g ( e, w ) = �� otherwise � w ⊕ e if length ( w ) = c f ( e, w ) = ⊥ otherwise = p 2 ◦ p 1 par = zipS () p 1 = mealyS ( g, f, ( �� , 0)) p 2 � ( w ⊕ e, d ) if length ( w ) < d where g (( e, c ) , ( w, d )) = ( �� , c ) otherwise � w ⊕ e if length ( w ) = d f (( e, c ) , ( w, d )) = ⊥ otherwise = mooreS ( g, f, �� ) ser � tail ( w ) if e = ⊥ where g ( e, w ) = tail ( w ) ⊕ e otherwise � head ( w ) if w � = �� f ( w ) = ⊥ otherwise A. Jantsch, KTH, Jan-Feb 2005
System Modeling MoC Integration 21 Case 1.a: Untimed to Synchronous/downward - Stateless Process U-MoC S-MoC Map based process: = mapU ( c, f 1 ) P U P U P insertU2S = insertU2S (1) p I = q 3 ◦ q 2 ◦ q 1 P S = q 1 par c = q 3 ser U-MoC S-MoC = mapS ( f 2 ) q 2 ⊥ if e = ⊥ f 2 ( e ) = P S ⊥ if f 1 ( e ) = �� P insertU2S f 1 ( e ) otherwise A. Jantsch, KTH, Jan-Feb 2005
System Modeling MoC Integration 22 Case 1.a: Untimed to Synchronous/downward - Statefull Process P S ( s 1 ) = s 5 where s 5 = q 4 ( s 4 ) s 4 = q 3 ( s 3 , s 2) s 3 = q 2 ( s 2 ) Mealy based process: s 2 = q 1 ( s 1 , s 6 ) s 6 = q 5 ( s 3 ) = mealyU ( γ, g, f, w 0 ) p U = insertU2S (1) p I = q 1 par = scanS ( f 2 , w 0 ) q 2 ✗✔ � ⊥ if e = ⊥ s 3 s 6 where g 2 ( e, w ) = ✖✕ q 5 g ( e, w ) otherwise ✗✔ ✗✔ ✗✔ ✗✔ = mapS ( f 3 ) q 3 � ✖✕ ✖✕ q 2 ✖✕ q 4 ✖✕ q 3 q 1 ⊥ if e = ⊥ s 1 s 5 s 4 where f 3 ( e, w ) = f ( e, w ) otherwise s 2 = q 4 ser = mapS ( γ 5 ) q 5 � ⊥ if e = ⊥ where γ 5 ( e ) = γ ( e ) otherwise A. Jantsch, KTH, Jan-Feb 2005
Recommend
More recommend