quick fix generation for dsmls
DESCRIPTION
Quick fix for domain-specific modeling languages using the VIATRA framework (http://viatra.inf.mit.bme.hu/) presented at the VL/HCC 2011 conference (http://www.cs.cmu.edu/~vlhcc2011/)TRANSCRIPT
Budapest University of Technology and EconomicsDepartment of Measurement and Information Systems
Quick fix generation for DSMLs
Ábel Hegedüs, Ákos Horváth, István Ráth, Moisés Castelo Branco*, Dániel Varró
Budapest University of Technology and Economics*University of Waterloo
VL/HCC 2011Pittsburgh, 2011.09.19.
2
Source code editing and fixing errorsVisual Studio Smart Compile Auto CorrectionNetbeans Editor HintsEclipse Quick Fix
3
Development support in programming languages
Economy classo Syntax-highlighting,
lightweight validation Business class
o Autocompletion, semantic validation
First-classo Quick fixes, refactoring
Examples:Custom DSL
Standard DSL (e.g. SQL)
Java, C#, PHPEclipse-like IDEs
4
Development support in modeling languages
Economy classo Syntax-driven
editing Business class
o Validation
First-classo Quick fixes,
refactoring
Examples:Traditional DSM,COTS modeling tools
UML toolsModern DSM
?
Need for generic approach for fix generation:• Language-independent• Customisable• Efficient
5
Domain Specific Modeling Languages Ubiquitous in software development
o Requirement specificationo System analysis and verificationo Code generationo Business processeso Standard DSMLs e.g.
• Matlab Simulink• UML profiles• BPEL, BPMN
o Custom DSMLs Sophisticated DSML
development toolso Eclipse Modeling Frameworko Microsoft DSL Toolso MetaEdit
6
Domain-specific constraints Syntax-driven editing is not enough!
o Design errors, company policies, best practices Additional inconsistency rules
oWell-formedness constraintso Structural correctness
Syntactically correct process
Violates basic process modeling practices
7
Example: BPMN process validationHow to fix these inconsistencies?
StandardEclipse BPMN tool
8
Requirementso Domain-specific
• Inconsistency rules• Editing operations
o Problem-specific
Output
Essence of the approacho Design Space Exploration
Quick fix generation for DSMLsGraph patterns and pattern matching
End event start of edge
Non-messaging event receiving message
9
Quick fix
Requirementso Domain-specific
• Inconsistency rules• Editing operations
o Problem-specific• Input model• Violation context
Outputo Sequence of applicable editing operationso Eliminate violations in the selected context
Essence of the approacho Design Space Exploration
Modify target of sequence edge
Pre
Post
Quick fix generation for DSMLsGraph patterns and pattern matching
Graph transformation
10
Design Space Exploration (DSE) High-level overview
Initial (inconsistent) model
Modified model
Operation
Partially corrected model
Violations identified by inconsistency rules
Application of a syntax-driven editing operation
Violations fixed on selected context
Termination condition:• number of solutions• time limit• depth
11
Modified model
Operation
Initial (inconsistent) model
Design Space Exploration (DSE) High-level overview
Operation sequence =
quick fix
Efficient solution detection• violations evaluated
incrementally
Exploration guided by• heuristics• already visited states
Efficient application of operations• Graph
TransformationEfficient backtracking of operations
Partially corrected model
12
Quick demonstration: BPMN quick fix
13
Presentation of quick fixes
List of fixes Sequence of operations Operation name Context
14
Case studies and evaluation Main evaluation criteria
o „On-the-fly” generation of quick fixeso Representative set of• Inconsistency rules• Editing operations• Input models and violations
Process size and complexity representative to typical BPMN processes and simpler DSML models
Real-life processes from the financial domaino Centralized customer registeringo Corporate procurement
15
Evaluation results
„On-the-fly” quick fix generation works in many cases Finding multiple solutions can increase runtime significantly
egyéb részletek
Memory:50-200 MBVisited states:50-40000
Logarithmic scale1st: 5ms2nd: 13ms3rd: 271ms
1 sec vs 160 secTotal:1 sec vs 160 sec
16
Evaluation results Identified significant factors
o Number of local violationso Operation complexityo Solution density
Usable during editing for fixing local errorso 12 inconsistency ruleso 16 editing operations (create,modify,delete)o 1-3 local violation, at most 2 step fix
17
Future work Knowledgebase-driven DSE
o User-aided fix generationo Learn applied fixes for future use• Store quick fix as a special editing operation
Improved search strategyo Partial order reductiono Better heuristics
Resumable search Streamlined integration with EMF tools
o Ease adaptation to third-party software
18
Summary Novel approach
o for an important language engineering problemo applicable to graph-based modeling languages
Problem formalized and solved efficientlyo using graph transformations, incremental pattern matching and
design space exploration Prototype implementation
o Evaluated on BPMNo Also presented at the Demo session (tonight)
We would like to thank the Bank of the Northeast of Brazil (Banco do Nordeste – BNB) for providing the case studies.
Thank you! Contact: [email protected]
References
Fault Tolerant Systems Research GroupBudapest University of Technology and Economics
inf.mit.bme.hu
VIATRA2 Model Transformation Framework
viatra.inf.mit.bme.hu
EMF IncQuery
viatra.inf.mit.bme.hu/incquery
Generative Software Development LabUniversity of Waterloo
gsd.uwaterloo.ca