Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cfworld dev #1

Open
wants to merge 79 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
8906fb4
VDDU and DDU added.
Feb 9, 2019
1f9745f
bug fix for VRDDU.
Harshagarwal19 Feb 9, 2019
da0aa56
Track DDU and VDDU fitness values.
jose Feb 11, 2019
22d5714
calling vmddu will maximize VDDU*branch_coverage.
prantikchatterjee Feb 16, 2019
f7a52b4
Originally, it was used at the branch granularity.
jose Feb 21, 2019
f9a2a4a
Merge branch 'vddu' of github.com:prantikchatterjee/evosuite into vddu
jose Feb 21, 2019
497b11f
VDDU branch granularity and VMDDU method granularity.
jose Feb 21, 2019
effd0a6
VCDDU criterion implements neural network
abhijit819 Apr 17, 2019
5875258
VMDDU criterion implements lambda implementation
abhijit819 Apr 17, 2019
4e2b43d
updated the return value of VMDDU
abhijit819 Apr 17, 2019
a04dbc1
updated VMDDU iteration value issue
abhijit819 Apr 18, 2019
7e61fcf
VCMDDU1: implements coverage + mrf and VCMDDU2: implements coverage *…
abhijit819 Apr 20, 2019
ec6f282
Issues with switch statement handled
abhijit819 Apr 20, 2019
adc3830
dl4j version is set to 1.0.0-beta3
abhijit819 Apr 20, 2019
b650934
return value of VCMDDU1 and VCMDDU2 are updated
abhijit819 Apr 21, 2019
7d81e4c
Feature dump for lambda implementation is switched off
abhijit819 Apr 24, 2019
201acb2
feature dump for Lang is activated
abhijit819 Apr 25, 2019
cc036f6
feature dump for Time is activated
abhijit819 Apr 25, 2019
6427e1b
added 3 new distance features, VCMDDU1 handles these 9 features and V…
abhijit819 Apr 27, 2019
b0fd5f2
VCMDDU1 handles 9 features (3 new distance features) and implements l…
abhijit819 Apr 30, 2019
14ce4db
VCMDDU1 now has DDU as a feature (total 10 features) and implements l…
abhijit819 May 4, 2019
220a047
VCMDDU1 implements lambda^2_(1-lambda^2) experiment for 9 features
abhijit819 May 6, 2019
77b1a46
VCMDDU1 implements lambda^2_(1-lambda)^2 experiment on 9 features
abhijit819 May 6, 2019
f75b96b
VCMDDU1 implements lambda^2_(1-lambda)^2 experiment with 9 featues
abhijit819 May 6, 2019
aff29f1
VCMDDU1 implements lambda^2_(1-lambda^2) experiment with 9 featues
abhijit819 May 6, 2019
efba06b
VCMDDU1 implements (lambda * DDU) + ((1-lambda) * (1 - NN_pred)) for …
abhijit819 May 9, 2019
aeae5a2
VCMDDU1 implements the basic lambda experiment
abhijit819 May 9, 2019
6f8d26e
VCMDDU1 implements (lambda*DDU + (1-lambda)*NN_pred), DDU is normaliz…
abhijit819 May 15, 2019
513d0d3
VCMDDU1 implements new ff1 - mean_mean and VCMDDU2 implements new ff2…
abhijit819 May 21, 2019
185c9e1
VCMDDU1 implements new ff1 - mean_mean and VCMDDU2 implements new ff2…
abhijit819 May 21, 2019
ebc56d2
VCMDDU1 implements new ff1 - mean_mean and VCMDDU2 implements new ff2…
abhijit819 May 21, 2019
3f27341
VCMDDU1 implements new ff1 - mean_mean and VCMDDU2 implements new ff2…
abhijit819 May 21, 2019
1dd1e3f
VCMDDU1 implements new ff1 - mean_mean and VCMDDU2 implements new ff2…
abhijit819 May 21, 2019
3df76a7
VCMDDU1 implements new ff1 - mean_mean and VCMDDU2 implements new ff2…
abhijit819 May 21, 2019
f52dd08
dumps final iteration value in MonotonicGA
abhijit819 May 22, 2019
5c93a61
dumps final iteration value in MonotonicGA
abhijit819 May 22, 2019
9bf5091
VCMDDU1 and VCMDDU2 updated: mean of mean must be minimized
abhijit819 May 23, 2019
7a16d2c
VCMDDU1 implements ff3 and VCMDDU2 implements ff4
abhijit819 May 24, 2019
478c99b
VCMDDU1 implements lambda*coverage + (1-lambda)*NN_pred
abhijit819 May 25, 2019
f9181ad
MonotonicGA writes the iteration val to /tmp/iteration_nn
abhijit819 May 25, 2019
696a79f
dumps iterartion number to file /tmp/iteration_ddu.txt
abhijit819 May 25, 2019
d694d33
Dump the fitness function value after each iteration
abhijit819 May 30, 2019
bb01c45
VCMDDU1 implements lambda experiment and dumps feature values to /tmp…
abhijit819 May 31, 2019
61ac955
FF3 and FF4 prints activity matrix too
abhijit819 Jun 1, 2019
731e253
improved
abhijit819 Jun 1, 2019
87c87c1
Now DDU also dumps features and activity matrix
abhijit819 Jun 1, 2019
ee3891f
VCMDDU1 implements nn with lambda and dumps feature values
abhijit819 Jun 5, 2019
f33c592
Feature dumping is improved for VCMDDU2 and DDU, VCMDDU1 and VCMDDU2 …
abhijit819 Jun 8, 2019
4634fa3
dl4j dependency removed from pom.xml
abhijit819 Jun 8, 2019
c12e966
d1
abhijit819 Jun 8, 2019
0c734b9
d2
abhijit819 Jun 8, 2019
d3e5907
d3
abhijit819 Jun 8, 2019
7191d6c
d4
abhijit819 Jun 8, 2019
9cdeb44
d5
abhijit819 Jun 8, 2019
d211a80
VCMDDU2 is now : FF4 * Density
abhijit819 Jun 13, 2019
2af7e1d
nothing new
abhijit819 Jun 13, 2019
6b3d828
FF4 with priors
abhijit819 Jun 25, 2019
0a63153
improved FF4_prior
abhijit819 Jun 27, 2019
26372d8
FF4 improved with features and activity matrices dump
abhijit819 Jun 29, 2019
3b8b144
improved
abhijit819 Jun 29, 2019
8c78597
improved
abhijit819 Jun 30, 2019
a21fc6c
added fitness function on nested counterfactual worlds
Aug 6, 2019
164583b
minor changes
Aug 29, 2019
4096163
simplified FF4 computation has been implemented, VCDDU implements cov…
abhijit819 Sep 1, 2019
cc80947
Merge branch 'master' into cfworld
jose May 11, 2020
6dbd298
First attempt to minimize the diff: removed comments.
jose May 11, 2020
da0119c
Fixed compilation issues introduced in cc8094789d23453f1fee8e2bb89ef3…
jose May 11, 2020
f738018
Attempt to minimize the diff: removed comments.
jose May 11, 2020
549b628
Removed unnecessary code.
jose May 11, 2020
39ab1c7
Removed changes that are no longer valid in the lasted version of Evo…
jose May 11, 2020
6bbfc2a
Removed new line.
jose May 11, 2020
662efab
Removed non-related code.
jose May 11, 2020
866725f
Fixed indentation.
jose May 11, 2020
aa59885
Added missing new line.
jose May 11, 2020
5fb5d58
A few minor optimizations to minimize the diff.
jose May 11, 2020
75f091b
Fixed indentation.
jose May 11, 2020
1d40c22
Removed ,
jose May 11, 2020
991189a
Revert change.
jose May 11, 2020
544a903
Removed JSON dep.
jose May 11, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion client/src/main/java/org/evosuite/Properties.java
Original file line number Diff line number Diff line change
Expand Up @@ -1436,7 +1436,8 @@ public enum Criterion {
EXCEPTION, DEFUSE, ALLDEFS, BRANCH, CBRANCH, STRONGMUTATION, WEAKMUTATION,
MUTATION, STATEMENT, RHO, AMBIGUITY, IBRANCH, READABILITY,
ONLYBRANCH, ONLYMUTATION, METHODTRACE, METHOD, METHODNOEXCEPTION, LINE, ONLYLINE, OUTPUT, INPUT,
REGRESSION, REGRESSIONTESTS, TRYCATCH
REGRESSION, REGRESSIONTESTS, TRYCATCH,
VDDU, VMDDU, VCDDU, VCMDDU1, VCMDDU2, VRDDU, DDU_METHOD, DDU_METHOD_DTR, DDU_PUBLIC_METHOD, DDU_PUBLIC_METHOD_DTR, DDU_BRANCH, DDU_BRANCH_DTR
}

@Parameter(key = "criterion", group = "Runtime", description = "Coverage criterion. Can define more than one criterion by using a ':' separated list")
Expand Down
36 changes: 36 additions & 0 deletions client/src/main/java/org/evosuite/TestSuiteGeneratorHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,42 @@ static void printTestCriterion(Criterion criterion) {
case REGRESSION:
LoggingUtils.getEvoLogger().info(" - Regression");
break;
case VDDU:
LoggingUtils.getEvoLogger().info(" - VDDU Method Coverage");
break;
case VMDDU:
LoggingUtils.getEvoLogger().info(" - VMDDU Method Coverage");
break;
case VCDDU:
LoggingUtils.getEvoLogger().info(" - VCDDU Method Coverage");
break;
case VCMDDU1:
LoggingUtils.getEvoLogger().info(" - VCMDDU1 Method Coverage");
break;
case VCMDDU2:
LoggingUtils.getEvoLogger().info(" - VCMDDU2 Method Coverage");
break;
case VRDDU:
LoggingUtils.getEvoLogger().info(" - VRDDU Method Coverage");
break;
case DDU_METHOD:
LoggingUtils.getEvoLogger().info(" - DDU Method Coverage");
break;
case DDU_METHOD_DTR:
LoggingUtils.getEvoLogger().info(" - DDU Method (DTR) Coverage");
break;
case DDU_PUBLIC_METHOD:
LoggingUtils.getEvoLogger().info(" - DDU Public Method Coverage");
break;
case DDU_PUBLIC_METHOD_DTR:
LoggingUtils.getEvoLogger().info(" - DDU Public Method (DTR) Coverage");
break;
case DDU_BRANCH:
LoggingUtils.getEvoLogger().info(" - DDU Branch Coverage");
break;
case DDU_BRANCH_DTR:
LoggingUtils.getEvoLogger().info(" - DDU Branch Coverage");
break;
default:
throw new IllegalArgumentException("Unrecognized criterion: " + criterion);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@

import org.evosuite.Properties;
import org.evosuite.Properties.Criterion;
import org.evosuite.coverage.aes.AbstractAESCoverageSuiteFitness.Metric;
import org.evosuite.coverage.aes.branch.AESBranchCoverageSuiteFitness;
import org.evosuite.coverage.aes.method.AESMethodCoverageSuiteFitness;
import org.evosuite.coverage.aes.method.AESPublicMethodCoverageSuiteFitness;
import org.evosuite.coverage.ambiguity.AmbiguityCoverageSuiteFitness;
import org.evosuite.coverage.rho.RhoCoverageSuiteFitness;
import org.evosuite.TestGenerationContext;
Expand Down Expand Up @@ -178,6 +182,20 @@ public static RuntimeVariable getCoverageVariable(Properties.Criterion criterion
return RuntimeVariable.BranchCoverage;
case TRYCATCH:
return RuntimeVariable.TryCatchCoverage;
case VDDU:
case VMDDU:
case VCDDU:
case VCMDDU1:
case VCMDDU2:
case VRDDU:
return RuntimeVariable.VDDUCoverage;
case DDU_METHOD:
case DDU_METHOD_DTR:
case DDU_PUBLIC_METHOD:
case DDU_PUBLIC_METHOD_DTR:
case DDU_BRANCH:
case DDU_BRANCH_DTR:
return RuntimeVariable.DDUCoverage;
default:
throw new RuntimeException("Criterion not supported: " + criterion);

Expand Down Expand Up @@ -296,6 +314,31 @@ private static void analyzeCoverage(TestSuiteChromosome testSuite, Properties.Cr
AmbiguityCoverageSuiteFitness ag = new AmbiguityCoverageSuiteFitness();
ClientServices.getInstance().getClientNode().trackOutputVariable(
RuntimeVariable.AmbiguityScore, ag.getFitness(testSuite));
} else if (criterion == Properties.Criterion.DDU_BRANCH) {
AESBranchCoverageSuiteFitness branchFitness = new AESBranchCoverageSuiteFitness(Metric.AES);
ClientServices.getInstance().getClientNode().trackOutputVariable(
RuntimeVariable.DDUBranchCoverage, branchFitness.getMetric(testSuite));
ClientServices.getInstance().getClientNode().trackOutputVariable(
RuntimeVariable.DDUScore, Math.abs(0.5 - branchFitness.getFitness(testSuite)));
branchFitness = new AESBranchCoverageSuiteFitness(Metric.DTR);
ClientServices.getInstance().getClientNode().trackOutputVariable(
RuntimeVariable.DDUBranchCoverageDTR, branchFitness.getMetric(testSuite));
AESMethodCoverageSuiteFitness methodFitness = new AESMethodCoverageSuiteFitness(Metric.AES);
ClientServices.getInstance().getClientNode().trackOutputVariable(
RuntimeVariable.DDUMethodCoverage, methodFitness.getMetric(testSuite));
methodFitness = new AESMethodCoverageSuiteFitness(Metric.DTR);
ClientServices.getInstance().getClientNode().trackOutputVariable(
RuntimeVariable.DDUMethodCoverageDTR, methodFitness.getMetric(testSuite));
AESPublicMethodCoverageSuiteFitness publicMethodFitness = new AESPublicMethodCoverageSuiteFitness(Metric.AES);
ClientServices.getInstance().getClientNode().trackOutputVariable(
RuntimeVariable.DDUPublicMethodCoverage, publicMethodFitness.getMetric(testSuite));
publicMethodFitness = new AESPublicMethodCoverageSuiteFitness(Metric.DTR);
ClientServices.getInstance().getClientNode().trackOutputVariable(
RuntimeVariable.DDUPublicMethodCoverageDTR, publicMethodFitness.getMetric(testSuite));
} else if (criterion == Properties.Criterion.VDDU) {
AESBranchCoverageSuiteFitness vddu = new AESBranchCoverageSuiteFitness(Metric.VDDU);
ClientServices.getInstance().getClientNode().trackOutputVariable(
RuntimeVariable.VDDUScore, Math.abs(0.5 - vddu.getFitness(testSuite)));
}
}

Expand Down
58 changes: 58 additions & 0 deletions client/src/main/java/org/evosuite/coverage/FitnessFunctions.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@

import org.evosuite.Properties;
import org.evosuite.Properties.Criterion;
import org.evosuite.coverage.aes.AbstractAESCoverageSuiteFitness.Metric;
import org.evosuite.coverage.aes.branch.AESBranchCoverageFactory;
import org.evosuite.coverage.aes.branch.AESBranchCoverageSuiteFitness;
import org.evosuite.coverage.aes.method.AESMethodCoverageFactory;
import org.evosuite.coverage.aes.method.AESMethodCoverageSuiteFitness;
import org.evosuite.coverage.aes.method.AESPublicMethodCoverageSuiteFitness;
import org.evosuite.coverage.ambiguity.AmbiguityCoverageFactory;
import org.evosuite.coverage.ambiguity.AmbiguityCoverageSuiteFitness;
import org.evosuite.coverage.branch.BranchCoverageFactory;
Expand Down Expand Up @@ -155,6 +161,30 @@ public static TestSuiteFitnessFunction getFitnessFunction(Criterion criterion) {
return new OutputCoverageSuiteFitness();
case INPUT:
return new InputCoverageSuiteFitness();
case VDDU:
return new AESBranchCoverageSuiteFitness(Metric.VDDU);
case VMDDU:
return new AESBranchCoverageSuiteFitness(Metric.VMDDU);
case VCDDU:
return new AESBranchCoverageSuiteFitness(Metric.VCDDU);
case VCMDDU1:
return new AESBranchCoverageSuiteFitness(Metric.VCMDDU1);
case VCMDDU2:
return new AESBranchCoverageSuiteFitness(Metric.VCMDDU2);
case VRDDU:
return new AESBranchCoverageSuiteFitness(Metric.VRDDU);
case DDU_METHOD:
return new AESMethodCoverageSuiteFitness();
case DDU_METHOD_DTR:
return new AESMethodCoverageSuiteFitness(Metric.DTR);
case DDU_PUBLIC_METHOD:
return new AESPublicMethodCoverageSuiteFitness();
case DDU_PUBLIC_METHOD_DTR:
return new AESPublicMethodCoverageSuiteFitness(Metric.DTR);
case DDU_BRANCH:
return new AESBranchCoverageSuiteFitness();
case DDU_BRANCH_DTR:
return new AESBranchCoverageSuiteFitness(Metric.DTR);
case TRYCATCH:
return new TryCatchCoverageSuiteFitness();
default:
Expand Down Expand Up @@ -216,6 +246,21 @@ public static TestFitnessFactory<? extends TestFitnessFunction> getFitnessFactor
return new OutputCoverageFactory();
case INPUT:
return new InputCoverageFactory();
case VDDU:
case VMDDU:
case VCDDU:
case VRDDU:
case DDU_METHOD:
case DDU_METHOD_DTR:
return new AESMethodCoverageFactory();
case DDU_PUBLIC_METHOD:
case DDU_PUBLIC_METHOD_DTR:
return new AESMethodCoverageFactory(true);
case VCMDDU1:
case VCMDDU2:
case DDU_BRANCH:
case DDU_BRANCH_DTR:
return new AESBranchCoverageFactory();
case TRYCATCH:
return new TryCatchCoverageFactory();
default:
Expand Down Expand Up @@ -282,6 +327,19 @@ public static Class<?> getTestFitnessFunctionClass(Criterion criterion) {
return InputCoverageTestFitness.class;
case TRYCATCH:
return TryCatchCoverageTestFitness.class;
case VDDU:
case VMDDU:
case VCDDU:
case VCMDDU1:
case VCMDDU2:
case VRDDU:
case DDU_METHOD:
case DDU_METHOD_DTR:
case DDU_PUBLIC_METHOD:
case DDU_PUBLIC_METHOD_DTR:
case DDU_BRANCH:
case DDU_BRANCH_DTR:
return LineCoverageTestFitness.class;
default:
throw new RuntimeException("No criterion defined for " + criterion.name());
}
Expand Down
Loading