Skip to content

Commit

Permalink
Consume unsat before proof if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
bpandreotti committed Nov 8, 2023
1 parent 46a5826 commit d869277
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions carcara/src/parser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,12 @@ impl<'a, R: BufRead> Parser<'a, R> {

let mut finished_assumes = false;

// Some solvers print the satisfiability result (unsat) together with the proof. To save the
// user from having to remove this, we consume this first "unsat" token if it exists
if self.current_token == Token::Symbol("unsat".into()) {
self.next_token()?;
}

while self.current_token != Token::Eof {
self.expect_token(Token::OpenParen)?;
let (token, position) = self.next_token()?;
Expand Down

0 comments on commit d869277

Please sign in to comment.