Skip to content

Commit

Permalink
Test something
Browse files Browse the repository at this point in the history
  • Loading branch information
agusaldasoro committed Dec 19, 2024
1 parent 45f6f01 commit 874722c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

*.DS_Store
/.idea/
.idea/
*.iml
Expand Down Expand Up @@ -168,7 +169,6 @@ Migrations/
/target/
/wfc/target/

*.DS_Store
/e2e-tests/emb-json/target/
/process_data/
/e2e-tests/spring-rest-multidb/target/
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import java.nio.file.Files
import java.nio.file.Paths
import java.util.*
import javax.annotation.PostConstruct
import javax.annotation.PreDestroy

/**
* An SMT solver implementation using Z3 in a Docker container.
Expand All @@ -42,15 +43,12 @@ import javax.annotation.PostConstruct
*/
class SMTLibZ3DbConstraintSolver() : DbConstraintSolver {
private val resourcesFolder = System.getProperty("user.dir") + "/target/tmp"
private lateinit var executor: Z3DockerExecutor
private lateinit var executor: Z3DockerExecutor
private var idCounter: Long = 0L

@Inject
private lateinit var config: EMConfig

@Inject
private lateinit var time: SearchTimeController

@PostConstruct
private fun postConstruct() {
if (config.generateSqlDataWithDSE) {
Expand All @@ -65,6 +63,7 @@ class SMTLibZ3DbConstraintSolver() : DbConstraintSolver {
/**
* Closes the Z3 Docker executor and cleans up temporary files.
*/
@PreDestroy
override fun close() {
executor.close()
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ public Optional<Map<String, SMTLibValue>> solveFromFile(String fileName) {
*/
@Override
public void close() {
z3Prover.stop();
if (z3Prover != null) {
z3Prover.stop();
}
}
}

0 comments on commit 874722c

Please sign in to comment.