Skip to content

Commit

Permalink
solvers: avoid specifying solver paths in define-runtime-path
Browse files Browse the repository at this point in the history
On commands like `raco distribute`, paths under `define-runtime-path`
will be copied over for distribution, which mandates their existence.
Therefore, we should only use `define-runtime-path` with paths
that we know for sure that they exist.
  • Loading branch information
sorawee committed Mar 5, 2024
1 parent edf682d commit f711802
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 9 deletions.
3 changes: 2 additions & 1 deletion rosette/solver/smt/bitwuzla.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@

(provide (rename-out [make-bitwuzla bitwuzla]) bitwuzla? bitwuzla-available?)

(define-runtime-path bitwuzla-path (build-path ".." ".." ".." "bin" "bitwuzla"))
(define-runtime-path bin-path (build-path ".." ".." ".." "bin"))
(define bitwuzla-path (build-path bin-path "bitwuzla"))
(define bitwuzla-opts '("-m"))

(define (bitwuzla-available?)
Expand Down
3 changes: 2 additions & 1 deletion rosette/solver/smt/boolector.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@

(provide (rename-out [make-boolector boolector]) boolector? boolector-available?)

(define-runtime-path boolector-path (build-path ".." ".." ".." "bin" "boolector"))
(define-runtime-path bin-path (build-path ".." ".." ".." "bin"))
(define boolector-path (build-path bin-path "boolector"))
(define boolector-opts '("-m" "--output-format=smt2" "-i"))

(define (boolector-available?)
Expand Down
3 changes: 2 additions & 1 deletion rosette/solver/smt/cvc4.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

(provide (rename-out [make-cvc4 cvc4]) cvc4? cvc4-available?)

(define-runtime-path cvc4-path (build-path ".." ".." ".." "bin" "cvc4"))
(define-runtime-path bin-path (build-path ".." ".." ".." "bin"))
(define cvc4-path (build-path bin-path "cvc4"))
(define cvc4-opts '("-L" "smt2" "-q" "-m" "-i" "--bv-print-consts-as-indexed-symbols" "--bv-div-zero-const"))

(define (cvc4-available?)
Expand Down
3 changes: 2 additions & 1 deletion rosette/solver/smt/cvc5.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

(provide (rename-out [make-cvc5 cvc5]) cvc5? cvc5-available?)

(define-runtime-path cvc5-path (build-path ".." ".." ".." "bin" "cvc5"))
(define-runtime-path bin-path (build-path ".." ".." ".." "bin"))
(define cvc5-path (build-path bin-path "cvc5"))
(define cvc5-opts '("-L" "smt2" "-q" "-m" "-i" "--bv-print-consts-as-indexed-symbols"))

(define (cvc5-available?)
Expand Down
4 changes: 2 additions & 2 deletions rosette/solver/smt/stp.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

(provide (rename-out [make-stp stp]) stp? stp-available?)

(define-runtime-path stp-path (build-path ".." ".." ".." "bin" "stp"))
(define-runtime-path bin-path (build-path ".." ".." ".." "bin"))
(define stp-path (build-path bin-path "stp"))
(define stp-opts '("--SMTLIB2"))

(define (stp-available?)
Expand Down Expand Up @@ -66,4 +67,3 @@

(define (set-default-options server)
void)

4 changes: 2 additions & 2 deletions rosette/solver/smt/yices.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

(provide (rename-out [make-yices yices]) yices? yices-available?)

(define-runtime-path yices-path (build-path ".." ".." ".." "bin" "yices-smt2"))
(define-runtime-path bin-path (build-path ".." ".." ".." "bin"))
(define yices-path (build-path bin-path "yices-smt2"))
(define yices-opts '("--incremental"))

(define (yices-available?)
Expand Down Expand Up @@ -66,4 +67,3 @@

(define (set-default-options server)
void)

3 changes: 2 additions & 1 deletion rosette/solver/smt/z3.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@

(provide (rename-out [make-z3 z3]) z3?)

(define-runtime-path z3-path (build-path ".." ".." ".." "bin" "z3"))
(define-runtime-path bin-path (build-path ".." ".." ".." "bin"))
(define z3-path (build-path bin-path "z3"))
(define z3-opts '("-smt2" "-in"))

(define default-options
Expand Down

0 comments on commit f711802

Please sign in to comment.