From b8a27fe11f864fe29944db9a84fb15918199a090 Mon Sep 17 00:00:00 2001 From: Mark Roberts Date: Thu, 13 Jul 2023 08:57:10 -0700 Subject: [PATCH] test confidence changes --- java/daikon/inv/binary/Member.java.jpp | 3 +++ java/daikon/inv/binary/twoSequence/Reverse.java.jpp | 3 +++ java/daikon/inv/binary/twoSequence/SubSequence.java.jpp | 3 +++ java/daikon/inv/binary/twoSequence/SubSet.java.jpp | 3 +++ java/daikon/inv/unary/scalar/Range.java.jpp | 3 +++ 5 files changed, 15 insertions(+) diff --git a/java/daikon/inv/binary/Member.java.jpp b/java/daikon/inv/binary/Member.java.jpp index 883a7a868a..8f1970da89 100644 --- a/java/daikon/inv/binary/Member.java.jpp +++ b/java/daikon/inv/binary/Member.java.jpp @@ -378,6 +378,9 @@ public final class CLASSNAME extends SEQUENCESCALAR { @Override protected double computeConfidence() { + if (ppt.num_samples() == 0) { + return Invariant.CONFIDENCE_UNJUSTIFIED; + } return Invariant.CONFIDENCE_JUSTIFIED; } diff --git a/java/daikon/inv/binary/twoSequence/Reverse.java.jpp b/java/daikon/inv/binary/twoSequence/Reverse.java.jpp index 6cd77ab9a8..19397f1150 100644 --- a/java/daikon/inv/binary/twoSequence/Reverse.java.jpp +++ b/java/daikon/inv/binary/twoSequence/Reverse.java.jpp @@ -227,6 +227,9 @@ public class CLASSNAME extends SUPERCLASS { @Override protected double computeConfidence() { + if (ppt.num_samples() == 0) { + return Invariant.CONFIDENCE_UNJUSTIFIED; + } return Invariant.CONFIDENCE_JUSTIFIED; } diff --git a/java/daikon/inv/binary/twoSequence/SubSequence.java.jpp b/java/daikon/inv/binary/twoSequence/SubSequence.java.jpp index 6083622d8d..704b5dfda1 100644 --- a/java/daikon/inv/binary/twoSequence/SubSequence.java.jpp +++ b/java/daikon/inv/binary/twoSequence/SubSequence.java.jpp @@ -313,6 +313,9 @@ public class CLASSNAME extends SUPERCLASS { @Override protected double computeConfidence() { + if (ppt.num_samples() == 0) { + return Invariant.CONFIDENCE_UNJUSTIFIED; + } return Invariant.CONFIDENCE_JUSTIFIED; } diff --git a/java/daikon/inv/binary/twoSequence/SubSet.java.jpp b/java/daikon/inv/binary/twoSequence/SubSet.java.jpp index 5591731b0f..c8a6e0f54f 100644 --- a/java/daikon/inv/binary/twoSequence/SubSet.java.jpp +++ b/java/daikon/inv/binary/twoSequence/SubSet.java.jpp @@ -309,6 +309,9 @@ public class SUBSET extends TWOSEQUENCE { @Override protected double computeConfidence() { + if (ppt.num_samples() == 0) { + return Invariant.CONFIDENCE_UNJUSTIFIED; + } return Invariant.CONFIDENCE_JUSTIFIED; } diff --git a/java/daikon/inv/unary/scalar/Range.java.jpp b/java/daikon/inv/unary/scalar/Range.java.jpp index b40cd69863..626fc06074 100644 --- a/java/daikon/inv/unary/scalar/Range.java.jpp +++ b/java/daikon/inv/unary/scalar/Range.java.jpp @@ -192,6 +192,9 @@ public abstract class RANGE extends SUPERCLASS { @Override protected double computeConfidence() { + if (ppt.num_samples() == 0) { + return Invariant.CONFIDENCE_UNJUSTIFIED; + } return CONFIDENCE_JUSTIFIED; }