Skip to content

Commit

Permalink
btor2: add array ite to parser
Browse files Browse the repository at this point in the history
  • Loading branch information
ekiwi committed Nov 29, 2023
1 parent a9ff34d commit a71aa1c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/btor2/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ impl<'a> Parser<'a> {
if tpe.is_bit_vector() {
self.ctx.bv_ite(a, b, c)
} else {
todo!("Array ITE")
self.ctx.array_ite(a, b, c)
}
}
"write" => self.ctx.array_store(a, b, c),
Expand Down
3 changes: 3 additions & 0 deletions src/ir/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ pub trait ExprNodeConstruction:
fn bv_ite(&mut self, cond: ExprRef, tru: ExprRef, fals: ExprRef) -> ExprRef {
self.add_node(Expr::BVIte { cond, tru, fals })
}
fn array_ite(&mut self, cond: ExprRef, tru: ExprRef, fals: ExprRef) -> ExprRef {
self.add_node(Expr::ArrayIte { cond, tru, fals })
}
fn implies(&mut self, a: ExprRef, b: ExprRef) -> ExprRef {
self.add_node(Expr::BVImplies(a, b))
}
Expand Down

0 comments on commit a71aa1c

Please sign in to comment.