Please note that all software is provided "as is".

Dynamic-Static-Dynamic Analysis (DSD-Crasher)

This is the current version of CnC. The older version from ICSE 2005 is still available below.

Test case generator and runtime

Example: How to use CnC and DSD-Crasher

The following is an example setup:

You can still run CnC without Daikon. To run CnC alone you have to comment out the Daikon configuration parameters in the build.xml file. (They are all in one block that starts with <!--Daikon-->.) Running CnC alone produces two warnings:

You might consider one of the two warnings produced by CnC alone a false positive though because it violates a precondition that the testee contains as an informal comment. The goal of combining CnC with Daikon is to suppress such false positive warnings. In our example we have a test case ( that exercises the testee as intended by the specification. CnC uses Daikon to infer this implicit precondition from the test execution and annotates the testee's source file with JML annotations. Running CnC with Daikon (the default setting of build.xml) CnC suppresses this false positive warning.

Example: Using CnC on a Medium-Size Third-Party Application

We have used the different configurations of CnC on Groovy version 1 beta 1, which is available at: We have used CnC 0.8.6 with the following configuration files: We have also experimented with Eclat using our own build script eclat.xml.

CnC Classic: ICSE 2005

CnC test case generator and runtime

Setting up Simplify

  1. Add the directory that contains the Simplify executable to your PATH environment variable, e.g. c:\bin\simplify-1.5.4 on my Windows machine.
  2. Set your PROVER_CC_LIMIT environment variable to 10, which specifies the maximum number of counterexamples Simplify searches for in the same method.

Using CnC

A user project using CnC will integrate the following computation steps into its build process.
  1. Execute CnC on selected testee sources and binaries.
  2. Compile the test cases CnC generated.
  3. Execute JUnit on the generated test cases.
  4. Archive the test results.

Using CnC without Ant

The following assumes that you have installed Java version 1.4.x (Java versions < 1.4 and Java versions >= 1.5 cause problems with the current version of CnC).
  1. Compile your testees like
  2. Make sure that the cnc-bundle jar file and the testee class files are reachable via your classpath.
  3. Run the CnC test case generator, pass it the testee source file names.
    java -ea -source 1.4 -simplify Simplify-1.5.4.exe -classpath c:\bin\j2sdk1.4.2_05\jre\lib\rt.jar;.
  4. CnC puts each generated test class source file in the same folder as its testee. So now we should have and at least CnC prints ESC's output, which contains three warnings.
  5. Compile the testfiles like
  6. Run the generated sources via our modified JUnit like
    java -noreinit BSTNodeTest
  7. You should get a report pointing to two class cast exceptions.
You have the following options.

Using CnC with Ant

Our goal is to ease the integration of CnC into a user project's build process. The idea is to separate the general steps of using CnC from the specifics of the user project's build process.

Ant is a popular open source tool to automate the build process of Java projects. Ant takes an XML formatted text file as input, which is also called the build file. An Ant build file is similar to a make file: it declares build targets and their dependencies. Ant interprets a build file and solves its dependencies to execute the build targets in a correct order.

The CnC distribution contains a generic Ant build file use.xml that invokes the CnC computation steps. A user project's build file build.xml then only needs to compile the testees (given by testees.txt) and call CnC's use.xml, passing project specific parameters to use.xml. The following code fragments illustrate the idea.

<!-- build.xml -->
<project name="MyProject" [..]>
  <!-- project properties -->
  <!-- environment properties -->
  <!-- compile -->
  <!-- test by calling use.xml -->

<!-- use.xml -->
<project name="CnC" [..]>
  <!-- test.generate -->
  <!-- test.compile -->
  <!-- -->
  <!-- test.archive -->
Some user projects might need to adapt use.xml to integrate the execution of CnC generated test cases with other testing activities or to adapt the archival of test results to the user project requirements.