Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vcanumalla/add stp #2

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
Revert "Skip ASSERT lines during check-sat for STP"
This reverts commit becbfab.
  • Loading branch information
gussmith23 committed Dec 12, 2023
commit 5d5cfae067e036a270b6b8608eb91d513c923ad7
21 changes: 2 additions & 19 deletions rosette/solver/smt/stp.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -58,25 +58,8 @@
(define (solver-pop self [k 1])
(base/solver-pop self k))


(define (solver-check self)
(define (read-solution server env #:unsat-core? [unsat-core? #f])
;;; Ignore the ASSERT lines, if present.
(server-read server
; Peek at the first five characters, which should always be present. They'll either be "unsat" or
; "ASSER", the latter of which is the first five characters of "ASSERT".
(let loop ()
(if (and (not (equal? (peek-string 3 0) "sat"))
(not (equal? (peek-string 5 0) "unsat")))
(begin
(when (not (string-prefix? (read-line) "ASSERT"))
(error "Expected extra line to start with ASSERT"))
(loop))
(void))))
(base/read-solution server env #:unsat-core? unsat-core?))

(base/solver-check self read-solution)
)
(define (solver-check self)
(base/solver-check self))

(define (solver-debug self)
(base/solver-debug self))])
Expand Down