From 017cad8b778c92377e1b23e50e7fdc73202ab6db Mon Sep 17 00:00:00 2001 From: Levente Bajczi Date: Thu, 15 Feb 2024 17:22:09 +0100 Subject: [PATCH] UNknown --- .../bme/mit/theta/analysis/algorithm/SafetyResult.java | 10 +++++----- .../theta/analysis/algorithm/bounded/BoundedChecker.kt | 2 +- .../bme/mit/theta/xcfa/cli/checkers/ConfigToChecker.kt | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/subprojects/common/analysis/src/main/java/hu/bme/mit/theta/analysis/algorithm/SafetyResult.java b/subprojects/common/analysis/src/main/java/hu/bme/mit/theta/analysis/algorithm/SafetyResult.java index 8e57705a30..ebc215711c 100644 --- a/subprojects/common/analysis/src/main/java/hu/bme/mit/theta/analysis/algorithm/SafetyResult.java +++ b/subprojects/common/analysis/src/main/java/hu/bme/mit/theta/analysis/algorithm/SafetyResult.java @@ -86,8 +86,8 @@ public static Unsafe unsafe() { return new Unsafe<>(); } - public static Unknown unknown() { - return new Unknown(); + public static Unknown unknown() { + return new Unknown<>(); } public abstract boolean isSafe(); @@ -195,7 +195,7 @@ public String toString() { } } - public static final class Unknown extends SafetyResult { + public static final class Unknown extends SafetyResult { @Override public boolean isSafe() { return false; @@ -207,12 +207,12 @@ public boolean isUnsafe() { } @Override - public Safe asSafe() { + public Safe asSafe() { return null; } @Override - public Unsafe asUnsafe() { + public Unsafe asUnsafe() { return null; } diff --git a/subprojects/common/analysis/src/main/java/hu/bme/mit/theta/analysis/algorithm/bounded/BoundedChecker.kt b/subprojects/common/analysis/src/main/java/hu/bme/mit/theta/analysis/algorithm/bounded/BoundedChecker.kt index 0cfef733e4..528df05d9d 100644 --- a/subprojects/common/analysis/src/main/java/hu/bme/mit/theta/analysis/algorithm/bounded/BoundedChecker.kt +++ b/subprojects/common/analysis/src/main/java/hu/bme/mit/theta/analysis/algorithm/bounded/BoundedChecker.kt @@ -116,7 +116,7 @@ class BoundedChecker @JvmOverloads constructor( lastIterLookup = lastIterLookup.copy(second = iteration) } } - return SafetyResult.unknown() as SafetyResult + return SafetyResult.unknown() } private fun bmc(): SafetyResult? { diff --git a/subprojects/xcfa/xcfa-cli/src/main/java/hu/bme/mit/theta/xcfa/cli/checkers/ConfigToChecker.kt b/subprojects/xcfa/xcfa-cli/src/main/java/hu/bme/mit/theta/xcfa/cli/checkers/ConfigToChecker.kt index 5fa1c31df8..5cece3382a 100644 --- a/subprojects/xcfa/xcfa-cli/src/main/java/hu/bme/mit/theta/xcfa/cli/checkers/ConfigToChecker.kt +++ b/subprojects/xcfa/xcfa-cli/src/main/java/hu/bme/mit/theta/xcfa/cli/checkers/ConfigToChecker.kt @@ -39,7 +39,7 @@ fun getChecker(xcfa: XCFA, mcm: MCM, config: XcfaConfig<*, *>, parseContext: Par Backend.BOUNDED -> getBoundedChecker(xcfa, mcm, config, logger) Backend.LAZY -> TODO() Backend.PORTFOLIO -> getPortfolioChecker(xcfa, mcm, config, parseContext, logger, uniqueLogger) - Backend.NONE -> SafetyChecker, XcfaAction, XcfaPrec<*>> { _ -> SafetyResult.unknown() as SafetyResult, XcfaAction> } + Backend.NONE -> SafetyChecker, XcfaAction, XcfaPrec<*>> { _ -> SafetyResult.unknown() } } }