SlideShare a Scribd company logo
1 of 45
On the Semantics of Real-Time Domain Specific Modeling Languages  Jose E. Rivera Advisors: Francisco Durán, Antonio Vallecillo PhDDefense Málaga, October 2010
Agenda Origins of Model-DrivenEngineering (MDE) MDE and itsmaintechnologies Definition of a DomainSpecificModelingLanguage (DSML) Ourapproach Specifying time-dependentbehavior of DSMLs Extension of in-place modeltransformation ProvidingDSMLswithsemantics (usingMaude) Modelmanagenent Simulation and analysis Contributions Futurework 2/44
Origins of modeldrivenengineering Software researchershavebeencreatingabstractionsto help them develop software systems: 3/44 X-orientedprogramming ??? … Component-orientedprogramming Object-orientedprogramming Structuredprogramming Assembler
Origins of modeldrivenengineering Whyabstractions? Lowlevel, littleexpresiveness Problem: programming! Computing-oriented focus: abstractions of the solution space Solution: abstractionsof the problem space 4/44
Modeldrivenengineering Create a model of thesystem Models are nottobeused as meredocumentation Simulation and analysis Drive final implementation 5/44
Model driven engineering Precise and formal semanticsneededto Facilitate unambiguous communication among model developers Enable the development of formal analysis and simulation tools Avoid semantic mismatches between design models and modeling languages of analysis tools 6/44
Model Driven Engineering (MDE) Models as first class entities. Twomaintechnologies: Domain Specific Modeling Languages (DSMLs) Notation close to the problem domain and intuitive for domain experts Model transformations Automatically synthesize alternative model representations, source code… 7/44 DSML DSML’ Model Transformation written in written in System’ Model Model’ represents represents System
Definition of a DSML 8/44 Behavior?? Semantics?? METAMODEL Conformsto CONCRETE SYNTAX MODEL
Definition of a DSML Behavior coded in the target (semantic) domain itself 9/44 Java AbstractState Machines First-OrderLogic …
Definition of a DSML (revisited) 10/44 TWO  VIEWS Structure:Structuralmodel, concrete syntax, structuralsemantics Behavior:Behavioralmodel, concrete syntax, behavioralsemantics
Definition of a DSML (revisited) Behavior as an intuitive model Precise semantics A set of (equivalent) notations A set of analysis tools Underlying logic 11/44 StructuralModel BehavioralModel + DSML’S STRUCTURE                        AND BEHAVIOR SEMANTIC MAPPINGS                (MODEL TRANSFORMATIONS) SEMANTIC DOMAINS MT3 MT1 MT2 Rewritinglogic (Reachabilityanalysis,  modelchecking…) Petrinets (Termination,  confluence…) …
Our approach 12/44 Ecore (MOF) (metamodel) (ext. of in-place MT) Structural Model Behavioral Model DSVL’S VIEWS Definedbytheuser + (Structural and behavioral) SEMANTIC MAPPINGS Transparenttotheuser SEMANTIC DOMAIN Transparenttotheuser RewritingLogic Maude Simulation, reachabilityanalysis, modelchecking
In-place modeltransformation Models, metamodels and model transformation are the key artifacts of MDE Intuitive and close to the problem domain Source and target models are the same 13/44
Extending in-place modeltransformation Why an extension? To cope with real-time systems Assist users to avoid driving the system to inconsistent time-states To refer to and reason about action executions To avoid modifying the metamodel (structure) to include (time and action) behavioral information Wewanttheuserjusttofocusonthecomplexity of his/hersystem Intrinsiccomplexity vs. accidental complexity 14/44
Extension of in-place modeltransformation*: A model of timedbehavior Twokind of timed rules: atomic and ongoing Periodicity Rule executions: normal and soft; scheduledactions. Global time elapse (clock) A mechanism to state action properties Actionexecutions OCL expressions, operations and variables (mOdCL) A graphical framework in Eclipse 15/44 * “A graphical approach for modeling time-dependent behavior of DSLs”. VL/HCC'09
Atomicactions Actionswitha specific duration (interval of time) TheSwitchOn rule 16/44
Instantaneousactions Atomic rules with no duration The BatteryOff rule Rule execution modes: normal and soft; scheduled 17/44
Periodicity Atomic rules can beperiodic TheCoverage rule OCL operations 18/44
Ongoingactions Actions that progress continuously with time while the rule preconditions (LHS and not NACs) hold TheBatteryConsumption rule 19/44
Actionexecutions An action execution element refers to one action:  Type; status; participants; starting, ending and execution time They can limit concurrency, refer to past actions, interrupt actions… TheCall rule 20/44
Actionexecutions 21/44 Referingtopastactions
Actionexecutions Interruptingactions 22/44
Our approach 23/44 Ecore (MOF) Structural Model Behavioral Model DSVL’S VIEWS Definedbytheuser + (Structural and behavioral) SEMANTIC MAPPINGS Transparenttotheuser SEMANTIC DOMAIN Transparenttotheuser RewritingLogic Maude* Simulation, reachabilityanalysis, modelchecking * “Formal specification and analysis of domain specific languages using Maude”. SIMULATION, 2009
Maude Wide-spectrum programing language based on rewriting logic Membership equational logic as its underlying equational theory Why Maude? Deals with complex structural and behavioral specifications Succesfully used in a wide range of projects Efficient  High level of abstraction Powerful toolkit: simulation, reachability analysis, model checking,… Integrated in Eclipse (MOMENT) Model of time (Real-time Maude) 24/44
MembershipEquationalLogic (MEL) Hornlogic Equalities (t = t’) Membershipassertions (t : S) MEL theoryΓ = (Σ, Ε) Σ : sorts, subsorts, kinds and overloadedoperators Ε : equations and memberships Example: natural numbers (Peanonotation) 25/44
RewritingLogic (RL) Logic of change Parametrizedbyitsunderlyingequationallogic RL theory = (Σ, Ε, R) (Σ, Ε) : Equationaltheory R : rewrite rules [t]E    [t’]E Example: Board 26/44
RepresentingmetamodelswithMaude 27/44 op@MPNs@: -> @Metamodel . opMPNs: -> @Package . sort MPN . subsort MPN < @Class . op MPN : -> MPN . els : -> @Reference . sortPositionedEl . subsortPositionedEl < @Class . opPositionedEl : -> PositionedEl . opxPos : -> @Attribute . opyPos : -> @Attribue . sortPhone . subsortPhone< PositionedEl . opPhone: -> Phone. opcontacts : -> @Reference. opdialedCalls : -> @Reference . opreceivedCalls: -> @Reference . opon : -> @Attribute . opbattery : -> @Attribute .    … eqisAbstract(Phone) = false . ... eqtype(contacts) = Phone . eqopposite(contacts) = null . eqlowerBound(contacts) = 0 . equpperBound(contacts) = * . … eqtype(on) = @Bool. eqlowerBound(on) = 1 . equpperBound(on) = 1 .
Representing models with Maude 28/44 mpn 111 battery = 100 xPos = 5 yPos = 45 a1 222 xPos = 25 yPos = 35 444 battery = 50 xPos = 45 yPos = 35 battery = 50 xPos = 65 yPos = 25 333 a2 xPos = 55 yPos = 15 battery = 100 xPos = 15 yPos = 15 xSize = 80 ySize = 50 MPN { < ’mpn : MPN | els : Set{a ; ’p1 ; ’p2 ; ’p3} # xSize : 80 # ySize : 50 > < ’a : Antenna | xPos : 100 # yPos : 50 > < ’p1 : Phone | dialedCalls : OrderedSet [ ] # receivedCalls : OrderedSet [ ] #                contacts : OrderedSet[’p2 # ’p3 # ’p4] # number : 111 # on : false # battery : 100 # coverage : 0 # bps : 1 # xPos : 5 # yPos : 45 # xDir : 1 # yDir : 0 > < ’p2 : Phone | dialedCalls : OrderedSet [ ] # receivedCalls : OrderedSet [ ] # contacts : OrderedSet[’p1 # ’p3 # ’p4] # number : 222 # on : false # battery : 50 # coverage : 0 # bps : 1 # xPos : 45 # yPos : 35 # xDir : 0 # yDir : -1 > < ’p3 : Phone | dialedCalls : OrderedSet [ ] # receivedCalls : OrderedSet [ ] # contacts : OrderedSet[’p1 # ’p2 # ’p4] # number : 333 # on : false # battery : 100 # coverage : 0 # bps : 1 #xPos : 15 #yPos : 15 # xDir : 0 # yDir : 1 > … }
Representing behavior with Maude* 29/44 * “Adding behavioral semantics to models”. EDOC’07.
Representing timed behavior with Maude Real-time Maude’smodel of time Delta Tick rule Time Elapse Mte crl [tick] :     {MODEL} =>     {delta(MODEL , T)} in time T  if T<= mte(MODEL)  [nonexec] . Instantaneous rules Dynamicbehavior 30/44
Representing timed behavior with Maude* 31/44 Preconditionsatisfied -> CreatesanActionExecobjectwithtwotimers  and informationabouttheoccurrence Triggeringinstantaneous rule Atomic rule After [t1,t2] Realization Instantaneous rule Participantsstillthere -> Performtheaction Preconditionsatisfied -> CreatesanActionExecobjectwithjustinformationabouttheoccurrence Initial Instantaneous rule Ongoing rule In next time elapse, whenmteiscomputed applyOngoingRulesequation (in delta) Preconditionsatisfied -> Performtheaction Decreasestimers of ActionExec, updatestheclockinstance, appliesongoing rules Delta Tick rule Time elapse Computedwiththeinformation of            ActionExecobjects Mte * “On the behavioral semantics of real-time domain specific visual languages”. WRLA’10
Atomic Rules 32/44 Triggering Realization
Ongoing rules 33/44 Initial Realization
Time elapse 34/44         delta crl [tick] :    {MODEL}  in time T =>    {delta(MODEL , TE)} in time (T  plus TE) if TE := mte(MODEL)     /TE =/= zero . mte
Toolsupport: modelmanagement* Eclipse plugin Mauderemainstransparenttotheuser 35/44 MAUDELING * “Formal and toolsupportformodel driven engineering with Maude.” JOT, 2007
Modelmanagement Modeldifference* (Structuraloridentifier) matching + differencing Properties: Model as a result Independent of the metamodel of the source models Self-contained. Do, undo, compose. Compact Non tree-based: Can detect moved elementsthroughdifferentlevels Failingtoidentify a match doesnotconditionother potencial matches 36/44 * “Representing and operating with model differences”. TOOLS’08
Modelmanagement Modelsubtyping* Modeltype: essentiallyits metamodel Modeloperationsreuse Type safety; polymorfism in MDE 4 kinds of subtyping: relaxation yes/no on name relations and packagestructure Modelmetrics No. of classes, maximum DIT, average No. of attributes… 37/44 * “Subtipado de modelos: una definición basada en la sustitución entre tipos y ...”. IDEAS’08
Modeledition Eclipse plugin 38/44
Model simulation 39/44
Time-bounded analysis Reachability Analysis Deadlock, invariants, etc. LTL Model checking Liveness properties  40/44 searchinit(mpnsModel) =>*    { @MPN@ { < O : AtomicActionExec | action :  “BatteryOffCaller” #  status : realized # SFS >      OBJSET}  }  in time T  suchthat (T le 100) .
Contributions Formal specification of real-Time DSMLs Twoviews: structure and behavior A language and a graphical tool to define time-dependent behavior of DSMLs Extension of in-place model transformation Model of timed behavior Mechanism to state action properties Formalization of real-Time DSMLs with Maude Automatic generation of the Maude specifications Model management Simulation and (reachability and model checking) analysis 41/44
Contributions Tool support: Metamodel, parser and serializer for (a subset of) Maude Model Management Model transformation from EMF metamodels to Maude Model transformations from EMF models to Maude and viceversa Analysis of DSMLs for AToM3*               Simulation and analysis of Real-Time DSMLs Model transformation from e-Motions to Maude Integration with Maude’s simulation facilities Integration with mOdCL 42/44 MAUDELING * ”Analyzing rule-basedbehavioral semantics of visual modeling languages with Maude”. SLE’08
FutureWork Model management Consider OCL constraints in model subtyping Formal proof of difference-related operations relationships Model simulation and analysis with Complete integration of Maude analysis tools  Reachability analysis and model checking Querying the result of a simulation Encoding refinement  Non-usedfeatures Untimedanalysis … OCL completion and validation Debugging and traceability 43/44
FutureWork Furtheranalysis Reachablemodelssatisfy metamodel constraints? Non-functional properties and QoS requirements* 44/44 * “Simulatingdomainspecific visual modelsby observation”. DEVS'10
On the Semantics of Real-Time Domain Specific Modeling Languages  Jose E. Rivera Advisors: Francisco Durán, Antonio Vallecillo PhDDefense Málaga, October 2010

More Related Content

What's hot

Convolution Neural Networks
Convolution Neural NetworksConvolution Neural Networks
Convolution Neural Networks
AhmedMahany
 

What's hot (20)

Deep Learning, Scala, and Spark
Deep Learning, Scala, and SparkDeep Learning, Scala, and Spark
Deep Learning, Scala, and Spark
 
Deep Learning: R with Keras and TensorFlow
Deep Learning: R with Keras and TensorFlowDeep Learning: R with Keras and TensorFlow
Deep Learning: R with Keras and TensorFlow
 
From programming to software engineering: ICSE keynote slides available
From programming to software engineering: ICSE keynote slides availableFrom programming to software engineering: ICSE keynote slides available
From programming to software engineering: ICSE keynote slides available
 
Java and Deep Learning (Introduction)
Java and Deep Learning (Introduction)Java and Deep Learning (Introduction)
Java and Deep Learning (Introduction)
 
nn network
nn networknn network
nn network
 
C++ and Deep Learning
C++ and Deep LearningC++ and Deep Learning
C++ and Deep Learning
 
Deep Learning: Recurrent Neural Network (Chapter 10)
Deep Learning: Recurrent Neural Network (Chapter 10) Deep Learning: Recurrent Neural Network (Chapter 10)
Deep Learning: Recurrent Neural Network (Chapter 10)
 
Scala and Deep Learning
Scala and Deep LearningScala and Deep Learning
Scala and Deep Learning
 
Analysis of algorithms
Analysis of algorithmsAnalysis of algorithms
Analysis of algorithms
 
Function Approx2009
Function Approx2009Function Approx2009
Function Approx2009
 
Deep Learning, Keras, and TensorFlow
Deep Learning, Keras, and TensorFlowDeep Learning, Keras, and TensorFlow
Deep Learning, Keras, and TensorFlow
 
Learning Financial Market Data with Recurrent Autoencoders and TensorFlow
Learning Financial Market Data with Recurrent Autoencoders and TensorFlowLearning Financial Market Data with Recurrent Autoencoders and TensorFlow
Learning Financial Market Data with Recurrent Autoencoders and TensorFlow
 
Convolution Neural Networks
Convolution Neural NetworksConvolution Neural Networks
Convolution Neural Networks
 
TensorFlow in Your Browser
TensorFlow in Your BrowserTensorFlow in Your Browser
TensorFlow in Your Browser
 
Class
ClassClass
Class
 
Deep Learning and TensorFlow
Deep Learning and TensorFlowDeep Learning and TensorFlow
Deep Learning and TensorFlow
 
Presentation Slides - Genetic algorithm based key generation for fully homomo...
Presentation Slides - Genetic algorithm based key generation for fully homomo...Presentation Slides - Genetic algorithm based key generation for fully homomo...
Presentation Slides - Genetic algorithm based key generation for fully homomo...
 
Semi-Supervised Autoencoders for Predicting Sentiment Distributions(第 5 回 De...
 Semi-Supervised Autoencoders for Predicting Sentiment Distributions(第 5 回 De... Semi-Supervised Autoencoders for Predicting Sentiment Distributions(第 5 回 De...
Semi-Supervised Autoencoders for Predicting Sentiment Distributions(第 5 回 De...
 
Workshop - Introduction to Machine Learning with R
Workshop - Introduction to Machine Learning with RWorkshop - Introduction to Machine Learning with R
Workshop - Introduction to Machine Learning with R
 
Development of Multi-Level ROM
Development of Multi-Level ROMDevelopment of Multi-Level ROM
Development of Multi-Level ROM
 

Viewers also liked

Minutes of bod meeting august 14'
Minutes of bod meeting august 14'Minutes of bod meeting august 14'
Minutes of bod meeting august 14'
Marivic Aloc
 
黃問_如何問出好問題 _台北市健言社(作大夢的歐吉桑)
黃問_如何問出好問題 _台北市健言社(作大夢的歐吉桑)黃問_如何問出好問題 _台北市健言社(作大夢的歐吉桑)
黃問_如何問出好問題 _台北市健言社(作大夢的歐吉桑)
Alan Huang
 
11g r2新特性之standby max_data_delay
11g r2新特性之standby max_data_delay11g r2新特性之standby max_data_delay
11g r2新特性之standby max_data_delay
maclean liu
 
Oracle10g高级安全特性列加密技术
Oracle10g高级安全特性列加密技术Oracle10g高级安全特性列加密技术
Oracle10g高级安全特性列加密技术
maclean liu
 
Curriculum fernando muñoz
Curriculum fernando muñozCurriculum fernando muñoz
Curriculum fernando muñoz
fernando
 
有評有具--講評3部曲之首部曲(作大夢的歐吉桑)
有評有具--講評3部曲之首部曲(作大夢的歐吉桑)有評有具--講評3部曲之首部曲(作大夢的歐吉桑)
有評有具--講評3部曲之首部曲(作大夢的歐吉桑)
Alan Huang
 
Ifc 2010 workshop david and goliath
Ifc 2010 workshop   david and goliathIfc 2010 workshop   david and goliath
Ifc 2010 workshop david and goliath
Jason Potts
 
Forward Progress Energy Field
Forward Progress Energy FieldForward Progress Energy Field
Forward Progress Energy Field
Mario Pinardo
 
Gebruiksaanwijzing platformweegschaal
Gebruiksaanwijzing platformweegschaalGebruiksaanwijzing platformweegschaal
Gebruiksaanwijzing platformweegschaal
laurenztack
 
Benchmarks riet picknicken
Benchmarks riet picknickenBenchmarks riet picknicken
Benchmarks riet picknicken
laurenztack
 
IIM A _ presentation
IIM A _ presentationIIM A _ presentation
IIM A _ presentation
Jalaj Saxena
 
Vision and Planning Energy Field
Vision and Planning Energy FieldVision and Planning Energy Field
Vision and Planning Energy Field
Mario Pinardo
 

Viewers also liked (20)

Main
MainMain
Main
 
P _n___l_accounting_website
P  _n___l_accounting_websiteP  _n___l_accounting_website
P _n___l_accounting_website
 
Minutes of bod meeting august 14'
Minutes of bod meeting august 14'Minutes of bod meeting august 14'
Minutes of bod meeting august 14'
 
黃問_如何問出好問題 _台北市健言社(作大夢的歐吉桑)
黃問_如何問出好問題 _台北市健言社(作大夢的歐吉桑)黃問_如何問出好問題 _台北市健言社(作大夢的歐吉桑)
黃問_如何問出好問題 _台北市健言社(作大夢的歐吉桑)
 
11g r2新特性之standby max_data_delay
11g r2新特性之standby max_data_delay11g r2新特性之standby max_data_delay
11g r2新特性之standby max_data_delay
 
Oracle10g高级安全特性列加密技术
Oracle10g高级安全特性列加密技术Oracle10g高级安全特性列加密技术
Oracle10g高级安全特性列加密技术
 
Curriculum fernando muñoz
Curriculum fernando muñozCurriculum fernando muñoz
Curriculum fernando muñoz
 
有評有具--講評3部曲之首部曲(作大夢的歐吉桑)
有評有具--講評3部曲之首部曲(作大夢的歐吉桑)有評有具--講評3部曲之首部曲(作大夢的歐吉桑)
有評有具--講評3部曲之首部曲(作大夢的歐吉桑)
 
Ifc 2010 workshop david and goliath
Ifc 2010 workshop   david and goliathIfc 2010 workshop   david and goliath
Ifc 2010 workshop david and goliath
 
Forward Progress Energy Field
Forward Progress Energy FieldForward Progress Energy Field
Forward Progress Energy Field
 
Der Weg weg von TemplaVoila
Der Weg weg von TemplaVoilaDer Weg weg von TemplaVoila
Der Weg weg von TemplaVoila
 
Gebruiksaanwijzing platformweegschaal
Gebruiksaanwijzing platformweegschaalGebruiksaanwijzing platformweegschaal
Gebruiksaanwijzing platformweegschaal
 
Exploration of Professional Learning Communities (PLCs)
Exploration of Professional Learning Communities (PLCs)Exploration of Professional Learning Communities (PLCs)
Exploration of Professional Learning Communities (PLCs)
 
The Gambling Industry
The Gambling IndustryThe Gambling Industry
The Gambling Industry
 
Benchmarks riet picknicken
Benchmarks riet picknickenBenchmarks riet picknicken
Benchmarks riet picknicken
 
IIM A _ presentation
IIM A _ presentationIIM A _ presentation
IIM A _ presentation
 
Vision and Planning Energy Field
Vision and Planning Energy FieldVision and Planning Energy Field
Vision and Planning Energy Field
 
New Zealand Franchising Confidence Index | July 2015
New Zealand Franchising Confidence Index | July 2015New Zealand Franchising Confidence Index | July 2015
New Zealand Franchising Confidence Index | July 2015
 
Adh
AdhAdh
Adh
 
Etech: Online & Hands-on Learning for Manufacturing Employers
Etech: Online & Hands-on Learning for Manufacturing EmployersEtech: Online & Hands-on Learning for Manufacturing Employers
Etech: Online & Hands-on Learning for Manufacturing Employers
 

Similar to On the Semantics of Real-Time Domain Specific Modeling Languages

Session 3.1 HCI (1).pptx
Session 3.1 HCI (1).pptxSession 3.1 HCI (1).pptx
Session 3.1 HCI (1).pptx
raghuinfo
 
Master Thesis Presentation
Master Thesis PresentationMaster Thesis Presentation
Master Thesis Presentation
Mohamed Sobh
 

Similar to On the Semantics of Real-Time Domain Specific Modeling Languages (20)

Software development effort reduction with Co-op
Software development effort reduction with Co-opSoftware development effort reduction with Co-op
Software development effort reduction with Co-op
 
Language translation with Deep Learning (RNN) with TensorFlow
Language translation with Deep Learning (RNN) with TensorFlowLanguage translation with Deep Learning (RNN) with TensorFlow
Language translation with Deep Learning (RNN) with TensorFlow
 
Keynote at IWLS 2017
Keynote at IWLS 2017Keynote at IWLS 2017
Keynote at IWLS 2017
 
A Tale of Three Deep Learning Frameworks: TensorFlow, Keras, & PyTorch with B...
A Tale of Three Deep Learning Frameworks: TensorFlow, Keras, & PyTorch with B...A Tale of Three Deep Learning Frameworks: TensorFlow, Keras, & PyTorch with B...
A Tale of Three Deep Learning Frameworks: TensorFlow, Keras, & PyTorch with B...
 
And Then There Are Algorithms - Danilo Poccia - Codemotion Rome 2018
And Then There Are Algorithms - Danilo Poccia - Codemotion Rome 2018And Then There Are Algorithms - Danilo Poccia - Codemotion Rome 2018
And Then There Are Algorithms - Danilo Poccia - Codemotion Rome 2018
 
Google Big Data Expo
Google Big Data ExpoGoogle Big Data Expo
Google Big Data Expo
 
Modelica-OpenModelica-slides para aprender.pdf
Modelica-OpenModelica-slides para aprender.pdfModelica-OpenModelica-slides para aprender.pdf
Modelica-OpenModelica-slides para aprender.pdf
 
Model Transformation Reuse
Model Transformation ReuseModel Transformation Reuse
Model Transformation Reuse
 
Session 3.1 HCI (1).pptx
Session 3.1 HCI (1).pptxSession 3.1 HCI (1).pptx
Session 3.1 HCI (1).pptx
 
Csmr10a.ppt
Csmr10a.pptCsmr10a.ppt
Csmr10a.ppt
 
Master Thesis Presentation
Master Thesis PresentationMaster Thesis Presentation
Master Thesis Presentation
 
EKON 23 Code_review_checklist
EKON 23 Code_review_checklistEKON 23 Code_review_checklist
EKON 23 Code_review_checklist
 
BlaBlaConf'22 The art of MLOps in TensorFlow Ecosystem
BlaBlaConf'22 The art of MLOps in TensorFlow EcosystemBlaBlaConf'22 The art of MLOps in TensorFlow Ecosystem
BlaBlaConf'22 The art of MLOps in TensorFlow Ecosystem
 
AutoML lectures (ACDL 2019)
AutoML lectures (ACDL 2019)AutoML lectures (ACDL 2019)
AutoML lectures (ACDL 2019)
 
2013 Lecture 5: AR Tools and Interaction
2013 Lecture 5: AR Tools and Interaction 2013 Lecture 5: AR Tools and Interaction
2013 Lecture 5: AR Tools and Interaction
 
CSMR10a.ppt
CSMR10a.pptCSMR10a.ppt
CSMR10a.ppt
 
AI and Deep Learning
AI and Deep Learning AI and Deep Learning
AI and Deep Learning
 
Problem solving using computers - Unit 1 - Study material
Problem solving using computers - Unit 1 - Study materialProblem solving using computers - Unit 1 - Study material
Problem solving using computers - Unit 1 - Study material
 
My Postdoctoral Research
My Postdoctoral ResearchMy Postdoctoral Research
My Postdoctoral Research
 
Generic Model-based Approaches for Software Reverse Engineering and Comprehen...
Generic Model-based Approaches for Software Reverse Engineering and Comprehen...Generic Model-based Approaches for Software Reverse Engineering and Comprehen...
Generic Model-based Approaches for Software Reverse Engineering and Comprehen...
 

On the Semantics of Real-Time Domain Specific Modeling Languages

  • 1. On the Semantics of Real-Time Domain Specific Modeling Languages Jose E. Rivera Advisors: Francisco Durán, Antonio Vallecillo PhDDefense Málaga, October 2010
  • 2. Agenda Origins of Model-DrivenEngineering (MDE) MDE and itsmaintechnologies Definition of a DomainSpecificModelingLanguage (DSML) Ourapproach Specifying time-dependentbehavior of DSMLs Extension of in-place modeltransformation ProvidingDSMLswithsemantics (usingMaude) Modelmanagenent Simulation and analysis Contributions Futurework 2/44
  • 3. Origins of modeldrivenengineering Software researchershavebeencreatingabstractionsto help them develop software systems: 3/44 X-orientedprogramming ??? … Component-orientedprogramming Object-orientedprogramming Structuredprogramming Assembler
  • 4. Origins of modeldrivenengineering Whyabstractions? Lowlevel, littleexpresiveness Problem: programming! Computing-oriented focus: abstractions of the solution space Solution: abstractionsof the problem space 4/44
  • 5. Modeldrivenengineering Create a model of thesystem Models are nottobeused as meredocumentation Simulation and analysis Drive final implementation 5/44
  • 6. Model driven engineering Precise and formal semanticsneededto Facilitate unambiguous communication among model developers Enable the development of formal analysis and simulation tools Avoid semantic mismatches between design models and modeling languages of analysis tools 6/44
  • 7. Model Driven Engineering (MDE) Models as first class entities. Twomaintechnologies: Domain Specific Modeling Languages (DSMLs) Notation close to the problem domain and intuitive for domain experts Model transformations Automatically synthesize alternative model representations, source code… 7/44 DSML DSML’ Model Transformation written in written in System’ Model Model’ represents represents System
  • 8. Definition of a DSML 8/44 Behavior?? Semantics?? METAMODEL Conformsto CONCRETE SYNTAX MODEL
  • 9. Definition of a DSML Behavior coded in the target (semantic) domain itself 9/44 Java AbstractState Machines First-OrderLogic …
  • 10. Definition of a DSML (revisited) 10/44 TWO VIEWS Structure:Structuralmodel, concrete syntax, structuralsemantics Behavior:Behavioralmodel, concrete syntax, behavioralsemantics
  • 11. Definition of a DSML (revisited) Behavior as an intuitive model Precise semantics A set of (equivalent) notations A set of analysis tools Underlying logic 11/44 StructuralModel BehavioralModel + DSML’S STRUCTURE AND BEHAVIOR SEMANTIC MAPPINGS (MODEL TRANSFORMATIONS) SEMANTIC DOMAINS MT3 MT1 MT2 Rewritinglogic (Reachabilityanalysis, modelchecking…) Petrinets (Termination, confluence…) …
  • 12. Our approach 12/44 Ecore (MOF) (metamodel) (ext. of in-place MT) Structural Model Behavioral Model DSVL’S VIEWS Definedbytheuser + (Structural and behavioral) SEMANTIC MAPPINGS Transparenttotheuser SEMANTIC DOMAIN Transparenttotheuser RewritingLogic Maude Simulation, reachabilityanalysis, modelchecking
  • 13. In-place modeltransformation Models, metamodels and model transformation are the key artifacts of MDE Intuitive and close to the problem domain Source and target models are the same 13/44
  • 14. Extending in-place modeltransformation Why an extension? To cope with real-time systems Assist users to avoid driving the system to inconsistent time-states To refer to and reason about action executions To avoid modifying the metamodel (structure) to include (time and action) behavioral information Wewanttheuserjusttofocusonthecomplexity of his/hersystem Intrinsiccomplexity vs. accidental complexity 14/44
  • 15. Extension of in-place modeltransformation*: A model of timedbehavior Twokind of timed rules: atomic and ongoing Periodicity Rule executions: normal and soft; scheduledactions. Global time elapse (clock) A mechanism to state action properties Actionexecutions OCL expressions, operations and variables (mOdCL) A graphical framework in Eclipse 15/44 * “A graphical approach for modeling time-dependent behavior of DSLs”. VL/HCC'09
  • 16. Atomicactions Actionswitha specific duration (interval of time) TheSwitchOn rule 16/44
  • 17. Instantaneousactions Atomic rules with no duration The BatteryOff rule Rule execution modes: normal and soft; scheduled 17/44
  • 18. Periodicity Atomic rules can beperiodic TheCoverage rule OCL operations 18/44
  • 19. Ongoingactions Actions that progress continuously with time while the rule preconditions (LHS and not NACs) hold TheBatteryConsumption rule 19/44
  • 20. Actionexecutions An action execution element refers to one action: Type; status; participants; starting, ending and execution time They can limit concurrency, refer to past actions, interrupt actions… TheCall rule 20/44
  • 23. Our approach 23/44 Ecore (MOF) Structural Model Behavioral Model DSVL’S VIEWS Definedbytheuser + (Structural and behavioral) SEMANTIC MAPPINGS Transparenttotheuser SEMANTIC DOMAIN Transparenttotheuser RewritingLogic Maude* Simulation, reachabilityanalysis, modelchecking * “Formal specification and analysis of domain specific languages using Maude”. SIMULATION, 2009
  • 24. Maude Wide-spectrum programing language based on rewriting logic Membership equational logic as its underlying equational theory Why Maude? Deals with complex structural and behavioral specifications Succesfully used in a wide range of projects Efficient High level of abstraction Powerful toolkit: simulation, reachability analysis, model checking,… Integrated in Eclipse (MOMENT) Model of time (Real-time Maude) 24/44
  • 25. MembershipEquationalLogic (MEL) Hornlogic Equalities (t = t’) Membershipassertions (t : S) MEL theoryΓ = (Σ, Ε) Σ : sorts, subsorts, kinds and overloadedoperators Ε : equations and memberships Example: natural numbers (Peanonotation) 25/44
  • 26. RewritingLogic (RL) Logic of change Parametrizedbyitsunderlyingequationallogic RL theory = (Σ, Ε, R) (Σ, Ε) : Equationaltheory R : rewrite rules [t]E [t’]E Example: Board 26/44
  • 27. RepresentingmetamodelswithMaude 27/44 op@MPNs@: -> @Metamodel . opMPNs: -> @Package . sort MPN . subsort MPN < @Class . op MPN : -> MPN . els : -> @Reference . sortPositionedEl . subsortPositionedEl < @Class . opPositionedEl : -> PositionedEl . opxPos : -> @Attribute . opyPos : -> @Attribue . sortPhone . subsortPhone< PositionedEl . opPhone: -> Phone. opcontacts : -> @Reference. opdialedCalls : -> @Reference . opreceivedCalls: -> @Reference . opon : -> @Attribute . opbattery : -> @Attribute . … eqisAbstract(Phone) = false . ... eqtype(contacts) = Phone . eqopposite(contacts) = null . eqlowerBound(contacts) = 0 . equpperBound(contacts) = * . … eqtype(on) = @Bool. eqlowerBound(on) = 1 . equpperBound(on) = 1 .
  • 28. Representing models with Maude 28/44 mpn 111 battery = 100 xPos = 5 yPos = 45 a1 222 xPos = 25 yPos = 35 444 battery = 50 xPos = 45 yPos = 35 battery = 50 xPos = 65 yPos = 25 333 a2 xPos = 55 yPos = 15 battery = 100 xPos = 15 yPos = 15 xSize = 80 ySize = 50 MPN { < ’mpn : MPN | els : Set{a ; ’p1 ; ’p2 ; ’p3} # xSize : 80 # ySize : 50 > < ’a : Antenna | xPos : 100 # yPos : 50 > < ’p1 : Phone | dialedCalls : OrderedSet [ ] # receivedCalls : OrderedSet [ ] # contacts : OrderedSet[’p2 # ’p3 # ’p4] # number : 111 # on : false # battery : 100 # coverage : 0 # bps : 1 # xPos : 5 # yPos : 45 # xDir : 1 # yDir : 0 > < ’p2 : Phone | dialedCalls : OrderedSet [ ] # receivedCalls : OrderedSet [ ] # contacts : OrderedSet[’p1 # ’p3 # ’p4] # number : 222 # on : false # battery : 50 # coverage : 0 # bps : 1 # xPos : 45 # yPos : 35 # xDir : 0 # yDir : -1 > < ’p3 : Phone | dialedCalls : OrderedSet [ ] # receivedCalls : OrderedSet [ ] # contacts : OrderedSet[’p1 # ’p2 # ’p4] # number : 333 # on : false # battery : 100 # coverage : 0 # bps : 1 #xPos : 15 #yPos : 15 # xDir : 0 # yDir : 1 > … }
  • 29. Representing behavior with Maude* 29/44 * “Adding behavioral semantics to models”. EDOC’07.
  • 30. Representing timed behavior with Maude Real-time Maude’smodel of time Delta Tick rule Time Elapse Mte crl [tick] : {MODEL} => {delta(MODEL , T)} in time T if T<= mte(MODEL) [nonexec] . Instantaneous rules Dynamicbehavior 30/44
  • 31. Representing timed behavior with Maude* 31/44 Preconditionsatisfied -> CreatesanActionExecobjectwithtwotimers and informationabouttheoccurrence Triggeringinstantaneous rule Atomic rule After [t1,t2] Realization Instantaneous rule Participantsstillthere -> Performtheaction Preconditionsatisfied -> CreatesanActionExecobjectwithjustinformationabouttheoccurrence Initial Instantaneous rule Ongoing rule In next time elapse, whenmteiscomputed applyOngoingRulesequation (in delta) Preconditionsatisfied -> Performtheaction Decreasestimers of ActionExec, updatestheclockinstance, appliesongoing rules Delta Tick rule Time elapse Computedwiththeinformation of ActionExecobjects Mte * “On the behavioral semantics of real-time domain specific visual languages”. WRLA’10
  • 32. Atomic Rules 32/44 Triggering Realization
  • 33. Ongoing rules 33/44 Initial Realization
  • 34. Time elapse 34/44 delta crl [tick] : {MODEL} in time T => {delta(MODEL , TE)} in time (T plus TE) if TE := mte(MODEL) /TE =/= zero . mte
  • 35. Toolsupport: modelmanagement* Eclipse plugin Mauderemainstransparenttotheuser 35/44 MAUDELING * “Formal and toolsupportformodel driven engineering with Maude.” JOT, 2007
  • 36. Modelmanagement Modeldifference* (Structuraloridentifier) matching + differencing Properties: Model as a result Independent of the metamodel of the source models Self-contained. Do, undo, compose. Compact Non tree-based: Can detect moved elementsthroughdifferentlevels Failingtoidentify a match doesnotconditionother potencial matches 36/44 * “Representing and operating with model differences”. TOOLS’08
  • 37. Modelmanagement Modelsubtyping* Modeltype: essentiallyits metamodel Modeloperationsreuse Type safety; polymorfism in MDE 4 kinds of subtyping: relaxation yes/no on name relations and packagestructure Modelmetrics No. of classes, maximum DIT, average No. of attributes… 37/44 * “Subtipado de modelos: una definición basada en la sustitución entre tipos y ...”. IDEAS’08
  • 40. Time-bounded analysis Reachability Analysis Deadlock, invariants, etc. LTL Model checking Liveness properties 40/44 searchinit(mpnsModel) =>* { @MPN@ { < O : AtomicActionExec | action : “BatteryOffCaller” # status : realized # SFS > OBJSET} } in time T suchthat (T le 100) .
  • 41. Contributions Formal specification of real-Time DSMLs Twoviews: structure and behavior A language and a graphical tool to define time-dependent behavior of DSMLs Extension of in-place model transformation Model of timed behavior Mechanism to state action properties Formalization of real-Time DSMLs with Maude Automatic generation of the Maude specifications Model management Simulation and (reachability and model checking) analysis 41/44
  • 42. Contributions Tool support: Metamodel, parser and serializer for (a subset of) Maude Model Management Model transformation from EMF metamodels to Maude Model transformations from EMF models to Maude and viceversa Analysis of DSMLs for AToM3* Simulation and analysis of Real-Time DSMLs Model transformation from e-Motions to Maude Integration with Maude’s simulation facilities Integration with mOdCL 42/44 MAUDELING * ”Analyzing rule-basedbehavioral semantics of visual modeling languages with Maude”. SLE’08
  • 43. FutureWork Model management Consider OCL constraints in model subtyping Formal proof of difference-related operations relationships Model simulation and analysis with Complete integration of Maude analysis tools Reachability analysis and model checking Querying the result of a simulation Encoding refinement Non-usedfeatures Untimedanalysis … OCL completion and validation Debugging and traceability 43/44
  • 44. FutureWork Furtheranalysis Reachablemodelssatisfy metamodel constraints? Non-functional properties and QoS requirements* 44/44 * “Simulatingdomainspecific visual modelsby observation”. DEVS'10
  • 45. On the Semantics of Real-Time Domain Specific Modeling Languages Jose E. Rivera Advisors: Francisco Durán, Antonio Vallecillo PhDDefense Málaga, October 2010