GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - RafaeNoor/Program-Analysis: Program Analysis @ LUMS Project 1

BranchesTags
Open more actions menu

Latest commit

 

History

18 Commits
18 Commits

Folders and files

NameName
Last commit message
Last commit date
Makefile
Makefile
 
 
ReadMe.md
ReadMe.md
 
 
Sum_function.png
Sum_function.png
 
 
available-support.cpp
available-support.cpp
 
 
available-support.h
available-support.h
 
 
available-test-m2r.bc
available-test-m2r.bc
 
 
available-test.png
available-test.png
 
 
available.cpp
available.cpp
 
 
dataflow.cpp
dataflow.cpp
 
 
dataflow.h
dataflow.h
 
 
liveness-test-m2r.bc
liveness-test-m2r.bc
 
 
liveness.cpp
liveness.cpp
 
 

Repository files navigation

Program Analysis @ LUMS

Assignment 1: Abdul Rafae Noor Momina Nofal

To build, configure Makefile to appropriate LLVM Version (We used LLVM-4.0)

DataFlow.cpp/h provide a general framework to make any dataflow analysis provided we provide the transfer functions and meet operators. This generic framework makes use of function pointers and the BBInfo class which allows us to maintain arbritrary state across basic blocks. A map from BasicBlocks to their corresponding BBInfo seperates state from the frame-work all together.

As a result, according to the needs of the analysis the BBInfo class can be modified and the function pointers would be able to make use of the state.

A base class called "Flow" is implemented which takes the transfer and meet operators and contains a bool for direction isFwd. Then to run analysis, the analyze function checks the direction and runs the analysis accordingly. A queue structure is used to traverse level by level. We either insert successors or predecessors according to the analysis direction and just pop from queue until size is 0. We also need to see if a basic block is already inserted in the queue, so we shouldn't insert it again (even if it has been popped before re-insertion in the same queue).

Both Analysis have a global variable called Verbose to level the debug info displayed during analysis. If set to true, it would output detailed information at each program point. But for just regular output, it can be set to false.

The analysis implemented are Available Expressions (Forward) analysis, and Liveness (Backward) Analysis. Both have their own classes which inherit from "Flow". Both also have appropriate meet and transfer functions according to their analysis. Note: due to structuing of the map from BasicBlock to BBInfo, any analysis implemented in the future would have to follow the syntax for function pointers indiciated in the dataflow.h file.

About

Program Analysis @ LUMS Project 1

Resources

Readme
Activity

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.