From ab8ec084849af99c106e7d848f714a28077a780c Mon Sep 17 00:00:00 2001 From: Koen Wermer <koenwermer@gmail.com> Date: Wed, 8 Mar 2017 23:45:07 +0100 Subject: [PATCH] finished the experiments --- Results/Daikon results.txt | 4 +-- ...eturnValueVar == returnValue_False_False_1 | 28 ++++++++++++++++++- .../{ => daikon tests}/BaseSecantSolver.java | 12 ++++---- .../{ => daikon tests}/GradientFunction.java | 0 Tests/{ => daikon tests}/Iterator.java | 0 5 files changed, 35 insertions(+), 9 deletions(-) rename Tests/{ => daikon tests}/BaseSecantSolver.java (97%) rename Tests/{ => daikon tests}/GradientFunction.java (100%) rename Tests/{ => daikon tests}/Iterator.java (100%) diff --git a/Results/Daikon results.txt b/Results/Daikon results.txt index 4dd99b3..ee6b757 100644 --- a/Results/Daikon results.txt +++ b/Results/Daikon results.txt @@ -11,7 +11,7 @@ GradientFunction: 0 mutations stuck in a loop BaseSecantSolver: -0 mutations with error found: -0 mutations with error found not detected by wlp: +3 mutations with error found: 49, 90, 122 (in the daikon version) +3 mutations with error found not detected by wlp: 49, 90, 122 (in the daikon version) 0 mutations with unterminated calls 0 mutations stuck in a loop \ No newline at end of file diff --git a/Results/basesecantsolver_true_returnValue != null_returnValueVar == returnValue_False_False_1 b/Results/basesecantsolver_true_returnValue != null_returnValueVar == returnValue_False_False_1 index ad587ee..2521dc0 100644 --- a/Results/basesecantsolver_true_returnValue != null_returnValueVar == returnValue_False_False_1 +++ b/Results/basesecantsolver_true_returnValue != null_returnValueVar == returnValue_False_False_1 @@ -5,4 +5,30 @@ postCondPrimType: returnValueVar == returnValue ignoreLibMethods: False ignoreMainMethod: False nrOfUnroll: 1 -erronous mutations detected: \ No newline at end of file +erronous mutations detected: +206 verifyBracketing +200 verifyInterval1 +200 verifySequence1 +200 verifyBracketing +197 isSequence1 +196 isSequence1 +195 isSequence1 +194 isSequence1 +193 isSequence1 +192 isSequence1 +191 isSequence1 +190 isSequence1 +189 isSequence1 +188 isSequence1 +152 midpoint +151 midpoint +150 midpoint +149 midpoint +148 midpoint +147 midpoint +146 midpoint +145 midpoint +144 midpoint +143 midpoint +Total number of mutants: 207 +Number of mutants in which we found an error: 22 \ No newline at end of file diff --git a/Tests/BaseSecantSolver.java b/Tests/daikon tests/BaseSecantSolver.java similarity index 97% rename from Tests/BaseSecantSolver.java rename to Tests/daikon tests/BaseSecantSolver.java index b73e491..f7b8db1 100644 --- a/Tests/BaseSecantSolver.java +++ b/Tests/daikon tests/BaseSecantSolver.java @@ -30,7 +30,7 @@ import org.apache.commons.math3.exception.util.LocalizedFormats; import org.apache.commons.math3.util.FastMath; import org.apache.commons.math3.exception.TooManyEvaluationsException; -import org.apache.commons.math3.analysis.function.Abs; +import org.apache.commons.math3.analysis.function.Exp; /** * Base class for all bracketing <em>Secant</em>-based methods for root-finding @@ -112,7 +112,7 @@ public class BaseSecantSolver this.method = method3; } - public static double doSolve1(final double ftol, final double atol, final double rtol, double x0, double x1, Method method, AllowedSolution allowed, Abs function) + public static double doSolve1(final double ftol, final double atol, final double rtol, double x0, double x1, Method method, AllowedSolution allowed, Exp function) throws ConvergenceException { double f0 = computeObjectiveValue1(x0, function); @@ -136,7 +136,7 @@ public class BaseSecantSolver boolean inverted = false; // Keep finding better approximations. - for(int i = 0; i < 100; i++) { + for(int i = 0; i < 10000; i++) { // Calculate the next approximation. final double x = x1 - ((f1 * (x1 - x0)) / (f1 - f0)); final double fx = computeObjectiveValue1(x, function); @@ -248,7 +248,7 @@ public class BaseSecantSolver return (a + b) * 0.5; } - public static boolean isBracketing(Abs function1, + public static boolean isBracketing(Exp function1, final double lower1, final double upper1) throws NullArgumentException { @@ -283,7 +283,7 @@ public class BaseSecantSolver verifyInterval1(initial, upper3); } - public static void verifyBracketing(Abs function2, + public static void verifyBracketing(Exp function2, final double lower4, final double upper4) throws NullArgumentException, @@ -324,7 +324,7 @@ public class BaseSecantSolver } - protected static double computeObjectiveValue1(double point, Abs function) + protected static double computeObjectiveValue1(double point, Exp function) { return function.value(point); } diff --git a/Tests/GradientFunction.java b/Tests/daikon tests/GradientFunction.java similarity index 100% rename from Tests/GradientFunction.java rename to Tests/daikon tests/GradientFunction.java diff --git a/Tests/Iterator.java b/Tests/daikon tests/Iterator.java similarity index 100% rename from Tests/Iterator.java rename to Tests/daikon tests/Iterator.java -- GitLab