SlideShare a Scribd company logo
Integrating Efficient Model Queries
                  in State-of-the-art EMF Tools

                      Gábor Bergmann, Ábel Hegedüs, Ákos
                     Horváth, István Ráth, Zoltán Ujhelyi and
                                   Dániel Varró



Budapest University of Technology and Economics   TOOLS Europe 2012
Fault Tolerant Systems Research Group             Prague, Czech Republic, 2012. 05. 30.
Overview
   Introduction
   EMF-INCQUERY overview
   Transparent query integration
   Performance considerations
   Conclusion
MDE today
                                          Modeling techniques
                           Integrated model-driven tools
         REQ

  Model-              SD
based early
 analysis Architecture
                                 IMP
           modeling,
            DSMLs                            TST
                           Code
                        generation,
IDE                    model-assisted         Model-based
                       development           test generation
MDE today
                                   Modeling techniques
                      Eclipse Modeling Framework
           REQ

                 SD

                           IMP

                                      TST


IDE - Eclipse
A key problem of MDE
 Scalability vs. modeling tools
   o Issues encountered by several industrial partners using
     tools based on the Eclipse Modeling Framework (EMF)
   o Modeling scenarios can get really complex really quickly
      • Instance models of size 1-2M and beyond
      • Performance issues with model transformations and code
        generators have an adverse effect on everyday development tasks
 Scalability?              Recognized e.g. by AUTOSAR tool vendors
   o Complex                 http://wiki.eclipse.org/Auto_IWG_WP2
     (meta)models
   o Large instance models
   o Complex query and manipulation scenarios
Focus: model queries
 Model queries: “a piece of code that retrieves a given set of the
  model”
 Queries are at the heart of MDE
   o Every model access/read is a (simple) query
   o More complex: Views, content providers
   o Most complex: Model transformations, code generators, …
 Query performance (= the speed of content retrieval) is crucial
   o First vs. consecutive vs. throughput
   o Query result vs. query contents
 Core problems
   1. Slow query engines
   2. Considerable programming effort necessary to get complex
      queries right
EMF-INCQUERY
Overview
 EMF-INCQUERY: a model query engine
  o Supports batch queries
  o Optimized for incremental queries!
 Incremental evaluation
  o Based on the RETE algorithm
  o Compute once, update afterwards
  o Gain: Instant re-evaluation
  o Price: Uses some more memory
     • Manageable with proper life cycles
EMF instance
   model
                Input = Model contents + changes (EMF notifications)
                               Input     RETE network
                               nodes

Query definition
                          Intermediate
                              nodes


                             Output       Delta
                             nodes       monitor

                         Generated query
                           components
                Query engine

           Output = Query results + (subsequent) Query result deltas
Benefits of EMF-INCQUERY
 Makes on-the-fly well-formedness validation, view
  maintenance, … feasible over really large instance
  models
 Simplifies writing really complex queries
  o Graph pattern language
  o Highly reusable  query libraries
 Easy-to-integrate into existing apps
  o Works with any EMF domain metamodel
  o Integrates through Eclipse standards  works with
    many EMF-based apps out-of-the-box
DEMO INCQUERY Pattern Language
 School metamodel in EMF
INCQUERY Pattern Language




      Expressive declarative query language
      by graph patterns
         Capture local + global queries
         Compositionality + Reusabilility
         „Arbitrary” Recursion, Negation
New features with version 0.6
 Tools
  o Xtext2-based language
     • Content assist (code completion), validation, outline, …
  o Unique query language features
     • Unlimited recursion and transitive closure
     • Aggregate functions
     • Match/exceed the expressive power of OCL, while providing more
       flexible re-use
 Runtime
  o Build and execute queries on-the-fly
  o Strong generative bindings to Java
  o Efficient incremental transitive closure
INCQUERY Development Tools
                                • Works with most EMF-
                                  based editors out-of-
                                  the-box
                                • Reveals matches as
                                  selection


               Pattern Editor


Queries are applied
& updates on-the-
fly
                                              Query Explorer
INCQUERY Model Validation

    • Works with most EMF-
      based tools out-of-the-
      box
    • Manages error-warning
      markers on-the-fly as the
Standard Eclipse BPMN Editor
      user is editing the model
      = Instantaneous feedback




                                  Markers in the Problems View
TRANSPARENT QUERY
   INTEGRATION

  … beyond the development tools
Derived features in EMF
Derived features:                        Derived attributes:
• Supported by auxiliary                 • Typed scalar values
  mechanisms (e.g. Java, OCL)            • Supported by
• Supported by EMF-based                   INCQUERY derivatives
                                              <<derived>>
  tools out-of-the-box
                      <<derived>>


                         <<derived>>




                     Derived edges:
                     • Binary relationships
                     • Supported by binary
                       INCQUERY patterns
INCQUERY derivatives
                                  You can combine IQPL
                                  with (side-effect free,
                                   deterministic) Xbase



Key benefits:
• Automatic
  dependency-aware
  change notifications              Derived attribute
  for derived features             “hasPrimeWeight”:
• Instantaneous result               True iff pattern
  retrieval                       “coursePrimeWeight”
                                    matches to host C
PERFORMANCE BENCHMARK

     Instantaneous result retrieval?
Benchmarking scenario
 In-memory models
   o Embedded railways control software system design domain
   o Instance models up to 2.7M elements
 Scenario: well-formedness validation
   o 5 rules, from simple to very complex
   o Batch validation: loading models + executing queries
   o On-the-fly revalidation: modifying models + re-executing
     queries instantaneously
 Tools
   o Eclipse tools (OCL, INCQUERY, EMF-Java)
   o RDF/SPARQL engines (for comparison)
 http://viatra.inf.mit.bme.hu/publications/trainbenchmark
Revalidation on-the-fly

   SPARQL tools are
                            • Incremental EMF engines
generally 1-2 Orders-of-
                              typically 5-10x faster
Magnitude (OM) slower
                            • sub-100ms response times
  than top EMF tools
                              for up to 1.5M elements
A closer look at the top

    Performance advantage
     of OCL-IA over OCL is
      not significant with
        complex queries




                       INCQUERY is 1-1.5 orders-
                         of-magnitude faster
                             than OCL-IA
Memory usage
• Incremental engines
  impose a linear memory
  consumption overhead
• INCQUERY overhead is
  larger than OCL-IA
• Even the largest models
  fit into 1GB of RAM
Final points
 EMF-INCQUERY has been proposed as an
  Eclipse.org project under EMFT
  http://www.eclipse.org/proposals/modeling.emf.incquery/
 EMF-INCQUERY 0.6 preview release is available
  immediately
  o Pointers:
    http://viatra.inf.mit.bme.hu/incquery
    http://viatra.inf.mit.bme.hu/incquery/getting_started
    http://viatra.inf.mit.bme.hu/performance
 Release 0.6 is scheduled shortly after the Eclipse
  Juno Launch (beginning of July)
Acknowledgements
 Additional development team members
  o Márk Czotter, Tamás Szabó
 Performance benchmarking
  o Benedek Izsó, Zoltán Szatmári
 Testing, examples
  o Attila Csicsely, Tamás Csurgó, Dániel Kávássy, Gábor
    Szárnyas, Tamás Tóth



 Thank you very much!

More Related Content

PDF
Developing and Visualizing Live Model Queries
PPTX
High-performance model queries
ODP
Fast, Faster and Super-Fast Queries
PDF
EMF-IncQuery 0.7 Presentation for Itemis
KEY
Spring AOP
PPTX
Sc11 presentation 2001_06_28
PDF
Towards JVM Dynamic Languages Toolchain
PDF
Working With Concurrency In Java 8
Developing and Visualizing Live Model Queries
High-performance model queries
Fast, Faster and Super-Fast Queries
EMF-IncQuery 0.7 Presentation for Itemis
Spring AOP
Sc11 presentation 2001_06_28
Towards JVM Dynamic Languages Toolchain
Working With Concurrency In Java 8

What's hot (19)

PPT
Tu1 1 5l
PDF
CoreML
PPTX
Java 101
PPS
Design Patterns For 70% Of Programmers In The World
PPT
D2 8 Enhydra Shark
PDF
Whats new in Java 7
PPSX
Introduction to Java
PPTX
Aspect Oriented Programming
PDF
Mock Objects, Design and Dependency Inversion Principle
PPT
PDF
Core Java
PPT
Java1 in mumbai
PPT
香港六合彩 &raquo; SlideShare
PDF
You need to extend your models? EMF Facet vs. EMF Profiles
PPTX
Design for testability as a way to good coding (SOLID and IoC)
KEY
Erjang - A journey into Erlang-land
PPT
Java Core | Modern Java Concurrency | Martijn Verburg & Ben Evans
PPTX
Go f designpatterns 130116024923-phpapp02
PPTX
Java programming course for beginners
Tu1 1 5l
CoreML
Java 101
Design Patterns For 70% Of Programmers In The World
D2 8 Enhydra Shark
Whats new in Java 7
Introduction to Java
Aspect Oriented Programming
Mock Objects, Design and Dependency Inversion Principle
Core Java
Java1 in mumbai
香港六合彩 &raquo; SlideShare
You need to extend your models? EMF Facet vs. EMF Profiles
Design for testability as a way to good coding (SOLID and IoC)
Erjang - A journey into Erlang-land
Java Core | Modern Java Concurrency | Martijn Verburg & Ben Evans
Go f designpatterns 130116024923-phpapp02
Java programming course for beginners
Ad

Viewers also liked (7)

PPT
Modeling Search Computing Applications
PDF
11.query optimization to improve performance of the code execution
PPTX
Query2 eclipse day
PDF
Transzformációk integrált alkalmazása a modellvezérelt szoftverfejlesztésben
PDF
The SENSORIA Development Environment
PDF
Incremental pattern matching in the VIATRA2 model transformation system
PDF
Efficient model transformations by combining pattern matching strategies
Modeling Search Computing Applications
11.query optimization to improve performance of the code execution
Query2 eclipse day
Transzformációk integrált alkalmazása a modellvezérelt szoftverfejlesztésben
The SENSORIA Development Environment
Incremental pattern matching in the VIATRA2 model transformation system
Efficient model transformations by combining pattern matching strategies
Ad

Similar to EMF-IncQuery presentation at TOOLS 2012 (20)

PDF
A tutorial on EMF-IncQuery
PPTX
IncQuery-D: Distributed Incremental Model Queries over the Cloud: Engineerin...
PPTX
Xcore meets IncQuery: How the New Generation of DSLs are Made
PDF
IncQuery Labs Models 2020 MIP Talk
PPTX
Incremental Model Queries for Model-Dirven Software Engineering
PDF
SERENE 2014 School: Incremental Model Queries over the Cloud
PDF
SERENE 2014 School: Daniel varro serene2014_school
PDF
EMF Facet vs. EMF Profiles - EclipseCon North America 2012, Modeling Symposium
PPTX
mbeddr meets IncQuer - Combining the Best Features of Two Modeling Worlds
PDF
IncQuery Server for Teamwork Cloud - Talk at IW2019
PPTX
IncQuery-D: Incremental Queries in the Cloud
PPTX
Incremental Queries and Transformations for Engineering Critical Systems
PPTX
IncQuery-D: Distributed Incremental Graph Queries
PDF
IncQuery Group's presentation for the INCOSE Polish Chapter 20220310
PPTX
Model visualization made easy: Incremental query-driven views in modeling tools
PDF
Eclipse Modeling Framework (EMF) and Graphical Modeling Framework (GMF)
PDF
Cloud-based Modelling Solutions Empowering Tool Integration
PDF
Sharded Joins for Scalable Incremental Graph Queries
PPT
ITU - MDD - EMF
PPTX
IncQuery Suite demo for INCOSE 2022IW
A tutorial on EMF-IncQuery
IncQuery-D: Distributed Incremental Model Queries over the Cloud: Engineerin...
Xcore meets IncQuery: How the New Generation of DSLs are Made
IncQuery Labs Models 2020 MIP Talk
Incremental Model Queries for Model-Dirven Software Engineering
SERENE 2014 School: Incremental Model Queries over the Cloud
SERENE 2014 School: Daniel varro serene2014_school
EMF Facet vs. EMF Profiles - EclipseCon North America 2012, Modeling Symposium
mbeddr meets IncQuer - Combining the Best Features of Two Modeling Worlds
IncQuery Server for Teamwork Cloud - Talk at IW2019
IncQuery-D: Incremental Queries in the Cloud
Incremental Queries and Transformations for Engineering Critical Systems
IncQuery-D: Distributed Incremental Graph Queries
IncQuery Group's presentation for the INCOSE Polish Chapter 20220310
Model visualization made easy: Incremental query-driven views in modeling tools
Eclipse Modeling Framework (EMF) and Graphical Modeling Framework (GMF)
Cloud-based Modelling Solutions Empowering Tool Integration
Sharded Joins for Scalable Incremental Graph Queries
ITU - MDD - EMF
IncQuery Suite demo for INCOSE 2022IW

More from Istvan Rath (20)

PPTX
Cloud-based Modelling Solutions Empowering Tool Integration
PPTX
MBSE meets Industrial IoT: Introducing the New MagicDraw Plug-in for RTI Co...
PPTX
VIATRA 2.0 Webinar
PPTX
Easier smart home development with simulators and rule engines
PPTX
Eclipse VIATRA Overview 2017
PPTX
Smarter internet of things with stream and event processing virtual io_t_meet...
PPTX
Modes3: Model-based Demonstrator for Smart and Safe Systems
PPTX
Eclipse DemoCamp Budapest 2016 November: Best of EclipseCon Europe 2016
PPTX
Exploring the Future of Eclipse Modeling: Web and Semantic Collaboration
PPTX
Okosabb Internet of Things rendszerek komplex eseményfeldolgozás alkalmazásával
PPTX
IoT Supercharged: Complex event processing for MQTT with Eclipse technologies
PPTX
Event-driven Model Transformations in Domain-specific Modeling Languages
PDF
Challenges for advanced domain-specific frameworks
PDF
Change-driven model transformations
PDF
Domain-specifikus nyelvek a fejlesztésben
PDF
Incremental pattern matching in the VIATRA2 model transformation framework
PDF
Model transformations in the VIATRA2 framework
PDF
Applications of incremental pattern matching in model transformations
PDF
Live model transformations driven by incremental pattern matching
PDF
A benchmark evaluation for incremental pattern matching in graph transformation
Cloud-based Modelling Solutions Empowering Tool Integration
MBSE meets Industrial IoT: Introducing the New MagicDraw Plug-in for RTI Co...
VIATRA 2.0 Webinar
Easier smart home development with simulators and rule engines
Eclipse VIATRA Overview 2017
Smarter internet of things with stream and event processing virtual io_t_meet...
Modes3: Model-based Demonstrator for Smart and Safe Systems
Eclipse DemoCamp Budapest 2016 November: Best of EclipseCon Europe 2016
Exploring the Future of Eclipse Modeling: Web and Semantic Collaboration
Okosabb Internet of Things rendszerek komplex eseményfeldolgozás alkalmazásával
IoT Supercharged: Complex event processing for MQTT with Eclipse technologies
Event-driven Model Transformations in Domain-specific Modeling Languages
Challenges for advanced domain-specific frameworks
Change-driven model transformations
Domain-specifikus nyelvek a fejlesztésben
Incremental pattern matching in the VIATRA2 model transformation framework
Model transformations in the VIATRA2 framework
Applications of incremental pattern matching in model transformations
Live model transformations driven by incremental pattern matching
A benchmark evaluation for incremental pattern matching in graph transformation

Recently uploaded (20)

PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
project resource management chapter-09.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Mushroom cultivation and it's methods.pdf
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Heart disease approach using modified random forest and particle swarm optimi...
PPTX
cloud_computing_Infrastucture_as_cloud_p
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PPTX
A Presentation on Touch Screen Technology
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Web App vs Mobile App What Should You Build First.pdf
PPTX
1. Introduction to Computer Programming.pptx
PDF
DP Operators-handbook-extract for the Mautical Institute
PDF
Zenith AI: Advanced Artificial Intelligence
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
A novel scalable deep ensemble learning framework for big data classification...
PDF
Enhancing emotion recognition model for a student engagement use case through...
Accuracy of neural networks in brain wave diagnosis of schizophrenia
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
1 - Historical Antecedents, Social Consideration.pdf
project resource management chapter-09.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Mushroom cultivation and it's methods.pdf
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Heart disease approach using modified random forest and particle swarm optimi...
cloud_computing_Infrastucture_as_cloud_p
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
A Presentation on Touch Screen Technology
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
Unlocking AI with Model Context Protocol (MCP)
Web App vs Mobile App What Should You Build First.pdf
1. Introduction to Computer Programming.pptx
DP Operators-handbook-extract for the Mautical Institute
Zenith AI: Advanced Artificial Intelligence
Programs and apps: productivity, graphics, security and other tools
A novel scalable deep ensemble learning framework for big data classification...
Enhancing emotion recognition model for a student engagement use case through...

EMF-IncQuery presentation at TOOLS 2012

  • 1. Integrating Efficient Model Queries in State-of-the-art EMF Tools Gábor Bergmann, Ábel Hegedüs, Ákos Horváth, István Ráth, Zoltán Ujhelyi and Dániel Varró Budapest University of Technology and Economics TOOLS Europe 2012 Fault Tolerant Systems Research Group Prague, Czech Republic, 2012. 05. 30.
  • 2. Overview  Introduction  EMF-INCQUERY overview  Transparent query integration  Performance considerations  Conclusion
  • 3. MDE today Modeling techniques Integrated model-driven tools REQ Model- SD based early analysis Architecture IMP modeling, DSMLs TST Code generation, IDE model-assisted Model-based development test generation
  • 4. MDE today Modeling techniques Eclipse Modeling Framework REQ SD IMP TST IDE - Eclipse
  • 5. A key problem of MDE  Scalability vs. modeling tools o Issues encountered by several industrial partners using tools based on the Eclipse Modeling Framework (EMF) o Modeling scenarios can get really complex really quickly • Instance models of size 1-2M and beyond • Performance issues with model transformations and code generators have an adverse effect on everyday development tasks  Scalability? Recognized e.g. by AUTOSAR tool vendors o Complex http://wiki.eclipse.org/Auto_IWG_WP2 (meta)models o Large instance models o Complex query and manipulation scenarios
  • 6. Focus: model queries  Model queries: “a piece of code that retrieves a given set of the model”  Queries are at the heart of MDE o Every model access/read is a (simple) query o More complex: Views, content providers o Most complex: Model transformations, code generators, …  Query performance (= the speed of content retrieval) is crucial o First vs. consecutive vs. throughput o Query result vs. query contents  Core problems 1. Slow query engines 2. Considerable programming effort necessary to get complex queries right
  • 8. Overview  EMF-INCQUERY: a model query engine o Supports batch queries o Optimized for incremental queries!  Incremental evaluation o Based on the RETE algorithm o Compute once, update afterwards o Gain: Instant re-evaluation o Price: Uses some more memory • Manageable with proper life cycles
  • 9. EMF instance model Input = Model contents + changes (EMF notifications) Input RETE network nodes Query definition Intermediate nodes Output Delta nodes monitor Generated query components Query engine Output = Query results + (subsequent) Query result deltas
  • 10. Benefits of EMF-INCQUERY  Makes on-the-fly well-formedness validation, view maintenance, … feasible over really large instance models  Simplifies writing really complex queries o Graph pattern language o Highly reusable  query libraries  Easy-to-integrate into existing apps o Works with any EMF domain metamodel o Integrates through Eclipse standards  works with many EMF-based apps out-of-the-box
  • 11. DEMO INCQUERY Pattern Language  School metamodel in EMF
  • 12. INCQUERY Pattern Language Expressive declarative query language by graph patterns Capture local + global queries Compositionality + Reusabilility „Arbitrary” Recursion, Negation
  • 13. New features with version 0.6  Tools o Xtext2-based language • Content assist (code completion), validation, outline, … o Unique query language features • Unlimited recursion and transitive closure • Aggregate functions • Match/exceed the expressive power of OCL, while providing more flexible re-use  Runtime o Build and execute queries on-the-fly o Strong generative bindings to Java o Efficient incremental transitive closure
  • 14. INCQUERY Development Tools • Works with most EMF- based editors out-of- the-box • Reveals matches as selection Pattern Editor Queries are applied & updates on-the- fly Query Explorer
  • 15. INCQUERY Model Validation • Works with most EMF- based tools out-of-the- box • Manages error-warning markers on-the-fly as the Standard Eclipse BPMN Editor user is editing the model = Instantaneous feedback Markers in the Problems View
  • 16. TRANSPARENT QUERY INTEGRATION … beyond the development tools
  • 17. Derived features in EMF Derived features: Derived attributes: • Supported by auxiliary • Typed scalar values mechanisms (e.g. Java, OCL) • Supported by • Supported by EMF-based INCQUERY derivatives <<derived>> tools out-of-the-box <<derived>> <<derived>> Derived edges: • Binary relationships • Supported by binary INCQUERY patterns
  • 18. INCQUERY derivatives You can combine IQPL with (side-effect free, deterministic) Xbase Key benefits: • Automatic dependency-aware change notifications Derived attribute for derived features “hasPrimeWeight”: • Instantaneous result True iff pattern retrieval “coursePrimeWeight” matches to host C
  • 19. PERFORMANCE BENCHMARK Instantaneous result retrieval?
  • 20. Benchmarking scenario  In-memory models o Embedded railways control software system design domain o Instance models up to 2.7M elements  Scenario: well-formedness validation o 5 rules, from simple to very complex o Batch validation: loading models + executing queries o On-the-fly revalidation: modifying models + re-executing queries instantaneously  Tools o Eclipse tools (OCL, INCQUERY, EMF-Java) o RDF/SPARQL engines (for comparison)  http://viatra.inf.mit.bme.hu/publications/trainbenchmark
  • 21. Revalidation on-the-fly SPARQL tools are • Incremental EMF engines generally 1-2 Orders-of- typically 5-10x faster Magnitude (OM) slower • sub-100ms response times than top EMF tools for up to 1.5M elements
  • 22. A closer look at the top Performance advantage of OCL-IA over OCL is not significant with complex queries INCQUERY is 1-1.5 orders- of-magnitude faster than OCL-IA
  • 23. Memory usage • Incremental engines impose a linear memory consumption overhead • INCQUERY overhead is larger than OCL-IA • Even the largest models fit into 1GB of RAM
  • 24. Final points  EMF-INCQUERY has been proposed as an Eclipse.org project under EMFT http://www.eclipse.org/proposals/modeling.emf.incquery/  EMF-INCQUERY 0.6 preview release is available immediately o Pointers: http://viatra.inf.mit.bme.hu/incquery http://viatra.inf.mit.bme.hu/incquery/getting_started http://viatra.inf.mit.bme.hu/performance  Release 0.6 is scheduled shortly after the Eclipse Juno Launch (beginning of July)
  • 25. Acknowledgements  Additional development team members o Márk Czotter, Tamás Szabó  Performance benchmarking o Benedek Izsó, Zoltán Szatmári  Testing, examples o Attila Csicsely, Tamás Csurgó, Dániel Kávássy, Gábor Szárnyas, Tamás Tóth  Thank you very much!