From db01f37d422ad1aff19cc10824ec94b504aa2a41 Mon Sep 17 00:00:00 2001 From: Koen Wermer <koenwermer@gmail.com> Date: Sat, 4 Mar 2017 01:13:30 +0100 Subject: [PATCH] tested gradientfunction with daikon --- Daikon.hs | 3 ++- Results/Daikon results.txt | 8 +++++++- Tests/GradientFunction.java | 4 ++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Daikon.hs b/Daikon.hs index 2d363cc..a313512 100644 --- a/Daikon.hs +++ b/Daikon.hs @@ -1,3 +1,4 @@ +-- Contains all code used for running the daikon experiments module Daikon where import Control.Monad @@ -6,7 +7,7 @@ import System.Directory import Data.List testNr :: Int -testNr = 1 +testNr = 2 source, pathDir, packageDir, methodName :: String source = case testNr of diff --git a/Results/Daikon results.txt b/Results/Daikon results.txt index 855df37..91f40b6 100644 --- a/Results/Daikon results.txt +++ b/Results/Daikon results.txt @@ -2,4 +2,10 @@ iterator: 5 mutations with error found: 2, 3, 4, 5, 32 4 mutations with error found not detected by wlp: 2, 3, 4, 5 2 mutations with unterminated calls: 1 and 31 -1 mutation stuck in a loop: 35 \ No newline at end of file +1 mutation stuck in a loop: 35 + +GradientFunction: +5 mutations with error found: 2, 9, 13, 14, 22 +4 mutations with error found not detected by wlp: 9, 13, 14, 22 +0 mutations with unterminated calls +0 mutations stuck in a loop \ No newline at end of file diff --git a/Tests/GradientFunction.java b/Tests/GradientFunction.java index c85f6cf..070a5f7 100644 --- a/Tests/GradientFunction.java +++ b/Tests/GradientFunction.java @@ -47,14 +47,14 @@ public class GradientFunction implements MultivariateVectorFunction { } // compute the derivatives - final DerivativeStructure dsY = this.f.value(dsX); + final DerivativeStructure dsY = null; // this.f.value(dsX); // extract the gradient final double[] y = new double[point.length]; final int[] orders = new int[point.length]; for (int j = 0; j < point.length; ++j) { orders[j] = 1; - y[j] = dsY.getPartialDerivative(orders); + y[j] = 1; //dsY.getPartialDerivative(orders); orders[j] = 0; } -- GitLab