Skip to content

Commit

Permalink
optimized assume intrinsics
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdullinAM committed May 2, 2024
1 parent 84ae761 commit 0808673
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>org.vorpal.research</groupId>
<artifactId>kex-intrinsics</artifactId>
<version>0.1.1</version>
<version>0.1.2</version>
<packaging>jar</packaging>

<name>org.vorpal.research kex-intrinsics</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,21 @@ object AssertIntrinsics {
@JvmStatic
inline fun kexAssert(id: String, condition: Boolean) {}

/**
* Assumes that the given object @param is null
* */
@JvmStatic
fun <T> kexAssertNull(value: T?): T {
return value ?: throw NullPointerException()
}

/**
* Assumes that the given object @param is null
* */
@JvmStatic
fun <T> kexAssertNotNull(value: T?): T {
return value ?: throw NullPointerException()
}

/**
* Checks if the call cite is unreachable
Expand Down

0 comments on commit 0808673

Please sign in to comment.