SlideShare a Scribd company logo
Dharma Ganesan
Reverse Architecting using
Relation Algebra
2
What’s On The Agenda
● Software Architecture
● Reverse Architecting
● A little bit math - I promise
● Extract-Abstract-Present to Reverse Architecting
● Demos (during the presentation)
● Some References
3
Software Architecture
● Software architecture deals with the design of the
high-level structure of the software
● Assembly of architectural elements in some well-chosen
forms to satisfy requirements
● (including Reliability, Scalability, Portability, etc)
● Software architecture deals with
● abstraction
● decomposition and composition
● styles (pipe-and-filter, publish-subscribe, etc.)
4
Describing Software Architecture
using Views
● How to best describe Software Architecture
is a topic of on-going R&D
● In literature, views are used to describe
Software Architecture
● Each view address one concern, for example:
● Structural view shows the decomposition of
system
● Behavioral view shows how components
interact at run-time
● Deployment view shows how components
are assigned to hardware elements
5
Reverse Architecting
Informally, extracting architecture information from
source code (including makefiles, docs, test cases,
etc.)
Some challenges:
● Software architecture is an invisible one
● It is difficult to “see” architecture in source code
● Real-world systems have a lot of code
Goal of reverse architecting: Semi-automatically
extract architecture from source code
6
Some questions we ask
● What are the entry-points to the system?
● Which classes inherit from this class?
● Which files deal with network communication?
● Is this function reachable from ‘main’?
● Are there missing code not in repo?
● Which functions are dead?
● etc. etc. etc.
All these questions can be be viewed as relational
algebra questions!
7
Just a bit of math (I promise)
What do we mean by Relation Algebra?
Three things:
Set - an unordered collection
E.g., set of files {f1.c, f2.c, …}
Binary Relation - an unordered set of pairs
E.g., {<main, run>, <run, execute>, …, }
Multi-Relation - Weighted Binary Relation
E.g., {<caller, callee, 5>, …}
8
Relation Algebra Queries
They are made of set-theory operators only
For example, union, intersection, complement, etc.
Compose two relations using join (a.k.a., comp)
part_of= {<a A}, <b B>, <c C>}
call = {<a b>, <b, c>}
E.g: inverse(part_of) comp (call) comp (part_of)?
9
Relation Algebra Toolset
Made of small utilities for each set-theory operator
Combine utilities using pipe-and-filter style
rel_inv part_of | rel_comp call - | rel_comp -
part_of
I personally used RA tools for several reverse
architecting projects
My Phd thesis has more details
10 A Reverse Architecting
Approach (Philips in 1990s)
Extraction: semi-automated extraction of different
relations (import, inherit, call, etc.)
Abstraction: rise the level of abstraction using
relational algebra queries (imagine SQL)
Presentation: visualize using graphs, tables, etc.
(These were published
by Philips)
11
Extraction
● Language-specific parsers to extract different
relations: inherit, call, include, etc.
○ Code need not compile or link
● Each relation is stored in database/files
● Depending on the goal, more custom parsers
have to be developed to extract code relations
● For example, if your goal is to extract inter-task
RPC views, you need to
○ extract tasks, queue names, which function
writes to or read from queues, etc.
12
Abstraction
A suite of relation algebra operators was developed
for abstraction (see demos)
Again, depending on the goal one could apply
different abstraction operators
Some common abstraction (examples):
● Lift class-level dependencies to package-level
● Filter out irrelevant information for your goal
○ For example, show all Java packages that
depend on Crypto packages
● Abstraction of runtime structure to show
inter-task communication (more details later)
13
Some examples: Folder-level
dependency from code relations
14
A medical device case study
Goal: Extract architecture from source code
Visualize inter-task and msg queue communication
Approach:
Extract relations from code
Abstraction using Relation Algebra
Visualize using our graph visualization tools
15
Extracted relations/sets
Our parser extracts names of tasks, queues,
semaphores, etc by pattern matching of library calls
16
Abstraction
We write SQL-like queries using join, inverse, and
other operations on the extracted relations
Output is also relations/sets
17
Presentation
We visualize relations as graphs or tables in general
For inter-task structure, we have something like this
from abstracted relations:
18
Conclusion/Takeaways
● Reverse architecting is a challenging problem
● Extract-Abstract-Present using relational algebra
can help with reverse architecting
● Many of the analysis questions can be
reformulated as relational algebra questions!
● The key is to have a goal for your reverse
architecting effort - to filter out irrelevant data
19 Some Reverse Engineering
Papers (not complete at all)
https://www.win.tue.nl/~wstomv/edu/2ii45/yea
r-0910/Maintaining_a_Legacy.pdf
https://www.cs.cmu.edu/~aldrich/courses/654-s
p05/ReengineeringTaxonomy.pdf
https://ieeexplore.ieee.org/document/5959691
https://ieeexplore.ieee.org/document/5071104
…

More Related Content

Similar to Reverse Architecting using Relation Algebra.pdf

Java 8 streams
Java 8 streams Java 8 streams
Java 8 streams
Srinivasan Raghvan
 
5-Architecture.ppt
5-Architecture.ppt5-Architecture.ppt
5-Architecture.ppt
DuraisamySubramaniam1
 
5 architecture
5 architecture5 architecture
5 architecture
Adarsh Kumar
 
ASPECT ORIENTED PROGRAMING(aop)
ASPECT ORIENTED PROGRAMING(aop)ASPECT ORIENTED PROGRAMING(aop)
ASPECT ORIENTED PROGRAMING(aop)
kvsrteja
 
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.docx
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.docxUNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.docx
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.docx
ganeshkarthy
 
Software Engineering Tools and Practices.pdf
Software Engineering Tools and Practices.pdfSoftware Engineering Tools and Practices.pdf
Software Engineering Tools and Practices.pdf
MeagGhn
 
Carlo Bonamico, Sonia Pini - So you want to build your (Angular) Component Li...
Carlo Bonamico, Sonia Pini - So you want to build your (Angular) Component Li...Carlo Bonamico, Sonia Pini - So you want to build your (Angular) Component Li...
Carlo Bonamico, Sonia Pini - So you want to build your (Angular) Component Li...
Codemotion
 
Build Your Own Angular Component Library
Build Your Own Angular Component LibraryBuild Your Own Angular Component Library
Build Your Own Angular Component Library
Carlo Bonamico
 
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.ppt
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.pptUNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.ppt
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.ppt
VGaneshKarthikeyan
 
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.ppt
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.pptUNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.ppt
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.ppt
VGaneshKarthikeyan
 
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.ppt
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.pptUNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.ppt
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.ppt
VGaneshKarthikeyan
 
Unit v -Construction and Evaluation
Unit v -Construction and EvaluationUnit v -Construction and Evaluation
Unit v -Construction and Evaluation
Dhivyaa C.R
 
Sysprog 10
Sysprog 10Sysprog 10
Sysprog 10
Ahmed Mekkawy
 
Sysprog 10
Sysprog 10Sysprog 10
Sysprog 10
Ahmed Mekkawy
 
Architectural Modeling
Architectural ModelingArchitectural Modeling
Architectural Modeling
AMITJain879
 
Java and XPages
Java and XPagesJava and XPages
Java and XPages
Patrick Kwinten
 
What`s New in Java 8
What`s New in Java 8What`s New in Java 8
What`s New in Java 8
Mohsen Zainalpour
 
3 analysis and design overview
3 analysis and design overview3 analysis and design overview
3 analysis and design overview
Châu Thanh Chương
 
Transaction Management, Recovery and Query Processing.pptx
Transaction Management, Recovery and Query Processing.pptxTransaction Management, Recovery and Query Processing.pptx
Transaction Management, Recovery and Query Processing.pptx
Roshni814224
 
Introduction to SOFTWARE ARCHITECTURE
Introduction to SOFTWARE ARCHITECTUREIntroduction to SOFTWARE ARCHITECTURE
Introduction to SOFTWARE ARCHITECTURE
Ivano Malavolta
 

Similar to Reverse Architecting using Relation Algebra.pdf (20)

Java 8 streams
Java 8 streams Java 8 streams
Java 8 streams
 
5-Architecture.ppt
5-Architecture.ppt5-Architecture.ppt
5-Architecture.ppt
 
5 architecture
5 architecture5 architecture
5 architecture
 
ASPECT ORIENTED PROGRAMING(aop)
ASPECT ORIENTED PROGRAMING(aop)ASPECT ORIENTED PROGRAMING(aop)
ASPECT ORIENTED PROGRAMING(aop)
 
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.docx
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.docxUNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.docx
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.docx
 
Software Engineering Tools and Practices.pdf
Software Engineering Tools and Practices.pdfSoftware Engineering Tools and Practices.pdf
Software Engineering Tools and Practices.pdf
 
Carlo Bonamico, Sonia Pini - So you want to build your (Angular) Component Li...
Carlo Bonamico, Sonia Pini - So you want to build your (Angular) Component Li...Carlo Bonamico, Sonia Pini - So you want to build your (Angular) Component Li...
Carlo Bonamico, Sonia Pini - So you want to build your (Angular) Component Li...
 
Build Your Own Angular Component Library
Build Your Own Angular Component LibraryBuild Your Own Angular Component Library
Build Your Own Angular Component Library
 
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.ppt
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.pptUNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.ppt
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.ppt
 
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.ppt
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.pptUNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.ppt
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.ppt
 
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.ppt
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.pptUNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.ppt
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.ppt
 
Unit v -Construction and Evaluation
Unit v -Construction and EvaluationUnit v -Construction and Evaluation
Unit v -Construction and Evaluation
 
Sysprog 10
Sysprog 10Sysprog 10
Sysprog 10
 
Sysprog 10
Sysprog 10Sysprog 10
Sysprog 10
 
Architectural Modeling
Architectural ModelingArchitectural Modeling
Architectural Modeling
 
Java and XPages
Java and XPagesJava and XPages
Java and XPages
 
What`s New in Java 8
What`s New in Java 8What`s New in Java 8
What`s New in Java 8
 
3 analysis and design overview
3 analysis and design overview3 analysis and design overview
3 analysis and design overview
 
Transaction Management, Recovery and Query Processing.pptx
Transaction Management, Recovery and Query Processing.pptxTransaction Management, Recovery and Query Processing.pptx
Transaction Management, Recovery and Query Processing.pptx
 
Introduction to SOFTWARE ARCHITECTURE
Introduction to SOFTWARE ARCHITECTUREIntroduction to SOFTWARE ARCHITECTURE
Introduction to SOFTWARE ARCHITECTURE
 

More from Dharmalingam Ganesan

.NET Deserialization Attacks
.NET Deserialization Attacks.NET Deserialization Attacks
.NET Deserialization Attacks
Dharmalingam Ganesan
 
How to exploit rand()?
How to exploit rand()?How to exploit rand()?
How to exploit rand()?
Dharmalingam Ganesan
 
Cyclic Attacks on the RSA Trapdoor Function
Cyclic Attacks on the RSA Trapdoor FunctionCyclic Attacks on the RSA Trapdoor Function
Cyclic Attacks on the RSA Trapdoor Function
Dharmalingam Ganesan
 
An Analysis of RSA Public Exponent e
An Analysis of RSA Public Exponent eAn Analysis of RSA Public Exponent e
An Analysis of RSA Public Exponent e
Dharmalingam Ganesan
 
An Analysis of Secure Remote Password (SRP)
An Analysis of Secure Remote Password (SRP)An Analysis of Secure Remote Password (SRP)
An Analysis of Secure Remote Password (SRP)
Dharmalingam Ganesan
 
Thank-a-Gram
Thank-a-GramThank-a-Gram
Thank-a-Gram
Dharmalingam Ganesan
 
Active Attacks on DH Key Exchange
Active Attacks on DH Key ExchangeActive Attacks on DH Key Exchange
Active Attacks on DH Key Exchange
Dharmalingam Ganesan
 
Can I write to a read only file ?
Can I write to a read only file ?Can I write to a read only file ?
Can I write to a read only file ?
Dharmalingam Ganesan
 
How do computers exchange secrets using Math?
How do computers exchange secrets using Math?How do computers exchange secrets using Math?
How do computers exchange secrets using Math?
Dharmalingam Ganesan
 
On the Secrecy of RSA Private Keys
On the Secrecy of RSA Private KeysOn the Secrecy of RSA Private Keys
On the Secrecy of RSA Private Keys
Dharmalingam Ganesan
 
Computing the Square Roots of Unity to break RSA using Quantum Algorithms
Computing the Square Roots of Unity to break RSA using Quantum AlgorithmsComputing the Square Roots of Unity to break RSA using Quantum Algorithms
Computing the Square Roots of Unity to break RSA using Quantum Algorithms
Dharmalingam Ganesan
 
Analysis of Short RSA Secret Exponent d
Analysis of Short RSA Secret Exponent dAnalysis of Short RSA Secret Exponent d
Analysis of Short RSA Secret Exponent d
Dharmalingam Ganesan
 
Dependency Analysis of RSA Private Variables
Dependency Analysis of RSA Private VariablesDependency Analysis of RSA Private Variables
Dependency Analysis of RSA Private Variables
Dharmalingam Ganesan
 
Analysis of Shared RSA Modulus
Analysis of Shared RSA ModulusAnalysis of Shared RSA Modulus
Analysis of Shared RSA Modulus
Dharmalingam Ganesan
 
RSA Game using an Oracle
RSA Game using an OracleRSA Game using an Oracle
RSA Game using an Oracle
Dharmalingam Ganesan
 
RSA Two Person Game
RSA Two Person GameRSA Two Person Game
RSA Two Person Game
Dharmalingam Ganesan
 
RSA without Integrity Checks
RSA without Integrity ChecksRSA without Integrity Checks
RSA without Integrity Checks
Dharmalingam Ganesan
 
RSA without Padding
RSA without PaddingRSA without Padding
RSA without Padding
Dharmalingam Ganesan
 
Solutions to online rsa factoring challenges
Solutions to online rsa factoring challengesSolutions to online rsa factoring challenges
Solutions to online rsa factoring challenges
Dharmalingam Ganesan
 
Security of RSA and Integer Factorization
Security of RSA and Integer FactorizationSecurity of RSA and Integer Factorization
Security of RSA and Integer Factorization
Dharmalingam Ganesan
 

More from Dharmalingam Ganesan (20)

.NET Deserialization Attacks
.NET Deserialization Attacks.NET Deserialization Attacks
.NET Deserialization Attacks
 
How to exploit rand()?
How to exploit rand()?How to exploit rand()?
How to exploit rand()?
 
Cyclic Attacks on the RSA Trapdoor Function
Cyclic Attacks on the RSA Trapdoor FunctionCyclic Attacks on the RSA Trapdoor Function
Cyclic Attacks on the RSA Trapdoor Function
 
An Analysis of RSA Public Exponent e
An Analysis of RSA Public Exponent eAn Analysis of RSA Public Exponent e
An Analysis of RSA Public Exponent e
 
An Analysis of Secure Remote Password (SRP)
An Analysis of Secure Remote Password (SRP)An Analysis of Secure Remote Password (SRP)
An Analysis of Secure Remote Password (SRP)
 
Thank-a-Gram
Thank-a-GramThank-a-Gram
Thank-a-Gram
 
Active Attacks on DH Key Exchange
Active Attacks on DH Key ExchangeActive Attacks on DH Key Exchange
Active Attacks on DH Key Exchange
 
Can I write to a read only file ?
Can I write to a read only file ?Can I write to a read only file ?
Can I write to a read only file ?
 
How do computers exchange secrets using Math?
How do computers exchange secrets using Math?How do computers exchange secrets using Math?
How do computers exchange secrets using Math?
 
On the Secrecy of RSA Private Keys
On the Secrecy of RSA Private KeysOn the Secrecy of RSA Private Keys
On the Secrecy of RSA Private Keys
 
Computing the Square Roots of Unity to break RSA using Quantum Algorithms
Computing the Square Roots of Unity to break RSA using Quantum AlgorithmsComputing the Square Roots of Unity to break RSA using Quantum Algorithms
Computing the Square Roots of Unity to break RSA using Quantum Algorithms
 
Analysis of Short RSA Secret Exponent d
Analysis of Short RSA Secret Exponent dAnalysis of Short RSA Secret Exponent d
Analysis of Short RSA Secret Exponent d
 
Dependency Analysis of RSA Private Variables
Dependency Analysis of RSA Private VariablesDependency Analysis of RSA Private Variables
Dependency Analysis of RSA Private Variables
 
Analysis of Shared RSA Modulus
Analysis of Shared RSA ModulusAnalysis of Shared RSA Modulus
Analysis of Shared RSA Modulus
 
RSA Game using an Oracle
RSA Game using an OracleRSA Game using an Oracle
RSA Game using an Oracle
 
RSA Two Person Game
RSA Two Person GameRSA Two Person Game
RSA Two Person Game
 
RSA without Integrity Checks
RSA without Integrity ChecksRSA without Integrity Checks
RSA without Integrity Checks
 
RSA without Padding
RSA without PaddingRSA without Padding
RSA without Padding
 
Solutions to online rsa factoring challenges
Solutions to online rsa factoring challengesSolutions to online rsa factoring challenges
Solutions to online rsa factoring challenges
 
Security of RSA and Integer Factorization
Security of RSA and Integer FactorizationSecurity of RSA and Integer Factorization
Security of RSA and Integer Factorization
 

Recently uploaded

Odoo ERP Vs. Traditional ERP Systems – A Comparative Analysis
Odoo ERP Vs. Traditional ERP Systems – A Comparative AnalysisOdoo ERP Vs. Traditional ERP Systems – A Comparative Analysis
Odoo ERP Vs. Traditional ERP Systems – A Comparative Analysis
Envertis Software Solutions
 
WWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders AustinWWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders Austin
Patrick Weigel
 
UI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design SystemUI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design System
Peter Muessig
 
SMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API ServiceSMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API Service
Yara Milbes
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
Lecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptxLecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptx
TaghreedAltamimi
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Green Software Development
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
Peter Muessig
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
Quickdice ERP
 
zOS Mainframe JES2-JES3 JCL-JECL Differences
zOS Mainframe JES2-JES3 JCL-JECL DifferenceszOS Mainframe JES2-JES3 JCL-JECL Differences
zOS Mainframe JES2-JES3 JCL-JECL Differences
YousufSait3
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 
Malibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed RoundMalibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed Round
sjcobrien
 
Modelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - AmsterdamModelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - Amsterdam
Alberto Brandolini
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
brainerhub1
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
dakas1
 
SQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure MalaysiaSQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure Malaysia
GohKiangHock
 
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
Bert Jan Schrijver
 
What next after learning python programming basics
What next after learning python programming basicsWhat next after learning python programming basics
What next after learning python programming basics
Rakesh Kumar R
 
Top 9 Trends in Cybersecurity for 2024.pptx
Top 9 Trends in Cybersecurity for 2024.pptxTop 9 Trends in Cybersecurity for 2024.pptx
Top 9 Trends in Cybersecurity for 2024.pptx
devvsandy
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
Rakesh Kumar R
 

Recently uploaded (20)

Odoo ERP Vs. Traditional ERP Systems – A Comparative Analysis
Odoo ERP Vs. Traditional ERP Systems – A Comparative AnalysisOdoo ERP Vs. Traditional ERP Systems – A Comparative Analysis
Odoo ERP Vs. Traditional ERP Systems – A Comparative Analysis
 
WWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders AustinWWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders Austin
 
UI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design SystemUI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design System
 
SMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API ServiceSMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API Service
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
Lecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptxLecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptx
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
 
zOS Mainframe JES2-JES3 JCL-JECL Differences
zOS Mainframe JES2-JES3 JCL-JECL DifferenceszOS Mainframe JES2-JES3 JCL-JECL Differences
zOS Mainframe JES2-JES3 JCL-JECL Differences
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 
Malibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed RoundMalibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed Round
 
Modelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - AmsterdamModelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - Amsterdam
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
 
SQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure MalaysiaSQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure Malaysia
 
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
 
What next after learning python programming basics
What next after learning python programming basicsWhat next after learning python programming basics
What next after learning python programming basics
 
Top 9 Trends in Cybersecurity for 2024.pptx
Top 9 Trends in Cybersecurity for 2024.pptxTop 9 Trends in Cybersecurity for 2024.pptx
Top 9 Trends in Cybersecurity for 2024.pptx
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
 

Reverse Architecting using Relation Algebra.pdf

  • 1. Dharma Ganesan Reverse Architecting using Relation Algebra
  • 2. 2 What’s On The Agenda ● Software Architecture ● Reverse Architecting ● A little bit math - I promise ● Extract-Abstract-Present to Reverse Architecting ● Demos (during the presentation) ● Some References
  • 3. 3 Software Architecture ● Software architecture deals with the design of the high-level structure of the software ● Assembly of architectural elements in some well-chosen forms to satisfy requirements ● (including Reliability, Scalability, Portability, etc) ● Software architecture deals with ● abstraction ● decomposition and composition ● styles (pipe-and-filter, publish-subscribe, etc.)
  • 4. 4 Describing Software Architecture using Views ● How to best describe Software Architecture is a topic of on-going R&D ● In literature, views are used to describe Software Architecture ● Each view address one concern, for example: ● Structural view shows the decomposition of system ● Behavioral view shows how components interact at run-time ● Deployment view shows how components are assigned to hardware elements
  • 5. 5 Reverse Architecting Informally, extracting architecture information from source code (including makefiles, docs, test cases, etc.) Some challenges: ● Software architecture is an invisible one ● It is difficult to “see” architecture in source code ● Real-world systems have a lot of code Goal of reverse architecting: Semi-automatically extract architecture from source code
  • 6. 6 Some questions we ask ● What are the entry-points to the system? ● Which classes inherit from this class? ● Which files deal with network communication? ● Is this function reachable from ‘main’? ● Are there missing code not in repo? ● Which functions are dead? ● etc. etc. etc. All these questions can be be viewed as relational algebra questions!
  • 7. 7 Just a bit of math (I promise) What do we mean by Relation Algebra? Three things: Set - an unordered collection E.g., set of files {f1.c, f2.c, …} Binary Relation - an unordered set of pairs E.g., {<main, run>, <run, execute>, …, } Multi-Relation - Weighted Binary Relation E.g., {<caller, callee, 5>, …}
  • 8. 8 Relation Algebra Queries They are made of set-theory operators only For example, union, intersection, complement, etc. Compose two relations using join (a.k.a., comp) part_of= {<a A}, <b B>, <c C>} call = {<a b>, <b, c>} E.g: inverse(part_of) comp (call) comp (part_of)?
  • 9. 9 Relation Algebra Toolset Made of small utilities for each set-theory operator Combine utilities using pipe-and-filter style rel_inv part_of | rel_comp call - | rel_comp - part_of I personally used RA tools for several reverse architecting projects My Phd thesis has more details
  • 10. 10 A Reverse Architecting Approach (Philips in 1990s) Extraction: semi-automated extraction of different relations (import, inherit, call, etc.) Abstraction: rise the level of abstraction using relational algebra queries (imagine SQL) Presentation: visualize using graphs, tables, etc. (These were published by Philips)
  • 11. 11 Extraction ● Language-specific parsers to extract different relations: inherit, call, include, etc. ○ Code need not compile or link ● Each relation is stored in database/files ● Depending on the goal, more custom parsers have to be developed to extract code relations ● For example, if your goal is to extract inter-task RPC views, you need to ○ extract tasks, queue names, which function writes to or read from queues, etc.
  • 12. 12 Abstraction A suite of relation algebra operators was developed for abstraction (see demos) Again, depending on the goal one could apply different abstraction operators Some common abstraction (examples): ● Lift class-level dependencies to package-level ● Filter out irrelevant information for your goal ○ For example, show all Java packages that depend on Crypto packages ● Abstraction of runtime structure to show inter-task communication (more details later)
  • 14. 14 A medical device case study Goal: Extract architecture from source code Visualize inter-task and msg queue communication Approach: Extract relations from code Abstraction using Relation Algebra Visualize using our graph visualization tools
  • 15. 15 Extracted relations/sets Our parser extracts names of tasks, queues, semaphores, etc by pattern matching of library calls
  • 16. 16 Abstraction We write SQL-like queries using join, inverse, and other operations on the extracted relations Output is also relations/sets
  • 17. 17 Presentation We visualize relations as graphs or tables in general For inter-task structure, we have something like this from abstracted relations:
  • 18. 18 Conclusion/Takeaways ● Reverse architecting is a challenging problem ● Extract-Abstract-Present using relational algebra can help with reverse architecting ● Many of the analysis questions can be reformulated as relational algebra questions! ● The key is to have a goal for your reverse architecting effort - to filter out irrelevant data
  • 19. 19 Some Reverse Engineering Papers (not complete at all) https://www.win.tue.nl/~wstomv/edu/2ii45/yea r-0910/Maintaining_a_Legacy.pdf https://www.cs.cmu.edu/~aldrich/courses/654-s p05/ReengineeringTaxonomy.pdf https://ieeexplore.ieee.org/document/5959691 https://ieeexplore.ieee.org/document/5071104 …