Git Product home page Git Product logo

neongoby's Introduction

NeonGoby Alias Analysis Checker

Building NeonGoby

Build LLVM 3.0/3.1 and clang 3.0/3.1 from source code.

Build RCS common utilities.

Finally, build Loom:

./configure \
    --with-rcssrc=<rcs srouce directory> \
    --with-rcsobj=<rcs object directory> \
    --prefix=`llvm-config --prefix`
make
make install

Running NeonGoby

Offline mode

As an example, say we want to check LLVM's basic alias analysis (basicaa) with a test program hello.cpp.

  1. Generate the bitcode of the test program using clang.

     clang++ hello.cpp -o hello.bc -c -emit-llvm
    
  2. Instrument the test program. dynaa_hook_mem.py -h shows you more options to tweak the instrumentation.

     dynaa_hook_mem.py hello
    
  3. Run the instrumented test program. NeonGoby generates the log file at /tmp/pts-<pid> by default. You can change the location by specifying environment variable LOG_FILE.

     ./hello.inst
    
  4. Check the alias analysis results against the aliases in the real execution.

     dynaa_check_aa.py hello.bc <log file> basicaa
    

Online mode

  1. Generate the bitcode as in the offline mode.

  2. Insert alias checks to the program. You can use option action-if-missed to specify what to do when detecting a missing alias: report means printing the missing alias to /tmp/report-<pid> and continuing executing the test program; abort means aborting the program; silence means doing nothing which is for internal use.

     dynaa_insert_alias_checker.py --action-if-missed=report hello basicaa
    
  3. Run the output executable. According to which action you specified in step 2, the program will abort on the first missing alias or report all missing aliases.

     ./hello.ac
    

Utilities

Use dump_dump_log to dump .pts files:

dynaa_dump_log -log-file hello.pts > hello.log

neongoby's People

Contributors

henryhu avatar jl3937 avatar wujingyue avatar ytang avatar

Watchers

 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.