Skip to content

Commit

Permalink
fix bug for get_at
Browse files Browse the repository at this point in the history
  • Loading branch information
ekiwi committed Nov 16, 2023
1 parent 587a69f commit 5457bbd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion examples/bmc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ use libpatron::*;
struct Args {
#[arg(short, long)]
verbose: bool,
#[arg(short, long)]
dump_smt: bool,
#[arg(value_name = "BTOR2", index = 1)]
filename: String,
}
Expand All @@ -31,7 +33,7 @@ fn main() {
let checker_opts = mc::SmtModelCheckerOptions {
check_constraints: true,
check_bad_states_individually: true,
save_smt_replay: false,
save_smt_replay: args.dump_smt,
};
let solver = mc::BITWUZLA_CMD;
if args.verbose {
Expand Down
2 changes: 1 addition & 1 deletion src/mc/smt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ impl<'a> TransitionSystemEncoding for UnrollSmtEncoding<'a> {
}
fn get_at(&self, smt_ctx: &mut smt::Context, expr: ExprRef, k: u64) -> smt::SExpr {
assert!(k <= self.current_step.unwrap_or(0));
self.get_local_expr_symbol_at(smt_ctx, expr, self.current_step.unwrap())
self.get_local_expr_symbol_at(smt_ctx, expr, k)
}
}

Expand Down

0 comments on commit 5457bbd

Please sign in to comment.