Coder Social home page Coder Social logo

cs-454-project-rlcheck's Introduction

AI Based software engineering term project

This project is privately copied from rlcheck by Sameer Reddy et al. Our project aims to make slight modifications to RL algorithm to achieve better performance.

RLCheck

This project contains the source code for RLCheck, a method for guiding generators with reinforcement learning.

To reference RLCheck in your research, you can cite our ICSE 2020 paper (to appear):

Sameer Reddy, Caroline Lemieux, Rohan Padhye, Koushik Sen. 2020. Quickly Generating Diverse Valid Test Inputs with Reinforcement Learning. In Proceedings of the 42nd International Conference on Software Engineering (ICSE โ€™20), May 23โ€“29, 2020, Seoul, Sout Korea. ACM, New York, NY, USA, 12 pages.

Directory structure

  • jqf: the main RLCheck implementation built on top of JQF
  • bst_example: a python implementation of RLCheck for a BST example
  • scripts : contains scripts for running experiments and plotting results

Build + run RLCheck

To build the main RLCheck go to the jqf folder and run mvn package

You should then be able to run the following command: $JQF_DIR/bin/jqf-rl -c [CLASSPATH] TEST_CLASS TEST_METHOD RL_GENERATOR CONFIG_FILE [OUTPUT_DIR]

Where $JQF_DIR is the location of the jqf subdirectory of RLCheck. For example, to run $JQF_DIR/bin/jqf-rl -c $($JQF_DIR/scripts/examples_classpath.sh) edu.berkeley.cs.jqf.examples.maven.ModelReaderTest testWithInputStream edu.berkeley.cs.jqf.examples.xml.XmlRLGenerator $JQF_DIR/configFiles/mavenConfig.json [OUTPUT_DIR]

Note: these commands run the instrumented version of RLCheck. While this results in a nice status screen, it also can cause substantial slowdowns on some benchmark. Add the -n flag to run an uninstrumented session (no status on increases in coverage, but faster execution), e.g.: $JQF_DIR/bin/jqf-rl -n -c [CLASSPATH] ...

RLCheck Changes to JQF

The implementation of RLCheck on top of JQF in this repo is a prototype. Most of the code, including the base class for the generators as well as the learners, can be found in the jqf/fuzz/src/main/java/edu/berkeley/cs/jqf/fuzz/rl directory.

In this prototype implementation, RLCheck generators are not proper JQF generators. This is because (at the time of writing) JQF's Guidance interface only supported providing guidance at the bytestream level. RLCheck, on the other hand, provides guidance directly at the SourceOfRandomness. As such, specialized generators need to be built. The implementation on top of JQF in this repo provides two, notably: jqf/examples/src/main/java/edu/berkeley/cs/jqf/examples/xml/XmlRLGenerator.java and jqf/examples/src/main/java/edu/berkeley/cs/jqf/examples/js/JavaScriptRLGenerator.java

Further reading

  • Our ICSE 2020 paper on RLCheck, see author's version.
  • REPLICATION.md contains instructions to replicate the experiments from the RLCheck paper, including how to load a docker container containing a pre-built RLCheck

cs-454-project-rlcheck's People

Contributors

umidjonokhunov avatar mickowale 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.