Model-driven approaches for software reverse engineering and comprehension
1. Generic Model-based Approaches for
Software Reverse Engineering
and Comprehension
Ph.D. thesis defense, by Hugo Bruneliere
hugo.bruneliere@imt-atlantique.fr
20th
of December 2018 - Nantes, France
University of Nantes referent: Gerson Sunyé
Research work supervisor: Jordi Cabot
2. 0. Preamble
1. General Introduction
2. Background - Modeling / Model Driven Engineering (MDE)
3. Model Driven Reverse Engineering (MDRE)
4. Model Federation and Comprehension (Model Views)
5. General Conclusion
Outline
2
3. Validation of Professional Experience and Knowledge
0. Preamble (1/2)
2006 2010 2017
R&D Engineer Research Engineer Researcher...
Global Model
Management
Tool &
Language
Interoperability
3
Reverse
Engineering
Model Views /
Viewpoints
Cloud,
CPSs, etc.
4. Research work: state-of-the-art, conceptual approaches,
metamodels, DSLs, technical architectures, papers, etc.
Implementation: various collaborators & projects...
0. Preamble (2/2)
Reverse
Engineering
Model Views
/ Viewpoints
...
4
6. Legacy software systems to evolve...
...new requirements, technologies, business strategies,
organizations, legislations, etc.
1.1. Context and Problem (1/3)
6
Software is
(and will be)
everywhere!
7. Modernization / migration projects are fundamental
Modeling / MDE principles and techniques could help!
1.1. Context and Problem (2/3)
7
C. Jones. The Technical
and Social History of
Software Engineering.
Addison-Wesley, 2013.
8. Modernization / migration process
1.1. Context and Problem (3/3)
8
Legacy car manufacturing
Software System
Reverse Engineering
Forward Engineering
Comprehension
New car manufacturing
Software System Bruneliere, H., Cabot, J., Canovas, J.L., Orue-Echevarria, L., Strauss, O. & Wimmer, M.
Software Modernization Revisited: Challenges and Prospects.
In Computer Magazine, 2015. IEEE.
9. Reverse Engineering and Comprehension
of Complex Software Systems
1.2. Research Challenges
9
CH1 - Generic support for
heterogeneous technologies
CH2 - Ability to
extract useful data
CH 3 - Coverage of
static vs. dynamic
aspects
CH4 - Capability of federating
and/or tracing different data
10. Model driven reverse
engineering solution (CH1-2-3)
Extension on behavior
Model view solution (CH1-3-4)
Detailed state-of-the-art
1.3. Proposed Contributions
10
12. represents
System
Modeling / Model Driven Engineering (MDE)
“A model of a system or process is a theoretical description that
can help you understand how the system or process works, or how it
might work.” (Collins Dictionary, 2018)
2. Background on Modeling / MDE (1/3)
12
Model
Perspective / Aspect(s)
13. A “standard” 3-layer (modeling) stack
2. Background on Modeling / MDE (2/3)
13
Modeling technical space (TS)
14. A “standard” 3-layer (modeling) stack
2. Background on Modeling / MDE (2/3)
14
Modeling technical space (TS) Language TS XML TS
15. Different types of model transformations
And also text-to-model (Model Discovery)...
2. Background on Modeling / MDE (3/3)
15
model-to-model
(Model Transformation)
model-to-text
(Code Generation)
16. Different types of model transformations
And also text-to-model (Model Discovery)...
2. Background on Modeling / MDE (3/3)
16
model-to-model
(Model Transformation)
model-to-text
(Code Generation)
18. Reverse Engineering is “the process of examining an
already implemented software system to represent it in a
different form/formalism and at a higher abstraction level”
E. J. Chikofsky and J. H. Cross. Reverse Engineering and Design Recovery: A Taxonomy.
IEEE Software, 7(1):13–17, 1990
3. Model Driven Reverse Engineering
18
Bruneliere, H., Cabot, J., Dupe, G. & Madiot, F.
MoDisco: a Model Driven Reverse Engineering Framework.
In Information and Software Technology (IST), 2014. Elsevier.
Model Driven
Reverse Engineering
Models!
19. ● MDRE vs. Reverse Engineering (early 2000’s)
Analysis platforms, language workbenches
OMG’s Architecture Driven Modernization
3.1. MDRE: State-of-the-Art
19
Specific MDRE solutions
Programming languages (Java, C++)
Goals (migration, integration, analysis)
General-purpose MDRE solutions
Some general modeling (commercial) tools
Few generic MDRE solutions...
20. RQ4
Structural vs.
Behavioral
Complexity
3.2. MDRE: Challenges
20
RQ1
Technical
Heterogeneity
RQ2
Adaptability /
Portability
RQ3
Scalability
Are we able to deploy our approach on practical
scenarios / systems of various technical natures?
Are we able to adapt and reuse our approach /
components as part of other (MDRE) solutions?
Are we able to use our approach in the context of
large-scale scenarios / systems?
Are we able to use our approach to tackle all
levels of structural and behavioral complexity?
21. MDRE framework architecture
Reuse and integration examples
Technology-specific components
Technology-independent bricks
3.3. MDRE: Conceptual Approach (1/3)
21
Model Driven Reverse Engineering
=
Model Discovery + Model Understanding
25. Up to 6 committers, 10 contributors
3.4. MDRE: Implementation (1/3)
25
More than 2,000,000 lines of code
More than 1000 “bugs”, 1000 posts on forum
Eclipse Simultaneous Releases each year
33. (Many) Heterogeneous models describing systems
MDRE processes, other tools, manually produced.
Scattering, overlapping, redundancy, etc.
4. Model Federation and Comprehension
33
Model Driven
Reverse Engineering
Model Federation
and Comprehension
Model views!
34. Views in Software Engineering
Pre-fixed and specific viewpoints
Architecture frameworks (e.g. Zachman)
Lack of flexibility (evolving viewpoints)
4.1. Model Views: State-of-the-Art
34
Model-based views
Model queries, transformations
Various model view solutions
Similarities and differences...
Bruneliere, H., Burger, E., Cabot, J. & Wimmer, M.
A Feature-based Survey of Model View Approaches.
In Journal on Software and Systems Modeling (SoSyM), 2017. Springer.
SoSyM 2018 Best Paper Award, also published and presented at ACM/IEEE MODELS 2018.
35. 4.2. Model Views: Challenges
35
RQ5
Scalability
RQ6
View
Maintenance
RQ7
View Update
Are we able to use our approach in the context
of large-scale scenarios / models?
Are we able to ensure synchronization from the
contributing models to the produced views?
Are we able to ensure synchronization from the
produced views to the contributing models?
Miscellaneous: Terminology inconsistencies, concrete
syntax generation, security aspects, etc.
36. Concept of Model Virtualization
A virtual model is a model whose (virtual)
elements are proxies to actual elements
contained in other models
A virtual metamodel is a metamodel…
4.3. Model Views: Conceptual Approach (1/5)
36
View = (Virtual) Model
&
Viewpoint = (Virtual) Metamodel
Bruneliere, H., Garcia, J.,Wimmer, M. & Cabot, J.
EMF Views: A View Mechanism for Integrating Heterogeneous Models.
In 34th International Conference on Conceptual Modeling (ER 2015), 2015. Springer.
40. 4.3. Model Views: Conceptual Approach (4/5)
40
...
Viewpoint/View specification DSLs
ViewPoint Description Language (VPDL)
...
41. Viewpoint/View specification DSLs
Metamodel Extension Language (MEL)
4.3. Model Views: Conceptual Approach (5/5)
41
Bruneliere, H., Garcia, J., Desfray, P., Khelladi, D.E., Hebig, R., Bendraou, R. & Cabot, J.
On Lightweight Metamodel Extension to Support Modeling Tools Agility.
In 11th European Conference on Modelling Foundations and Applications (ECMFA 2015) (a STAF 2015 conference), 2015. Springer.
42. 2 committers, 2 contributors
4.4. Model Views: Implementation (1/4)
42
More than 40,000 lines of code
Tutorials, examples, documentation
Regular builds + Eclipse update site
46. Motivating example from MegaM@Rt2 EU project
4.5. Model Views: Quantitative Evaluation (1/2)
46
Bruneliere, H., Marchand de Kerchove, F., Daniel, G. & Cabot, J.
Towards Scalable Model Views on Heterogeneous Model Resources.
In ACM/IEEE 21st International Conference on Model Driven Engineering Languages and Systems (MODELS 2018), 2018. ACM.
47. 4.5. Model Views: Quantitative Evaluation (2/2)
47
Performance Benchmarks
(Model size from 10¹ to 10⁶ elements)
RQ5
Scalability
BENCH1 -
View data creation
BENCH3 -
View querying
BENCH2 -
View loading
Time (in seconds)
to load the view
48. 4.6. Model Views: Conclusion
48
Model view solution - EMF Views
→ Detailed state-of-the-art / survey
on model view approaches
→ Conceptual approach
→ Eclipse-based framework
50. Model-based infrastructure to facilitate the reverse
engineering and comprehension of possibly complex
and/or heterogeneous software systems
5.1. General Summary
50
Legacy car manufacturing
Software System
Model Driven
Reverse Engineering
Forward Engineering
Model Federation
and Comprehension
(Model Views)
New car manufacturing
Software System
51. 5.2. Perspectives and Future Work
51
More & more
Software to
maintain & evolve!
(e.g. Industry 4.0)
Cloud/Fog
Computing
Internet of
Things (IoT)
Big Data,
Machine Learning
Future
trends...
Afzal, W., Bruneliere, H., Di Ruscio, D., Sadovykh, A., Mazzini, S., Cariou, E., Truscan, D., Cabot, J, et al.
The MegaM@Rt2 ECSEL Project - Scalable Model-based Framework for Continuous Development and Runtime Validation of Complex Systems.
In Journal of Microprocessors and Microsystems (MICPRO), 2018. Elsevier.
52. 5.2. Perspectives and Future Work
52
More & more
Software to
maintain & evolve!
(e.g. Industry 4.0)
Cloud/Fog
Computing
Internet of
Things (IoT)
Big Data,
Machine Learning
Future
trends...
Heterogeneity
/ Adaptability
Scalability
Runtime vs.
Design
Afzal, W., Bruneliere, H., Di Ruscio, D., Sadovykh, A., Mazzini, S., Cariou, E., Truscan, D., Cabot, J, et al.
The MegaM@Rt2 ECSEL Project - Scalable Model-based Framework for Continuous Development and Runtime Validation of Complex Systems.
In Journal of Microprocessors and Microsystems (MICPRO), 2018. Elsevier.