From 84ae76113466bce7373fd6f8301301c29b2fd817 Mon Sep 17 00:00:00 2001 From: Azat Abdullin Date: Thu, 2 May 2024 14:14:58 +0200 Subject: [PATCH] optimized assume intrinsics --- pom.xml | 2 +- .../kex/intrinsics/AssertIntrinsics.kt | 44 ++++++++++++++++++- 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index f070d74..7ca2d2a 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.vorpal.research kex-intrinsics - 0.1.0 + 0.1.1 jar org.vorpal.research kex-intrinsics diff --git a/src/main/kotlin/org/vorpal/research/kex/intrinsics/AssertIntrinsics.kt b/src/main/kotlin/org/vorpal/research/kex/intrinsics/AssertIntrinsics.kt index 332df2e..2160c89 100644 --- a/src/main/kotlin/org/vorpal/research/kex/intrinsics/AssertIntrinsics.kt +++ b/src/main/kotlin/org/vorpal/research/kex/intrinsics/AssertIntrinsics.kt @@ -9,6 +9,48 @@ object AssertIntrinsics { @JvmStatic fun kexAssume(condition: Boolean) {} + /** + * Assumes that the value is positive without checking it + * */ + @JvmStatic + fun kexAssumePositive(value: Int) {} + + /** + * Assumes that the value is positive or zero without checking it + * */ + @JvmStatic + fun kexAssumePositiveOrZero(value: Int) {} + + /** + * Assumes that the value is positive without checking it + * */ + @JvmStatic + fun kexAssumeNegative(value: Int) {} + + /** + * Assumes that the value is positive without checking it + * */ + @JvmStatic + fun kexAssumeNegativeOrZero(value: Int) {} + + /** + * Assumes that the values are equal + * */ + @JvmStatic + fun kexAssumeEqual(lhv: Int, rhv: Int) {} + + /** + * Assumes that the values are equal + * */ + @JvmStatic + fun kexAssumeNotEqual(lhv: Int, rhv: Int) {} + + /** + * Assumes that the values are equal + * */ + @JvmStatic + fun kexAssumeEqual(lhv: CharArray, rhv: CharArray) {} + /** * Assumes that the given object @param is not null * */ @@ -49,4 +91,4 @@ object AssertIntrinsics { */ @JvmStatic inline fun kexUnreachable(id: String, condition: Boolean) {} -} \ No newline at end of file +}