21
Instant Bidirectional QVT Transformation for Runtime Models

Instant Bidirectional QVT Transformation for Runtime Models

  • Upload
    albina

  • View
    37

  • Download
    0

Embed Size (px)

DESCRIPTION

Instant Bidirectional QVT Transformation for Runtime Models. Runtime models. Models that represent the structure , state, configuration, etc., of an executing system Monitoring the system by reading the model Reconfiguring the system by writing th e model - PowerPoint PPT Presentation

Citation preview

Page 1: Instant Bidirectional QVT Transformation for Runtime Models

Instant Bidirectional QVT Transformation for Runtime Models

Page 2: Instant Bidirectional QVT Transformation for Runtime Models

Runtime models

• Models that represent the structure, state, configuration, etc., of an executing system– Monitoring the system by reading the model– Reconfiguring the system by writing the model– With full semantics basis and supporting tools

• A hot topic in the models community– “A new trend” by Robert France’s survey on MDE– A special session in last MoDELS, a topic in this

Page 3: Instant Bidirectional QVT Transformation for Runtime Models

Supporting runtime models

system Runtime system model

System meta-model

conforms to

RFID readers, tags, sensors…

Runtime application

model

Goods, storage…

Runtime application

model

Persons, things, rooms…

Different views according to different application concerns

Page 4: Instant Bidirectional QVT Transformation for Runtime Models

Supporting runtime models

system Runtime system model

System meta-model

conforms to

Runtime application

model

Applicationmeta-modelrelation

conforms toGuided by

Causal connection

Page 5: Instant Bidirectional QVT Transformation for Runtime Models

Approach overview

system Runtime system model

System meta-model in

MOF

conforms to

Runtime application

model

Applicationmeta-model in

MOF

Relation in QVT-R

conforms toGuided by

Instant QVT transformation

engine

Page 6: Instant Bidirectional QVT Transformation for Runtime Models

Challenge

• Instant: – Traditional transformation is from model to model

• Inefficient when the models are big• System changes are small but frequent

– Require a new execution from change to change• With live models maintained as a reference

• Bidirectional:– Not bijective, one change may corresponds to many– Need a proper and determined semantics

Page 7: Instant Bidirectional QVT Transformation for Runtime Models

Illustration

Page 8: Instant Bidirectional QVT Transformation for Runtime Models

Batching transformationsr : SysRoot

name : pkusi

ar : AppRoot

name = pkusi

rm : Room

number = 1621temp = 16.0

ps : Person

name = Huiid = 102

th : Thing

name=phoneid = 104

root

room person thing

ownownerperson

locate

sn : Sensor

id = 1621temp=16.0Bright=620.0

rd : Reader

id = 1621

tg1 : Tag

id = 102

rootreader sensor

tag

reader

add:[rd, reader, tg2]

tg2 : Tag

id = 104

Why in-efficient: the impact of the change is not the whole model, but since the change is not considered, the impact scope is not utilized

Page 9: Instant Bidirectional QVT Transformation for Runtime Models

Instant transformationsr : SysRoot

name : pkusi

ar : AppRoot

name = pkusi

rm : Room

number = 1621temp = 16.0

ps : Person

name = Huiid = 102

th : Thing

name=phoneid = 104

root

room person thing

ownownerperson

locate

sn : Sensor

id = 1621temp=16.0Bright=620.0

rd : Reader

id = 1621

tg1 : Tag

id = 102

rootreader sensor

tag

reader

add:[rd, reader, tg2]

tg2 : Tag

id = 104

set:[th, locate, rm]

Page 10: Instant Bidirectional QVT Transformation for Runtime Models

About bidirectionalsr : SysRoot

name : pkusi

ar : AppRoot

name = pkusi

rm : Room

number = 1621temp = 16.0

ps : Person

name = Huiid = 102

th : Thing

name=phoneid = 104

root

room person thing

ownownerperson

locate

sn : Sensor

id = 1621temp=16.0Bright=620.0

rd : Reader

id = 1621

tg1 : Tag

id = 102

rootreader sensor

tag

reader

tg2 : Tag

id = 104

remove:[rd, reader, tg2]set:[th, locate, null]

destroy:[th]

Page 11: Instant Bidirectional QVT Transformation for Runtime Models

Contributions of this paper

• Formal semantics of instant QVT transformation for runtime models

• Algorithms to implement instant QVT transformation

• An instant transformation engine based on mediniQVT

Page 12: Instant Bidirectional QVT Transformation for Runtime Models

Formal semantics

• Abstraction:• Properties– Consistency:

– Stability:

– Restorability:

Page 13: Instant Bidirectional QVT Transformation for Runtime Models

The algorithm

• Basic idea– Record the mapped model elements(traces)– Analyze the impact of the change• Influence no relations: stop• Influence a relation:

– Found the relevant traces, re-evaluate• Cause new groups of elements to be mapped

– Create new traces, record changes• Cause an existing trace to fail

– Delete the trace, roll-back the recorded changes

Page 14: Instant Bidirectional QVT Transformation for Runtime Models

Detailed Algorithm

Page 15: Instant Bidirectional QVT Transformation for Runtime Models

Evaluation

• Feasibility and effectiveness• Performance• Limitation

Page 16: Instant Bidirectional QVT Transformation for Runtime Models

feasibility and effectiveness

• Main case study: Our SmartLab IOT system– System meta-model: rfid readers, tags, sensors, switches,

locks– Application meta-model: rooms, persons, things

• Scenarios:– Missing personal effects– Leaving the air-conditioner on– …

• Conforms to the expectations of scenario developers• Other case studies: JOnAS-C2, JOnAS-Client/Server

Page 17: Instant Bidirectional QVT Transformation for Runtime Models

performance

• Made-up models conforming to IOT case– Control the scale– Eliminate other factors such as device invocations

Page 18: Instant Bidirectional QVT Transformation for Runtime Models

Limitation

• For modeling– Every model element must has a key attribute– Only support unordered multiple properties

• For QVT– No “where” clause (but can use when)

Page 19: Instant Bidirectional QVT Transformation for Runtime Models

Related work

• Runtime models– Usually based on code wrapping– One on TGG, but no discussion about runtime-model

specific semantics• Model transformation with semantics– On batching transformations

• Incremental transformation (supported by QVT)– Still model to model, not change to change

• Instant transformation– No transformation language, or TGG

Page 20: Instant Bidirectional QVT Transformation for Runtime Models

Conclusion

• Runtime models and causal connections• A transformation-based approach to support

causal connections– Instant, bidirectional

• Semantics• Algorithms• Implementation and evaluation

Page 21: Instant Bidirectional QVT Transformation for Runtime Models

Thank you for your attention