Deam Usage

How to use Deam

Study with random changes

To evaluate the target dynamic impact analysis using random changes, the first and foremost step is to generate a massive number of changed program versions. Deam does this efficiently via dynamic generation of those versions of a same base program version, which involves byte-code instrumentation.

In order for Deam to instrument the bytecode of the target subject, adding certain statements in the subject source code is needed. In this regard however, Deam requires the addition of statements into the main/entry class of the holistic subject project only.

Precisely, the following statements should be added to the entry class, which is essentially an extra static method and thus would not mess the original source code up:

public class TheEntryClass {
	......
	// added for deam Instrumentation
	static void __link() { 
		mut.Modify.__link(); 
	}
	......

Then, follow the steps below:

(1) Compile the subject with the above extra code added.

(2) Instrument state-modification probes for runtime generation of changed versions.

(3) Run the above instrumented code to produce the execution history of the unchanged program.

(4) Prepare the binary executable as the input to the dynamic impact analysis you want to evaluate.

(5) Run the study.

ver=$1
seed=$2
query=${3:-"main"}
change=$4
NT=${5:-2650}

ROOT=/home/hcai/
subjectloc=/home/hcai/SVNRepos/star-lab/trunk/Subjects/Schedule1/

suffix=${ver}${seed}

INDIREA=$subjectloc/MutEAInstrumented-$suffix
INDIREH=$subjectloc/MutEHInstrumented-$suffix

MAINCP=".:/etc/alternatives/java_sdk/jre/lib/rt.jar:$ROOT/tools/j2sdk1.4.2_18/lib/tools.jar:$ROOT/tools/polyglot-1.3.5/lib/polyglot.jar:$ROOT/tools/soot-2.3.0/lib/sootclasses-2.3.0.jar:$ROOT/tools/jasmin-2.3.0/lib/jasminclasses-2.3.0.jar:$ROOT/tools/java_cup.jar:$ROOT/workspace/DUAForensics/bin:$ROOT/workspace/LocalsBox/bin:$ROOT/workspace/InstrReporters/bin:$ROOT/workspace/Deam/bin:$ROOT/workspace/mcia/bin:$ROOT/workspace/Sensa/bin:$ROOT/workspace/ProbSli/bin:$ROOT/workspace/TestAdequacy/bin:$subjectloc/lib"

suffix=${ver}${seed}

java -Xmx1600m -ea -cp ${MAINCP} mut.MutRunAnalysis \
	"$subjectloc" \
	${ver}${seed} \
	$DRIVERCLASS \
	"$query" \
	$change \
	$INDIREA/traceLengths.txt \
	$INDIREH/stmtids.out \
	$NT \
	10 \
	1

(6) Obtain the results.


Generated on 3 Dec 2014 for Deam by  doxygen 1.6.1