Skip to content

Commit

Permalink
Test refactoring and documentation update (#82)
Browse files Browse the repository at this point in the history
* Move benchmarks tests

* Move benchmarks tests

* Update release workflow

* Update docs
  • Loading branch information
Saloed authored Mar 10, 2023
1 parent 6921c86 commit 250b14e
Show file tree
Hide file tree
Showing 15 changed files with 30 additions and 23 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ jobs:
ksmt-core/build/release/**/ksmt-core-*.jar
ksmt-z3/build/release/**/ksmt-z3-*.jar
ksmt-bitwuzla/build/release/**/ksmt-bitwuzla-*.jar
ksmt-yices/build/release/**/ksmt-yices-*.jar
ksmt-cvc5/build/release/**/ksmt-cvc5-*.jar
ksmt-runner/build/release/**/ksmt-runner-*.jar
2 changes: 1 addition & 1 deletion .github/workflows/run-long-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ jobs:
uses: gradle/gradle-build-action@v2
with:
arguments: |
:ksmt-test:test --tests ${{ format('"org.ksmt.test.{0}"', matrix.test) }}
:ksmt-test:test --tests ${{ format('"org.ksmt.test.benchmarks.{0}"', matrix.test) }}
--no-daemon
--continue
-PrunBenchmarksBasedTests=true
Expand Down
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,17 @@ Currently, KSMT supports the following SMT solvers:
| [Z3](https://github.com/Z3Prover/z3) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| [Bitwuzla](https://github.com/bitwuzla/bitwuzla) | :heavy_check_mark: | :heavy_check_mark: | |
| [Yices2](https://github.com/SRI-CSL/yices2) | :heavy_check_mark: | :heavy_check_mark: | |
| [cvc5](https://github.com/cvc5/cvc5) | :heavy_check_mark: | :heavy_check_mark: | |

KSMT can express formulas in the following theories:

| Theory | Z3 | Bitwuzla | Yices2 |
|-------------------------|:------------------:|:------------------:|--------------------|
| Bitvectors | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| Arrays | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| IEEE Floats | :heavy_check_mark: | :heavy_check_mark: | |
| Uninterpreted Functions | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| Arithmetic | :heavy_check_mark: | | :heavy_check_mark: |
| Theory | Z3 | Bitwuzla | Yices2 | cvc5 |
|-------------------------|:------------------:|:------------------:|--------------------|--------------------|
| Bitvectors | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| Arrays | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| IEEE Floats | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: |
| Uninterpreted Functions | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| Arithmetic | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: |

Check out our [roadmap](Requirements.md) for detailed description of features and future plans.

Expand Down
2 changes: 1 addition & 1 deletion Requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
| [Z3 solver support](#z3-solver-support) | Done |
| [Bitwuzla solver support](#bitwuzla-solver-support) | Done |
| [Yices2 solver support](#yices2-solver-support) | Done |
| [CVC5 solver support](#cvc5-solver-support) | In progress |
| [CVC5 solver support](#cvc5-solver-support) | Done |
| [External process runner](#external-process-runner) | Done |
| [Portfolio solver](#portfolio-solver) | Done |
| [Solver configuration API](#solver-configuration-api) | Done |
Expand Down
7 changes: 4 additions & 3 deletions ksmt-test/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,13 @@ val downloadPreparedBenchmarksTestData = downloadPreparedSmtLibBenchmarkTestData
)

tasks.withType<Test> {
enabled = runBenchmarksBasedTests
if (runBenchmarksBasedTests) {
dependsOn.add(prepareTestData)
environment("benchmarkChunkMaxSize", benchmarkChunkMaxSize)
environment("benchmarkChunk", benchmarkChunk)
} else {
exclude("org/ksmt/test/benchmarks/**")
}
environment("benchmarkChunkMaxSize", benchmarkChunkMaxSize)
environment("benchmarkChunk", benchmarkChunk)
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.ksmt.test
package org.ksmt.test.benchmarks

import com.jetbrains.rd.util.reactive.RdFault
import kotlinx.coroutines.TimeoutCancellationException
Expand Down Expand Up @@ -44,6 +44,10 @@ import org.ksmt.sort.KFpSort
import org.ksmt.sort.KIntSort
import org.ksmt.sort.KRealSort
import org.ksmt.sort.KSort
import org.ksmt.test.SmtLibParseError
import org.ksmt.test.TestRunner
import org.ksmt.test.TestWorker
import org.ksmt.test.TestWorkerProcess
import org.ksmt.utils.FpUtils.isZero
import java.nio.file.Path
import java.nio.file.Paths
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.ksmt.test
package org.ksmt.test.benchmarks

import org.junit.jupiter.api.parallel.Execution
import org.junit.jupiter.api.parallel.ExecutionMode
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.ksmt.test
package org.ksmt.test.benchmarks

import org.junit.jupiter.api.AfterAll
import org.junit.jupiter.api.BeforeAll
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.ksmt.test
package org.ksmt.test.benchmarks

import org.junit.jupiter.api.parallel.Execution
import org.junit.jupiter.api.parallel.ExecutionMode
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.ksmt.test
package org.ksmt.test.benchmarks

import org.junit.jupiter.api.AfterAll
import org.junit.jupiter.api.BeforeAll
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.ksmt.test
package org.ksmt.test.benchmarks

import com.jetbrains.rd.framework.IMarshaller
import com.jetbrains.rd.framework.SerializationCtx
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.ksmt.test
package org.ksmt.test.benchmarks

import org.junit.jupiter.api.parallel.Execution
import org.junit.jupiter.api.parallel.ExecutionMode
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.ksmt.test
package org.ksmt.test.benchmarks

import org.junit.jupiter.api.parallel.Execution
import org.junit.jupiter.api.parallel.ExecutionMode
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.ksmt.test
package org.ksmt.test.benchmarks

import org.junit.jupiter.api.parallel.Execution
import org.junit.jupiter.api.parallel.ExecutionMode
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.ksmt.test
package org.ksmt.test.benchmarks

import com.microsoft.z3.Context
import kotlinx.coroutines.async
Expand Down

0 comments on commit 250b14e

Please sign in to comment.