A systematic approach to constructing families of incremental - - PowerPoint PPT Presentation

a systematic approach to constructing
SMART_READER_LITE
LIVE PREVIEW

A systematic approach to constructing families of incremental - - PowerPoint PPT Presentation

A systematic approach to constructing families of incremental topology control algorithms using graph transformation Presentation at ICGT 2018 Toulouse, France, 2018-06-25 Sensor node Properties Topology control Aux. Algorithm Weight


slide-1
SLIDE 1

Roland Kluge roland.kluge@es.tu-darmstadt.de with Michael Stein, Gergely Varró, Andy Schürr, Matthias Hollick, Max Mühlhäuser Supported by the Cooperative Research Center 1053 "MAKI" – https://tiny.cc/MAKI [SoSyM17] Kluge, R. et al. SoSyM 2017, DOI: 10.1007/s10270-017-0587-8

Technische Universität Darmstadt Fachgebiet Echtzeitsysteme – Real-Time Systems Lab

  • Prof. Dr. rer. nat. Andy Schürr
  • Dept. of Electrical Engineering and Information Technology
  • Dept. of Computer Science (adjunct Professor)

www.es.tu-darmstadt.de

A systematic approach to constructing families of incremental topology control algorithms using graph transformation

Presentation at ICGT 2018 Toulouse, France, 2018-06-25

1

Sensor node Topology control Maxpower kTC l-kTC RNG XTC GG Aux. e-kTC Properties Weight Energy Position Yao Min.-Weight Algorithm Tie Breaking Hops

φ(e12, e13, e32) = w(e12) > max(w(e13),w(e23)) ᴧ w(e12) > k*min(w(e13),w(e23))

Triangle-Based

slide-2
SLIDE 2

Kluge et al. | Real-Time Systems Lab | Prof. Dr. Andy Schürr | A systematic approach to constructing families of incremental topology control algorithms using graph transformation

Example: da_sense – A hybrid sensor network for Smart Cities (“Digitalstadt Darmstadt”) (I)

An Urban Management Platform based on heterogeneous sensor networks

  • Traffic: static at traffic lights
  • Temperature: mobile on trams
  • Noise: mobile via Android app

http://www.da-sense.de/

2

Image Sources: Traffic light: https://wiki.freiheitsfoo.de/pmwiki.php?n=Main.Ampel-Kameras | Tram: "Die Transparente Stadt" https://www.youtube.com/watch?v=JimyRNyLZKo | Android screenshots and map: http://www.da-sense.de/

slide-3
SLIDE 3

Kluge et al. | Real-Time Systems Lab | Prof. Dr. Andy Schürr | A systematic approach to constructing families of incremental topology control algorithms using graph transformation

Example: da_sense – A hybrid sensor network for Smart Cities (“Digitalstadt Darmstadt”) (II)

3

http://www.da-sense.de/

3

Image Sources: Traffic light: https://wiki.freiheitsfoo.de/pmwiki.php?n=Main.Ampel-Kameras | Tram: "Die Transparente Stadt" https://www.youtube.com/watch?v=JimyRNyLZKo | Android screenshots and map: http://www.da-sense.de/

An Urban Management Platform based on heterogeneous sensor networks

  • Traffic: static at traffic lights
  • Temperature: mobile on trams
  • Noise: mobile via Android app
slide-4
SLIDE 4

Kluge et al. | Real-Time Systems Lab | Prof. Dr. Andy Schürr | A systematic approach to constructing families of incremental topology control algorithms using graph transformation

Graph-based topology model for Wireless Sensor Networks

4

Transmission range of n1 Wireless node n1 Wireless link e12 with link weight w(e12)

TelosB sensor node 48kB ROM, 10kB RAM, 2xAAA battery 2 3 2 2 2 3 1 4

x y Wireless Sensor Network topology

Image Sources: TelosB Sensor node: Wiki Commons, CC-BY-3.0, by Jbasic, https://commons.wikimedia.org/wiki/File:TelosB.jpg

slide-5
SLIDE 5

Kluge et al. | Real-Time Systems Lab | Prof. Dr. Andy Schürr | A systematic approach to constructing families of incremental topology control algorithms using graph transformation

Topology control sparsens topologies to improve non-functional property

  • Topo. Ctrl.

Communication link Sensor node

ID: 3

Maintain connectivity

Input topology Output topology

5

slide-6
SLIDE 6

Kluge et al. | Real-Time Systems Lab | Prof. Dr. Andy Schürr | A systematic approach to constructing families of incremental topology control algorithms using graph transformation

Topology control by example: kTC algorithm

6

2 3 2 2 2 3 1 4

Topology control x y

2 3 2 2 2 3 1 4

x y Active Inactive kTC rule: "Inactivate a link if (and only if) it is (i) the weight-maximal link in a triangle and (ii) at least k-times longer than the weight-minimal link in the triangle." Input topology Output topology

Reduced transmission range of n1

k=1.2

slide-7
SLIDE 7

Kluge et al. | Real-Time Systems Lab | Prof. Dr. Andy Schürr | A systematic approach to constructing families of incremental topology control algorithms using graph transformation

(i) Specification: Graph theory, … (ii) Simulation: C++, Java, … (iii) Testbed: C, Assembler-like,…

The curse of low abstraction in traditional communication system development

7

Iteration Implementation Formalization, proofs,… Constraints ✓ Model

</>

Level of abstraction Porting Limitations ✓ Code

Image Sources: FlockLab https://www.flocklab.ethz.ch/wiki/chrome/site/wiki_public/observer/outdoor_1.jpg

slide-8
SLIDE 8

Kluge et al. | Real-Time Systems Lab | Prof. Dr. Andy Schürr | A systematic approach to constructing families of incremental topology control algorithms using graph transformation

Goal: Support the correct-by-construction development of topology control algorithms

8

(i) Specification: Graph theory, … (ii) Simulation: C, Java, … (iii) Testbed: C, C++,…

Formalization, proofs,… Localization

</>

Constraints ✓ Limitations ✓ Model Code Iteration Extensible code gen. Extensible code gen. Level of abstraction

How to specify consistency (declaratively)? How to

  • perationalize

consistency preservation? How to ensure transparency/ traceability?

slide-9
SLIDE 9

Kluge et al. | Real-Time Systems Lab | Prof. Dr. Andy Schürr | A systematic approach to constructing families of incremental topology control algorithms using graph transformation

MAKI for a better Future Internet

Multi-Mechanismen-Adaption für das Künftige Internet

9

  • Network topologies and topology adaptation
  • Specification languages
  • Software engineering

𝑁

𝑘

𝑁𝑗

Transition

A: Construction methods

Our area (models, design patterns, languages) https://www.maki.tu-darmstadt.de/

P2P Streaming

Mesh Hybrid Tree

C/S Streaming

DASH HLS ...

C: Communication systems (concrete self-adaptive systems)

Monitor Analyze Plan Execute

B: Adaptation mechanisms (reusable components for adaptive systems)

Knowledge

slide-10
SLIDE 10

Kluge et al. | Real-Time Systems Lab | Prof. Dr. Andy Schürr | A systematic approach to constructing families of incremental topology control algorithms using graph transformation

Unstructured consistency specification

Unstructured formulation kTC: "Inactivate a link if (and only if) it is (i) the weight-maximal link in a triangle and (ii) at least k-times longer than the weight-minimal link in the triangle." Structured formulation Problem 1: Implicit, unstructured, or informal specification of constraints.

Spec. Sim. Test.

10

3 2 1

e13 e23 e12 Structural constraint φ(e12, e13, e32) = w(e12) > max(w(e13),w(e23)) ᴧ w(e12) > k*min(w(e13),w(e23))

Attribute constraints

slide-11
SLIDE 11

Kluge et al. | Real-Time Systems Lab | Prof. Dr. Andy Schürr | A systematic approach to constructing families of incremental topology control algorithms using graph transformation

2 1 3 θ Spec. Sim. Test.

Topology control algorithms form families

─ Family: common structural pattern ─ Algorithm: refinement based onattribute constraints Problem 2: Insufficient usage of relationships among topology control algorithms kTC LMST Yao/CBTC SϴGG LSϴGG SYaoGG RNG GG XTC e-kTC l-kTC l*-kTC g-kTC Cone-based Triangle-based Tree-based

Spec. Sim. Test.

11

builds on (uses/refines)

3 2 1

slide-12
SLIDE 12

Kluge et al. | Real-Time Systems Lab | Prof. Dr. Andy Schürr | A systematic approach to constructing families of incremental topology control algorithms using graph transformation

TC Algorithm families are Dynamic Software Product Lines

12

Sensor node Topology control Maxpower kTC l-kTC RNG XTC GG Aux. e-kTC Properties Weight Energy Position Yao Min.-Weight Algorithm Tie Breaking Hops

Mandatory feature Optional feature XOR group

φ(e12, e13, e32) = w(e12) > max(w(e13),w(e23)) ᴧ w(e12) > k*min(w(e13),w(e23))

Spec. Sim. Test. Spec. Sim. Test.

Advantages: Reuse in of predicates, spec. of topology control reconfiguration

Triangle-Based

slide-13
SLIDE 13

Kluge et al. | Real-Time Systems Lab | Prof. Dr. Andy Schürr | A systematic approach to constructing families of incremental topology control algorithms using graph transformation

Graph constraints for specifying local consistency properties

Ci a b eab c eac ecb φ(eab, eac, ecb) ci a b eab pi "Each inactive link should be part

  • f a triangle for which φ holds"

Active Inactive Don't care

Spec. Sim. Test.

Advantages: expressiveness, formal + domain-specific + operationalizeable

13

Ca a b eab c eac ecb φ(eab, eac, ecb) pa "No active link should be part of a triangle for which φ holds" Violated if match of pa exists.

slide-14
SLIDE 14

Kluge et al. | Real-Time Systems Lab | Prof. Dr. Andy Schürr | A systematic approach to constructing families of incremental topology control algorithms using graph transformation

Example: Fulfilled and violated constraints

14

1 3 2 4 1 1 3 7 5 Ca pa a b eab c eac ecb φ(eab, eac, ecb)

Ci a b eab c eac ecb φ(eab, eac, ecb) ci a b eab pi

slide-15
SLIDE 15

Kluge et al. | Real-Time Systems Lab | Prof. Dr. Andy Schürr | A systematic approach to constructing families of incremental topology control algorithms using graph transformation

Enforcing and preserving consistency

Consistency enforcement: Recover from any inconsistent state

2 3 2 2 2 3 1 4

TC

2 3 2 2 2 3 1 4

✘ ✔

2 3 2 2 2 3 1 4

TC

2 3 2 2 2 3 1 4

✔ ✔

Active Inactive Unmarked Chosen solution Active Inactive

Spec. Sim. Test.

15

Weakly consistent Strongly consistent Consistency preservation: Weak and strong consistency

slide-16
SLIDE 16

Kluge et al. | Real-Time Systems Lab | Prof. Dr. Andy Schürr | A systematic approach to constructing families of incremental topology control algorithms using graph transformation

Recap on consistency preservation

Generic  e.g., connectivity Algorithm-specific  e.g., "no φ-triangles" Global consistency properties Local consistency properties (declarative) implies

?

preserves Topology control algorithm specification (operationalized)

Spec. Sim. Test.

16

Active Inactive Unmarked

slide-17
SLIDE 17

Kluge et al. | Real-Time Systems Lab | Prof. Dr. Andy Schürr | A systematic approach to constructing families of incremental topology control algorithms using graph transformation

Specifying algorithmic implementation using Story-Driven Modeling [FNT+98]

e12 [Failure] TCA() [Success] [Failure] [Success] Rfind-u() LHS = RHS 1 2 e12 [Success], [Failure] Ra (e12 : Link) LHS 1 2 1 2 e12 Ri (e12 : Link) RHS LHS 1 2 e12 1 2 e12 RHS

Spec. Sim. Test.

[FNT+98] Fischer et al.: "Story Diagrams: A New Graph Rewrite Language Based on the UML and Java," 1998

17

1.Start

  • 2. Find unmarked link
  • 3. Try activating e12
  • 4a. If successful, continue.

4b.If unsuccessful, try inactivating e12

  • 5. Continue in any case.

6.Terminate if no more unmarked links exist.

slide-18
SLIDE 18

Kluge et al. | Real-Time Systems Lab | Prof. Dr. Andy Schürr | A systematic approach to constructing families of incremental topology control algorithms using graph transformation

Rule applications may violate consistency!

1 3 2 4 1 1 3 7 5 G 1 3 2 4 1 1 3 7 5 H Ra(e12 : Link) Apply at link e13 LHS RHS 1 2 e12 1 2 e12 Ca pa a b eab c eac ecb φ(eab, eac, ecb)

Spec. Sim. Test.

18

slide-19
SLIDE 19

Kluge et al. | Real-Time Systems Lab | Prof. Dr. Andy Schürr | A systematic approach to constructing families of incremental topology control algorithms using graph transformation

Ensuring inductive consistency preservation

Pairwise refinement Repeat for all (Rx, Cy) pairs Example: Refining Ra based on Ca

[HW95] Heckel, Wagner: "Ensuring consistency of conditional graph grammars-a constructive approach," ENTCA, 1995 [DV14] Varró, Deckwerth: "Attribute Handling for Generating Preconditions from Graph Constraints," ICGT, 2014.

Ra Ri Ca Ci

[HW95, DV14]

Cy Rx Rx

ACx,y,1 ACx,y,2 …

? ✔

Ra(e12 : Link) LHS 1 2 e12 1 2 e12 RHS

?

Ra(e12 : Link) LHS 1 2 e12 1 2 e12 RHS NACa,a,1 NACa,a,2 NACa,a,8

[HW95, DV14]

Spec. Sim. Test.

Advantages: mechanical algorithm, existing tool support Synthesized application conditions

19

slide-20
SLIDE 20

Kluge et al. | Real-Time Systems Lab | Prof. Dr. Andy Schürr | A systematic approach to constructing families of incremental topology control algorithms using graph transformation

Refined algorithm specification

[Failure] TCA() [Success] [Failure] [Success] Rfind-u() LHS = RHS 1 2 e12 [Success], [Failure] Ra(e12 : Link) LHS 1 2 e12 1 2 e12 Ri(e12 : Link) RHS LHS 1 2 e12 1 2 e12 RHS NACa,a,1 NACa,a,2 NACa,a,8 PACi,a,1 NACi,a,2 NACi,a,8

✔ ✔

Spec. Sim. Test.

Advantages: inductive invariant, strong consistency on termination Required: proof of termination

20

slide-21
SLIDE 21

Kluge et al. | Real-Time Systems Lab | Prof. Dr. Andy Schürr | A systematic approach to constructing families of incremental topology control algorithms using graph transformation

Topologies are never stable: Context events and dynamic topology control

Context events (CEs) reflect environmental influences Example: Link removal rule

21

TC

2 3 2 2 2 3 1 4

2 3 2 2 2 3 1 4

R-e(e12 : Link) 1 2 1 2 e12 LHS RHS

CE

2 3 2 2 3 1 4

Remove e12 Remove e21 Obstacle TC

?

slide-22
SLIDE 22

Kluge et al. | Real-Time Systems Lab | Prof. Dr. Andy Schürr | A systematic approach to constructing families of incremental topology control algorithms using graph transformation

Context event handlers: Anticipating consistency violation

22

Spec. Sim. Test. R-e(e12 : Link) 1 2 1 2 e12 LHS RHS

?

R-e(e12 : Link) 1 2 1 2 e12 LHS RHS PAC-e,i,2 PAC-e,i,6

[HW95, DV14]

[SoSyM 2017]

handle-R-e(e12 : Link) [Failure] [Success]

R-e(e12 : Link) 1 2 1 2 e12 LHS RHS Anticipate a violation of PAC-e,i,2

[Success]

Anticipate a violation of PAC-e,i,1

[Failure]

slide-23
SLIDE 23

Kluge et al. | Real-Time Systems Lab | Prof. Dr. Andy Schürr | A systematic approach to constructing families of incremental topology control algorithms using graph transformation

Consistency preservation by context event handling

─ Context event handler for R-e ─ Achieved consistency preservation

23

2 3 2 2 2 3 1 4

CE

2 3 2 2 3 1 4

Remove e12 Remove e21 Obstacle

2 3 2 2 2 3 1 4

✔ ✔ ✔

Antic. TC

handle-R-e(e12 : Link) [Failure] [Success]

R-e(e12 : Link) 1 2 1 2 e12 LHS RHS Anticipate PAC-e,i,6

[Success]

Anticipate PAC-e,i,2

[Failure]

! ! !

Pending context event Inactivate e13 Inactivate e31

slide-24
SLIDE 24

Kluge et al. | Real-Time Systems Lab | Prof. Dr. Andy Schürr | A systematic approach to constructing families of incremental topology control algorithms using graph transformation

Recap on specification phase

Global consistency properties Local consistency properties (declarative) Generic  e.g., connectivity Algorithm-specific  e.g., "no φ-triangles" implies preserves Topology control algorithm specification (operationalized)

Spec. Sim. Test.

24

[HW95, DV14]

handle-R-e(e12 : Link)

[Failure] R-e [Success] Anticipate PAC-e,i,6 [Success] Anticipate PAC-e,i,2 [Failure]

slide-25
SLIDE 25

Kluge et al. | Real-Time Systems Lab | Prof. Dr. Andy Schürr | A systematic approach to constructing families of incremental topology control algorithms using graph transformation

Tool support for simulation and testbed

cMoflon

[ECMFA17]

Java API

eMoflon SIMONSTRATOR

C Code

CONTIKI

Spec. Sim. Test.

[ECMFA17] Kluge et al: cMoflon: Model-Driven Generation of Embedded C Code for Wireless Sensor Networks. In: ECMFA 2017. LNCS 10376. [SoSyM17]

25

[HW95,DV14]

Simulation Testbed

slide-26
SLIDE 26

Kluge et al. | Real-Time Systems Lab | Prof. Dr. Andy Schürr | A systematic approach to constructing families of incremental topology control algorithms using graph transformation

Ongoing Work: From centralized to distributed topology control algorithm specifications

Centralized-global perspective of TC: TC: sequential Topology: global, consistent view TC: distributed Topology: local consistent view Distributed-local perspective of TC: TC: distributed Topology: local, inconsistent + monitoring

Global topology Read Write

Pglobal P1 P2

Global topology

Monitoring Sync Protocol P1 P2 Sync

Spec. Sim. Test.

Local views

26

slide-27
SLIDE 27

Kluge et al. | Real-Time Systems Lab | Prof. Dr. Andy Schürr | A systematic approach to constructing families of incremental topology control algorithms using graph transformation

Goal: Characterize concurrent execution + identify potential problems

  • Atomic actions: rule applications and synchronized view of topology
  • Interleaved execution: no two events at same point in time
  • Vertex-centric: A node has 1 process and 1 local-view model

Computation model

27

CE Antic. TC CE Antic. CE Antic. TC TC Centralized execution T T Distributed execution

1 2 3

A T A A T A C T

P1 Local view

Per-node control flow ("happened- before") Global control flow

slide-28
SLIDE 28

Kluge et al. | Real-Time Systems Lab | Prof. Dr. Andy Schürr | A systematic approach to constructing families of incremental topology control algorithms using graph transformation

Example: Non-termination of context handling

28

1 3

Topology Control Flow

2

T "New unmarked link!" Liveness problem due to Mutual dependency (necessary) Return to same state (sufficient)

!

3 1 2

5 7 10 A "e32 will disappear"

! !

3 1 2

5 7 10 A

!

3 1 2

5 7 10 T A

… … …

!

Pending context event

slide-29
SLIDE 29

Kluge et al. | Real-Time Systems Lab | Prof. Dr. Andy Schürr | A systematic approach to constructing families of incremental topology control algorithms using graph transformation

Take-Home Messages

Goal: Overcome curse of low abstraction in dev. of topology adaptations Result: Correct-by-construction development methodology TC algorithm families Onging work: Toward distributed-local topology control specifications

Thank you!

(i) Specification: Graph theory, … (ii) Simulation: C++, Java,… (iii) Testbed: C, Assembler-like,…

Formalization, proofs,… Localization

</>

Constraints ✓ Limitations ✓ Model Code Feedback & refinement Extensible code gen. Extensible code gen. Level of abstraction

Supplementary material on GitHub

cMoflon 29

slide-30
SLIDE 30

Kluge et al. | Real-Time Systems Lab | Prof. Dr. Andy Schürr | A systematic approach to constructing families of incremental topology control algorithms using graph transformation

References

─ eMoflon/cMoflon logos: Work of the eMoflon developer team. Subject to Fair Use conditions. ─ Peerfact logo: Multimedia Communications Lab (KOM), TU Darmstadt, https://www.kom.tu-darmstadt.de ─ Henshin logo: https://www.eclipse.org/henshin/ ─ EMF logo: https://www.eclipse.org/modeling/emf/ ─ Android logo: https://developer.android.com/distribute/marketing-tools/brand-guidelines "The Android robot is reproduced or modified from work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License." ─ TelosB Sensor node: Wiki Commons, CC-BY-3.0, by Jbasic, https://commons.wikimedia.org/wiki/File:TelosB.jpg ─ Writing Hand: CC-BY-3.0 US, Rediffusion, https://thenounproject.com/search/?q=hand%20drawing&i=29383 ─ Gears: CC-BY-3.0 US, Pedro Santos https://thenounproject.com/search/?q=gear&i=1030299 ─ GitHub Logo: CC-BY-3.0, Dave Gandy, http://www.flaticon.com/free-icon/github-logo_25231

30

Department of Electrical Engineering and Information Technology Real-Time Systems Lab

Roland Kluge, M.Sc.

roland.kluge@es.tu-darmstadt.de Phone: +49(0)6151 16-22354

  • Magdalenenstr. 4

Fax: +49(0)6151 16-22352 64289 Darmstadt www.es.tu-darmstadt.de Germany