Skip to content

Commit

Permalink
Fixed type-invariant triggers to also depend on option
Browse files Browse the repository at this point in the history
  • Loading branch information
dewert99 committed Oct 20, 2023
1 parent 41dfd92 commit 519379f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion creusot/src/backend/ty_inv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,12 @@ fn build_inv_axiom<'tcx>(
.unwrap_or_else(|| Exp::mk_true())
};
let trivial = rhs.is_true();
let trigger =
if ctx.opts.simple_triggers { Trigger::single(lhs.clone()) } else { Trigger::NONE };

let axiom = Exp::forall_trig(
vec![("self".into(), translate_ty(ctx, names, DUMMY_SP, ty))],
Trigger::single(lhs.clone()),
trigger,
lhs.eq(rhs),
);
Axiom { name, rewrite: !trivial, axiom }
Expand Down

0 comments on commit 519379f

Please sign in to comment.