Skip to content

Commit

Permalink
feat: add a way to override solver's executable (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
sorawee authored Dec 11, 2023
1 parent a011857 commit c278da0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions changelogs/unreleased/23-12-11-override-solver.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
added:
- Added the ability to override the solver's executable
by using the environment variable `SOLVER_PATH`
6 changes: 3 additions & 3 deletions picus/solver-helper.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
(picus:log-debug "[solver] smt path: ~a" temp-path)
(picus:log-progress "[solver] solving...")
(define-values (sp out in err)
; (note) use `apply` to expand the last argument
; (apply subprocess #f #f #f (find-executable-path "cvc5") (list temp-path))
(apply subprocess #f #f #f (find-executable-path executable) temp-path options))
(apply subprocess #f #f #f
(or (getenv "SOLVER_PATH") (find-executable-path executable))
temp-path options))

(close-output-port in)

Expand Down

0 comments on commit c278da0

Please sign in to comment.