1 / 24

A Timed Mobility Semantics based on Rewriting Strategies Jason Steggles Newcastle University

A Timed Mobility Semantics based on Rewriting Strategies Jason Steggles Newcastle University. Gabriel Ciobanu A. I. Cuza University of Iasi. Maciej Koutny Newcastle University. Overview. Motivation. TiMo – A Timed Mobility Process Algebra. Rewriting Logic and Strategies.

tahlia
Download Presentation

A Timed Mobility Semantics based on Rewriting Strategies Jason Steggles Newcastle University

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A Timed Mobility Semantics based on Rewriting Strategies Jason Steggles Newcastle University Gabriel Ciobanu A. I. Cuza University of Iasi MaciejKoutny Newcastle University

  2. Overview • Motivation. • TiMo – A Timed Mobility Process Algebra. • Rewriting Logic and Strategies. • A Rewriting Semantics for TiMo: • Basic Idea. • Use of Strategies. • Correctness. • Simple Case Study with Elan. • Concluding Remarks.

  3. Motivation • TiMo is a process algebra supporting mobility and time constraints. • Range of interesting theoretical results exist for TiMo. • However, currently TiMo lacks tool support resulting in few case studies. Solution • Develop a Rewriting Logic semantics. • Use strategies to capture maximal parallel computational step in TiMo. • Use Elan to develop prototype analysis tool.

  4. Basic Idea behind TiMo locations + mobility + interaction + timers Formalism for modelling distributed systems with time-related aspects. Simple process algebra: Local interaction (communication). Interaction is not delayed. Migration with bounded delay Discrete time semantics + maximal concurrency

  5. Mobility Example ] ] ] ] ] ] ] ] ] ] ] ] [ [ [ [ [ [ [ [ [ [ [ [ LocA 1 2 0 goΔ2LocB then P goΔ1LocB then P P LocA goΔ1LocB then P |... |LocB ... LocA goΔ2LocB then P |... |LocB ... LocB 0 P LocA ... |LocB P | ...

  6. Communication Example ] ] ] ] [ [ [ [ LocA aΔ2?(l) then P1 else P2 | aΔ3!<LocB> then Q1 else Q2 LocA 0 1 aΔ2?(l) then P1 else P2 {LocB/l}P1 Q1 aΔ3!(LocB) then Q1 else Q2 LocA {LocB/l}P1 | Q1

  7. Simple Workflow Example ] ] ] ] [ [ [ [ Done job Init Web job job Err job≡aΔ1?(l:loc)thengoΔ1lthenjobelsejob srv(l:loc)≡aΔ2!<l>thensrv(l)elsesrv(l) Init job|srv(Web) |Web srv(Done)

  8. Rules for Operational Semantics ] ] ] ] ] ] ] ] [ [ [ [ [ [ [ [ (Move) L1 goΔtL2 then P L2 ⃝P S ⃝ Stall symbol S L1 aΔt1?(l)thenP1elseP2| aΔt2!<L2>thenQ1elseQ2 (Com) L1 ⃝{L2/l}P1|⃝Q1 S S

  9. Rules for Operational Semantics ] ] ] ] ] ] ] ] ] ] ] ] [ [ [ [ [ [ [ [ [ [ [ [ L1 P1...LkPk Li (Time)   ( ) L1 P1...LkPk L1 P1...LkPk Li • Contains a negative premise (no rules applicable in given location). • Use  to apply clock tick and enforce timeout. • Derivation is a maximal parallel step for a location: Li 1 2 k   N1  N2 ...Nk   (Nk)  N1 (Nk) Li Li

  10. Rewriting Logic (RL) Sorts Ent, MSet; Subsort Ent < MSet; Ops a,b,c : Ent; @@ : MSet MSet  MSet Eqs xy = yx; x(yz) = (xy)z [r1] ab  ac [r2] bb  c [r3] ac  c r1 r1 r3 abb  acb  acc  cc States of system defined by equational specification: Dynamic transitions defined by rewrite rules: Example:

  11. Rewriting Logic (RL) abb r2 r1 ac [r1] ab  ac [r2] bb  c [r3] ac  c acb r1 r3 r3 acc c cb r3 cc • Control application of rules using strategies. • For example, Elan has a strategy language.

  12. Rewriting Strategies abb r2 r1 ac [r1] ab  ac [r2] bb  c [r3] ac  c acb r1 r3 r3 acc cb c r3 cc r1 Strategy: dc(r1,r2,r3)

  13. Rewriting Strategies abb r2 r1 ac [r1] ab  ac [r2] bb  c [r3] ac  c acb r1 r3 r3 acc cb c r3 cc Strategy: dk(r1,r2,r3)

  14. Rewriting Strategies abb r2 r1 ac [r1] ab  ac [r2] bb  c [r3] ac  c acb r1 r3 r3 acc c cb r3 cc Strategy: repeat*dk(r1,r2,r3)

  15. Rewriting Strategies abb r2 r1 ac [r1] ab  ac [r2] bb  c [r3] ac  c acb r1 r3 r3 acc cb c r3 cc Strategy: repeat*first(r1,r2,r3)

  16. RL Model for TiMo [AC] @|@ : Prs Prs  Prs go(@,@) then @ : Time Loc Prs  Prs in(@,@)(@) then @ else @ : Chan Time Loc Prs Prs  Prs @[@] : Loc Prs  Net @|@ : Net Net  Net [AC] Define RL terms to model TiMo processes:

  17. Modelling Semantic Rules ] ] ] ] [ [ [ [ (Move) L1 goΔtL2 then P L2 ⃝P S [Move] L1[go(t,L2) then P | P2]  L1[P2] | L2[S(P)] [Move] L1[go(t,L2) then P | P2]  L1[S(go(t-1,L2) then P)|P2] if t>0

  18. Modelling Semantic Rules ] ] ] ] [ [ [ [ (Com) L ⃝{L2/l}P1|⃝Q1 S S L1 aΔt1?(l)thenP1elseP2| aΔt2!<L2>thenQ1elseQ2 [Com] L1[in(a,t1)(l) then P1 else P2 | out(a,t2)<L2> then Q1 else Q2 | P3]  L1[S({L2/l}P1) | S(Q1) | P3]

  19. Modelling Derivation Step step ⇒ repeat*dc(Move,Com,Calls) tick(S(P))  P tick(P1 | P2)  tick(P1) | tick(P2) tick(in(a,0)(l) then P1 else P2)  P2 tick(in(a,t)(l) then P1 else P2)  in(a,t-1)(l) then P1 else P2 if t>0 ... Formulate a strategy for maximal parallel step: Define function to model clock tick and timeout:

  20. Modelling Derivation Step [derStep] l[P]|N1  N3|N1 where N2 := (step) l[P] N3 := () tick(N2) Formulate a strategy for derivation step:

  21. Correctness of RL Model • Define bijective mapping from processes to RL terms: • Correctness: : WellFormed(TM)  Valid(RL) 1) Soundness 2) Completeness derStep N1 N2 T2 T1   -1 -1 T1 T2 N2 N1 derStep    

  22. Simple Workflow Example ] ] ] ] [ [ [ [ Done job Init Web job job Err job≡aΔ1?(l:loc)thengoΔ1lthenjobelsejob srv(l:loc)≡aΔ2!<l>thensrv(l)elsesrv(l) Init job|srv(Web) |Web srv(Done) Use Elan to simulate and analyse RL model:

  23. Simple Workflow Example ] ] ] ] [ [ [ [ Done Init Web Err srvE(Err) srvE(l:loc)≡aΔ2!<l>thensrvE(l)elsesrvE(Err) Init job|srv(Web) |Web srvE(Done) Add possibility of an error:

  24. Concluding Remarks • Developed an RL model for TiMo. • Use strategies to capture maximal parallel computational steps. • Proved RL model is correct: sound and complete. • Used Elan to implement an analysis tool. • Future work includes: • Extend to TiMo with access permissions. • Enhance tool support (i.e. Maude). • Investigate alternative semantic choices for TiMo. • Detailed case studies.

More Related