SlideShare une entreprise Scribd logo
1  sur  11
EMF-INCQUERY:
A high-performance model query engine for EMF
                   models


                     István Ráth
                  rath@mit.bme.hu
   Budapest University of Technology and Economics
       Fault Tolerant Systems Research Group
Overview
 A model query engine
   o Supports batch queries                                 Query: a piece of code
   o Optimized for incremental queries!                       that looks/iterates
 Incrementality                                           through certain parts of
   o Compute once, update afterwards
                                                              an (EMF) instance
   o Gain: Instant re-evaluation
                                                                     model
   o Price: Uses some more memory
       • Manageable with proper life cycles
 Why?
   o Queries are everywhere
       • UI (views), business logic (transformations), tooling (validation)
   o Existing technology has performance issues with large models
   o Current query languages are difficult (to reuse)
Benefits
 Makes on-the-fly well-formedness validation, view maintenance, …
  feasible over really large instance models
   o Large: >1M elements
   o Difference is noticeable for a few hundred elements too, depending on your
     queries
 Simplifies writing really complex queries
   o Graph pattern language
   o Highly reusable, you can even build query libraries
   o Performance does not (significantly) depend on query complexity!
 Easy-to-integrate into existing apps
   o works with any EMF DSL
   o Query engine can be attached to any Notifier or TransactionalEditingDomain
EXAMPLE      A simple UML validation constraint
 “All Behaviors must have an
 Expressiveas their specification.”language
  Operation declarative query
   o Otherwise they do not have any
by graph patterns which they could be
    “interface” through
   Capture local + global queries
     accessed  “dead code”
   Compositionality + Reusabilility
 Bad case:
   „Arbitrary” Recursion, Negation


               • Uses the IncQuery Validation Engine to manage
                 validation markers on-the-fly
               • No manual coding necessary
               • Generically integrates into EMF tree editors and
                 GMF editors
Batch mode

             Linear function of
             model size, orders
             of magnitude faster
Incremental mode




 Evaluation time is
uniformly near zero
  (independent of
     model size)
EMF-INCQUERY Architecture v0.7
Application
                   Your code


                    Generated                tooling
                                                       Pattern/Quer
                                                             y
                 pattern matcher                       specification

API
                 Validation    Reflective pattern
                  Engine            matcher
 IncQuery BASE                      • The RETE algorithm
                                    EMF INC PM the magic work
                                      makes all
                   RETE Core
                                    • Well-known in rule-
                                       Core
                                      based systems
                                      Framework
IncQuery BASE
 Light-weight Java library for simple (yet very powerful) EMF model
  queries, with incremental evaluation
 Supports
   o Get all instance elements by type
   o Reverse navigation along references
   o Get model elements by attribute value/type
 Very easy to integrate into any EMF tool (pure Java) – standalone!
 Same high performance and scalability as IncQuery
 Incremental transitive closure
   o Computation of e.g. reachability regions, connected model partitions, …
   o Innovative new algorithm for general graphs
Development roadmap: IncQuery v0.7
 Tooling
   o Xtext2-based tooling
   o Incorporating
       •   Unlimited recursion and transitive closure
       •   Short attribute notation
       •   Aggregate functions
       •   Match (or even exceed) most of the expressive power of OCL, while providing
           better re-use and more concise notation
 Runtime
   o Reflective queries
       • Build and execute queries on-the-fly, using Java and IQ PL
   o RETE construction optimizations
       • Goal: to significantly reduce memory footprint
Further plans & collaboration opportunities
 Integrate IncQuery Base and IncQuery to EMF
  modeling tools
  o Support for Epsilon, ATL, OCL, …
 Performance boost for derived EFeatures
  o and notifications!
Check it out!
 Pointers
  o http://viatra.inf.mit.bme.hu/incquery
     • Documentation, language reference
     • Tutorials
     • Examples
  o http://viatra.inf.mit.bme.hu/incquery/base
  o rath@mit.bme.hu
  o viatra-dev@inf.mit.bme.hu

Contenu connexe

Plus de Istvan 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
 
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
 
Change-driven model transformations
Change-driven model transformationsChange-driven model transformations
Change-driven model transformationsIstvan Rath
 
Domain-specifikus nyelvek a fejlesztésben
Domain-specifikus nyelvek a fejlesztésbenDomain-specifikus nyelvek a fejlesztésben
Domain-specifikus nyelvek a fejlesztésbenIstvan Rath
 
Incremental pattern matching in the VIATRA2 model transformation framework
Incremental pattern matching in the VIATRA2 model transformation frameworkIncremental pattern matching in the VIATRA2 model transformation framework
Incremental pattern matching in the VIATRA2 model transformation frameworkIstvan Rath
 
Model transformations in the VIATRA2 framework
Model transformations in the VIATRA2 frameworkModel transformations in the VIATRA2 framework
Model transformations in the VIATRA2 frameworkIstvan Rath
 
Applications of incremental pattern matching in model transformations
Applications of incremental pattern matching in model transformationsApplications of incremental pattern matching in model transformations
Applications of incremental pattern matching in model transformationsIstvan Rath
 
Live model transformations driven by incremental pattern matching
Live model transformations driven by incremental pattern matchingLive model transformations driven by incremental pattern matching
Live model transformations driven by incremental pattern matchingIstvan Rath
 
Efficient model transformations by combining pattern matching strategies
Efficient model transformations by combining pattern matching strategiesEfficient model transformations by combining pattern matching strategies
Efficient model transformations by combining pattern matching strategiesIstvan Rath
 
A benchmark evaluation for incremental pattern matching in graph transformation
A benchmark evaluation for incremental pattern matching in graph transformationA benchmark evaluation for incremental pattern matching in graph transformation
A benchmark evaluation for incremental pattern matching in graph transformationIstvan Rath
 

Plus de Istvan Rath (20)

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
 
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
 
Change-driven model transformations
Change-driven model transformationsChange-driven model transformations
Change-driven model transformations
 
Domain-specifikus nyelvek a fejlesztésben
Domain-specifikus nyelvek a fejlesztésbenDomain-specifikus nyelvek a fejlesztésben
Domain-specifikus nyelvek a fejlesztésben
 
Incremental pattern matching in the VIATRA2 model transformation framework
Incremental pattern matching in the VIATRA2 model transformation frameworkIncremental pattern matching in the VIATRA2 model transformation framework
Incremental pattern matching in the VIATRA2 model transformation framework
 
Model transformations in the VIATRA2 framework
Model transformations in the VIATRA2 frameworkModel transformations in the VIATRA2 framework
Model transformations in the VIATRA2 framework
 
Applications of incremental pattern matching in model transformations
Applications of incremental pattern matching in model transformationsApplications of incremental pattern matching in model transformations
Applications of incremental pattern matching in model transformations
 
Live model transformations driven by incremental pattern matching
Live model transformations driven by incremental pattern matchingLive model transformations driven by incremental pattern matching
Live model transformations driven by incremental pattern matching
 
Efficient model transformations by combining pattern matching strategies
Efficient model transformations by combining pattern matching strategiesEfficient model transformations by combining pattern matching strategies
Efficient model transformations by combining pattern matching strategies
 
A benchmark evaluation for incremental pattern matching in graph transformation
A benchmark evaluation for incremental pattern matching in graph transformationA benchmark evaluation for incremental pattern matching in graph transformation
A benchmark evaluation for incremental pattern matching in graph transformation
 

Dernier

SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 

Dernier (20)

SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 

EMF-IncQuery EclipseCon Europe 2011 Modeling Symposium Talk

  • 1. EMF-INCQUERY: A high-performance model query engine for EMF models István Ráth rath@mit.bme.hu Budapest University of Technology and Economics Fault Tolerant Systems Research Group
  • 2. Overview  A model query engine o Supports batch queries Query: a piece of code o Optimized for incremental queries! that looks/iterates  Incrementality through certain parts of o Compute once, update afterwards an (EMF) instance o Gain: Instant re-evaluation model o Price: Uses some more memory • Manageable with proper life cycles  Why? o Queries are everywhere • UI (views), business logic (transformations), tooling (validation) o Existing technology has performance issues with large models o Current query languages are difficult (to reuse)
  • 3. Benefits  Makes on-the-fly well-formedness validation, view maintenance, … feasible over really large instance models o Large: >1M elements o Difference is noticeable for a few hundred elements too, depending on your queries  Simplifies writing really complex queries o Graph pattern language o Highly reusable, you can even build query libraries o Performance does not (significantly) depend on query complexity!  Easy-to-integrate into existing apps o works with any EMF DSL o Query engine can be attached to any Notifier or TransactionalEditingDomain
  • 4. EXAMPLE A simple UML validation constraint  “All Behaviors must have an Expressiveas their specification.”language Operation declarative query o Otherwise they do not have any by graph patterns which they could be “interface” through Capture local + global queries accessed  “dead code” Compositionality + Reusabilility  Bad case: „Arbitrary” Recursion, Negation • Uses the IncQuery Validation Engine to manage validation markers on-the-fly • No manual coding necessary • Generically integrates into EMF tree editors and GMF editors
  • 5. Batch mode Linear function of model size, orders of magnitude faster
  • 6. Incremental mode Evaluation time is uniformly near zero (independent of model size)
  • 7. EMF-INCQUERY Architecture v0.7 Application Your code Generated tooling Pattern/Quer y pattern matcher specification API Validation Reflective pattern Engine matcher IncQuery BASE • The RETE algorithm EMF INC PM the magic work makes all RETE Core • Well-known in rule- Core based systems Framework
  • 8. IncQuery BASE  Light-weight Java library for simple (yet very powerful) EMF model queries, with incremental evaluation  Supports o Get all instance elements by type o Reverse navigation along references o Get model elements by attribute value/type  Very easy to integrate into any EMF tool (pure Java) – standalone!  Same high performance and scalability as IncQuery  Incremental transitive closure o Computation of e.g. reachability regions, connected model partitions, … o Innovative new algorithm for general graphs
  • 9. Development roadmap: IncQuery v0.7  Tooling o Xtext2-based tooling o Incorporating • Unlimited recursion and transitive closure • Short attribute notation • Aggregate functions • Match (or even exceed) most of the expressive power of OCL, while providing better re-use and more concise notation  Runtime o Reflective queries • Build and execute queries on-the-fly, using Java and IQ PL o RETE construction optimizations • Goal: to significantly reduce memory footprint
  • 10. Further plans & collaboration opportunities  Integrate IncQuery Base and IncQuery to EMF modeling tools o Support for Epsilon, ATL, OCL, …  Performance boost for derived EFeatures o and notifications!
  • 11. Check it out!  Pointers o http://viatra.inf.mit.bme.hu/incquery • Documentation, language reference • Tutorials • Examples o http://viatra.inf.mit.bme.hu/incquery/base o rath@mit.bme.hu o viatra-dev@inf.mit.bme.hu