Stack-Analysis Tool (42) - cs.technion.ac.il

Post on 28-Apr-2022

4 views 0 download

Transcript of Stack-Analysis Tool (42) - cs.technion.ac.il

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)

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.

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

Function Call Graph Example

Main

foo

draw

func

run

printf

getID

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.

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

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

Demo

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

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

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.

Mini-Website