Giter VIP home page Giter VIP logo

iflowjavert's Introduction

JavaScript Analyser

This is a verification tool for JavaScript programs. In time it will plug into eclipse, emacs and verification web services, to make writing correct, fast JavaScript easier to do.

Prerequisites:

  1. ocaml 3.11 or higher You can get this in ubuntu with:

    sudo apt-get install ocaml

  2. the XML-light library You can get this in ubuntu with:

    sudo apt-get install libxml-light-ocaml-dev

  3. ocaml batteries included You can get this in ubuntu with:

    sudo apt-get install ocaml-batteries-included

  4. The ocaml unit testing library OUnit You can get this in ubuntu with:

    sudo apt-get install libounit-ocaml-dev

  5. Java You can get this in ubuntu with:

    sudo apt-get install java7-jdk

  6. xdot You can get this in ubuntu with:

    sudo apt-get install xdot

  7. etags You can get this in ubuntu with:

    sudo apt-get install exuberant-ctags

To build:

  1. git submodule init && git submodule update

  2. cd JS_Symbolic_Debugger && make init

  3. Set config options so they make sense on your system.

    $EDITOR src/localconfig.ml
    $EDITOR config/config.xml
    
  4. make all

Updated Instructions

  1. Obtain the code of the compiler: i) git clone https://github.com/resource-reasoning/JavaScriptVerification.git ii) git submodule init && git submodule update

  2. Obtain the OCaml package manager and install OCaml (brew is required) i) brew install opam ii) opam switch 4.02.1 iii) eval opam config env

  3. Obtain the OCaml libraries required for the code: i) opam install batteries ii) opam install core iii) opam xml-light iv) opam install oUnit=1.1.2 (the compiler only works with this version of the library)

  4. Configure Eclipse (Eclipse for RCP and RAP developers, Version: Luna Service Release 2) i) Add OCaml plugin to Eclipse * Help -> Eclipse MarketPlace -> OcaIDE

    ii) Add EGit * Help -> Eclipse MarketPlace -> EGit

    iii) Compile Corestar * Go to the directory PROJECT_PATH/lib/corestar/corestar_src E.g. PROJECT_PATH = /Users/josesantos/projects/JavaScriptVerification

     * Run the script compile_prover.sh
    
     * Verify whether the file _build was created in the folder PROJECT_PATH/lib/corestar/corestar_src
    

    iv) Set the parameters for compiling the project * JS_Symbolic_Debugger -> Properties

     * Select Properties Menu
    
     * Targets: main.byte,interpreter_run.byte,translate.byte,test_all.byte
    
     * Libraries: xml-light,unix,oUnit,nums,str,bigarray,camomile,batteries,dynlink,corestar
    
     * Compiler Flags: -I OUNIT_PATH/oUnit -I XMLLIGHT_PATH/xml-light -I CAMOMILE_PATH/camomile -I BATTERIES_PATH/batteries -I PROJECT_PATH/lib/corestar/corestar_src/_build
     E.g. BATTERIES_PATH = /Users/josesantos/.opam/4.02.1/lib/batteries
         * To find the path of a library use: ocamlfind query LIBNAME
         E.g. ocamlfind query batteries 
    
     * Linker Flags: -I OUNIT_PATH/oUnit -I XMLLIGHT_PATH/xml-light -I CAMOMILE_PATH/camomile -I BATTERIES_PATH/batteries -I PROJECT_PATH/lib/corestar/corestar_src/_build
    

    v) Set the config file * Create the file config.xml in the folder PROJECT_PATH/config

     * Copy the contents of the file config.default to the file config.xml
    
     * Set the value of the attribute "location" of the node JS_TO_XML_PARSER to 
       the path of the xml parser
    
     * Set the value of the node LOGIC_DIR to the absolute path to the library 
       logic: PROJECT_PATH/lib/logic/
    
     * Set the value of the attribute "path" of the node SMT to the absolute 
       path to the binary of Z3
    

iflowjavert's People

Contributors

da319 avatar ignoredambience avatar billiejoe-bw avatar totherme avatar bengelmann avatar brabalan avatar tautschnig avatar bjx avatar

Watchers

James Cloos avatar  avatar

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.