Giter Club home page Giter Club logo

jas's Introduction

JAS

I am trying to build a Static Analysis for JS in JS.

Right now, everything is in beta (early early beta).

To install it, you should firt execute npm install.

Then, most of the samples are in the tests/source directory.

To run a sample, you can execute node tests/SourceTest.js the-file-you-want-to-test.js.

For instance, node tests/SourceTest.js anonymousCall.js will run the Static Analysis with the anonymousCall.js sample.

The SourceTest.js generates a dot graph in the tests/graph directory.

To create a corresponding PNG file, I personnaly execute dot. For example dot -Tpng tests/graph/innerFunction.js.gv -o tests/graph/innerFunction.png creates the PNG file for the innerFunction.js sample.

If you want to look into the souce code, here is some informations:

  • rewriteJS.js translates JS AST into an internal format
  • stateBuilder.js creates the nodes of the call graph
  • callBuilder.js links the nodes of the call graph (callee and caller)
  • State.js is a state
  • ScopeMap.js is the map to store values of variables
  • functionLattice.js is the lattice I use to create the call graph
  • simpleIntegerLattice.js is a simple lattice I use to know if integer variables

Don't hesitate to contact me for any comment, or even if you want to join this project !

jas's People

Stargazers

言己 avatar  avatar

Watchers

James Cloos avatar  avatar  avatar Xavier Blanc avatar

jas's Issues

prototype

prototype chain should be included in the SA

Object

include object in the SA

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.