SlideShare a Scribd company logo
1 of 28
Download to read offline
Local Search-based
Pattern Matching Features in
EMF-IncQuery
2015. 07. 22. 1Local search-based pattern matching features in EMF-IncQuery
Márton Búr, Zoltán Ujhelyi, Ákos Horváth, Dániel Varró
Presenter: Ábel Hegedüs
IncQuery Labs Ltd.
Budapest University of Technology and Economics
Anti-pattern Detection in Java Programs
2015. 07. 22. 2Local search-based pattern matching features in EMF-IncQuery
public class StringLiteralCompareTest {
public StringLiteralCompareTest srcVar;
@Override
public boolean equals(Object other) {
return super.equals(other);
}
public void test() {
srcVar.equals("source");
}
}
Anti-pattern Detection in Java Programs
2015. 07. 22. 3Local search-based pattern matching features in EMF-IncQuery
public class StringLiteralCompareTest {
public StringLiteralCompareTest srcVar;
@Override
public boolean equals(Object other) {
return super.equals(other);
}
public void test() {
srcVar.equals("source");
}
}
EMF metamodel of Java programs (part)
Anti-pattern Detection in Java Programs
2015. 07. 22. 4Local search-based pattern matching features in EMF-IncQuery
public class StringLiteralCompareTest {
public StringLiteralCompareTest srcVar;
@Override
public boolean equals(Object other) {
return super.equals(other);
}
public void test() {
srcVar.equals("source");
}
}
Instance model in EMF editor
Anti-pattern Detection in Java Programs
2015. 07. 22. 5Local search-based pattern matching features in EMF-IncQuery
public class StringLiteralCompareTest {
public StringLiteralCompareTest srcVar;
@Override
public boolean equals(Object other) {
return super.equals(other);
}
public void test() {
srcVar.equals("source");
}
}
String Literal as Compare Parameter
(anti-pattern as graph pattern)
inv: MethodInvocation
name = “equals”
m: NormalMethod
arg: StringLiteral
op: Literal
invokes operand
argument
check count
matches == 1
: Expression
Pattern Matching Strategies
2015. 07. 22. 6Local search-based pattern matching features in EMF-IncQuery
Local Search
• Executes a search plan
• Lower memory requirements
• Tools: ATL, GrGen.net, FUJABA, …
Incremental
• Maintains a cache structure
• Efficient recalculation
• Tools: EMF-IncQuery, Drools, ...
Local-search Based Pattern Matching
2015. 07. 22. 7Local search-based pattern matching features in EMF-IncQuery
Find all m that m ∈ NormalMethod
Attribute test: m.name=="equals”
Find inv that inv.invokes → m
Count of inv.argument → arg is 1
Find arg that inv.argument → arg
Instance test: arg is a StringLiteral
Find op that inv.operand → op
NEG: op is not a Literal8
7
6
5
4
3
2
1
Local-search Based Pattern Matching
2015. 07. 22. 8Local search-based pattern matching features in EMF-IncQuery
Normal Method
1
Find all m that m ∈ NormalMethod
Attribute test: m.name=="equals”
Find inv that inv.invokes → m
Count of inv.argument → arg is 1
Find arg that inv.argument → arg
Instance test: arg is a StringLiteral
Find op that inv.operand → op
NEG: op is not a Literal8
7
6
5
4
3
2
1
Local-search Based Pattern Matching
2015. 07. 22. 9Local search-based pattern matching features in EMF-IncQuery
Normal Method
1
2
Find all m that m ∈ NormalMethod
Attribute test: m.name=="equals”
Find inv that inv.invokes → m
Count of inv.argument → arg is 1
Find arg that inv.argument → arg
Instance test: arg is a StringLiteral
Find op that inv.operand → op
NEG: op is not a Literal8
7
6
5
4
3
2
1
name: “equals”
Local-search Based Pattern Matching
2015. 07. 22. 10Local search-based pattern matching features in EMF-IncQuery
Normal Method
Method
Invocation
invokes
1
2
3
Find all m that m ∈ NormalMethod
Attribute test: m.name=="equals”
Find inv that inv.invokes → m
Count of inv.argument → arg is 1
Find arg that inv.argument → arg
Instance test: arg is a StringLiteral
Find op that inv.operand → op
NEG: op is not a Literal8
7
6
5
4
3
2
1
name: “equals”
Local-search Based Pattern Matching
2015. 07. 22. 11Local search-based pattern matching features in EMF-IncQuery
Normal Method
StringLiteral
Method
Invocation
invokes
1
2
3
6
Find all m that m ∈ NormalMethod
Attribute test: m.name=="equals”
Find inv that inv.invokes → m
Count of inv.argument → arg is 1
Find arg that inv.argument → arg
Instance test: arg is a StringLiteral
Find op that inv.operand → op
NEG: op is not a Literal8
7
6
5
4
3
2
1
name: “equals”
Local-search Based Pattern Matching
2015. 07. 22. 12Local search-based pattern matching features in EMF-IncQuery
Normal Method
StringLiteral
Identifier
Method
Invocation
invokes
1
2
3
6
8
Find all m that m ∈ NormalMethod
Attribute test: m.name=="equals”
Find inv that inv.invokes → m
Count of inv.argument → arg is 1
Find arg that inv.argument → arg
Instance test: arg is a StringLiteral
Find op that inv.operand → op
NEG: op is not a Literal8
7
6
5
4
3
2
1
name: “equals”
EMF-IncQuery
2015. 07. 22. 13Local search-based pattern matching features in EMF-IncQuery
Runtime
Incremental
queries using
Rete backend
Local search
backend
IDE
Language
Code
generator
Development
tools
Query
Explorer
Local Search
Debugger
Local Search Runtime
2015. 07. 22. 14Local search-based pattern matching features in EMF-IncQuery
IncQuery Engine
Model
Graph
patterns
Local Search Runtime
2015. 07. 22. 15Local search-based pattern matching features in EMF-IncQuery
IncQuery Engine
Model
Graph
patterns
• Calculates matches
• Manages model indexes
Local Search Runtime
2015. 07. 22. 16Local search-based pattern matching features in EMF-IncQuery
IncQuery Engine
Model
Rete backend
Graph
patterns
Local Search Runtime
2015. 07. 22. 17Local search-based pattern matching features in EMF-IncQuery
IncQuery Engine
Model
Rete backend
Graph
patterns
Default (incremental)
query executor
Local Search Runtime
2015. 07. 22. 18Local search-based pattern matching features in EMF-IncQuery
IncQuery Engine
Model
Rete backend
Graph
patterns
Pattern matches
Local Search Runtime
2015. 07. 22. 19Local search-based pattern matching features in EMF-IncQuery
IncQuery Engine
Model
Local search backend
Planner
Graph
patterns
Pattern matches
• Initializes search plans
• Reuses pre-populated
model indexes
Local Search Runtime
2015. 07. 22. 20Local search-based pattern matching features in EMF-IncQuery
IncQuery Engine
Model
Local search backend
Planner Matcher
Graph
patterns
Pattern matches
• Executes search plans
• Based on depth-first search
EMF-IncQuery IDE
2015. 07. 22. 21Local search-based pattern matching features in EMF-IncQuery
EMF-IncQuery IDE
2015. 07. 22. 22Local search-based pattern matching features in EMF-IncQuery
Query Editor
Defines graph patterns
Model Editor
EMF-based editor
Query Explorer
Displays query results
Local Search Debugger
2015. 07. 22. 23Local search-based pattern matching features in EMF-IncQuery
Step-by-step execution of search plans
• Visualizes search plans
• Visualizes (partial) query results
Local Search Debugger
2015. 07. 22. 24Local search-based pattern matching features in EMF-IncQuery
Step-by-step execution of search plans
• Visualizes search plans
• Visualizes (partial) query results
Local Search Debugger
• Based on local search
• Visualizes query
structure
• Step-by-step
execution
Query Explorer
• Relies on incremental
query evaluation
• Reacts on model
changes
• Results can be filtered
DEMO
2015. 07. 22. 25Local search-based pattern matching features in EMF-IncQuery
Performance Characteristics – 1.
2015. 07. 22. 26Local search-based pattern matching features in EMF-IncQuery
1
10
100
1000 10000 100000
SEARCHTIME(S)
PROGRAM SIZE (LOC)
LS INC LS (100) INC (100) LS INC LS (100) INC (100)
Incremental approach is beneficial
in case of re-evaluation
Performance Characteristics – 2.
2015. 07. 22. 27Local search-based pattern matching features in EMF-IncQuery
1
10
100
1000
10000
100000
1000 10000 100000 1000000 10000000
MEMORYUSAGE(MB)
PROGRAM SIZE (LOC)
LS INC LS INC
Local search works
uses less memory
Summary
Local search based pattern matcher
• Alternative execution strategy
• Reuses existing infrastructure
Search Plan Debugger
• Step-by-step execution of search plans
• Complements Query Explorer
Future plans
• Enhanced search plan generation
• Hybrid pattern matching
2015. 07. 22. 28Local search-based pattern matching features in EMF-IncQuery

More Related Content

Similar to Local search-based pattern matching features in EMF-IncQuery

Testing untestable Code - PFCongres 2010
Testing untestable Code - PFCongres 2010Testing untestable Code - PFCongres 2010
Testing untestable Code - PFCongres 2010
Stephan Hochdörfer
 
Testing untestable code - phpday
Testing untestable code - phpdayTesting untestable code - phpday
Testing untestable code - phpday
Stephan Hochdörfer
 
JavaScript - Programming Languages course
JavaScript - Programming Languages course JavaScript - Programming Languages course
JavaScript - Programming Languages course
yoavrubin
 
Behaviour driven infrastructure
Behaviour driven infrastructureBehaviour driven infrastructure
Behaviour driven infrastructure
Lindsay Holmwood
 

Similar to Local search-based pattern matching features in EMF-IncQuery (20)

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
 
Testing untestable code - DPC10
Testing untestable code - DPC10Testing untestable code - DPC10
Testing untestable code - DPC10
 
Advanced JavaScript
Advanced JavaScriptAdvanced JavaScript
Advanced JavaScript
 
Testing untestable Code - PFCongres 2010
Testing untestable Code - PFCongres 2010Testing untestable Code - PFCongres 2010
Testing untestable Code - PFCongres 2010
 
Api specification based function search engine using natural language query-S...
Api specification based function search engine using natural language query-S...Api specification based function search engine using natural language query-S...
Api specification based function search engine using natural language query-S...
 
Nearest neighbour algorithm
Nearest neighbour algorithmNearest neighbour algorithm
Nearest neighbour algorithm
 
Javascript Objects Deep Dive
Javascript Objects Deep DiveJavascript Objects Deep Dive
Javascript Objects Deep Dive
 
Looking for Bugs in MonoDevelop
Looking for Bugs in MonoDevelopLooking for Bugs in MonoDevelop
Looking for Bugs in MonoDevelop
 
Developer testing 101: Become a Testing Fanatic
Developer testing 101: Become a Testing FanaticDeveloper testing 101: Become a Testing Fanatic
Developer testing 101: Become a Testing Fanatic
 
Testing untestable code - phpday
Testing untestable code - phpdayTesting untestable code - phpday
Testing untestable code - phpday
 
Mutation Testing: Testing your tests
Mutation Testing: Testing your testsMutation Testing: Testing your tests
Mutation Testing: Testing your tests
 
Learning to rank search results
Learning to rank search resultsLearning to rank search results
Learning to rank search results
 
JavaScript - Programming Languages course
JavaScript - Programming Languages course JavaScript - Programming Languages course
JavaScript - Programming Languages course
 
ElasticSearch, Elastica, ElasticaBundle
ElasticSearch, Elastica, ElasticaBundleElasticSearch, Elastica, ElasticaBundle
ElasticSearch, Elastica, ElasticaBundle
 
Js tips & tricks
Js tips & tricksJs tips & tricks
Js tips & tricks
 
Behaviour driven infrastructure
Behaviour driven infrastructureBehaviour driven infrastructure
Behaviour driven infrastructure
 
JavaScript Essentials
JavaScript EssentialsJavaScript Essentials
JavaScript Essentials
 
Scaling your Android App With Modularization
Scaling your Android App With ModularizationScaling your Android App With Modularization
Scaling your Android App With Modularization
 
BigCloneBench
BigCloneBenchBigCloneBench
BigCloneBench
 
Beyond design patterns phpnw14
Beyond design patterns   phpnw14Beyond design patterns   phpnw14
Beyond design patterns phpnw14
 

Recently uploaded

Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 bAsymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Sérgio Sacani
 
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdfPests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
PirithiRaju
 
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune WaterworldsBiogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Sérgio Sacani
 
Digital Dentistry.Digital Dentistryvv.pptx
Digital Dentistry.Digital Dentistryvv.pptxDigital Dentistry.Digital Dentistryvv.pptx
Digital Dentistry.Digital Dentistryvv.pptx
MohamedFarag457087
 
The Mariana Trench remarkable geological features on Earth.pptx
The Mariana Trench remarkable geological features on Earth.pptxThe Mariana Trench remarkable geological features on Earth.pptx
The Mariana Trench remarkable geological features on Earth.pptx
seri bangash
 

Recently uploaded (20)

Grade 7 - Lesson 1 - Microscope and Its Functions
Grade 7 - Lesson 1 - Microscope and Its FunctionsGrade 7 - Lesson 1 - Microscope and Its Functions
Grade 7 - Lesson 1 - Microscope and Its Functions
 
Dubai Call Girls Beauty Face Teen O525547819 Call Girls Dubai Young
Dubai Call Girls Beauty Face Teen O525547819 Call Girls Dubai YoungDubai Call Girls Beauty Face Teen O525547819 Call Girls Dubai Young
Dubai Call Girls Beauty Face Teen O525547819 Call Girls Dubai Young
 
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 bAsymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
 
pumpkin fruit fly, water melon fruit fly, cucumber fruit fly
pumpkin fruit fly, water melon fruit fly, cucumber fruit flypumpkin fruit fly, water melon fruit fly, cucumber fruit fly
pumpkin fruit fly, water melon fruit fly, cucumber fruit fly
 
Clean In Place(CIP).pptx .
Clean In Place(CIP).pptx                 .Clean In Place(CIP).pptx                 .
Clean In Place(CIP).pptx .
 
Call Girls Ahmedabad +917728919243 call me Independent Escort Service
Call Girls Ahmedabad +917728919243 call me Independent Escort ServiceCall Girls Ahmedabad +917728919243 call me Independent Escort Service
Call Girls Ahmedabad +917728919243 call me Independent Escort Service
 
Introduction to Viruses
Introduction to VirusesIntroduction to Viruses
Introduction to Viruses
 
Zoology 5th semester notes( Sumit_yadav).pdf
Zoology 5th semester notes( Sumit_yadav).pdfZoology 5th semester notes( Sumit_yadav).pdf
Zoology 5th semester notes( Sumit_yadav).pdf
 
Proteomics: types, protein profiling steps etc.
Proteomics: types, protein profiling steps etc.Proteomics: types, protein profiling steps etc.
Proteomics: types, protein profiling steps etc.
 
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdfPests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
 
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune WaterworldsBiogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
 
Digital Dentistry.Digital Dentistryvv.pptx
Digital Dentistry.Digital Dentistryvv.pptxDigital Dentistry.Digital Dentistryvv.pptx
Digital Dentistry.Digital Dentistryvv.pptx
 
The Mariana Trench remarkable geological features on Earth.pptx
The Mariana Trench remarkable geological features on Earth.pptxThe Mariana Trench remarkable geological features on Earth.pptx
The Mariana Trench remarkable geological features on Earth.pptx
 
GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)
 
COST ESTIMATION FOR A RESEARCH PROJECT.pptx
COST ESTIMATION FOR A RESEARCH PROJECT.pptxCOST ESTIMATION FOR A RESEARCH PROJECT.pptx
COST ESTIMATION FOR A RESEARCH PROJECT.pptx
 
High Class Escorts in Hyderabad ₹7.5k Pick Up & Drop With Cash Payment 969456...
High Class Escorts in Hyderabad ₹7.5k Pick Up & Drop With Cash Payment 969456...High Class Escorts in Hyderabad ₹7.5k Pick Up & Drop With Cash Payment 969456...
High Class Escorts in Hyderabad ₹7.5k Pick Up & Drop With Cash Payment 969456...
 
Human & Veterinary Respiratory Physilogy_DR.E.Muralinath_Associate Professor....
Human & Veterinary Respiratory Physilogy_DR.E.Muralinath_Associate Professor....Human & Veterinary Respiratory Physilogy_DR.E.Muralinath_Associate Professor....
Human & Veterinary Respiratory Physilogy_DR.E.Muralinath_Associate Professor....
 
GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)
 
GBSN - Microbiology (Unit 3)
GBSN - Microbiology (Unit 3)GBSN - Microbiology (Unit 3)
GBSN - Microbiology (Unit 3)
 
SAMASTIPUR CALL GIRL 7857803690 LOW PRICE ESCORT SERVICE
SAMASTIPUR CALL GIRL 7857803690  LOW PRICE  ESCORT SERVICESAMASTIPUR CALL GIRL 7857803690  LOW PRICE  ESCORT SERVICE
SAMASTIPUR CALL GIRL 7857803690 LOW PRICE ESCORT SERVICE
 

Local search-based pattern matching features in EMF-IncQuery

  • 1. Local Search-based Pattern Matching Features in EMF-IncQuery 2015. 07. 22. 1Local search-based pattern matching features in EMF-IncQuery Márton Búr, Zoltán Ujhelyi, Ákos Horváth, Dániel Varró Presenter: Ábel Hegedüs IncQuery Labs Ltd. Budapest University of Technology and Economics
  • 2. Anti-pattern Detection in Java Programs 2015. 07. 22. 2Local search-based pattern matching features in EMF-IncQuery public class StringLiteralCompareTest { public StringLiteralCompareTest srcVar; @Override public boolean equals(Object other) { return super.equals(other); } public void test() { srcVar.equals("source"); } }
  • 3. Anti-pattern Detection in Java Programs 2015. 07. 22. 3Local search-based pattern matching features in EMF-IncQuery public class StringLiteralCompareTest { public StringLiteralCompareTest srcVar; @Override public boolean equals(Object other) { return super.equals(other); } public void test() { srcVar.equals("source"); } } EMF metamodel of Java programs (part)
  • 4. Anti-pattern Detection in Java Programs 2015. 07. 22. 4Local search-based pattern matching features in EMF-IncQuery public class StringLiteralCompareTest { public StringLiteralCompareTest srcVar; @Override public boolean equals(Object other) { return super.equals(other); } public void test() { srcVar.equals("source"); } } Instance model in EMF editor
  • 5. Anti-pattern Detection in Java Programs 2015. 07. 22. 5Local search-based pattern matching features in EMF-IncQuery public class StringLiteralCompareTest { public StringLiteralCompareTest srcVar; @Override public boolean equals(Object other) { return super.equals(other); } public void test() { srcVar.equals("source"); } } String Literal as Compare Parameter (anti-pattern as graph pattern) inv: MethodInvocation name = “equals” m: NormalMethod arg: StringLiteral op: Literal invokes operand argument check count matches == 1 : Expression
  • 6. Pattern Matching Strategies 2015. 07. 22. 6Local search-based pattern matching features in EMF-IncQuery Local Search • Executes a search plan • Lower memory requirements • Tools: ATL, GrGen.net, FUJABA, … Incremental • Maintains a cache structure • Efficient recalculation • Tools: EMF-IncQuery, Drools, ...
  • 7. Local-search Based Pattern Matching 2015. 07. 22. 7Local search-based pattern matching features in EMF-IncQuery Find all m that m ∈ NormalMethod Attribute test: m.name=="equals” Find inv that inv.invokes → m Count of inv.argument → arg is 1 Find arg that inv.argument → arg Instance test: arg is a StringLiteral Find op that inv.operand → op NEG: op is not a Literal8 7 6 5 4 3 2 1
  • 8. Local-search Based Pattern Matching 2015. 07. 22. 8Local search-based pattern matching features in EMF-IncQuery Normal Method 1 Find all m that m ∈ NormalMethod Attribute test: m.name=="equals” Find inv that inv.invokes → m Count of inv.argument → arg is 1 Find arg that inv.argument → arg Instance test: arg is a StringLiteral Find op that inv.operand → op NEG: op is not a Literal8 7 6 5 4 3 2 1
  • 9. Local-search Based Pattern Matching 2015. 07. 22. 9Local search-based pattern matching features in EMF-IncQuery Normal Method 1 2 Find all m that m ∈ NormalMethod Attribute test: m.name=="equals” Find inv that inv.invokes → m Count of inv.argument → arg is 1 Find arg that inv.argument → arg Instance test: arg is a StringLiteral Find op that inv.operand → op NEG: op is not a Literal8 7 6 5 4 3 2 1 name: “equals”
  • 10. Local-search Based Pattern Matching 2015. 07. 22. 10Local search-based pattern matching features in EMF-IncQuery Normal Method Method Invocation invokes 1 2 3 Find all m that m ∈ NormalMethod Attribute test: m.name=="equals” Find inv that inv.invokes → m Count of inv.argument → arg is 1 Find arg that inv.argument → arg Instance test: arg is a StringLiteral Find op that inv.operand → op NEG: op is not a Literal8 7 6 5 4 3 2 1 name: “equals”
  • 11. Local-search Based Pattern Matching 2015. 07. 22. 11Local search-based pattern matching features in EMF-IncQuery Normal Method StringLiteral Method Invocation invokes 1 2 3 6 Find all m that m ∈ NormalMethod Attribute test: m.name=="equals” Find inv that inv.invokes → m Count of inv.argument → arg is 1 Find arg that inv.argument → arg Instance test: arg is a StringLiteral Find op that inv.operand → op NEG: op is not a Literal8 7 6 5 4 3 2 1 name: “equals”
  • 12. Local-search Based Pattern Matching 2015. 07. 22. 12Local search-based pattern matching features in EMF-IncQuery Normal Method StringLiteral Identifier Method Invocation invokes 1 2 3 6 8 Find all m that m ∈ NormalMethod Attribute test: m.name=="equals” Find inv that inv.invokes → m Count of inv.argument → arg is 1 Find arg that inv.argument → arg Instance test: arg is a StringLiteral Find op that inv.operand → op NEG: op is not a Literal8 7 6 5 4 3 2 1 name: “equals”
  • 13. EMF-IncQuery 2015. 07. 22. 13Local search-based pattern matching features in EMF-IncQuery Runtime Incremental queries using Rete backend Local search backend IDE Language Code generator Development tools Query Explorer Local Search Debugger
  • 14. Local Search Runtime 2015. 07. 22. 14Local search-based pattern matching features in EMF-IncQuery IncQuery Engine Model Graph patterns
  • 15. Local Search Runtime 2015. 07. 22. 15Local search-based pattern matching features in EMF-IncQuery IncQuery Engine Model Graph patterns • Calculates matches • Manages model indexes
  • 16. Local Search Runtime 2015. 07. 22. 16Local search-based pattern matching features in EMF-IncQuery IncQuery Engine Model Rete backend Graph patterns
  • 17. Local Search Runtime 2015. 07. 22. 17Local search-based pattern matching features in EMF-IncQuery IncQuery Engine Model Rete backend Graph patterns Default (incremental) query executor
  • 18. Local Search Runtime 2015. 07. 22. 18Local search-based pattern matching features in EMF-IncQuery IncQuery Engine Model Rete backend Graph patterns Pattern matches
  • 19. Local Search Runtime 2015. 07. 22. 19Local search-based pattern matching features in EMF-IncQuery IncQuery Engine Model Local search backend Planner Graph patterns Pattern matches • Initializes search plans • Reuses pre-populated model indexes
  • 20. Local Search Runtime 2015. 07. 22. 20Local search-based pattern matching features in EMF-IncQuery IncQuery Engine Model Local search backend Planner Matcher Graph patterns Pattern matches • Executes search plans • Based on depth-first search
  • 21. EMF-IncQuery IDE 2015. 07. 22. 21Local search-based pattern matching features in EMF-IncQuery
  • 22. EMF-IncQuery IDE 2015. 07. 22. 22Local search-based pattern matching features in EMF-IncQuery Query Editor Defines graph patterns Model Editor EMF-based editor Query Explorer Displays query results
  • 23. Local Search Debugger 2015. 07. 22. 23Local search-based pattern matching features in EMF-IncQuery Step-by-step execution of search plans • Visualizes search plans • Visualizes (partial) query results
  • 24. Local Search Debugger 2015. 07. 22. 24Local search-based pattern matching features in EMF-IncQuery Step-by-step execution of search plans • Visualizes search plans • Visualizes (partial) query results Local Search Debugger • Based on local search • Visualizes query structure • Step-by-step execution Query Explorer • Relies on incremental query evaluation • Reacts on model changes • Results can be filtered
  • 25. DEMO 2015. 07. 22. 25Local search-based pattern matching features in EMF-IncQuery
  • 26. Performance Characteristics – 1. 2015. 07. 22. 26Local search-based pattern matching features in EMF-IncQuery 1 10 100 1000 10000 100000 SEARCHTIME(S) PROGRAM SIZE (LOC) LS INC LS (100) INC (100) LS INC LS (100) INC (100) Incremental approach is beneficial in case of re-evaluation
  • 27. Performance Characteristics – 2. 2015. 07. 22. 27Local search-based pattern matching features in EMF-IncQuery 1 10 100 1000 10000 100000 1000 10000 100000 1000000 10000000 MEMORYUSAGE(MB) PROGRAM SIZE (LOC) LS INC LS INC Local search works uses less memory
  • 28. Summary Local search based pattern matcher • Alternative execution strategy • Reuses existing infrastructure Search Plan Debugger • Step-by-step execution of search plans • Complements Query Explorer Future plans • Enhanced search plan generation • Hybrid pattern matching 2015. 07. 22. 28Local search-based pattern matching features in EMF-IncQuery