stack-analysis tool (42) - cs.technion.ac.il
TRANSCRIPT
![Page 1: Stack-Analysis Tool (42) - cs.technion.ac.il](https://reader034.vdocuments.us/reader034/viewer/2022042914/626a706bd602763ec61033dc/html5/thumbnails/1.jpg)
Industrial Project 234313
Stack-Analysis Tool (42)
Final Meeting Presentation
Academic Coordinator: Alon Shtern, Liran Funaro
Students: Yonathan Touitou, Tomer Cohen
Industrial Supervisor: Ori Arad, Carmel Ravid (Elbit Systems)
![Page 2: Stack-Analysis Tool (42) - cs.technion.ac.il](https://reader034.vdocuments.us/reader034/viewer/2022042914/626a706bd602763ec61033dc/html5/thumbnails/2.jpg)
The Goals
• To give an upper bound of a program’s memory usage for
the benefit of real time and Safety-Critical systems.
• To develop a stacks analysis tool which statically examines
an application’s maximum or worst-case stack usage
scenario.
![Page 3: Stack-Analysis Tool (42) - cs.technion.ac.il](https://reader034.vdocuments.us/reader034/viewer/2022042914/626a706bd602763ec61033dc/html5/thumbnails/3.jpg)
High Level Methodology
• Given C++ program, create weighted function call graph
from its representing Assembly
• Each function represented by vertex in the graph
• Each vertex have a weight correlate the function memory
usage that it represent
• The memory usage upper bound will be the heaviest path in
the graph
![Page 4: Stack-Analysis Tool (42) - cs.technion.ac.il](https://reader034.vdocuments.us/reader034/viewer/2022042914/626a706bd602763ec61033dc/html5/thumbnails/4.jpg)
Function Call Graph Example
Main
foo
draw
func
run
printf
getID
![Page 5: Stack-Analysis Tool (42) - cs.technion.ac.il](https://reader034.vdocuments.us/reader034/viewer/2022042914/626a706bd602763ec61033dc/html5/thumbnails/5.jpg)
Today situation
• There are some industrial stack analysis tools in the
market, but none of them fulfil all the requirements.
• The main issue is while using C++ polymorphism and
dynamic dispatch.
• Those existing tools doesn’t support command line
Interface – make it useless for Automation
• Our main objective is to provide a solution for those issues.
![Page 6: Stack-Analysis Tool (42) - cs.technion.ac.il](https://reader034.vdocuments.us/reader034/viewer/2022042914/626a706bd602763ec61033dc/html5/thumbnails/6.jpg)
Methodology
• Building inheritance graph from given C++ source files.
• Analyses of inheritance graph in order to find
implemented virtual functions which can be called.
• Optional: make it possible to automatically complete
missing function call graph
![Page 7: Stack-Analysis Tool (42) - cs.technion.ac.il](https://reader034.vdocuments.us/reader034/viewer/2022042914/626a706bd602763ec61033dc/html5/thumbnails/7.jpg)
Working Schema
C++ source files
Assembly
Missing Calling function Graph
Complete Calling
function Graph
Inheritance Graph
DoxygenCalling
function Graph
Doxygen
VerOStack
Analysis
Stacks Mem Upper bound
OUR PROJECT
![Page 8: Stack-Analysis Tool (42) - cs.technion.ac.il](https://reader034.vdocuments.us/reader034/viewer/2022042914/626a706bd602763ec61033dc/html5/thumbnails/8.jpg)
Demo
![Page 9: Stack-Analysis Tool (42) - cs.technion.ac.il](https://reader034.vdocuments.us/reader034/viewer/2022042914/626a706bd602763ec61033dc/html5/thumbnails/9.jpg)
The progress (1)Preliminary Analysis (Week 3)
• Explore and examines the available tools for our needs
Analyze and Design (Weeks 4-5 )
• Input parsing
• Representation of the data
• Determine the right algorithms
Coding and Midway Meeting preparation (Weeks 6-9)
• Coding, debugging and minor testing
• Midway Meeting (Week 8)
• First version of inheritance graph
![Page 10: Stack-Analysis Tool (42) - cs.technion.ac.il](https://reader034.vdocuments.us/reader034/viewer/2022042914/626a706bd602763ec61033dc/html5/thumbnails/10.jpg)
The progress (2)
Coding (Weeks 9-11)
• Coding – complete the missing call graph that was created by VerOStack
• Given a uncompleted line
• Parse, find objects and functions
• Find their static types
• Call our function
Testing & Finalizing (Weeks 12-13)
• Tests
• Documentation
• Mini Website
![Page 11: Stack-Analysis Tool (42) - cs.technion.ac.il](https://reader034.vdocuments.us/reader034/viewer/2022042914/626a706bd602763ec61033dc/html5/thumbnails/11.jpg)
Deliverables• A program that: given C++ source files and VerOStack missing
function calling graph, complete the missing parts (and display the
program inheritance graph)
• An user manual - information for usage of software by end-user.
• A developer manual - information on the software design and
structure so that development can be continued if necessary.
• A final report in the form of Mini-website that presents the project
to the public.
![Page 12: Stack-Analysis Tool (42) - cs.technion.ac.il](https://reader034.vdocuments.us/reader034/viewer/2022042914/626a706bd602763ec61033dc/html5/thumbnails/12.jpg)
Mini-Website
![Page 13: Stack-Analysis Tool (42) - cs.technion.ac.il](https://reader034.vdocuments.us/reader034/viewer/2022042914/626a706bd602763ec61033dc/html5/thumbnails/13.jpg)