SlideShare une entreprise Scribd logo
1  sur  27
XCORE MEETS INCQUERY:
HOW THE NEW GENERATION
OF DSLS ARE MADE
Tamás Szabó (itemis AG), István Ráth (BUTE)
With contributions from:
Ed Merks
Gábor Bergmann, Ábel Hegedüs, Ákos Horváth,
András Ökrös, Zoltán Ujhelyi, Benedek Izsó

Budapest University of Technology and Economics
Fault Tolerant Systems Research Group

IncQueryLabs Ltd.

Itemis AG
Overview






Introduction
Live graph search for EMF
Query-based language engineering
Conclusion
EMF-INCQUERY:
LIVE GRAPH SEARCH FOR EMF
Queries in modeling tools
 Important!
o Model management
o Queries
o Views
o Transformations
Incremental queries
 Key observation: model queries are expensive
o Models are large (1-5-10+ M elements)
o Queries are complex (attribute value checks +
navigation/joins + iterations)
o Industrial example: well-formedness validation of a 4M
element AUTOSAR model takes 30+ minutes
• Despite being hand-coded in Java (no OCL, …)
 Usability issues
 Productivity issues

 How to address this?
o Lazy evaluation
o Incrementality: calculate once, update afterwards
Comparison
 Normal queries

 Live (incremental) queries

o Java, OCL, …
Quer
y

Model

Evaluator
Results
Model change

(Re-)traversal necessary if
the model is changed

Model change

Quer
y

Model

Evaluator
Updated results

Efficient change
propagation

Result deltas

1. Always up-to-date results
without model traversal
2. Track changes of your model
in terms of queries
EMF-INCQUERY
 An EMF model query engine for live graph search
• Expressive query
language based on
graph patterns and
Xbase

• Incremental
evaluation based on
the Rete algorithm
• Instantaneous
response for
complex queries
over large models

• Incremental model
processing (validation,
synchronization, ...)

Language

Execution

Tools

http://eclipse.org/incquery
Important use-case: Live abstractions

abstract

Complex model

Computed overlay
aka. “View”
Defined by a query
Items = SELECT …
Id

Label

Prop0

Prop1

0

N1

a

B

1

N2

c

D
Important use-case: Live abstractions
UI update
Model
Modification

abstract

Complex model

Computed overlay
aka. “View”

Change notification
Defined by a query
Items = SELECT …
Id

Prop0

Prop1

0

N1

a

B

1

Query result update

Label

N2

c

D

2

N3

e

F
INCQUERY Viewers
1. Model
Modification

On-the-fly
abstractions over
the model

EMF Model
2. Change
Notifications

Live
Live
Queries
Queries

Labeled, hierarchic
property graph

Derived
Model
3. Continuous,
efficient
synchronization

UI
4. UI updates

 Visualize things that are not (directly) present in your model
 Provides an easy-to-use API for integration into your presentation layer
o Eclipse Data Binding
o Simple callbacks
DEMO INCQUERY Viewers
 Using pattern annotations for the specification of
on-thy-fly abstractions
 Using the INCQUERY Viewers Sandbox for
development and testing
 Visualizing large graphs with yFiles
 Using INCQUERY Viewers Extensions APIs in your
own apps
Live abstractions: simple example
 Influence relationships in the Library
W1
W1: Writer

W2: Writer

: writers

B1: Book

: writers
: cites

B2: Book

: influencedBy

Derived relationship
W2

: citations

: citations

Bx: Book

Transitive closure

EMF instance model

Visualization
QUERY-BASED LANGUAGE
ENGINEERING
Xcore
 Xcore
o Extended textual syntax for
Ecore-based
metamodeling, built on Xtext
o Fully fledged programming
language
o To specify structure +
behavior
(operations, datatype
conversion logic)
o http://wiki.eclipse.org/Xcore

Xbase
• Xtext-based programming
language
• Compiles to Java
• Java type system
• Supports advanced constructs
(closures, type inference,
operator overloading, …)
• http://wiki.eclipse.org/Xbase
Derived features in Ecore
 Getters (and setters) implemented with Java
 Frequently used to transparently integrate
complex queries into the language
o Can also be specified by means other than Java

 Nice proposition
o Transparent: integrate queries into the model – no
utility classes needed
o Extend the expressive power of metamodeling

 Many language engineers are reluctant to use
them – why?
The functionality challenge
 Typical modeling tool
architecture

View

o Model: EMF
o Controller: ~ EMF.Edit
o View: e.g. JFace Viewers

 Change notifications are
essential for this to work
 EMF has nice notifications
o Notifier - Adapter
o … except for derived
features

Controller
Change notifications

Model
The performance challenge
 What happens when a getter is called?
class Book {
String title = "" // set a default value
refers Writer[] writers
derived String longName get {
return title + " (" + writers.size + ")"
}
derived String shortName get {
return longName.subString(0,5)
}
}

dependencies
Tougher problem than you
 Dependencies
might think:
o The value of “longName” depends on “title” and “writers”
- DFs are used explicit
o The value of “shortName” depends on “longName” –a lot in dependency
complex
• … and thus on “title” and “writers” – implicit dependency DSLs
- Query complexity times
 Performance challenge: getters may be called manycan
explode easily
o Make sure they execute quickly – but how?
o Cache whenever you can – but how?
Solution: well-behaving derived features
 Key idea
o Changes in the value of “name” depend on changes in
the values of “title” and “writers”
o Change notifications can be used to implement an
efficient caching strategy
o As long as every feature is behaving well
• i.e. sends notifications when necessary

 But…
o How do I discover implicit dependencies? graph
Live
search!
o How do I get/send notifications for derived features?
DEMO Query integration options for INCQUERY
 INCQUERY Java API
 Add-on APIs
o INCQUERY Validation
o INCQUERY Viewers
DEMO Query integration options for INCQUERY
 INCQUERY Java API
 Add-on APIs
o INCQUERY Validation
o INCQUERY Viewers

 Query-based derived features
o Automatically computes and maintains references
and attribute values
o Transparent integration with Xcore and (pure) Xbase
• Works with traditional genmodeled Ecore too

o Unique feature: well-behaving derived features with
efficient and automated notification support
Scalability? Yes!

Eclipse OCL, SPARQL
engines, Neo4j, …
Characteristic
difference, note
the log scales

• IncQuery can provide near zero response times for
complex queries over models up to 14M elements
•

Check http://incquery.net/publications/trainbenchmark for
more details
CONCLUSION
What can I do with all this? – query-based live abstractions
Eclipse
technology

Pros

Trees, tables,
Properties
(JFace viewers)

EMF.Edit

The real deal:
doesn’t hide abstract syntax

Diagrams

GEF, GMF,
Graphiti

Easy to read and write
for non-programmers

Textual DSLs

Xtext

Easy to read and write
for programmers

INCQUERY
Viewers

Makes understanding and
working with complex models
a lot easier

Syntax

JFace, Zest,
yFiles
Your tool!
What can I do with all this? – query-based derived features

 Boost the power and scalability of Ecore:
live graph search tightly integrated into your DSL
o Self validating models
• 30+ min batch  <1s on-the-fly

o Query-based traceability links / language integration
o INCQUERY Viewers  “derived EObjects”
o << your idea here >>

 Get rid of lots of legacy stuff
o Legacy model elements
o Legacy helper/utility classes
o Legacy UI boilerplate
Top 3 cool applications of INCQUERY
Model-driven development toolchain for avionics systems,
Based on a combination of Eclipse tech and MATLAB/Simulink

Well-formedness validation in a modeling tool for an automotive OEM

Development tools for live dependency analysis of a large software infrastructure model
Three points to take home

1. Live abstractions are very powerful.
2. Use well-behaving derived features to boost your
DSL’s expressive power.
3. Xcore+INCQUERY is how the new generation of
DSLs are made 
Final points
 Find all details, examples, demos at
o http://eclipse.org/incquery
o http://incquery.net

 Check out the blog post
o http://incquery.net/blog/2013/10/xcore-meets-incqueryhow-new-generation-dsls-are-made-talk-eclipseconeurope-2013
o Demo projects
o Further reading (docs + the theory behind)

 Release 0.8 (including all these new features) is
scheduled shortly after the Xtext 2.5 release
 Your contributions (feedback, forum posts, ideas,
bugzillas, patches) are very welcome!

Contenu connexe

En vedette

Visualization of Traceability Models with Domain-specific Layouting
Visualization of Traceability Models with Domain-specific LayoutingVisualization of Traceability Models with Domain-specific Layouting
Visualization of Traceability Models with Domain-specific LayoutingZoltán Ujhelyi
 
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
 
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
 
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
 
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
 
Local search-based pattern matching features in EMF-IncQuery
Local search-based pattern matching features in EMF-IncQueryLocal search-based pattern matching features in EMF-IncQuery
Local search-based pattern matching features in EMF-IncQueryZoltán Ujhelyi
 
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
 
Domain-Specific Languages
Domain-Specific LanguagesDomain-Specific Languages
Domain-Specific LanguagesJavier Canovas
 

En vedette (9)

Visualization of Traceability Models with Domain-specific Layouting
Visualization of Traceability Models with Domain-specific LayoutingVisualization of Traceability Models with Domain-specific Layouting
Visualization of Traceability Models with Domain-specific Layouting
 
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
 
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
 
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
 
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
 
Local search-based pattern matching features in EMF-IncQuery
Local search-based pattern matching features in EMF-IncQueryLocal search-based pattern matching features in EMF-IncQuery
Local search-based pattern matching features in EMF-IncQuery
 
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
 
Domain-Specific Languages
Domain-Specific LanguagesDomain-Specific Languages
Domain-Specific Languages
 

Similaire à Xcore meets IncQuery: How the New Generation of DSLs are Made

Model visualization made easy: Incremental query-driven views in modeling tools
Model visualization made easy: Incremental query-driven views in modeling toolsModel visualization made easy: Incremental query-driven views in modeling tools
Model visualization made easy: Incremental query-driven views in modeling toolsÁkos Horváth
 
EMF-IncQuery presentation at TOOLS 2012
EMF-IncQuery presentation at TOOLS 2012EMF-IncQuery presentation at TOOLS 2012
EMF-IncQuery presentation at TOOLS 2012Istvan Rath
 
High-performance model queries
High-performance model queriesHigh-performance model queries
High-performance model queriesIstvan Rath
 
COMMitMDE'18: Eclipse Hawk: model repository querying as a service
COMMitMDE'18: Eclipse Hawk: model repository querying as a serviceCOMMitMDE'18: Eclipse Hawk: model repository querying as a service
COMMitMDE'18: Eclipse Hawk: model repository querying as a serviceAntonio García-Domínguez
 
OS for AI: Elastic Microservices & the Next Gen of ML
OS for AI: Elastic Microservices & the Next Gen of MLOS for AI: Elastic Microservices & the Next Gen of ML
OS for AI: Elastic Microservices & the Next Gen of MLNordic APIs
 
Domain oriented development
Domain oriented developmentDomain oriented development
Domain oriented developmentrajmundr
 
"Source Code Abstracts Classification Using CNN", Vadim Markovtsev, Lead Soft...
"Source Code Abstracts Classification Using CNN", Vadim Markovtsev, Lead Soft..."Source Code Abstracts Classification Using CNN", Vadim Markovtsev, Lead Soft...
"Source Code Abstracts Classification Using CNN", Vadim Markovtsev, Lead Soft...Dataconomy Media
 
Learn about Eclipse e4 from Lars Vogel at SF-JUG
Learn about Eclipse e4 from Lars Vogel at SF-JUGLearn about Eclipse e4 from Lars Vogel at SF-JUG
Learn about Eclipse e4 from Lars Vogel at SF-JUGMarakana Inc.
 
The Larch - a visual interactive programming environment
The Larch - a visual interactive programming environmentThe Larch - a visual interactive programming environment
The Larch - a visual interactive programming environmentPython Ireland
 
Clojure intro Dallas Functional
Clojure intro   Dallas FunctionalClojure intro   Dallas Functional
Clojure intro Dallas FunctionalAdam Hill
 
Clojure Intro - Dallas Functional
Clojure Intro - Dallas FunctionalClojure Intro - Dallas Functional
Clojure Intro - Dallas FunctionalAdam Hill
 
Next-Generation Completeness and Consistency Management in the Digital Threa...
Next-Generation Completeness and Consistency Management in the Digital Threa...Next-Generation Completeness and Consistency Management in the Digital Threa...
Next-Generation Completeness and Consistency Management in the Digital Threa...Ákos Horváth
 
The Joy Of Functional Programming
The Joy Of Functional ProgrammingThe Joy Of Functional Programming
The Joy Of Functional Programmingjasondew
 
EclipseCon Eu 2015 - Breathe life into your Designer!
EclipseCon Eu 2015 - Breathe life into your Designer!EclipseCon Eu 2015 - Breathe life into your Designer!
EclipseCon Eu 2015 - Breathe life into your Designer!melbats
 
IncQuery_presentation_Incose_EMEA_WSEC.pptx
IncQuery_presentation_Incose_EMEA_WSEC.pptxIncQuery_presentation_Incose_EMEA_WSEC.pptx
IncQuery_presentation_Incose_EMEA_WSEC.pptxIncQuery Labs
 
Building and deploying LLM applications with Apache Airflow
Building and deploying LLM applications with Apache AirflowBuilding and deploying LLM applications with Apache Airflow
Building and deploying LLM applications with Apache AirflowKaxil Naik
 
Exploring SharePoint with F#
Exploring SharePoint with F#Exploring SharePoint with F#
Exploring SharePoint with F#Talbott Crowell
 

Similaire à Xcore meets IncQuery: How the New Generation of DSLs are Made (20)

Model visualization made easy: Incremental query-driven views in modeling tools
Model visualization made easy: Incremental query-driven views in modeling toolsModel visualization made easy: Incremental query-driven views in modeling tools
Model visualization made easy: Incremental query-driven views in modeling tools
 
EMF-IncQuery presentation at TOOLS 2012
EMF-IncQuery presentation at TOOLS 2012EMF-IncQuery presentation at TOOLS 2012
EMF-IncQuery presentation at TOOLS 2012
 
High-performance model queries
High-performance model queriesHigh-performance model queries
High-performance model queries
 
COMMitMDE'18: Eclipse Hawk: model repository querying as a service
COMMitMDE'18: Eclipse Hawk: model repository querying as a serviceCOMMitMDE'18: Eclipse Hawk: model repository querying as a service
COMMitMDE'18: Eclipse Hawk: model repository querying as a service
 
OS for AI: Elastic Microservices & the Next Gen of ML
OS for AI: Elastic Microservices & the Next Gen of MLOS for AI: Elastic Microservices & the Next Gen of ML
OS for AI: Elastic Microservices & the Next Gen of ML
 
Domain oriented development
Domain oriented developmentDomain oriented development
Domain oriented development
 
"Source Code Abstracts Classification Using CNN", Vadim Markovtsev, Lead Soft...
"Source Code Abstracts Classification Using CNN", Vadim Markovtsev, Lead Soft..."Source Code Abstracts Classification Using CNN", Vadim Markovtsev, Lead Soft...
"Source Code Abstracts Classification Using CNN", Vadim Markovtsev, Lead Soft...
 
Learn about Eclipse e4 from Lars Vogel at SF-JUG
Learn about Eclipse e4 from Lars Vogel at SF-JUGLearn about Eclipse e4 from Lars Vogel at SF-JUG
Learn about Eclipse e4 from Lars Vogel at SF-JUG
 
Eclipse e4
Eclipse e4Eclipse e4
Eclipse e4
 
The Larch - a visual interactive programming environment
The Larch - a visual interactive programming environmentThe Larch - a visual interactive programming environment
The Larch - a visual interactive programming environment
 
Sadiq786
Sadiq786Sadiq786
Sadiq786
 
Clojure intro Dallas Functional
Clojure intro   Dallas FunctionalClojure intro   Dallas Functional
Clojure intro Dallas Functional
 
Clojure Intro - Dallas Functional
Clojure Intro - Dallas FunctionalClojure Intro - Dallas Functional
Clojure Intro - Dallas Functional
 
Next-Generation Completeness and Consistency Management in the Digital Threa...
Next-Generation Completeness and Consistency Management in the Digital Threa...Next-Generation Completeness and Consistency Management in the Digital Threa...
Next-Generation Completeness and Consistency Management in the Digital Threa...
 
The Joy Of Functional Programming
The Joy Of Functional ProgrammingThe Joy Of Functional Programming
The Joy Of Functional Programming
 
EclipseCon Eu 2015 - Breathe life into your Designer!
EclipseCon Eu 2015 - Breathe life into your Designer!EclipseCon Eu 2015 - Breathe life into your Designer!
EclipseCon Eu 2015 - Breathe life into your Designer!
 
IncQuery_presentation_Incose_EMEA_WSEC.pptx
IncQuery_presentation_Incose_EMEA_WSEC.pptxIncQuery_presentation_Incose_EMEA_WSEC.pptx
IncQuery_presentation_Incose_EMEA_WSEC.pptx
 
Illustrated Code (ASE 2021)
Illustrated Code (ASE 2021)Illustrated Code (ASE 2021)
Illustrated Code (ASE 2021)
 
Building and deploying LLM applications with Apache Airflow
Building and deploying LLM applications with Apache AirflowBuilding and deploying LLM applications with Apache Airflow
Building and deploying LLM applications with Apache Airflow
 
Exploring SharePoint with F#
Exploring SharePoint with F#Exploring SharePoint with F#
Exploring SharePoint with F#
 

Plus de 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
 
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)

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
 
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

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
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
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
 
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
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
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
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
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
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
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
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 

Dernier (20)

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
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
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
 
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
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
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
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
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
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
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
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 

Xcore meets IncQuery: How the New Generation of DSLs are Made

  • 1. XCORE MEETS INCQUERY: HOW THE NEW GENERATION OF DSLS ARE MADE Tamás Szabó (itemis AG), István Ráth (BUTE) With contributions from: Ed Merks Gábor Bergmann, Ábel Hegedüs, Ákos Horváth, András Ökrös, Zoltán Ujhelyi, Benedek Izsó Budapest University of Technology and Economics Fault Tolerant Systems Research Group IncQueryLabs Ltd. Itemis AG
  • 2. Overview     Introduction Live graph search for EMF Query-based language engineering Conclusion
  • 4. Queries in modeling tools  Important! o Model management o Queries o Views o Transformations
  • 5. Incremental queries  Key observation: model queries are expensive o Models are large (1-5-10+ M elements) o Queries are complex (attribute value checks + navigation/joins + iterations) o Industrial example: well-formedness validation of a 4M element AUTOSAR model takes 30+ minutes • Despite being hand-coded in Java (no OCL, …)  Usability issues  Productivity issues  How to address this? o Lazy evaluation o Incrementality: calculate once, update afterwards
  • 6. Comparison  Normal queries  Live (incremental) queries o Java, OCL, … Quer y Model Evaluator Results Model change (Re-)traversal necessary if the model is changed Model change Quer y Model Evaluator Updated results Efficient change propagation Result deltas 1. Always up-to-date results without model traversal 2. Track changes of your model in terms of queries
  • 7. EMF-INCQUERY  An EMF model query engine for live graph search • Expressive query language based on graph patterns and Xbase • Incremental evaluation based on the Rete algorithm • Instantaneous response for complex queries over large models • Incremental model processing (validation, synchronization, ...) Language Execution Tools http://eclipse.org/incquery
  • 8. Important use-case: Live abstractions abstract Complex model Computed overlay aka. “View” Defined by a query Items = SELECT … Id Label Prop0 Prop1 0 N1 a B 1 N2 c D
  • 9. Important use-case: Live abstractions UI update Model Modification abstract Complex model Computed overlay aka. “View” Change notification Defined by a query Items = SELECT … Id Prop0 Prop1 0 N1 a B 1 Query result update Label N2 c D 2 N3 e F
  • 10. INCQUERY Viewers 1. Model Modification On-the-fly abstractions over the model EMF Model 2. Change Notifications Live Live Queries Queries Labeled, hierarchic property graph Derived Model 3. Continuous, efficient synchronization UI 4. UI updates  Visualize things that are not (directly) present in your model  Provides an easy-to-use API for integration into your presentation layer o Eclipse Data Binding o Simple callbacks
  • 11. DEMO INCQUERY Viewers  Using pattern annotations for the specification of on-thy-fly abstractions  Using the INCQUERY Viewers Sandbox for development and testing  Visualizing large graphs with yFiles  Using INCQUERY Viewers Extensions APIs in your own apps
  • 12. Live abstractions: simple example  Influence relationships in the Library W1 W1: Writer W2: Writer : writers B1: Book : writers : cites B2: Book : influencedBy Derived relationship W2 : citations : citations Bx: Book Transitive closure EMF instance model Visualization
  • 14. Xcore  Xcore o Extended textual syntax for Ecore-based metamodeling, built on Xtext o Fully fledged programming language o To specify structure + behavior (operations, datatype conversion logic) o http://wiki.eclipse.org/Xcore Xbase • Xtext-based programming language • Compiles to Java • Java type system • Supports advanced constructs (closures, type inference, operator overloading, …) • http://wiki.eclipse.org/Xbase
  • 15. Derived features in Ecore  Getters (and setters) implemented with Java  Frequently used to transparently integrate complex queries into the language o Can also be specified by means other than Java  Nice proposition o Transparent: integrate queries into the model – no utility classes needed o Extend the expressive power of metamodeling  Many language engineers are reluctant to use them – why?
  • 16. The functionality challenge  Typical modeling tool architecture View o Model: EMF o Controller: ~ EMF.Edit o View: e.g. JFace Viewers  Change notifications are essential for this to work  EMF has nice notifications o Notifier - Adapter o … except for derived features Controller Change notifications Model
  • 17. The performance challenge  What happens when a getter is called? class Book { String title = "" // set a default value refers Writer[] writers derived String longName get { return title + " (" + writers.size + ")" } derived String shortName get { return longName.subString(0,5) } } dependencies Tougher problem than you  Dependencies might think: o The value of “longName” depends on “title” and “writers” - DFs are used explicit o The value of “shortName” depends on “longName” –a lot in dependency complex • … and thus on “title” and “writers” – implicit dependency DSLs - Query complexity times  Performance challenge: getters may be called manycan explode easily o Make sure they execute quickly – but how? o Cache whenever you can – but how?
  • 18. Solution: well-behaving derived features  Key idea o Changes in the value of “name” depend on changes in the values of “title” and “writers” o Change notifications can be used to implement an efficient caching strategy o As long as every feature is behaving well • i.e. sends notifications when necessary  But… o How do I discover implicit dependencies? graph Live search! o How do I get/send notifications for derived features?
  • 19. DEMO Query integration options for INCQUERY  INCQUERY Java API  Add-on APIs o INCQUERY Validation o INCQUERY Viewers
  • 20. DEMO Query integration options for INCQUERY  INCQUERY Java API  Add-on APIs o INCQUERY Validation o INCQUERY Viewers  Query-based derived features o Automatically computes and maintains references and attribute values o Transparent integration with Xcore and (pure) Xbase • Works with traditional genmodeled Ecore too o Unique feature: well-behaving derived features with efficient and automated notification support
  • 21. Scalability? Yes! Eclipse OCL, SPARQL engines, Neo4j, … Characteristic difference, note the log scales • IncQuery can provide near zero response times for complex queries over models up to 14M elements • Check http://incquery.net/publications/trainbenchmark for more details
  • 23. What can I do with all this? – query-based live abstractions Eclipse technology Pros Trees, tables, Properties (JFace viewers) EMF.Edit The real deal: doesn’t hide abstract syntax Diagrams GEF, GMF, Graphiti Easy to read and write for non-programmers Textual DSLs Xtext Easy to read and write for programmers INCQUERY Viewers Makes understanding and working with complex models a lot easier Syntax JFace, Zest, yFiles Your tool!
  • 24. What can I do with all this? – query-based derived features  Boost the power and scalability of Ecore: live graph search tightly integrated into your DSL o Self validating models • 30+ min batch  <1s on-the-fly o Query-based traceability links / language integration o INCQUERY Viewers  “derived EObjects” o << your idea here >>  Get rid of lots of legacy stuff o Legacy model elements o Legacy helper/utility classes o Legacy UI boilerplate
  • 25. Top 3 cool applications of INCQUERY Model-driven development toolchain for avionics systems, Based on a combination of Eclipse tech and MATLAB/Simulink Well-formedness validation in a modeling tool for an automotive OEM Development tools for live dependency analysis of a large software infrastructure model
  • 26. Three points to take home 1. Live abstractions are very powerful. 2. Use well-behaving derived features to boost your DSL’s expressive power. 3. Xcore+INCQUERY is how the new generation of DSLs are made 
  • 27. Final points  Find all details, examples, demos at o http://eclipse.org/incquery o http://incquery.net  Check out the blog post o http://incquery.net/blog/2013/10/xcore-meets-incqueryhow-new-generation-dsls-are-made-talk-eclipseconeurope-2013 o Demo projects o Further reading (docs + the theory behind)  Release 0.8 (including all these new features) is scheduled shortly after the Xtext 2.5 release  Your contributions (feedback, forum posts, ideas, bugzillas, patches) are very welcome!

Notes de l'éditeur

  1. Nemnagyméretűmódosítások