SlideShare a Scribd company logo
1 of 73
Download to read offline
EMF-­‐INCQUERY	
  
                    Incremental	
  evalua7on	
  of	
  model	
  queries	
  over	
  EMF	
  models    	
  

                                                 Gábor	
  Bergmann,	
  Ákos	
  Horváth,	
  	
  
                                                    István	
  Ráth,	
  Dániel	
  Varró	
  
                                                  András	
  Balogh,	
  Zoltán	
  Balogh,	
  	
  
                                                   András	
  Ökrös,	
  Zoltán	
  Ujhelyi	
  
                              Budapest	
  University	
  of	
  Technology	
  and	
  Economics	
  
                                 OptXware	
  Research	
  and	
  Development	
  LLC	
  


Budapest	
  University	
  of	
  Technology	
  and	
  Economics	
  
Department	
  of	
  Measurement	
  and	
  Informa<on	
  Systems	
  
MOTIVATION	
  
Hi	
  Jane,	
  what	
  do	
  you	
  do	
  at	
  work?	
  


Jane	
  
                                                                        Detect!	
  


            Gen	
  

                                         Report!	
  
                      Query	
  /	
  
                       View	
  


Boss	
  
                                                       Constraint	
  
Hi	
  Jane,	
  you	
  look	
  so	
  sad.	
  What	
  is	
  wrong?	
  
  It	
  takes	
  me	
  hours	
  to	
  write	
  a	
          Why	
  don’t	
  you	
  use	
  a	
  declara7ve	
  
   query	
  of	
  an	
  EMF	
  model	
                        query	
  language	
  (like	
  OCL)?	
  




                                                Jane	
           Boss	
  
Hi	
  Jane,	
  you	
  look	
  so	
  sad.	
  What	
  is	
  wrong?	
  
  It	
  takes	
  me	
  hours	
  to	
  write	
  a	
  
   query	
  of	
  an	
  EMF	
  model	
  

  I	
  need	
  to	
  re-­‐run	
  the	
  checks	
            Why	
  don’t	
  you	
  try	
  
   from	
  scratch	
  every	
  7me	
                          something	
  incremental?	
  




                                                Jane	
         Boss	
  
Hi	
  Jane,	
  you	
  look	
  so	
  sad.	
  What	
  is	
  wrong?	
  
  It	
  takes	
  me	
  hours	
  to	
  write	
  a	
  
   query	
  of	
  an	
  EMF	
  model	
  

  I	
  need	
  to	
  re-­‐run	
  the	
  checks	
  
   from	
  scratch	
  every	
  7me	
  

  I	
  go	
  to	
  have	
  lunch	
  while	
  
   running	
  well-­‐formedness	
                          Oh,	
  Jane,	
  you	
  must	
  eat	
  a	
  lot!	
  	
  
   checks	
  on	
  large	
  UML	
  models	
  




                                                Jane	
           Boss	
  
STATE	
  OF	
  THE	
  ART	
  
Problem	
  1:	
  Expressiveness	
  
  EMF	
  Query	
  (declara7ve)	
  
   o Low	
  expressiveness	
  
   o Limited	
  navigability	
  
       •  no	
  „cycles”	
  




                                                ?
  OCL	
  (declara7ve)	
  
   o Verbose	
  	
  
   o Lack	
  of	
  reusability	
  support	
  
   o Local	
  constraints	
  of	
  	
  
     a	
  model	
  element	
  
   o Poor	
  handling	
  of	
  recursion	
  
   Challenging	
  to	
  use	
  
Problem	
  2:	
  Incrementality	
  
  Goal:	
  Incremental	
  evala7on	
  of	
  model	
  queries	
  
    o Incremental	
  maintenance	
  of	
  result	
  set	
  
    o Avoid	
  unnecessary	
  re-­‐computa7on	
  
  Related	
  work:	
  	
  
    o Constraint	
  evalua7on	
  (by	
  A.	
  Egyed)	
  
         •  Arbitrary	
  constraint	
  descrip7on	
  
               –  Can	
  be	
  a	
  boeleneck	
  for	
  complex	
  constraints	
  
               –  Always	
  local	
  to	
  a	
  model	
  element	
  
         •  Listen	
  to	
  model	
  no7fica7ons	
  	
  
         •  Calculate	
  which	
  constraints	
  need	
  to	
  be	
  reevaluated	
  
    o No	
  other	
  related	
  technology	
  directly	
  over	
  EMF	
  
    o Research	
  MT	
  tools:	
  with	
  varying	
  degrees	
  of	
  support	
  
Problem	
  3:	
  Performance	
  
  Na7ve	
  EMF	
  queries	
  (Java	
  program	
  code):	
  	
  
   Lack	
  of	
  	
  
    o Reverse	
  naviga7on	
  along	
  references	
  
    o Enumera7on	
  of	
  all	
  instances	
  by	
  type	
  
    o Smart	
  Caching	
  


  Scalability	
  of	
  (academic)	
  MT	
  tools	
  
    o Queries	
  over	
  >100K	
  model	
  elements	
  (several	
  proofs):	
  	
  
      FUJABA,	
  VIATRA2	
  (Java),	
  GrGEN,	
  VMTS	
  (.Net),	
  Egyed’s	
  
      tools	
  
Contribu7ons	
  
  Expressive	
  declara7ve	
  query	
  language	
  by	
  graph	
  paeerns	
  




  Incremental	
  cache	
  of	
  matches	
  (materialized	
  view)	
  




  High	
  performance	
  for	
  large	
  models	
  
Contribu7ons	
  
  Expressive	
  declara7ve	
  query	
  language	
  by	
  graph	
  paeerns	
  
    o Capture	
  local	
  +	
  global	
  queries	
  
    o Composi7onality	
  +	
  Reusabilility	
  	
  
    o „Arbitrary”	
  Recursion,	
  Nega7on	
  
  Incremental	
  cache	
  of	
  matches	
  (materialized	
  view)	
  
    o Cheap	
  maintenance	
  of	
  cache	
  (only	
  memory	
  overhead)	
  
    o No7fy	
  about	
  relevant	
  changes	
  
    o Enable	
  reac7ons	
  to	
  complex	
  structural	
  events	
  
  High	
  performance	
  for	
  large	
  models	
  
    o Linear	
  overhead	
  for	
  loading	
  	
  
    o Instant	
  response	
  for	
  queries	
  
    o >	
  1	
  million	
  model	
  elements	
  (on	
  desktop	
  PC)	
  
QUERY	
  LANGUAGE	
  
Contribu7ons	
  
  Expressive	
  declara7ve	
  query	
  language	
  by	
  graph	
  paeerns	
  
    o Capture	
  local	
  +	
  global	
  queries	
  
    o Composi7onality	
  +	
  Reusabilility	
  	
  
    o „Arbitrary”	
  Recursion,	
  Nega7on	
  
  Incremental	
  cache	
  of	
  matches	
  (materialized	
  view)	
  



  High	
  performance	
  for	
  large	
  models	
  
Paeern	
  defini7on	
                                                                Graphical	
  nota7on	
  
                                                                                                                                       implements	
  
paeern	
  siblingClass(C1,C2)	
                                                           UI	
  Model	
  
                                                                                                                                       superClass	
  

                          S:	
  Class	
                              S	
        GComp	
                 Cmd	
                   Iface	
  

  S1:superClass	
                           S2:superClass	
                                                                   Class	
  

                                                                     C1	
       Bueon	
          ImageBueon	
                 C2	
  
     C1:	
  Class	
                            C2:	
  Class	
  


                   matching	
  
           s1:implement	
  
                                                                                Graph	
  Paeern:	
  	
  
                                                                                   o  Structural	
  condi7on	
  that	
  have	
  to	
  be	
  
     GComp:Class	
                                   Cmd:Iface	
  
                                                                                      fulfilled	
  by	
  a	
  part	
  of	
  the	
  model	
  space	
  
                        s2:included	
  
                                                                                Graph	
  paeern	
  matching:	
  
     s1:superClass	
                         i2:implement:	
  Iface	
  
                                                                                   o  A	
  model	
  (i.e.	
  part	
  of	
  the	
  model	
  space)	
  
     Bueon:Class	
                            ImageBueon:Class	
                      can	
  sa7sfy	
  a	
  graph	
  paeern,	
  	
  
                                                                                   o  if	
  the	
  paeern	
  can	
  be	
  matched	
  to	
  a	
  
                                                                                      subgraph	
  of	
  the	
  model	
  	
  
                Instance	
  Model	
  
Graph	
  paeerns	
  (VTCL)	
  
                                                                                               // B is a sibling class of A
siblingClass(A,B)	
                                                                             pattern siblingClass(A, B) =
                                                                                                {
                                P:	
  Class	
                                                      Class(A);
  s1:superClass	
                                 s2:superClass	
                                  Class.superClass(S1, A, P);
                                                                                                   Class(P);
        A:	
  Class	
                                    B:	
  Class	
                             Class.superClass(S2, B, P);
                                                                                                   Class(B);
                                                                                               }
                                                                                                // S is locally substitutable by A
locallySubs	
  (A,	
  S,	
  X)	
                                                                pattern localSubs(A, S, X) = {
                                                                                                   Class(A);
                                     X:	
  Iface	
                                                 Iface(X);
                                                                                                   Class.implements(I1, A, X);
   I1:implements	
                                     I2:implements	
                             Class(S);
                                                                                                   Class.implements(I2, S, X);
          A:	
  Class	
                                       S:Class	
  
                                                                                               } or {
                                        OR	
                                                       Class(A);
                                     X:	
  Class	
                          OR	
  paeern	
         Class(X);
                                                                                                   Class.superClass(P1, X, X);
    s1:superClass	
                                    s2:	
  superClass	
                         Class(S);
          A:	
  Class	
                                       S:Class	
                            Class.superClass(P2, S, X);
                                                                                               }
Posi7ve	
  and	
  Nega7ve	
  paeerns	
  (VTCL)	
  
topLevelClass(A)	
                                                                          pattern topLevelClass(A) = {
                                                                 Nega7ve	
  
                                                                                               Class(A);
      A:	
  Class	
                                              paeern	
  
                                                                                               neg find subClass(A);
                                   wSuperClass(X)	
                                         }
      X                                                                                     pattern wSuperClass(X) = {
  neg find                              X:	
  Class	
                     A:	
  Class	
        Class(X);
 wSuperClass                                          s1:superClass	
                          Class.superClass(S1, X, A);
                                                                                               Class(A);
suspiciousClass(X)	
                                                                        }
                                                                                            pattern suspiciousClass(X) = {
     X:	
  Class	
                     A:	
  Class	
                                           Class(X);
                                                                    Posi7ve	
  
                  S1:superClass	
                                                              find topLevelClass(X);
                         IA:isAbstract	
                            paeern	
                   Class.superClass(S1, A, X);
      X
    find                              B:	
  Boolean	
                                          Class(A);
topLevelClass                                                                                  Class.isAbstract(IA, A, B);
                                                                                               Boolean(B);
check	
  (B	
  ==	
  false);	
                                                                 check (value(B) == "false");
                                                                                            }
Recursive	
  paeerns	
  (VTCL)	
  

                                                                            pattern descendant(X, D) = {
paeern	
  descendant(X,D)	
                                                     Class(X);
                      X:	
  Class	
                                             Class.superClass(S, Ch, X);
 S:superClass	
  
                                                              OR	
  paeern	
   Class(Ch);
                                                              Recursive	
  
                                                               paeern	
         find descendant(Ch, D)
   Ch:	
  Class	
                           D:	
  Class	
                       Class(D);
                                                                            } or {
                                                                                Class(X);
               X          D
                                                                                Class.superClass(S, D, X);
              find descendant
                                                                                Class(D);
                      OR	
                                                    }
                 S:superClass	
  

   D:	
  Class	
                        X:	
  Class	
  
Origins	
  of	
  the	
  idea	
  
  Model	
  transforma7ons	
  by	
  VIATRA2	
  
    o  Transforma7on	
  language	
  
         •  Declara7ve	
  paeerns	
  for	
  model	
  queries	
  
         •  Graph	
  transforma7on	
  rules	
  for	
  elementary	
  mapping	
  specifica7ons	
  	
  
         •  ASM	
  rules	
  for	
  control	
  structure	
  
    o  Matching	
  strategy	
  
         •  Local	
  search-­‐based	
  (op7mized	
  search	
  plans)	
  
         •  Incremental	
  paNern	
  matching	
  (based	
  on	
  RETE)	
  
         •  Hybrid	
  paeern	
  matching	
  (adap7ve	
  combina7on	
  of	
  INC	
  and	
  LS)	
  

  Development	
  team	
  
    o Developed	
  by	
  BUTE	
  and	
  OptXware	
  Ltd.	
  
    o 9	
  developers	
  
  More	
  info	
  
    o  hep://eclipse.org/gmt/VIATRA2	
  
    o  hep://wiki.eclipse.org/VIATRA2	
  
Applica7ons	
  of	
  VIATRA2	
  
  “Stand-­‐alone”	
  model	
  transforma7ons	
  
  Early	
  model-­‐based	
  analysis	
  	
  
   (DECOS,	
  SecureChange)	
  
  Integrated	
  features	
  for	
  graphical	
  DSMLs	
  
   (ViatraDSM)	
  
  Model	
  execu7on/analysis	
  (stochas7c	
  GT)	
  
  (Development)	
  tool	
  integra7on	
  	
  
   (DECOS,	
  SENSORIA,	
  MOGENTES)	
  
  Model	
  op7miza7on	
  /	
  constraint	
  solving	
  (DIANA)	
  
INCREMENTAL	
  PATTERN	
  MATCHING	
  
Contribu7ons	
  
  Expressive	
  declara7ve	
  query	
  language	
  by	
  graph	
  paeerns	
  
    o Capture	
  local	
  +	
  global	
  queries	
  
    o Composi7onality	
  +	
  Reusabilility	
  	
  
    o „Arbitrary”	
  Recursion,	
  Nega7on	
  
  Incremental	
  cache	
  of	
  matches	
  (materialized	
  view)	
  
    o Cheap	
  maintenance	
  of	
  cache	
  (only	
  memory	
  overhead)	
  
    o No7fy	
  about	
  relevant	
  changes	
  (new	
  match	
  –	
  lost	
  match)	
  
    o Enable	
  reac7ons	
  to	
  complex	
  structural	
  events	
  
  High	
  performance	
  for	
  large	
  models	
  
Incremental	
  graph	
  paeern	
  matching	
  
  Goal:	
  retrieve	
  the	
  match	
  set	
  quickly	
  
  How?	
  	
  RETE	
  network	
  
    o Store	
  (cache)	
  matches	
  
    o Incrementally	
  update	
  them	
  as	
  the	
  model	
  changes	
  
         •  Update	
  precisely	
  
  Experimental	
  results:	
  good,	
  if…	
  
    o There	
  is	
  enough	
  memory	
  
    o Transac7onal	
  model	
  manipula7on	
  
RETE	
  net	
  
  RETE	
  network	
                                               a b c           ISignal	
  objects	
  
    o  node:	
  (par7al)	
  matches	
  	
  
         of	
  a	
  (sub)paeern	
  
                                                                   EMF	
  RISignal.systemSignal	
  edges	
  
                                                                           esourceSet	
  
                                                                 x        z w      SystemSignal	
  objects	
  
  EMF	
  no<fica<on	
  m	
  echanism	
  
    o  edge:	
  update	
  
         propaga7on	
  
  Transparent:	
  user	
  modifica7on,	
                   INPUT	
                       INPUT	
                                             INPUT	
  
  model	
  imports,	
  results	
  of	
  a	
         SS	
  :	
  SystemSignal	
          S	
  :	
  ISignal	
                                  S	
  :	
  ISignal	
  

                                                                        w Input	
  nodes	
   a
  transforma7on,	
  external	
                                                        R1:systemSignal	
  
  modifica7on,	
  …	
  	
                              x        z                                                                                   b c
  	
  RETE	
  is	
  always	
  updated!	
                                         SS	
  :	
  SystemSignal	
  



                                                           JOIN	
                                                  ANTI-­‐JOIN	
  
                                                Intermediate	
  
                                                            S	
  :	
  ISignal	
  
                                                                                                    Produc7on	
  
                                                                                                                    S	
  :	
  ISignal	
  
  Demonstration	
                                      R1:systemSignal	
  
                                                         nodes	
   x
                                                                                                                   R1:systemSignal	
  
     o  input:	
  AUTOSAR	
  model	
  
     o  paeern:	
  ISignal	
  check	
  
                                              x
                                                  SS	
  :	
  SystemSignal	
  

                                                                         z
                                                                                                       node	
   NEG	
  
                                                                                                               SS	
  :	
  SystemSignal	
  

     o  change:	
  delete	
  systemSignal	
  edge	
  	
                                                          CC_ISignal(S)	
  
                                                                                                                   a                           c
RETE	
  nets	
  
                                                    a b c 	
  Class	
  objects	
  
  RETE	
  network	
  
    o  node:	
  (par7al)	
  matches	
  	
  
                                                     In-­‐memory	
  model
                                                                  TypedElement.type	
  edges	
  
       of	
  a	
  (sub)paeern	
  
  No<fica<on	
  pdate	
  	
  
    o  edge:	
  u
                                                    (EMF	
  RTypedElement	
  objects	
  
                                                     x z w esourceSet)	
  
       propaga7on	
  
 Transparent:	
  user	
  modifica7on,	
                    INPUT	
                              INPUT	
                                             INPUT	
  
PATTERN	
   results	
  of	
  lass	
  
 model	
  imports,	
            C:	
  C a	
        TE:	
  TypedElement	
                        C	
  :	
  Class	
                                  C	
  :	
  Class	
  

                                                                     w Input	
  nodes	
   a
UnusedClass(C)	
   external	
  
 transforma7on,	
                                                                            	
  T	
  :	
  type	
  
 modifica7on,	
  …	
  	
                               x       z     UnusedClass(C)	
                                                                   b c
 	
  RETE	
  is	
  always	
  updated!	
                                                TE:	
  TypedElement	
  
                  T:	
  type	
  




  NEG	
                                                                       A	
  class	
  to	
  which	
  no	
  type	
  reference	
  points	
  
                                                                              •  ssocia7on	
  
                                                                                A
    Experimental	
  results:	
                                  JOIN	
   •  roperty	
  
                                                                                P
       TE:	
  TypedElement	
                                                                                               ANTI-­‐JOIN	
  
      good,	
  if…	
                            Intermediate	
  
                                                            C	
  :	
  Class	
   Parameter	
  
                                                                              • 
                                                                                                              Produc7on	
  
                                                                                                                            C	
  :	
  Class	
  
  Demonstration	
  nough	
  
        o  There	
  is	
  e                            	
  T	
  :	
  type	
   •  ariable	
  
                                                                                V
                                                         nodes	
  
                                                                                                                          	
  T	
  :	
  type	
  
     o  input:	
  UML	
  model	
  
             memory	
  
     o  paeern:	
  UnusedClass	
  
          o  Transac7onal	
  model	
  
                                               x
                                                  TE:	
  TypedElement	
  

                                                       z
                                                                          x
                                                                                                                 node	
   NEG	
  
                                                                                                                      TE:	
  TypedElement	
  

     o  change:	
  delete/retarget	
  type	
  reference	
  
             manipula7on	
                                                                                            UnusedClass(C)	
  
                                                                                                                         a                         c
EMF-­‐INCQUERY	
  
Overview	
  
  What	
  is	
  EMF-­‐INCQuery?	
  
    o Query	
  language	
  +	
  incremental	
  paeern	
  matcher	
  +	
  
      development	
  tools	
  for	
  EMF	
  models	
  
         •  Works	
  with	
  any	
  (pure)	
  EMF	
  applica7on	
  
         •  Reusability	
  by	
  paeern	
  composi7on	
  
         •  Arbitrary	
  recursion,	
  nega7on	
  
         •  Generic	
  and	
  parameterized	
  model	
  queries	
  
         •  Bidirec7onal	
  navigability	
  
         •  Immediate	
  access	
  to	
  all	
  instances	
  of	
  a	
  type	
  
         •  Complex	
  change	
  detec7on	
  
  Benefits	
  
    o Fully	
  declara7ve	
  +	
  Scalable	
  performance	
  
Architectural	
  overview	
  


                                                  RETE	
  Core	
  


Paeern/Query	
             EMF	
  INC	
  PM	
  
                                                                     VIATRA2	
  INC	
  PM	
  
    spec	
                    Core	
  

                          Generated	
  PM	
  and	
  RETE	
  
  EMF	
  App	
  
                                 builder	
  
EMF-­‐INCQUERY	
  TOOLING	
  
EMF-­‐INCQUERY	
  Tooling	
  
  Genera7ve	
  approach	
  
   o compile	
  queries	
  into	
  	
  
       •  RETE	
  network	
  builders	
  
       •  Query	
  interface	
  wrappers	
  
   o end-­‐to-­‐end	
  solu7on:	
  generates	
  Eclipse	
  plug-­‐in	
  projects	
  
  Relies	
  on	
  the	
  VIATRA2	
  environment	
  
   o query	
  development	
  
   o debugging	
  	
  
Tooling	
  architecture	
  


 Declara7ve	
  Queries	
     3   Generated	
  Query	
  
     in	
  VIATRA2	
                Wrappers	
  

                                              4           EMF	
  App	
  
            2

         VIATRA2	
  	
  
                                    EMF	
  Model	
  
model	
  representa7on	
     1



   Development	
  7me	
                Run7me	
  
Development	
  workflow	
  
                                   Semi-­‐automated	
  for	
  
                                    typical	
  scenarios,	
  
Import	
  EMF	
                	
  some	
  manual	
  coding	
  
                                                                  Integrate	
  into	
  EMF	
  
domain	
  into	
  
                                                                      applica7on	
  
  VIATRA2	
                       Automated	
  




               Develop	
  and	
  test	
  
                                                       Generate	
  INCQuery	
  
                 queries	
  over	
  
                                                             code	
  
                   VIATRA2	
  
                                      Supported	
  by	
  
                                          the	
  VIATRA2	
  
                                                 IDE	
  
Impor7ng	
  EMF	
  domains	
  
  Automated	
  by	
  the	
  EMF2VIATRA	
  plug-­‐in	
  	
  
   (by	
  OptXware	
  Ltd.)	
  
  Generic	
  support	
  to	
  process	
  	
  
   o ECore	
  metamodels	
  and	
  	
  
   o EMF-­‐based	
  instance	
  models	
  	
  
   o within	
  the	
  VIATRA2	
  model	
  space	
  
  Available	
  as	
  an	
  independent	
  open	
  source	
  add-­‐on	
  
   to	
  VIATRA2	
  
ECore	
  models	
  in	
  VIATRA2	
  
  Ecore	
                                                      VIATRA2	
  
    o EClass	
                                                     o En7ty	
  (Node)	
  
    o EReference	
                                                 o Rela7on	
  (Edge)	
  
    o EAeribute	
                                                  o Node+Edge	
  

   Car:	
  EClass	
                                                                Car	
  
                             parts:	
  EReference	
                                              parts	
  
                                                                                    weight	
  
   +weight:	
  EInt	
                   Part:	
  EClass	
  
                                                                               Integer	
                 Part	
  

                                                               MyCar:	
  Car	
   :parts	
  
        MyCar:	
  Car	
                                                  :weight	
        MyWheel:	
  
   weight	
  =	
  1500	
                                                                    Part	
  
   parts	
  =	
  [MyWheel:Part]	
                               :	
  Integer	
  
                                                                value	
  =	
  	
  1500	
  
Developing	
  and	
  tes7ng	
  queries	
  
  Supported	
  by	
  the	
  VIATRA2	
  framework	
  
  LPG-­‐based	
  parser	
  
   o Recovery	
  parsing,	
  error	
  highligh7ng	
  
   o Light-­‐weight	
  sta7c	
  analysis	
  for	
  paeerns	
  	
  
     (type	
  and	
  metamodel	
  conformance)	
  
  Development	
  features	
  
   o Paeern	
  graph	
  visualiza7on	
  
   o Paeern	
  match	
  set	
  visualiza7on	
  
   o Execute	
  paeerns	
  (in	
  transforma7ons)	
  
Genera7ng	
  INCQuery	
  code	
  
  Just	
  a	
  few	
  clicks	
  necessary	
  
  Generated	
  components:	
  INCQuery	
  run7me	
  
   o Eclipse	
  plugin	
  
       •  Depends	
  only	
  on	
  EMF	
  and	
  the	
  INCQuery	
  core	
  
       •  No	
  VIATRA2	
  dependency!	
  	
  
   o Private	
  code:	
  paeern	
  builders	
  
       •  Parameterize	
  the	
  RETE	
  core	
  and	
  the	
  generic	
  EMF	
  PM	
  library	
  
   o Public	
  API:	
  Paeern	
  matcher	
  access	
  layer	
  
       •  Query	
  interfaces	
  
       •  Data	
  Transfer	
  Objects	
  (DTOs)	
  
       •  Used	
  to	
  integrate	
  to	
  EMF	
  applica7ons	
  	
  
EMF-­‐INCQUERY	
  RUNTIME	
  
Facili7es	
  




Generic	
  Query	
  API	
   Generic	
  Change	
  API	
  

Generated	
  Query	
         Generated	
  Change	
  
      API	
                        API	
  
Generated	
  Query	
  API	
  
  Basic	
  queries	
  
    o Uses	
  tuples	
  (object	
  arrays)	
  corresponding	
  to	
  paeern	
  parameters	
  
    o Object[] getOneMatch()
    o Collection<Object[]> getAllMatches()
  Parameterized	
  queries	
  
    o getOneMatch(Object X, Object Y, …)
    o getAllMatches(Object X, Object Y, …)
    o Null	
  input	
  values	
  =	
  unbound	
  input	
  variables	
  


                                                                  Based	
  on	
  paeern	
  
                                                                     signature	
  
Query	
  DTOs	
  
                                               // B is a sibling class of A
  Data	
  Transfer	
  Objects	
                pattern siblingClass(C1, C2) =
   generated	
  for	
  	
                       {
                                                   /* contents */
   paeern	
  signatures	
                       }

  DTO	
  query	
  methods	
  
     o  SiblingClassDTO getOneMatch()
     o  SiblingClassDTO getOneMatch
        (Object C1, Object C2)
                                        public class SiblingClassDTO
     o  Collection<SiblingClassDTO>     {
        getAllMatches()                   Object C1;
     o  Collection<SiblingClassDTO>       Object C2;
        getAllMatches(Object C1, Object
        C2)
                                        }

  C1,	
  C2:	
  EObjects	
  or	
  	
  
   datatype	
  instances	
  	
  
   (String,	
  Boolean,	
  …)	
  
Query	
  DTOs	
  
                                               // B is a sibling class of A
  Data	
  Transfer	
  Objects	
                pattern siblingClass(C1, C2) =
   generated	
  for	
  	
                       {
                                                   /* contents */
   paeern	
  signatures	
                       }

  DTO	
  query	
  methods	
  
     o  SiblingClassDTO getOneMatch()
     o  SiblingClassDTO getOneMatch
        (UMLClass C1, UMLClass C2)
                                              public class SiblingClassDTO
     o  Collection<SiblingClassDTO>           {
        getAllMatches()                         UMLClass C1;
     o  Collection<SiblingClassDTO>             UMLClass C2;
        getAllMatches(UMLClass C1,
                                              }
        UMLClass C2)
                                                               Ongoing	
  work:	
  use	
  
  C1,	
  C2:	
  EObjects	
  or	
  	
                            domain-­‐specific	
  
   datatype	
  instances	
  	
                                 types	
  in	
  generated	
  
   (String,	
  Boolean,	
  …)	
                                          code	
  
Change	
  API	
  
  Track	
  changes	
  in	
  the	
  match	
  set	
  of	
  paeerns	
  (new/lost)	
  
  Delta	
  monitors	
  
    o May	
  be	
  ini7alized	
  at	
  any	
  7me	
  
    o DeltaMonitor.matchFoundEvents /
      DeltaMonitor.matchLostEvents
         •  Queues	
  of	
  matches	
  (tuples/DTOs)	
  that	
  have	
  appeared/disappeared	
  since	
  
            ini7aliza7on	
  
  Typical	
  usage	
  
    o Listen	
  to	
  model	
  manipula7on	
  (transac7ons)	
  
    o A{er	
  transac7on	
  commits:	
  
         •  Evaluate	
  delta	
  monitor	
  contents	
  and	
  process	
  changes	
  
         •  Remove	
  processed	
  	
  tuples/DTOs	
  from	
  .matchFound/LostEvents	
  
Integra7ng	
  into	
  EMF	
  applica7ons	
  
  Paeern	
  matchers	
  may	
  be	
  ini7alized	
  for	
  
   o Any	
  EMF	
  No7fier	
  
       •  e.g.	
  Resources,	
  ResourceSets	
  
   o Transac7onalEdi7ngDomains	
  
  Ini7aliza7on	
  
   o Possible	
  at	
  any	
  7me	
  
   o Involves	
  a	
  single	
  exhaus7ve	
  model	
  traversal	
  
     (independent	
  of	
  the	
  number	
  of	
  paeerns,	
  paeern	
  
     contents	
  etc.)	
  
Typical	
  programming	
  paeerns	
  
1.  Ini7alize	
  EMF	
  model	
  
   o  Usually	
  already	
  done	
  by	
  your	
  app	
  	
  
2.  Ini7alize	
  incremental	
  PM	
  whenever	
  necessary	
  
3.  Use	
  the	
  incremental	
  PM	
  for	
  queries	
  
   o  Model	
  updates	
  will	
  be	
  processed	
  transparently,	
  with	
  
      minimal	
  performance	
  overhead	
  
   o  Delta	
  monitors	
  can	
  be	
  used	
  to	
  track	
  complex	
  changes	
  
4.  Dispose	
  the	
  PM	
  when	
  not	
  needed	
  anymore	
  
   o  +	
  Frees	
  memory	
  
   o  -­‐	
  Re-­‐traversal	
  will	
  be	
  necessary	
  
CASE	
  STUDY	
  
Case	
  study:	
  UML	
  valida7on	
  
  Goal:	
  	
  
   well-­‐formedness	
  constraint	
  valida7on	
  over	
  UML2	
  
  Requirements	
  
    o Live	
  /	
  on-­‐the-­‐fly:	
  	
  
      instantaneous	
  feedback	
  as	
  the	
  user	
  is	
  edi7ng	
  
    o Incremental:	
  fast	
  for	
  large	
  models	
  
  Ingredients	
  	
  
    o Papyrus	
  UML	
  
    o VIATRA2	
  R3.2	
  
    o EMF-­‐INCQuery	
  
Example	
  UML	
  well-­‐formedness	
  constraint	
  
  Diamonds	
  are	
  the	
  girl’s	
  
   best	
  friend	
  
    o But	
  our	
  system	
  architect’s	
  
      worst	
  enemy	
  	
  
  The	
  “diamond”	
  is	
  a	
  (local)	
  
   an7-­‐paeern	
  
    o Mul7ple	
  inheritance	
  (and	
  
      polymorphism)	
  can	
  be	
  
      problema7c	
  in	
  some	
  
      programming	
  languages	
  
  Goal:	
  detect	
  	
  
   diamond	
  structures	
  in	
  
   UML	
  class	
  diagrams	
  	
  
Formaliza7on	
  
pattern SuperType(Sub, Super) =
{
   Class(Sub);
   Generalization.specific(GS, Gen, Sub);          Sub:	
  Class	
  
   Generalization(Gen);
   Generalization.general(GG, Gen, Super);
   Class(Super);                                            :	
  specific	
  
}

                                             Gen:	
  Generaliza7on	
  

                                                            :	
  general	
  


                                                 Super:	
  Class	
  
Formaliza7on	
  
pattern SuperType(Sub, Super) =
{
   Class(Sub);
   Generalization.specific(GS, Gen, Sub);          Sub:	
  Class	
  
   Generalization(Gen);
   Generalization.general(GG, Gen, Super);
   Class(Super);                                            :	
  specific	
  
}

                                             Gen:	
  Generaliza7on	
  

                                                            :	
  general	
  


                                                 Super:	
  Class	
  
Formaliza7on	
  
pattern SuperType(Sub, Super) =
{
   Class(Sub);
   Generalization.specific(GS, Gen, Sub);          Sub:	
  Class	
  
   Generalization(Gen);
   Generalization.general(GG, Gen, Super);
   Class(Super);                                            :	
  specific	
  
}

                                             Gen:	
  Generaliza7on	
  

                                                            :	
  general	
  


                                                 Super:	
  Class	
  
Formaliza7on	
  
pattern diamond(CA,C1,C2,C3) =
{
   Class(CA); Class(C1); Class(C2); Class(C3);
   find SuperType(C1,CA);
   find SuperType(C2,CA);
   find SuperType(C3,C1);                                  Common	
  
   find SuperType(C3,C2);                                Ancestor:	
  Class	
  
   neg find SuperType(C1,C2);
   neg find SuperType(C2,C1);
}

pattern SuperType(Sub, Super) =                  C1:	
  Class	
            C2:	
  Class	
  
{
   Class(Sub);
   Generalization.specific(GS, Gen, Sub);
   Generalization(Gen);
   Generalization.general(GG, Gen, Super);
   Class(Super);                                              C3:	
  Class	
  
}
Formaliza7on	
  
pattern diamond(CA,C1,C2,C3) =
{
   Class(CA); Class(C1); Class(C2); Class(C3);
   find SuperType(C1,CA);
   find SuperType(C2,CA);
   find SuperType(C3,C1);                                  Common	
  
   find SuperType(C3,C2);                                Ancestor:	
  Class	
  
   neg find SuperType(C1,C2);
   neg find SuperType(C2,C1);
}

pattern SuperType(Sub, Super) =                  C1:	
  Class	
            C2:	
  Class	
  
{
   Class(Sub);
   Generalization.specific(GS, Gen, Sub);
   Generalization(Gen);
   Generalization.general(GG, Gen, Super);
   Class(Super);                                              C3:	
  Class	
  
}
Formaliza7on	
  
pattern diamond(CA,C1,C2,C3) =
{
   Class(CA); Class(C1); Class(C2); Class(C3);
   find SuperType(C1,CA);
   find SuperType(C2,CA);
   find SuperType(C3,C1);                                  Common	
  
   find SuperType(C3,C2);                                Ancestor:	
  Class	
  
   neg find SuperType(C1,C2);
   neg find SuperType(C2,C1);
}

pattern SuperType(Sub, Super) =                  C1:	
  Class	
            C2:	
  Class	
  
{
   Class(Sub);
   Generalization.specific(GS, Gen, Sub);
   Generalization(Gen);
   Generalization.general(GG, Gen, Super);
   Class(Super);                                              C3:	
  Class	
  
}
Formaliza7on	
  
pattern diamond(CA,C1,C2,C3) =
{
   Class(CA); Class(C1); Class(C2); Class(C3);
   find SuperType(C1,CA);
   find SuperType(C2,CA);
   find SuperType(C3,C1);                                  Common	
  
   find SuperType(C3,C2);                                Ancestor:	
  Class	
  
   neg find SuperType(C1,C2);
   neg find SuperType(C2,C1);
}

pattern SuperType(Sub, Super) =                  C1:	
  Class	
            C2:	
  Class	
  
{
   Class(Sub);
   Generalization.specific(GS, Gen, Sub);
   Generalization(Gen);
   Generalization.general(GG, Gen, Super);
   Class(Super);                                              C3:	
  Class	
  
}
Formaliza7on	
  
   Problem:	
  transi7vity	
  needs	
  to	
  
    be	
  taken	
  into	
  account	
                       Common	
  
   Solu7on:	
  recursion	
                              Ancestor:	
  Class	
  
pattern transitiveSuperType(Sub, Super) =
{ find SuperType(Sub,Super); } OR {
    find transitiveSuperType(Sub, Middle);
    find SuperType(Middle,Super);                                        C2’:	
  Class	
  
}
pattern diamond(CA,C1,C2,C3) =
{ Class(CA); Class(C1); Class(C2); Class(C3);    C1:	
  Class	
  
    find transitiveSuperType(C1,CA);
                                                                          C2:	
  Class	
  
    find transitiveSuperType(C2,CA);
    find transitiveSuperType(C3,C1);
    find transitiveSuperType(C3,C2);
    neg find transitiveSuperType(C1,C2);
    neg find transitiveSuperType(C2,C1);                      C3:	
  Class	
  
}
Paeern	
  development	
  in	
  VIATRA2	
  
  Import	
  the	
  UML	
  metamodel	
  
  Import	
  UML	
  instance	
  models	
  	
  
  VTCL	
  development	
  environment	
  
   o Create	
  and	
  debug	
  paeerns	
  
   o Visualize	
  paeerns	
  and	
  paeern	
  matches	
  
   o Test	
  queries/paeerns	
  in	
  transforma7ons	
  
Genera7ng	
  INCQuery	
  wrappers	
  
  Create	
  INCQuery	
  project	
  
  INCQuery	
  project	
  set-­‐up	
  and	
  customiza7on	
  
  Genera7ng	
  code	
  
Integra7on	
  into	
  Papyrus	
  UML	
  
  Papyrus	
  uses	
  org.eclipse.uml2	
  models	
  internally	
  
     o  Managed	
  in	
  a	
  standard	
  ResourceSet	
  
     o  No	
  Transac7onalEdi7ngDomain	
  support	
  
  Valida7on	
  is	
  facilitated	
  using	
  EMF-­‐Valida7on	
  
     o  Inflexible	
                                                                Not	
  suitable	
  for	
  
     o  Manages	
  live	
  valida7on	
  by	
  a	
  different	
  paradigm	
          our	
  purposes	
  
     o  Constraints	
  rely	
  on	
  manually	
  coded	
  model	
  traversal	
  
Integra7on	
  into	
  Papyrus	
  UML	
  
  We	
  implemented	
  manually:	
  
    o  Custom	
  light-­‐weight	
  valida7on	
  extension	
  (200	
  LOC)	
  
          •  Based	
  on	
  Eclipse	
  resource	
  markers	
  
          •  Generically	
  reusable	
  for	
  any	
  EMF	
  model	
  
    o  UI	
  integra7on	
  (150	
  LOC)	
  
          •  Contributed	
  menu	
  item	
  
          •  Relevant	
  part:	
  15	
  LOC	
  	
  
          •  Generically	
  reusable	
  
    o  Constraint-­‐specific	
  code	
  
          •  Graph	
  paeerns	
  (18	
  LOC	
  in	
  VTCL)	
  
          •  Adapter	
  class	
  (~15	
  LOC	
  in	
  Java)	
  
                 –  extends	
  the	
  light-­‐weight	
  valida7on	
  feedback	
  framework	
  

  All	
  the	
  rest	
  is	
  automa7cally	
  generated.	
  
On-­‐the-­‐fly	
  incremental	
  valida7on	
  by	
  delta	
  monitors	
  
idm.getReteEngine().getAfterUpdateCallbacks().add(new Runnable() {!

@Override!
public void run() {!                                 Simple	
  mechanism	
  
// after each model update, check the delta monitor!
                                                       to	
  register	
  call-­‐
// FIXME should be: after each complete transaction, check the delta
   monitor!                                          backs	
  that	
  execute	
  
                                                     a{er	
  all	
  updates	
  
dm.matchFoundEvents.removeAll( processNewMatches(dm.matchFoundEvents,
   outline, f.getFile()) );!
                                                        have	
  been	
  
                                                       propagated	
  
dm.matchLostEvents.removeAll( processLostMatches(dm.matchLostEvents,
     outline, f.getFile()) );!

}!
});	
  
                                                           Core	
  technique	
  of	
  
                                                          processing	
  changes	
  
On-­‐the-­‐fly	
  incremental	
  valida7on	
  by	
  delta	
  monitors	
  
private Collection<InheritanceDiamondDTO> processNewMatches
      (Collection<InheritanceDiamondDTO> dtos, IFile f) throws
      CoreException {!
Vector<InheritanceDiamondDTO> processed = new
      Vector<InheritanceDiamondDTO>();!
for (InheritanceDiamondDTO diamond : dtos) {!
                                                             Process	
  paeern	
  
" Vector<EObject> affectedElements = new Vector<EObject>();! signature	
  DTOs	
  
" affectedElements.add((EObject)diamond.getA());!
" affectedElements.add((EObject)diamond.getB());!
" affectedElements.add((EObject)diamond.getC());!
" affectedElements.add((EObject)diamond.getD());!
" ValidationUtil.markProblem(f, affectedElements,
      !   ValidationProblemKind.DIAMOND);!
" processed.add(diamond);!           Make	
  sure	
  to	
      Use	
  light-­‐weight	
  
}!                                    remove	
  a	
            valida7on	
  facility	
  
return processed;!                    processed	
               to	
  create	
  error	
  
}	
                                change	
  from	
  the	
             marker	
  
                                                 queue	
  
DEMO	
   How	
  does	
  it	
  work?	
  
PERFORMANCE	
  
Challenges	
  
  Performance	
  evalua7ons	
  are	
  hard	
  
    o Fair?	
  
    o Reliable?	
  
    o Reproducible?	
  
    o Can	
  the	
  results	
  be	
  generalized?	
  
  Benchmark	
  example:	
  	
  
   on-­‐the-­‐fly	
  constraint	
  valida7on	
  over	
  AUTOSAR	
  models	
  
    o Conference	
  presenta7on	
  tomorrow,	
  11-­‐12.30,	
  Hall	
  B	
  
    o Mo7va7on:	
  the	
  Embedded	
  Architect	
  Tool	
  of	
  OptXware	
  Ltd.	
  
    o AUTOSAR	
  models	
  can	
  be	
  very	
  large	
  (>>1m	
  elements)	
  
What	
  is	
  measured?	
  
  Sample	
  models	
  were	
  generated	
  
     o  matches	
  are	
  scarce	
  rela7ve	
  to	
  overall	
  model	
  size	
  
  On-­‐the-­‐fly	
  valida7on	
  is	
  modeled	
  as	
  follows:	
  
     1.  Compute	
  ini7al	
  valida7on	
  results	
  
     2.  Apply	
  randomly	
  distributed,	
  small	
  changes	
  
     3.  Re-­‐compute	
  valida7on	
  results	
  
  Measured:	
  execu7on	
  7mes	
  of	
  
     o  Ini7aliza7on	
  (model	
  load	
  +	
  RETE	
  construc7on)	
  
     o  Model	
  manipula7on	
  opera7ons	
  (negligible)	
  
     o  Valida7on	
  result	
  (re)computa7on	
  
  Compared	
  technologies	
  
     o  MDT-­‐OCL	
  
     o  Plain	
  Java	
  code	
  that	
  an	
  average	
  developer	
  would	
  write	
  
INCQuery	
  Results	
  
  Hardware:	
  normal	
  desktop	
  PC	
  (Core2,	
  4GB	
  RAM)	
  
  Model	
  sizes	
  up	
  to	
  1.5m	
  elements	
  
  Ini7aliza7on	
  7mes	
  (resource	
  loading	
  +	
  first	
  valida7on)	
  
     o  <1	
  sec	
  for	
  model	
  sizes	
  below	
  50000	
  elements	
  
     o  Up	
  to	
  40	
  seconds	
  for	
  the	
  largest	
  model	
  (grows	
  linearly	
  with	
  the	
  model	
  size)	
  
  Recomputa7on	
  7mes	
  
     o  Within	
  error	
  of	
  measurement	
  (=0),	
  independent	
  of	
  model	
  size	
  
     o  Retrieval	
  of	
  matches	
  AND	
  complex	
  changes	
  is	
  instantaneous	
  
  Memory	
  overhead	
  
     o  <50	
  MB	
  for	
  model	
  sizes	
  below	
  50000	
  elements	
  
     o  Up	
  to	
  1GB	
  for	
  the	
  largest	
  model	
  (grows	
  linearly	
  with	
  model	
  size)	
  
  How	
  does	
  it	
  compare	
  to	
  na7ve	
  code	
  /	
  OCL?	
  
     o See	
  the	
  conference	
  talk	
  tomorrow	
  	
  
Ini7aliza7on	
  7me	
  




                     • Includes	
  7me	
  for	
  
                      	
  
                     first	
  valida7on	
  
                     • Linear	
  func7on	
  of	
  
                      	
  
                     model	
  size,	
  orders	
  
                     of	
  magnitude	
  faster	
  
Recomputa7on	
  7me	
  



       Recomputa7on	
  
      7me	
  is	
  uniformly	
  
          near	
  zero	
  
      (independent	
  of	
  
         model	
  size)	
  
Performance	
  overview	
  
Assessment	
  of	
  the	
  benchmark	
  
  On-­‐the-­‐fly	
  valida7on	
  is	
  only	
  one	
  scenario	
  
    o Early	
  model-­‐based	
  analysis	
  	
  
    o Language	
  engineering	
  in	
  graphical	
  DSMLs	
  
    o Model	
  execu7on/analysis	
  (stochas7c	
  GT)	
  
    o Tool	
  integra7on	
  	
  
    o Model	
  op7miza7on	
  /	
  constraint	
  solving	
  
  Example	
  AUTOSAR	
  queries	
  
    o Do	
  not	
  make	
  use	
  of	
  advanced	
  features	
  such	
  as	
  
      parameterized	
  queries	
  or	
  complex	
  structural	
  
      constraints	
  (recursion)	
  
CONCLUSION	
  
Contribu7ons	
  
  Expressive	
  declara7ve	
  query	
  language	
  by	
  graph	
  paeerns	
  
    o Capture	
  local	
  +	
  global	
  queries	
  
    o Composi7onality	
  +	
  Reusabilility	
  	
  
    o „Arbitrary”	
  Recursion,	
  Nega7on	
  
  Incremental	
  cache	
  of	
  matches	
  (materialized	
  view)	
  
    o Cheap	
  maintenance	
  of	
  cache	
  (only	
  memory	
  overhead)	
  
    o No7fy	
  about	
  relevant	
  changes	
  
    o Enable	
  reac7ons	
  to	
  complex	
  structural	
  events	
  
  High	
  performance	
  for	
  large	
  models	
  
    o Linear	
  overhead	
  for	
  loading	
  	
  
    o Instant	
  response	
  for	
  queries	
  
    o >	
  1	
  million	
  model	
  elements	
  (on	
  desktop	
  PC)	
  
Pointers	
  
  Details	
  on	
  availability	
  soon	
  to	
  follow	
  
    o hep://viatra.inf.mit.bme.hu/incquery	
  
  Will	
  be	
  integrated	
  into	
  OptXware’s	
  tools	
  
    o hep://optxware.com/en/embedded	
  
    o hep://optxware.com/en/modeling-­‐infrastructure	
  
  Thank	
  you	
  for	
  your	
  kind	
  aeen7on.	
  

More Related Content

Similar to EMF-IncQuery: Incremental evaluation of model queries over EMF models

From UML Profiles to EMF Profiles and Beyond (TOOLS'11)
From UML Profiles to EMF Profiles and Beyond (TOOLS'11)From UML Profiles to EMF Profiles and Beyond (TOOLS'11)
From UML Profiles to EMF Profiles and Beyond (TOOLS'11)Philip Langer
 
深度學習在AOI的應用
深度學習在AOI的應用深度學習在AOI的應用
深度學習在AOI的應用CHENHuiMei
 
An expressive and modular layer activation mechanism for Context-Oriented Pro...
An expressive and modular layer activation mechanism for Context-Oriented Pro...An expressive and modular layer activation mechanism for Context-Oriented Pro...
An expressive and modular layer activation mechanism for Context-Oriented Pro...Universidad de los Andes
 
Summary of Excel Skills
Summary of Excel SkillsSummary of Excel Skills
Summary of Excel Skillsjunggi784
 
SiriusCon 2015 - Breathe Life into Your Designer!
SiriusCon 2015 - Breathe Life into Your Designer!SiriusCon 2015 - Breathe Life into Your Designer!
SiriusCon 2015 - Breathe Life into Your Designer!melbats
 
Planning-Based Approach for Automating Sequence Diagram Generation
Planning-Based Approach for Automating Sequence Diagram GenerationPlanning-Based Approach for Automating Sequence Diagram Generation
Planning-Based Approach for Automating Sequence Diagram GenerationYaser Sulaiman
 
IEEE 2014 MATLAB IMAGE PROCESSING PROJECTS Robust face recognition from multi...
IEEE 2014 MATLAB IMAGE PROCESSING PROJECTS Robust face recognition from multi...IEEE 2014 MATLAB IMAGE PROCESSING PROJECTS Robust face recognition from multi...
IEEE 2014 MATLAB IMAGE PROCESSING PROJECTS Robust face recognition from multi...IEEEBEBTECHSTUDENTPROJECTS
 
GECCO'2007: Modeling XCS in Class Imbalances: Population Size and Parameter S...
GECCO'2007: Modeling XCS in Class Imbalances: Population Size and Parameter S...GECCO'2007: Modeling XCS in Class Imbalances: Population Size and Parameter S...
GECCO'2007: Modeling XCS in Class Imbalances: Population Size and Parameter S...Albert Orriols-Puig
 
High-performance model queries
High-performance model queriesHigh-performance model queries
High-performance model queriesIstvan Rath
 
Review: You Only Look One-level Feature
Review: You Only Look One-level FeatureReview: You Only Look One-level Feature
Review: You Only Look One-level FeatureDongmin Choi
 
Scalable image recognition model with deep embedding
Scalable image recognition model with deep embeddingScalable image recognition model with deep embedding
Scalable image recognition model with deep embedding捷恩 蔡
 
Scala lens: An introduction
Scala lens: An introductionScala lens: An introduction
Scala lens: An introductionKnoldus Inc.
 
Erlang, The Road Movie [GOTO:CPH 2011 Keynote]
Erlang, The Road Movie [GOTO:CPH 2011 Keynote]Erlang, The Road Movie [GOTO:CPH 2011 Keynote]
Erlang, The Road Movie [GOTO:CPH 2011 Keynote]Kresten Krab Thorup
 
What's New in v2 - AnsibleFest London 2015
What's New in v2 - AnsibleFest London 2015What's New in v2 - AnsibleFest London 2015
What's New in v2 - AnsibleFest London 2015jimi-c
 
Modular Java EE in the Cloud
Modular Java EE in the CloudModular Java EE in the Cloud
Modular Java EE in the CloudBert Ertman
 
Enriching EMF Models with Scala (quick overview)
Enriching EMF Models with Scala (quick overview)Enriching EMF Models with Scala (quick overview)
Enriching EMF Models with Scala (quick overview)Filip Krikava
 

Similar to EMF-IncQuery: Incremental evaluation of model queries over EMF models (20)

From UML Profiles to EMF Profiles and Beyond (TOOLS'11)
From UML Profiles to EMF Profiles and Beyond (TOOLS'11)From UML Profiles to EMF Profiles and Beyond (TOOLS'11)
From UML Profiles to EMF Profiles and Beyond (TOOLS'11)
 
Shuronr
ShuronrShuronr
Shuronr
 
Os Django
Os DjangoOs Django
Os Django
 
Lecture8 - From CBR to IBk
Lecture8 - From CBR to IBkLecture8 - From CBR to IBk
Lecture8 - From CBR to IBk
 
深度學習在AOI的應用
深度學習在AOI的應用深度學習在AOI的應用
深度學習在AOI的應用
 
An expressive and modular layer activation mechanism for Context-Oriented Pro...
An expressive and modular layer activation mechanism for Context-Oriented Pro...An expressive and modular layer activation mechanism for Context-Oriented Pro...
An expressive and modular layer activation mechanism for Context-Oriented Pro...
 
Summary of Excel Skills
Summary of Excel SkillsSummary of Excel Skills
Summary of Excel Skills
 
SiriusCon 2015 - Breathe Life into Your Designer!
SiriusCon 2015 - Breathe Life into Your Designer!SiriusCon 2015 - Breathe Life into Your Designer!
SiriusCon 2015 - Breathe Life into Your Designer!
 
Planning-Based Approach for Automating Sequence Diagram Generation
Planning-Based Approach for Automating Sequence Diagram GenerationPlanning-Based Approach for Automating Sequence Diagram Generation
Planning-Based Approach for Automating Sequence Diagram Generation
 
IEEE 2014 MATLAB IMAGE PROCESSING PROJECTS Robust face recognition from multi...
IEEE 2014 MATLAB IMAGE PROCESSING PROJECTS Robust face recognition from multi...IEEE 2014 MATLAB IMAGE PROCESSING PROJECTS Robust face recognition from multi...
IEEE 2014 MATLAB IMAGE PROCESSING PROJECTS Robust face recognition from multi...
 
GECCO'2007: Modeling XCS in Class Imbalances: Population Size and Parameter S...
GECCO'2007: Modeling XCS in Class Imbalances: Population Size and Parameter S...GECCO'2007: Modeling XCS in Class Imbalances: Population Size and Parameter S...
GECCO'2007: Modeling XCS in Class Imbalances: Population Size and Parameter S...
 
Lecture7 - IBk
Lecture7 - IBkLecture7 - IBk
Lecture7 - IBk
 
High-performance model queries
High-performance model queriesHigh-performance model queries
High-performance model queries
 
Review: You Only Look One-level Feature
Review: You Only Look One-level FeatureReview: You Only Look One-level Feature
Review: You Only Look One-level Feature
 
Scalable image recognition model with deep embedding
Scalable image recognition model with deep embeddingScalable image recognition model with deep embedding
Scalable image recognition model with deep embedding
 
Scala lens: An introduction
Scala lens: An introductionScala lens: An introduction
Scala lens: An introduction
 
Erlang, The Road Movie [GOTO:CPH 2011 Keynote]
Erlang, The Road Movie [GOTO:CPH 2011 Keynote]Erlang, The Road Movie [GOTO:CPH 2011 Keynote]
Erlang, The Road Movie [GOTO:CPH 2011 Keynote]
 
What's New in v2 - AnsibleFest London 2015
What's New in v2 - AnsibleFest London 2015What's New in v2 - AnsibleFest London 2015
What's New in v2 - AnsibleFest London 2015
 
Modular Java EE in the Cloud
Modular Java EE in the CloudModular Java EE in the Cloud
Modular Java EE in the Cloud
 
Enriching EMF Models with Scala (quick overview)
Enriching EMF Models with Scala (quick overview)Enriching EMF Models with Scala (quick overview)
Enriching EMF Models with Scala (quick overview)
 

More from Istvan Rath

Cloud-based Modelling Solutions Empowering Tool Integration
Cloud-based Modelling Solutions Empowering Tool IntegrationCloud-based Modelling Solutions Empowering Tool Integration
Cloud-based Modelling Solutions Empowering Tool IntegrationIstvan Rath
 
Cloud-based Modelling Solutions Empowering Tool Integration
Cloud-based Modelling Solutions Empowering Tool IntegrationCloud-based Modelling Solutions Empowering Tool Integration
Cloud-based Modelling Solutions Empowering Tool IntegrationIstvan Rath
 
MBSE meets Industrial IoT: Introducing the New MagicDraw Plug-in for RTI Co...
MBSE meets Industrial IoT: Introducing the New MagicDraw Plug-in for RTI Co...MBSE meets Industrial IoT: Introducing the New MagicDraw Plug-in for RTI Co...
MBSE meets Industrial IoT: Introducing the New MagicDraw Plug-in for RTI Co...Istvan Rath
 
IncQuery Server for Teamwork Cloud - Talk at IW2019
IncQuery Server for Teamwork Cloud - Talk at IW2019IncQuery Server for Teamwork Cloud - Talk at IW2019
IncQuery Server for Teamwork Cloud - Talk at IW2019Istvan Rath
 
VIATRA 2.0 Webinar
VIATRA 2.0 WebinarVIATRA 2.0 Webinar
VIATRA 2.0 WebinarIstvan Rath
 
Easier smart home development with simulators and rule engines
Easier smart home development with simulators and rule enginesEasier smart home development with simulators and rule engines
Easier smart home development with simulators and rule enginesIstvan Rath
 
Eclipse VIATRA Overview 2017
Eclipse VIATRA Overview 2017Eclipse VIATRA Overview 2017
Eclipse VIATRA Overview 2017Istvan Rath
 
Smarter internet of things with stream and event processing virtual io_t_meet...
Smarter internet of things with stream and event processing virtual io_t_meet...Smarter internet of things with stream and event processing virtual io_t_meet...
Smarter internet of things with stream and event processing virtual io_t_meet...Istvan Rath
 
Modes3: Model-based Demonstrator for Smart and Safe Systems
Modes3: Model-based Demonstrator for Smart and Safe SystemsModes3: Model-based Demonstrator for Smart and Safe Systems
Modes3: Model-based Demonstrator for Smart and Safe SystemsIstvan Rath
 
Eclipse DemoCamp Budapest 2016 November: Best of EclipseCon Europe 2016
Eclipse DemoCamp Budapest 2016 November: Best of EclipseCon Europe 2016Eclipse DemoCamp Budapest 2016 November: Best of EclipseCon Europe 2016
Eclipse DemoCamp Budapest 2016 November: Best of EclipseCon Europe 2016Istvan Rath
 
Exploring the Future of Eclipse Modeling: Web and Semantic Collaboration
Exploring the Future of Eclipse Modeling: Web and Semantic CollaborationExploring the Future of Eclipse Modeling: Web and Semantic Collaboration
Exploring the Future of Eclipse Modeling: Web and Semantic CollaborationIstvan Rath
 
Okosabb Internet of Things rendszerek komplex eseményfeldolgozás alkalmazásával
Okosabb Internet of Things rendszerek komplex eseményfeldolgozás alkalmazásával Okosabb Internet of Things rendszerek komplex eseményfeldolgozás alkalmazásával
Okosabb Internet of Things rendszerek komplex eseményfeldolgozás alkalmazásával Istvan Rath
 
IoT Supercharged: Complex event processing for MQTT with Eclipse technologies
IoT Supercharged: Complex event processing for MQTT with Eclipse technologiesIoT Supercharged: Complex event processing for MQTT with Eclipse technologies
IoT Supercharged: Complex event processing for MQTT with Eclipse technologiesIstvan Rath
 
mbeddr meets IncQuer - Combining the Best Features of Two Modeling Worlds
mbeddr meets IncQuer - Combining the Best Features of Two Modeling Worldsmbeddr meets IncQuer - Combining the Best Features of Two Modeling Worlds
mbeddr meets IncQuer - Combining the Best Features of Two Modeling WorldsIstvan Rath
 
Xcore meets IncQuery: How the New Generation of DSLs are Made
Xcore meets IncQuery: How the New Generation of DSLs are MadeXcore meets IncQuery: How the New Generation of DSLs are Made
Xcore meets IncQuery: How the New Generation of DSLs are MadeIstvan Rath
 
EMF-IncQuery 0.7 Presentation for Itemis
EMF-IncQuery 0.7 Presentation for ItemisEMF-IncQuery 0.7 Presentation for Itemis
EMF-IncQuery 0.7 Presentation for ItemisIstvan Rath
 
Event-driven Model Transformations in Domain-specific Modeling Languages
Event-driven Model Transformations in Domain-specific Modeling LanguagesEvent-driven Model Transformations in Domain-specific Modeling Languages
Event-driven Model Transformations in Domain-specific Modeling LanguagesIstvan Rath
 
The SENSORIA Development Environment
The SENSORIA Development EnvironmentThe SENSORIA Development Environment
The SENSORIA Development EnvironmentIstvan Rath
 
Challenges for advanced domain-specific frameworks
Challenges for advanced domain-specific frameworksChallenges for advanced domain-specific frameworks
Challenges for advanced domain-specific frameworksIstvan Rath
 
Transzformációk integrált alkalmazása a modellvezérelt szoftverfejlesztésben
Transzformációk integrált alkalmazása a modellvezérelt szoftverfejlesztésbenTranszformációk integrált alkalmazása a modellvezérelt szoftverfejlesztésben
Transzformációk integrált alkalmazása a modellvezérelt szoftverfejlesztésbenIstvan Rath
 

More from Istvan Rath (20)

Cloud-based Modelling Solutions Empowering Tool Integration
Cloud-based Modelling Solutions Empowering Tool IntegrationCloud-based Modelling Solutions Empowering Tool Integration
Cloud-based Modelling Solutions Empowering Tool Integration
 
Cloud-based Modelling Solutions Empowering Tool Integration
Cloud-based Modelling Solutions Empowering Tool IntegrationCloud-based Modelling Solutions Empowering Tool Integration
Cloud-based Modelling Solutions Empowering Tool Integration
 
MBSE meets Industrial IoT: Introducing the New MagicDraw Plug-in for RTI Co...
MBSE meets Industrial IoT: Introducing the New MagicDraw Plug-in for RTI Co...MBSE meets Industrial IoT: Introducing the New MagicDraw Plug-in for RTI Co...
MBSE meets Industrial IoT: Introducing the New MagicDraw Plug-in for RTI Co...
 
IncQuery Server for Teamwork Cloud - Talk at IW2019
IncQuery Server for Teamwork Cloud - Talk at IW2019IncQuery Server for Teamwork Cloud - Talk at IW2019
IncQuery Server for Teamwork Cloud - Talk at IW2019
 
VIATRA 2.0 Webinar
VIATRA 2.0 WebinarVIATRA 2.0 Webinar
VIATRA 2.0 Webinar
 
Easier smart home development with simulators and rule engines
Easier smart home development with simulators and rule enginesEasier smart home development with simulators and rule engines
Easier smart home development with simulators and rule engines
 
Eclipse VIATRA Overview 2017
Eclipse VIATRA Overview 2017Eclipse VIATRA Overview 2017
Eclipse VIATRA Overview 2017
 
Smarter internet of things with stream and event processing virtual io_t_meet...
Smarter internet of things with stream and event processing virtual io_t_meet...Smarter internet of things with stream and event processing virtual io_t_meet...
Smarter internet of things with stream and event processing virtual io_t_meet...
 
Modes3: Model-based Demonstrator for Smart and Safe Systems
Modes3: Model-based Demonstrator for Smart and Safe SystemsModes3: Model-based Demonstrator for Smart and Safe Systems
Modes3: Model-based Demonstrator for Smart and Safe Systems
 
Eclipse DemoCamp Budapest 2016 November: Best of EclipseCon Europe 2016
Eclipse DemoCamp Budapest 2016 November: Best of EclipseCon Europe 2016Eclipse DemoCamp Budapest 2016 November: Best of EclipseCon Europe 2016
Eclipse DemoCamp Budapest 2016 November: Best of EclipseCon Europe 2016
 
Exploring the Future of Eclipse Modeling: Web and Semantic Collaboration
Exploring the Future of Eclipse Modeling: Web and Semantic CollaborationExploring the Future of Eclipse Modeling: Web and Semantic Collaboration
Exploring the Future of Eclipse Modeling: Web and Semantic Collaboration
 
Okosabb Internet of Things rendszerek komplex eseményfeldolgozás alkalmazásával
Okosabb Internet of Things rendszerek komplex eseményfeldolgozás alkalmazásával Okosabb Internet of Things rendszerek komplex eseményfeldolgozás alkalmazásával
Okosabb Internet of Things rendszerek komplex eseményfeldolgozás alkalmazásával
 
IoT Supercharged: Complex event processing for MQTT with Eclipse technologies
IoT Supercharged: Complex event processing for MQTT with Eclipse technologiesIoT Supercharged: Complex event processing for MQTT with Eclipse technologies
IoT Supercharged: Complex event processing for MQTT with Eclipse technologies
 
mbeddr meets IncQuer - Combining the Best Features of Two Modeling Worlds
mbeddr meets IncQuer - Combining the Best Features of Two Modeling Worldsmbeddr meets IncQuer - Combining the Best Features of Two Modeling Worlds
mbeddr meets IncQuer - Combining the Best Features of Two Modeling Worlds
 
Xcore meets IncQuery: How the New Generation of DSLs are Made
Xcore meets IncQuery: How the New Generation of DSLs are MadeXcore meets IncQuery: How the New Generation of DSLs are Made
Xcore meets IncQuery: How the New Generation of DSLs are Made
 
EMF-IncQuery 0.7 Presentation for Itemis
EMF-IncQuery 0.7 Presentation for ItemisEMF-IncQuery 0.7 Presentation for Itemis
EMF-IncQuery 0.7 Presentation for Itemis
 
Event-driven Model Transformations in Domain-specific Modeling Languages
Event-driven Model Transformations in Domain-specific Modeling LanguagesEvent-driven Model Transformations in Domain-specific Modeling Languages
Event-driven Model Transformations in Domain-specific Modeling Languages
 
The SENSORIA Development Environment
The SENSORIA Development EnvironmentThe SENSORIA Development Environment
The SENSORIA Development Environment
 
Challenges for advanced domain-specific frameworks
Challenges for advanced domain-specific frameworksChallenges for advanced domain-specific frameworks
Challenges for advanced domain-specific frameworks
 
Transzformációk integrált alkalmazása a modellvezérelt szoftverfejlesztésben
Transzformációk integrált alkalmazása a modellvezérelt szoftverfejlesztésbenTranszformációk integrált alkalmazása a modellvezérelt szoftverfejlesztésben
Transzformációk integrált alkalmazása a modellvezérelt szoftverfejlesztésben
 

Recently uploaded

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 

Recently uploaded (20)

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 

EMF-IncQuery: Incremental evaluation of model queries over EMF models

  • 1. EMF-­‐INCQUERY   Incremental  evalua7on  of  model  queries  over  EMF  models   Gábor  Bergmann,  Ákos  Horváth,     István  Ráth,  Dániel  Varró   András  Balogh,  Zoltán  Balogh,     András  Ökrös,  Zoltán  Ujhelyi   Budapest  University  of  Technology  and  Economics   OptXware  Research  and  Development  LLC   Budapest  University  of  Technology  and  Economics   Department  of  Measurement  and  Informa<on  Systems  
  • 3. Hi  Jane,  what  do  you  do  at  work?   Jane   Detect!   Gen   Report!   Query  /   View   Boss   Constraint  
  • 4. Hi  Jane,  you  look  so  sad.  What  is  wrong?     It  takes  me  hours  to  write  a     Why  don’t  you  use  a  declara7ve   query  of  an  EMF  model   query  language  (like  OCL)?   Jane   Boss  
  • 5. Hi  Jane,  you  look  so  sad.  What  is  wrong?     It  takes  me  hours  to  write  a   query  of  an  EMF  model     I  need  to  re-­‐run  the  checks     Why  don’t  you  try   from  scratch  every  7me   something  incremental?   Jane   Boss  
  • 6. Hi  Jane,  you  look  so  sad.  What  is  wrong?     It  takes  me  hours  to  write  a   query  of  an  EMF  model     I  need  to  re-­‐run  the  checks   from  scratch  every  7me     I  go  to  have  lunch  while   running  well-­‐formedness   Oh,  Jane,  you  must  eat  a  lot!     checks  on  large  UML  models   Jane   Boss  
  • 7. STATE  OF  THE  ART  
  • 8. Problem  1:  Expressiveness     EMF  Query  (declara7ve)   o Low  expressiveness   o Limited  navigability   •  no  „cycles”   ?   OCL  (declara7ve)   o Verbose     o Lack  of  reusability  support   o Local  constraints  of     a  model  element   o Poor  handling  of  recursion   Challenging  to  use  
  • 9. Problem  2:  Incrementality     Goal:  Incremental  evala7on  of  model  queries   o Incremental  maintenance  of  result  set   o Avoid  unnecessary  re-­‐computa7on     Related  work:     o Constraint  evalua7on  (by  A.  Egyed)   •  Arbitrary  constraint  descrip7on   –  Can  be  a  boeleneck  for  complex  constraints   –  Always  local  to  a  model  element   •  Listen  to  model  no7fica7ons     •  Calculate  which  constraints  need  to  be  reevaluated   o No  other  related  technology  directly  over  EMF   o Research  MT  tools:  with  varying  degrees  of  support  
  • 10. Problem  3:  Performance     Na7ve  EMF  queries  (Java  program  code):     Lack  of     o Reverse  naviga7on  along  references   o Enumera7on  of  all  instances  by  type   o Smart  Caching     Scalability  of  (academic)  MT  tools   o Queries  over  >100K  model  elements  (several  proofs):     FUJABA,  VIATRA2  (Java),  GrGEN,  VMTS  (.Net),  Egyed’s   tools  
  • 11. Contribu7ons     Expressive  declara7ve  query  language  by  graph  paeerns     Incremental  cache  of  matches  (materialized  view)     High  performance  for  large  models  
  • 12. Contribu7ons     Expressive  declara7ve  query  language  by  graph  paeerns   o Capture  local  +  global  queries   o Composi7onality  +  Reusabilility     o „Arbitrary”  Recursion,  Nega7on     Incremental  cache  of  matches  (materialized  view)   o Cheap  maintenance  of  cache  (only  memory  overhead)   o No7fy  about  relevant  changes   o Enable  reac7ons  to  complex  structural  events     High  performance  for  large  models   o Linear  overhead  for  loading     o Instant  response  for  queries   o >  1  million  model  elements  (on  desktop  PC)  
  • 14. Contribu7ons     Expressive  declara7ve  query  language  by  graph  paeerns   o Capture  local  +  global  queries   o Composi7onality  +  Reusabilility     o „Arbitrary”  Recursion,  Nega7on     Incremental  cache  of  matches  (materialized  view)     High  performance  for  large  models  
  • 15. Paeern  defini7on   Graphical  nota7on   implements   paeern  siblingClass(C1,C2)   UI  Model   superClass   S:  Class   S   GComp   Cmd   Iface   S1:superClass   S2:superClass   Class   C1   Bueon   ImageBueon   C2   C1:  Class   C2:  Class   matching   s1:implement     Graph  Paeern:     o  Structural  condi7on  that  have  to  be   GComp:Class   Cmd:Iface   fulfilled  by  a  part  of  the  model  space   s2:included     Graph  paeern  matching:   s1:superClass   i2:implement:  Iface   o  A  model  (i.e.  part  of  the  model  space)   Bueon:Class   ImageBueon:Class   can  sa7sfy  a  graph  paeern,     o  if  the  paeern  can  be  matched  to  a   subgraph  of  the  model     Instance  Model  
  • 16. Graph  paeerns  (VTCL)   // B is a sibling class of A siblingClass(A,B)   pattern siblingClass(A, B) = { P:  Class   Class(A); s1:superClass   s2:superClass   Class.superClass(S1, A, P); Class(P); A:  Class   B:  Class   Class.superClass(S2, B, P); Class(B); } // S is locally substitutable by A locallySubs  (A,  S,  X)   pattern localSubs(A, S, X) = { Class(A); X:  Iface   Iface(X); Class.implements(I1, A, X); I1:implements   I2:implements   Class(S); Class.implements(I2, S, X); A:  Class   S:Class   } or { OR   Class(A); X:  Class   OR  paeern   Class(X); Class.superClass(P1, X, X); s1:superClass   s2:  superClass   Class(S); A:  Class   S:Class   Class.superClass(P2, S, X); }
  • 17. Posi7ve  and  Nega7ve  paeerns  (VTCL)   topLevelClass(A)   pattern topLevelClass(A) = { Nega7ve   Class(A); A:  Class   paeern   neg find subClass(A); wSuperClass(X)   } X pattern wSuperClass(X) = { neg find X:  Class   A:  Class   Class(X); wSuperClass s1:superClass   Class.superClass(S1, X, A); Class(A); suspiciousClass(X)   } pattern suspiciousClass(X) = { X:  Class   A:  Class   Class(X); Posi7ve   S1:superClass   find topLevelClass(X); IA:isAbstract   paeern   Class.superClass(S1, A, X); X find B:  Boolean   Class(A); topLevelClass Class.isAbstract(IA, A, B); Boolean(B); check  (B  ==  false);   check (value(B) == "false"); }
  • 18. Recursive  paeerns  (VTCL)   pattern descendant(X, D) = { paeern  descendant(X,D)   Class(X); X:  Class   Class.superClass(S, Ch, X); S:superClass   OR  paeern   Class(Ch); Recursive   paeern   find descendant(Ch, D) Ch:  Class   D:  Class   Class(D); } or { Class(X); X D Class.superClass(S, D, X); find descendant Class(D); OR   } S:superClass   D:  Class   X:  Class  
  • 19. Origins  of  the  idea     Model  transforma7ons  by  VIATRA2   o  Transforma7on  language   •  Declara7ve  paeerns  for  model  queries   •  Graph  transforma7on  rules  for  elementary  mapping  specifica7ons     •  ASM  rules  for  control  structure   o  Matching  strategy   •  Local  search-­‐based  (op7mized  search  plans)   •  Incremental  paNern  matching  (based  on  RETE)   •  Hybrid  paeern  matching  (adap7ve  combina7on  of  INC  and  LS)     Development  team   o Developed  by  BUTE  and  OptXware  Ltd.   o 9  developers     More  info   o  hep://eclipse.org/gmt/VIATRA2   o  hep://wiki.eclipse.org/VIATRA2  
  • 20. Applica7ons  of  VIATRA2     “Stand-­‐alone”  model  transforma7ons     Early  model-­‐based  analysis     (DECOS,  SecureChange)     Integrated  features  for  graphical  DSMLs   (ViatraDSM)     Model  execu7on/analysis  (stochas7c  GT)     (Development)  tool  integra7on     (DECOS,  SENSORIA,  MOGENTES)     Model  op7miza7on  /  constraint  solving  (DIANA)  
  • 22. Contribu7ons     Expressive  declara7ve  query  language  by  graph  paeerns   o Capture  local  +  global  queries   o Composi7onality  +  Reusabilility     o „Arbitrary”  Recursion,  Nega7on     Incremental  cache  of  matches  (materialized  view)   o Cheap  maintenance  of  cache  (only  memory  overhead)   o No7fy  about  relevant  changes  (new  match  –  lost  match)   o Enable  reac7ons  to  complex  structural  events     High  performance  for  large  models  
  • 23. Incremental  graph  paeern  matching     Goal:  retrieve  the  match  set  quickly     How?    RETE  network   o Store  (cache)  matches   o Incrementally  update  them  as  the  model  changes   •  Update  precisely     Experimental  results:  good,  if…   o There  is  enough  memory   o Transac7onal  model  manipula7on  
  • 24. RETE  net     RETE  network   a b c ISignal  objects   o  node:  (par7al)  matches     of  a  (sub)paeern   EMF  RISignal.systemSignal  edges   esourceSet   x z w SystemSignal  objects   EMF  no<fica<on  m  echanism   o  edge:  update   propaga7on   Transparent:  user  modifica7on,   INPUT   INPUT   INPUT   model  imports,  results  of  a   SS  :  SystemSignal   S  :  ISignal   S  :  ISignal   w Input  nodes   a transforma7on,  external   R1:systemSignal   modifica7on,  …     x z b c   RETE  is  always  updated!   SS  :  SystemSignal   JOIN   ANTI-­‐JOIN   Intermediate   S  :  ISignal   Produc7on   S  :  ISignal     Demonstration   R1:systemSignal   nodes   x R1:systemSignal   o  input:  AUTOSAR  model   o  paeern:  ISignal  check   x SS  :  SystemSignal   z node   NEG   SS  :  SystemSignal   o  change:  delete  systemSignal  edge     CC_ISignal(S)   a c
  • 25. RETE  nets   a b c  Class  objects     RETE  network   o  node:  (par7al)  matches     In-­‐memory  model TypedElement.type  edges   of  a  (sub)paeern   No<fica<on  pdate     o  edge:  u (EMF  RTypedElement  objects   x z w esourceSet)   propaga7on   Transparent:  user  modifica7on,   INPUT   INPUT   INPUT   PATTERN   results  of  lass   model  imports,   C:  C a   TE:  TypedElement   C  :  Class   C  :  Class   w Input  nodes   a UnusedClass(C)   external   transforma7on,    T  :  type   modifica7on,  …     x z UnusedClass(C)   b c   RETE  is  always  updated!   TE:  TypedElement   T:  type   NEG   A  class  to  which  no  type  reference  points   •  ssocia7on   A Experimental  results:   JOIN   •  roperty   P TE:  TypedElement   ANTI-­‐JOIN   good,  if…   Intermediate   C  :  Class   Parameter   •  Produc7on   C  :  Class     Demonstration  nough   o  There  is  e  T  :  type   •  ariable   V nodes    T  :  type   o  input:  UML  model   memory   o  paeern:  UnusedClass   o  Transac7onal  model   x TE:  TypedElement   z x node   NEG   TE:  TypedElement   o  change:  delete/retarget  type  reference   manipula7on   UnusedClass(C)   a c
  • 27. Overview     What  is  EMF-­‐INCQuery?   o Query  language  +  incremental  paeern  matcher  +   development  tools  for  EMF  models   •  Works  with  any  (pure)  EMF  applica7on   •  Reusability  by  paeern  composi7on   •  Arbitrary  recursion,  nega7on   •  Generic  and  parameterized  model  queries   •  Bidirec7onal  navigability   •  Immediate  access  to  all  instances  of  a  type   •  Complex  change  detec7on     Benefits   o Fully  declara7ve  +  Scalable  performance  
  • 28. Architectural  overview   RETE  Core   Paeern/Query   EMF  INC  PM   VIATRA2  INC  PM   spec   Core   Generated  PM  and  RETE   EMF  App   builder  
  • 30. EMF-­‐INCQUERY  Tooling     Genera7ve  approach   o compile  queries  into     •  RETE  network  builders   •  Query  interface  wrappers   o end-­‐to-­‐end  solu7on:  generates  Eclipse  plug-­‐in  projects     Relies  on  the  VIATRA2  environment   o query  development   o debugging    
  • 31. Tooling  architecture   Declara7ve  Queries   3 Generated  Query   in  VIATRA2   Wrappers   4 EMF  App   2 VIATRA2     EMF  Model   model  representa7on   1 Development  7me   Run7me  
  • 32. Development  workflow   Semi-­‐automated  for   typical  scenarios,   Import  EMF    some  manual  coding   Integrate  into  EMF   domain  into   applica7on   VIATRA2   Automated   Develop  and  test   Generate  INCQuery   queries  over   code   VIATRA2   Supported  by   the  VIATRA2   IDE  
  • 33. Impor7ng  EMF  domains     Automated  by  the  EMF2VIATRA  plug-­‐in     (by  OptXware  Ltd.)     Generic  support  to  process     o ECore  metamodels  and     o EMF-­‐based  instance  models     o within  the  VIATRA2  model  space     Available  as  an  independent  open  source  add-­‐on   to  VIATRA2  
  • 34. ECore  models  in  VIATRA2     Ecore     VIATRA2   o EClass   o En7ty  (Node)   o EReference   o Rela7on  (Edge)   o EAeribute   o Node+Edge   Car:  EClass   Car   parts:  EReference   parts   weight   +weight:  EInt   Part:  EClass   Integer   Part   MyCar:  Car   :parts   MyCar:  Car   :weight   MyWheel:   weight  =  1500   Part   parts  =  [MyWheel:Part]   :  Integer   value  =    1500  
  • 35. Developing  and  tes7ng  queries     Supported  by  the  VIATRA2  framework     LPG-­‐based  parser   o Recovery  parsing,  error  highligh7ng   o Light-­‐weight  sta7c  analysis  for  paeerns     (type  and  metamodel  conformance)     Development  features   o Paeern  graph  visualiza7on   o Paeern  match  set  visualiza7on   o Execute  paeerns  (in  transforma7ons)  
  • 36. Genera7ng  INCQuery  code     Just  a  few  clicks  necessary     Generated  components:  INCQuery  run7me   o Eclipse  plugin   •  Depends  only  on  EMF  and  the  INCQuery  core   •  No  VIATRA2  dependency!     o Private  code:  paeern  builders   •  Parameterize  the  RETE  core  and  the  generic  EMF  PM  library   o Public  API:  Paeern  matcher  access  layer   •  Query  interfaces   •  Data  Transfer  Objects  (DTOs)   •  Used  to  integrate  to  EMF  applica7ons    
  • 38. Facili7es   Generic  Query  API   Generic  Change  API   Generated  Query   Generated  Change   API   API  
  • 39. Generated  Query  API     Basic  queries   o Uses  tuples  (object  arrays)  corresponding  to  paeern  parameters   o Object[] getOneMatch() o Collection<Object[]> getAllMatches()   Parameterized  queries   o getOneMatch(Object X, Object Y, …) o getAllMatches(Object X, Object Y, …) o Null  input  values  =  unbound  input  variables   Based  on  paeern   signature  
  • 40. Query  DTOs   // B is a sibling class of A   Data  Transfer  Objects   pattern siblingClass(C1, C2) = generated  for     { /* contents */ paeern  signatures   }   DTO  query  methods   o  SiblingClassDTO getOneMatch() o  SiblingClassDTO getOneMatch (Object C1, Object C2) public class SiblingClassDTO o  Collection<SiblingClassDTO> { getAllMatches() Object C1; o  Collection<SiblingClassDTO> Object C2; getAllMatches(Object C1, Object C2) }   C1,  C2:  EObjects  or     datatype  instances     (String,  Boolean,  …)  
  • 41. Query  DTOs   // B is a sibling class of A   Data  Transfer  Objects   pattern siblingClass(C1, C2) = generated  for     { /* contents */ paeern  signatures   }   DTO  query  methods   o  SiblingClassDTO getOneMatch() o  SiblingClassDTO getOneMatch (UMLClass C1, UMLClass C2) public class SiblingClassDTO o  Collection<SiblingClassDTO> { getAllMatches() UMLClass C1; o  Collection<SiblingClassDTO> UMLClass C2; getAllMatches(UMLClass C1, } UMLClass C2) Ongoing  work:  use     C1,  C2:  EObjects  or     domain-­‐specific   datatype  instances     types  in  generated   (String,  Boolean,  …)   code  
  • 42. Change  API     Track  changes  in  the  match  set  of  paeerns  (new/lost)     Delta  monitors   o May  be  ini7alized  at  any  7me   o DeltaMonitor.matchFoundEvents / DeltaMonitor.matchLostEvents •  Queues  of  matches  (tuples/DTOs)  that  have  appeared/disappeared  since   ini7aliza7on     Typical  usage   o Listen  to  model  manipula7on  (transac7ons)   o A{er  transac7on  commits:   •  Evaluate  delta  monitor  contents  and  process  changes   •  Remove  processed    tuples/DTOs  from  .matchFound/LostEvents  
  • 43. Integra7ng  into  EMF  applica7ons     Paeern  matchers  may  be  ini7alized  for   o Any  EMF  No7fier   •  e.g.  Resources,  ResourceSets   o Transac7onalEdi7ngDomains     Ini7aliza7on   o Possible  at  any  7me   o Involves  a  single  exhaus7ve  model  traversal   (independent  of  the  number  of  paeerns,  paeern   contents  etc.)  
  • 44. Typical  programming  paeerns   1.  Ini7alize  EMF  model   o  Usually  already  done  by  your  app     2.  Ini7alize  incremental  PM  whenever  necessary   3.  Use  the  incremental  PM  for  queries   o  Model  updates  will  be  processed  transparently,  with   minimal  performance  overhead   o  Delta  monitors  can  be  used  to  track  complex  changes   4.  Dispose  the  PM  when  not  needed  anymore   o  +  Frees  memory   o  -­‐  Re-­‐traversal  will  be  necessary  
  • 46. Case  study:  UML  valida7on     Goal:     well-­‐formedness  constraint  valida7on  over  UML2     Requirements   o Live  /  on-­‐the-­‐fly:     instantaneous  feedback  as  the  user  is  edi7ng   o Incremental:  fast  for  large  models     Ingredients     o Papyrus  UML   o VIATRA2  R3.2   o EMF-­‐INCQuery  
  • 47. Example  UML  well-­‐formedness  constraint     Diamonds  are  the  girl’s   best  friend   o But  our  system  architect’s   worst  enemy       The  “diamond”  is  a  (local)   an7-­‐paeern   o Mul7ple  inheritance  (and   polymorphism)  can  be   problema7c  in  some   programming  languages     Goal:  detect     diamond  structures  in   UML  class  diagrams    
  • 48. Formaliza7on   pattern SuperType(Sub, Super) = { Class(Sub); Generalization.specific(GS, Gen, Sub); Sub:  Class   Generalization(Gen); Generalization.general(GG, Gen, Super); Class(Super); :  specific   } Gen:  Generaliza7on   :  general   Super:  Class  
  • 49. Formaliza7on   pattern SuperType(Sub, Super) = { Class(Sub); Generalization.specific(GS, Gen, Sub); Sub:  Class   Generalization(Gen); Generalization.general(GG, Gen, Super); Class(Super); :  specific   } Gen:  Generaliza7on   :  general   Super:  Class  
  • 50. Formaliza7on   pattern SuperType(Sub, Super) = { Class(Sub); Generalization.specific(GS, Gen, Sub); Sub:  Class   Generalization(Gen); Generalization.general(GG, Gen, Super); Class(Super); :  specific   } Gen:  Generaliza7on   :  general   Super:  Class  
  • 51. Formaliza7on   pattern diamond(CA,C1,C2,C3) = { Class(CA); Class(C1); Class(C2); Class(C3); find SuperType(C1,CA); find SuperType(C2,CA); find SuperType(C3,C1); Common   find SuperType(C3,C2); Ancestor:  Class   neg find SuperType(C1,C2); neg find SuperType(C2,C1); } pattern SuperType(Sub, Super) = C1:  Class   C2:  Class   { Class(Sub); Generalization.specific(GS, Gen, Sub); Generalization(Gen); Generalization.general(GG, Gen, Super); Class(Super); C3:  Class   }
  • 52. Formaliza7on   pattern diamond(CA,C1,C2,C3) = { Class(CA); Class(C1); Class(C2); Class(C3); find SuperType(C1,CA); find SuperType(C2,CA); find SuperType(C3,C1); Common   find SuperType(C3,C2); Ancestor:  Class   neg find SuperType(C1,C2); neg find SuperType(C2,C1); } pattern SuperType(Sub, Super) = C1:  Class   C2:  Class   { Class(Sub); Generalization.specific(GS, Gen, Sub); Generalization(Gen); Generalization.general(GG, Gen, Super); Class(Super); C3:  Class   }
  • 53. Formaliza7on   pattern diamond(CA,C1,C2,C3) = { Class(CA); Class(C1); Class(C2); Class(C3); find SuperType(C1,CA); find SuperType(C2,CA); find SuperType(C3,C1); Common   find SuperType(C3,C2); Ancestor:  Class   neg find SuperType(C1,C2); neg find SuperType(C2,C1); } pattern SuperType(Sub, Super) = C1:  Class   C2:  Class   { Class(Sub); Generalization.specific(GS, Gen, Sub); Generalization(Gen); Generalization.general(GG, Gen, Super); Class(Super); C3:  Class   }
  • 54. Formaliza7on   pattern diamond(CA,C1,C2,C3) = { Class(CA); Class(C1); Class(C2); Class(C3); find SuperType(C1,CA); find SuperType(C2,CA); find SuperType(C3,C1); Common   find SuperType(C3,C2); Ancestor:  Class   neg find SuperType(C1,C2); neg find SuperType(C2,C1); } pattern SuperType(Sub, Super) = C1:  Class   C2:  Class   { Class(Sub); Generalization.specific(GS, Gen, Sub); Generalization(Gen); Generalization.general(GG, Gen, Super); Class(Super); C3:  Class   }
  • 55. Formaliza7on     Problem:  transi7vity  needs  to   be  taken  into  account   Common     Solu7on:  recursion   Ancestor:  Class   pattern transitiveSuperType(Sub, Super) = { find SuperType(Sub,Super); } OR { find transitiveSuperType(Sub, Middle); find SuperType(Middle,Super); C2’:  Class   } pattern diamond(CA,C1,C2,C3) = { Class(CA); Class(C1); Class(C2); Class(C3); C1:  Class   find transitiveSuperType(C1,CA); C2:  Class   find transitiveSuperType(C2,CA); find transitiveSuperType(C3,C1); find transitiveSuperType(C3,C2); neg find transitiveSuperType(C1,C2); neg find transitiveSuperType(C2,C1); C3:  Class   }
  • 56. Paeern  development  in  VIATRA2     Import  the  UML  metamodel     Import  UML  instance  models       VTCL  development  environment   o Create  and  debug  paeerns   o Visualize  paeerns  and  paeern  matches   o Test  queries/paeerns  in  transforma7ons  
  • 57. Genera7ng  INCQuery  wrappers     Create  INCQuery  project     INCQuery  project  set-­‐up  and  customiza7on     Genera7ng  code  
  • 58. Integra7on  into  Papyrus  UML     Papyrus  uses  org.eclipse.uml2  models  internally   o  Managed  in  a  standard  ResourceSet   o  No  Transac7onalEdi7ngDomain  support     Valida7on  is  facilitated  using  EMF-­‐Valida7on   o  Inflexible   Not  suitable  for   o  Manages  live  valida7on  by  a  different  paradigm   our  purposes   o  Constraints  rely  on  manually  coded  model  traversal  
  • 59. Integra7on  into  Papyrus  UML     We  implemented  manually:   o  Custom  light-­‐weight  valida7on  extension  (200  LOC)   •  Based  on  Eclipse  resource  markers   •  Generically  reusable  for  any  EMF  model   o  UI  integra7on  (150  LOC)   •  Contributed  menu  item   •  Relevant  part:  15  LOC     •  Generically  reusable   o  Constraint-­‐specific  code   •  Graph  paeerns  (18  LOC  in  VTCL)   •  Adapter  class  (~15  LOC  in  Java)   –  extends  the  light-­‐weight  valida7on  feedback  framework     All  the  rest  is  automa7cally  generated.  
  • 60. On-­‐the-­‐fly  incremental  valida7on  by  delta  monitors   idm.getReteEngine().getAfterUpdateCallbacks().add(new Runnable() {! @Override! public void run() {! Simple  mechanism   // after each model update, check the delta monitor! to  register  call-­‐ // FIXME should be: after each complete transaction, check the delta monitor! backs  that  execute   a{er  all  updates   dm.matchFoundEvents.removeAll( processNewMatches(dm.matchFoundEvents, outline, f.getFile()) );! have  been   propagated   dm.matchLostEvents.removeAll( processLostMatches(dm.matchLostEvents, outline, f.getFile()) );! }! });   Core  technique  of   processing  changes  
  • 61. On-­‐the-­‐fly  incremental  valida7on  by  delta  monitors   private Collection<InheritanceDiamondDTO> processNewMatches (Collection<InheritanceDiamondDTO> dtos, IFile f) throws CoreException {! Vector<InheritanceDiamondDTO> processed = new Vector<InheritanceDiamondDTO>();! for (InheritanceDiamondDTO diamond : dtos) {! Process  paeern   " Vector<EObject> affectedElements = new Vector<EObject>();! signature  DTOs   " affectedElements.add((EObject)diamond.getA());! " affectedElements.add((EObject)diamond.getB());! " affectedElements.add((EObject)diamond.getC());! " affectedElements.add((EObject)diamond.getD());! " ValidationUtil.markProblem(f, affectedElements, ! ValidationProblemKind.DIAMOND);! " processed.add(diamond);! Make  sure  to   Use  light-­‐weight   }! remove  a   valida7on  facility   return processed;! processed   to  create  error   }   change  from  the   marker   queue  
  • 62. DEMO   How  does  it  work?  
  • 64. Challenges     Performance  evalua7ons  are  hard   o Fair?   o Reliable?   o Reproducible?   o Can  the  results  be  generalized?     Benchmark  example:     on-­‐the-­‐fly  constraint  valida7on  over  AUTOSAR  models   o Conference  presenta7on  tomorrow,  11-­‐12.30,  Hall  B   o Mo7va7on:  the  Embedded  Architect  Tool  of  OptXware  Ltd.   o AUTOSAR  models  can  be  very  large  (>>1m  elements)  
  • 65. What  is  measured?     Sample  models  were  generated   o  matches  are  scarce  rela7ve  to  overall  model  size     On-­‐the-­‐fly  valida7on  is  modeled  as  follows:   1.  Compute  ini7al  valida7on  results   2.  Apply  randomly  distributed,  small  changes   3.  Re-­‐compute  valida7on  results     Measured:  execu7on  7mes  of   o  Ini7aliza7on  (model  load  +  RETE  construc7on)   o  Model  manipula7on  opera7ons  (negligible)   o  Valida7on  result  (re)computa7on     Compared  technologies   o  MDT-­‐OCL   o  Plain  Java  code  that  an  average  developer  would  write  
  • 66. INCQuery  Results     Hardware:  normal  desktop  PC  (Core2,  4GB  RAM)     Model  sizes  up  to  1.5m  elements     Ini7aliza7on  7mes  (resource  loading  +  first  valida7on)   o  <1  sec  for  model  sizes  below  50000  elements   o  Up  to  40  seconds  for  the  largest  model  (grows  linearly  with  the  model  size)     Recomputa7on  7mes   o  Within  error  of  measurement  (=0),  independent  of  model  size   o  Retrieval  of  matches  AND  complex  changes  is  instantaneous     Memory  overhead   o  <50  MB  for  model  sizes  below  50000  elements   o  Up  to  1GB  for  the  largest  model  (grows  linearly  with  model  size)     How  does  it  compare  to  na7ve  code  /  OCL?   o See  the  conference  talk  tomorrow    
  • 67. Ini7aliza7on  7me   • Includes  7me  for     first  valida7on   • Linear  func7on  of     model  size,  orders   of  magnitude  faster  
  • 68. Recomputa7on  7me   Recomputa7on   7me  is  uniformly   near  zero   (independent  of   model  size)  
  • 70. Assessment  of  the  benchmark     On-­‐the-­‐fly  valida7on  is  only  one  scenario   o Early  model-­‐based  analysis     o Language  engineering  in  graphical  DSMLs   o Model  execu7on/analysis  (stochas7c  GT)   o Tool  integra7on     o Model  op7miza7on  /  constraint  solving     Example  AUTOSAR  queries   o Do  not  make  use  of  advanced  features  such  as   parameterized  queries  or  complex  structural   constraints  (recursion)  
  • 72. Contribu7ons     Expressive  declara7ve  query  language  by  graph  paeerns   o Capture  local  +  global  queries   o Composi7onality  +  Reusabilility     o „Arbitrary”  Recursion,  Nega7on     Incremental  cache  of  matches  (materialized  view)   o Cheap  maintenance  of  cache  (only  memory  overhead)   o No7fy  about  relevant  changes   o Enable  reac7ons  to  complex  structural  events     High  performance  for  large  models   o Linear  overhead  for  loading     o Instant  response  for  queries   o >  1  million  model  elements  (on  desktop  PC)  
  • 73. Pointers     Details  on  availability  soon  to  follow   o hep://viatra.inf.mit.bme.hu/incquery     Will  be  integrated  into  OptXware’s  tools   o hep://optxware.com/en/embedded   o hep://optxware.com/en/modeling-­‐infrastructure     Thank  you  for  your  kind  aeen7on.