Developing and Visualizing Live Model Queries
Upcoming SlideShare
Loading in...5
×
 

Developing and Visualizing Live Model Queries

on

  • 444 views

1st Analysis of Model Transformations Workshop, 2012 ...

1st Analysis of Model Transformations Workshop, 2012

Several important tasks performed by model driven development tools — such as well-formedness constraint validation or model transformations — rely on evaluating model queries. If the model changes rapidly or frequently, it is beneficial to provide live queries that automatically propagate these model changes into the query results. To ease the development and debugging of live queries, the development environment should provide a way to evaluate the query results continuously, helping to understand how the created query works.
This presentation presents a generic live model query visualizer that displays and updates the query results depending on their source models. It has been implemented for the EMF-IncQuery framework and presented here for validating BPMN models.

Statistics

Views

Total Views
444
Slideshare-icon Views on SlideShare
379
Embed Views
65

Actions

Likes
1
Downloads
1
Comments
0

6 Embeds 65

http://viatra.inf.mit.bme.hu 37
http://www.eclipse.org 14
http://eclipse.org 6
http://incquery.net 5
https://www.eclipse.org 2
https://www.linkedin.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-NonCommercial LicenseCC Attribution-NonCommercial License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Developing and Visualizing Live Model Queries Developing and Visualizing Live Model Queries Presentation Transcript

    • Developing  and  Visualizing   Live  Model  Queries   Zoltán  Ujhelyi,  Tamás  Szabó   István  Ráth,  Dániel  Varró   Ábel  Hegedüs  (demonstrator)  Budapest  University  of  Technology  and  Economics  Department  of  Measurement  and  Informa<on  Systems  
    • What  is  a  Model  Query?    ModelQuery(A,B)   Cond(A,B)   o  Retrieve  tuples  of   model  elements  A,B   o  SaOsfying  the  query   condiOon  Cond   o  Enumerate     one  /  all  instances   o  With  A,B  as     input  or  output   parameters   2  
    • What  is  a  Model  Query?    ModelQuery(A,B)   AUTOSAR   Cond(A,B)   •  Select  pairs  of  SystemSignal  and   o  Retrieve  tuples  of   its  signal  group  which  are  not  in   the  same  IPDU   model  elements  A,B   o  SaOsfying  the  query   condiOon  Cond   IMA   •  Find  instances  of  cri;cal  func;ons   o  Enumerate     not  running  on  different   one  /  all  instances   processors  of  different  chassis   o  With  A,B  as     input  or  output   BPMN   parameters   •  Show  sink  ac;vi;es  with  no   outgoing  flow   3  
    • What  is  a  Model  Query?    ModelQuery(A,B)   AUTOSAR   Cond(A,B)   •  Select  pairs  of  SystemSignal  and   o  Retrieve  tuples  of   its  signal  group  which  are  not  in   the  same  IPDU   model  elements  A,B   o  SaOsfying  the  query   condiOon  Cond   IMA   •  Find  instances  of  cri;cal  func;ons   o  Enumerate     not  running  on  different   one  /  all  instances   processors  of  different  chassis   o  With  A,B  as     input  or  output   BPMN   parameters   •  Show  sink  ac;vi;es  with  no   outgoing  flow   4  
    • Live  Model  Queries    Live  Query  EvaluaOon:   Incremental  cache  of  matches   o  Maintain  a  cheap  cache     (only  memory  overhead)   o  NoOfy  about  relevant  changes   o  Enable  reacOons  to  complex        structural  events   5  
    • Live  Model  Queries    Live  Query  EvaluaOon:   Incremental  cache  of  matches   o  Maintain  a  cheap  cache     (only  memory  overhead)   o  NoOfy  about  relevant  changes   o  Enable  reacOons  to  complex        structural  events   6  
    • Live  Model  Queries    Live  Query  EvaluaOon:   Incremental  cache  of  matches   o  Maintain  a  cheap  cache     (only  memory  overhead)   o  NoOfy  about  relevant  changes   o  Enable  reacOons  to  complex        structural  events   7  
    • Live  Model  Queries    Live  Query  EvaluaOon:   Live  Model  Queries  for     Model  TransformaOons   Incremental  cache  of  matches   o  Maintain  a  cheap  cache     •  Find  all  contexts  a  MT  rule  is   applicable  for   (only  memory  overhead)   •  Live  MT  rules:  triggered   o  NoOfy  about  relevant  changes   automaOcally  upon  change   o  Enable  reacOons  to  complex        structural  events   Live  Model  Queries  for     Early  ValidaOon   •  Find  all  violaOons  of     a  well-­‐formedness  constraint   •  Immediate  re-­‐validaOon     upon  model  change   Live  Model  Queries  for     Traceability  Management   •  See  talk  tomorrow  at  11:30   8  
    • Example:  ValidaOon  of  BPMN  Models    BPMN  models   o Describing  business  processes   o Models  control  and  dataflow   •  Flowchart-­‐like  notaOon   9  
    • Example:  ValidaOon  of  BPMN  Models    Well-­‐formedness  validaOon  during  ediOng   o Sink  AcOvity:  acOvity  without  outgoing  edge   10  
    • Example:  ValidaOon  of  BPMN  Models    Well-­‐formedness  validaOon  during  ediOng   o Sink  AcOvity:  acOvity  without  outgoing  edge   11  
    • EMF-­‐IncQuery  Framework  
    • EMF-­‐IncQuery:  Architecture  Overview  Application Application code Generated pattern Generative tooling Query matcher specificationAPI Validation Derived feature Interpreted Engine support pattern matcherINCQUERY Base RETE Core INCQUERY Core Framework
    • EMF-­‐IncQuery:  Architecture  Overview  Application •  Graph pattern-based query language Application code •  Xtext2-based tooling •  Execution, testing and debugging for queries Generated pattern Generative tooling Query matcher specificationAPI Validation Derived feature Interpreted Engine support pattern matcherINCQUERY Base RETE Core INCQUERY Core Framework
    • EMF-­‐IncQuery:  Architecture  Overview  Application •  Graph pattern-based query language Application code •  Xtext2-based toolingTypesafe querywrappers (DTOs) •  Execution, testing andfor easy integration debugging for queries Generated pattern Generative tooling Query matcher specificationAPI Validation Derived feature Interpreted Engine support pattern matcher INCQUERY Base RETE Core INCQUERY Core Framework
    • EMF-­‐IncQuery:  Architecture  Overview  Application •  Graph pattern-based query language Application code •  Xtext2-based toolingTypesafe querywrappers (DTOs) •  Execution, testing andfor easy integration debugging for queries Generated pattern Generative tooling Query matcher specificationAPI Validation Derived feature Interpreted Engine support pattern matcher •  Easy-to-use API forOn-the-fly validation Efficient maintenance queryand problem marker of derived attributes managementmanagement and references •  Support for programmed and INCQUERY Base RETE Core INCQUERY Core dynamic queries •  Fully dynamic parameterization Framework
    • EMF-­‐IncQuery:  Architecture  Overview   Application •  Graph pattern-based query language Application code •  Xtext2-based tooling Typesafe query wrappers (DTOs) •  Execution, testing and for easy integration debugging for queries Generated pattern Generative tooling Query matcher specification API Validation Derived feature Interpreted Engine support pattern matcher •  Easy-to-use API for On-the-fly validation Efficient maintenance query and problem marker of derived attributes management management and references •  Support for programmed and INCQUERY Base RETE Core INCQUERY Core dynamic queries •  Fully dynamicHigh performance Scalable evaluation for parameterizationbackward getters and complex queries Frameworktransitive closure (over 2 000 000 EObjects)
    • Simple  Graph  Pajern  in  EMF-­‐IncQuery  pattern  sequenceFlowEdge           (Flow:SequenceEdge,  Src:Activity,  Dst:Activity)=  { SequenceEdge.source(Flow,  Src); SequenceEdge.target(Flow,  Dst);} source   Flow:   target   Src  :   Dst:   Sequence AcOvity   AcOvity   Edge   18  
    • And  Some  More  Complex  Examples…  pattern  hasOutEdge(A:  Activity)  {    find  sequenceFlowEdge(_Fr,  A,  _Other);  }  or  {    find  messageFlowEdge(_Fr,  A,  _Other); Pajern  composiOon  } (for  reuse)  pattern  sinkActivityNames(Name)  { Activity(A); Activity.name(A,  Name); neg  find  hasOutEdge(A);} NegaOve  composiOon   (negaOon,  quanOficaOon)   19  
    • EMF-­‐INCQUERY  Development  Tools  
    • EMF-­‐INCQUERY  Development  Tools   Pajern  Editor   EMF  Instance  Model   Query  Explorer  
    • EMF-­‐INCQUERY  Development  Tools   Pajern  Editor   EMF  Instance  Model   Query  Explorer  
    • EMF-­‐INCQUERY  Development  Tools   •  Works  with  most     EMF  editors     out-­‐of-­‐the-­‐box   •  Reveals  matches     as  selecOon   Pajern  Editor   EMF  Instance  Model  Query  results  recalculated    on-­‐the-­‐fly   Query  Explorer  
    • Visualiza<on  of  Live  Model  Queries   in  EMF-­‐IncQuery  
    • Requirements  for  Query  VisualizaOon  Genericity   Incrementality  •  MulOple  Model  Sources   •  Query  Changes   •  Model  Editors   •  Model  Changes   •  Current  SelecOon  Traceability   PresentaOon  •  Query  DefiniOons   •  Filtering  •  Input  Model   •  Grouping   25  
    • Proposed  Architecture  of  Query  Visualizer   Edited   Model   Edited   Query   Other  Model   Query   Editors   Sources   Connectors   Model  and   Filtered  group  of   NoOficaOons   queries   Query   Query   Repository   Engine   Query   Query  Result   Query  Results   DefiniOon   Deltas   Query  Result  Viewer   26  
    • Model  Source  Connectors  for  Genericity    Different  model  sources   Edited   Edited   Model   Other   Query   Model   o  Graphical  (e.g  BPMN,  UML)   Query   Editors   Sources   o  Textual  (e.g.  OCL)   Connectors   o  Different  implementaOon   Model  and   technologies   Query   NoOficaOons  Model  source  connectors   Engine    OperaOons   Genericity Incrementality o  Open  model   • Multiple Model Sources • Query  Changes o  Send  noOficaOon  upon  model   • Model  Editors • Current  Selection • Model  Changes change   o  Get  current  selecOon   Traceability • Query  Definitions Presentation • Filtering o  Close  editor   • Input  Model • Grouping 27  
    • Query-­‐based  Indexing  for  Incrementality    Update  query  results   Query-­‐based  indexing   incrementally  upon   o  Model  updates   • Contains  model  elements  accessed   •  E.g.  using  the  built-­‐in  editor   by  the  query   •  Engine:  handles  this  case   • Populated  by  an  exhausOve  model   internally   traversal  (can  be  slow!)   o  Query  updates   • Goal:  Avoid  unnecessary  re-­‐ •  E.g.  using  the  query  editor   traversal   •  Engine:  rebuilds  internal  model   indexes   Strategy  1:     Generic  model  indexer   Genericity Incrementality • “Wildcard  mode”:     • Multiple Model Sources • Query  Changes • Model  Editors • Model  Changes index  every  model  element   • Current  Selection • Higher  memory  consumpOon   Traceability Presentation Strategy  2:     • Query  Definitions • Filtering Group  iniOalizaOon   • Input  Model • Grouping • IniOalize  several  pajerns  together   28  
    • Traceability  and  NavigaOon    Maintaining  source  models   Query   Editor   Edited   Edited   Model   Query   Query   Editors   Other  Model   Sources   and  queries   Connectors    Support  for  navigaOng  to/ highlighOng   Query   Repository   Query   Engine   o Corresponding  query   definiOons   Query  Result  Viewer   •  HighlighOng  funcOonality  in  the   query  editor   Genericity Incrementality o Referenced  model  element(s)  • Multiple Model Sources • Model  Editors • Query  Changes • Model  Changes •  Editor-­‐dependent   • Current  Selection implementaOon   Traceability Presentation •  Model  source  connector     • Query  Definitions • Filtering handles  funcOonality   • Input  Model • Grouping 29  
    • Traceability  in  Query  Visualizer   Pajern  Editor   EMF  Instance  Model   Query  Explorer  
    • Traceability  in  Query  Visualizer   Pajern  Editor   EMF  Instance  Model   Query  Explorer  
    • Grouping  and  Filtering  for  PresentaOon    Define  query  groups   („related”  queries)   Query   Query   Query  Result   o StaOc  groups   DefiniOons   Results   Deltas   •  E.g.  Namespaces   Query  Result  Viewer   o Dynamic  groups   •  E.g.  Dependency  based    Filtering   Genericity Incrementality o Filter  visible  queries   • Multiple Model Sources • Query  Changes • Model  Editors • Model  Changes •  Uses  hints  from  developer   • Current  Selection •  Manual  overriding   Traceability Presentation o Filter  query  results   • Query  Definitions • Filtering • Input  Model • Grouping •  By  binding  query  parameters   32  
    • Result  Viewer   33  
    • Result  Viewer  Different  model   Szöveg   sources   34  
    • Result  Viewer   Loaded   Queries   35  
    • Result  Viewer   Query  Results   36  
    • Filtering  Visible  Queries   37  
    • Filtering  Visible  Queries  Elements  in  Query   Registry   38  
    • Filtering  Visible  Queries   Queries  Loaded   39  
    • Query  Result  Filtering   40  
    • Query  Result  Filtering   41  
    • Conclusions  and  Future  Work   R1.  Genericity   Edited   Model   Edited   Other  Model  R3.  Traceability   Query   Query   Editors   Sources  R3.  Traceability   Connectors  R4.  PresentaOon   Model  and   Filtered  group  of   R2.  Incrementality   NoOficaOons   queries   Query   Query   Repository   Engine   Query  Result   Query   Query  Results   Deltas   DefiniOon   Query  Result  Viewer   R4.  PresentaOon   42  
    • Conclusions  and  Future  Work   R1.  Genericity   Edited   Model   Edited   Other  Model   R3.  Traceability   Query   Query   Editors   Sources   R3.  Traceability   Connectors   R4.  PresentaOon   Model  and   Filtered  group  of   R2.  Incrementality   NoOficaOons   queries   Query   Query   Repository   Engine   Query  Result   Query   Query  Results   Deltas   DefiniOon   Query  Result  Viewer   R4.  PresentaOon  Future  Plans  •  Analysis-­‐based  grouping  •  Graph-­‐based  result  visualizaOon   43