Git Product home page Git Product logo

stava's Introduction

Stava

Stava is a static program analysis for identifying stack allocable objects of code written in Java. With the results generated, a JVM can be instructed to allocate those objects on the stack instead of the heap. Analysis is performed on java bytecode and Stava will only generate partial results if library code is unavailable. This project is based on the PYE framework.

Getting Started

Installation

This project only requires a working installation of Java 8. Clone the repo and you're good to go! Use scripts from the scripts package and set them up according to your installation.

Analysing Code

Sample scripts are provided in the scripts directory. There are 2 types of usecases for stava.

  • Benchmark Code: This code is expected to be precompiled. These can be benchmarks like DaCapo.
  • Application Code: This is code written by user that has to be compiled. More instructions here.

Built With

  • Soot- a Java optimization framework which enables this project to look into class files and much more.

Authors

stava's People

Contributors

42niks avatar dheeraj135 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

stava's Issues

Testcases

Test cases to be written for which verification is to be done. @manasthakur sir please provide us some test cases you can think of whenever you are free.

Verification of updates for Load and Store Statements

For Store statements of type a.f = b, changes to be made are:
es(a) to be copied into es(b) and all objects reachable from b.

For Load statements of type b = a.f, changes to be made are:

  1. If a.f already exists:
    b -> [assimilate all objects pointed to by a.f]. Should a new object be created here?
  2. if a.f doesn't already exist: (can a be a field variable in such a case?)
    a.f -> [new object]
    b -> [same new object]
    es(same new object) = es(a).f

BCIs for `newarray/anewarray/*newmultiarray` etc are incorrect

Looks like the BCIs for array allocations are being picked up from the next statement (found in moldyn/md.runiters).

Plan: Check this with a small program involving different kinds of array allocations.

Solution(s): Perhaps get the BCI of the predecessor from the control-flow graph? Else subtract correct offset based on the kind of array-alloc instruction.

Verification of Weak Updates

Store statements must have weak updates. The strong and weak updates carry meaning only for store statements. All other statements must have normal updates.

Examples

Insert comments for each method describing the case that it is meant to cover.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.