[Back]
COPPICE: Discovering Legitimate API Rules
Institute National University of Singapore  Department Computer Science  People Anh Cuong Nguyen and Siau-Cheng Khoo  Email {anhcuong, specmine} 'at' comp.nus.edu.sg  Contact (65) 651-61862
DESCRIPTION COPPICE is a mutation framework for inferring legitimate API rules. COPPICE infers interaction rules between objects in the format of call sequences and represent them using past-time temporal logic. Following are examples of some API rules inferred by COPPICE:
  • getPixels(IIII[I)[I  REQUIRE  getMinX()I  getMinY()I  getWidth()I  getHeight()I  [Raster]
  • substring(II)  REQUIRE  length()  OR  indexOf(I)  OR  indexOf(II)  OR  lastIndexOf(String)
                                               OR  indexOf(String)  OR  startsWith(String)  [String]
  • BufferImage.getData(Rectangle)  REQUIRE  Rectangle.intersection(Rectangle)  OR  Rectangle.translate(II)
COPPICE infer API rules directly from software implementation and currently supports programs written in Java language.

REQUIREMENT
EXAMPLE USAGE

COPPICE receives a specification file and a command to execute the container project of the specifications as input. Usage of COPPICE is as follows:

-help : prints this usage information
-spec : specification file
-cp : classpath of the container project
-cmd : command to execute the container project

Except for the first option, the last three options are compulsory. An example command to execute COPPICE is as follows. The command instructs COPPICE to extract legitimate rules from mined specifications of Apache FOP application in the DaCapo benchmark.

java -jar coppice.jar -spec mrules/fop_mrules -cp dacapo.jar -cmd Harness fop

By default, COPPICE assumes that ASM and Commons CLI are installed in /user/share/java in your system. If you install them in a different location, you need to execute COPPICE with the following command:

java -cp coppice.jar:path_to_asm:path_to_cli coppice.Main -spec mrules/fop_mrules -cp dacapo.jar -cmd Harness fop

After COPPICE completes its execution, look for a file named srules.sc in your current directory to see the legitimate rules inferred.

DEMONSTRATION
DOWNLOAD

This release includes the binary version of COPPICE and the data we used in our ICFEM'11 paper: coppice-0.1.7z (482KB) [released on 1st Nov, 2011].

The zipped file is secured with a password. As a faculty policy, we are asked to know your purpose for downloading the tool. Please help us to fill up the following form, and a password will be shown to you. You may need to read our term of usage before proceeding with the dowload.

FREQUENTLY ASKED QUESTIONS
PUBLICATIONS

Last updated on 1st Nov, 2011.

[Back]