Skip to content

Commit f36ae00

Browse files
committed
1 parent c25e0e9 commit f36ae00

11 files changed

Lines changed: 32 additions & 32 deletions

File tree

LiveVerif/src/LiveVerif/LiveProgramLogic.v

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,11 @@ Inductive stepping: Type :=.
101101
Definition ready{P: Prop} := P.
102102

103103
(* heapletwise- and word-aware lia, successor of ZnWords *)
104-
Ltac hwlia := zify_hyps; puri_simpli_zify_hyps true; zify_goal; xlia zchecker.
104+
Ltac hwlia := zify_hyps; puri_simpli_zify_hyps true; zify_goal; mp_lia zchecker.
105105

106-
Ltac2 Set bottom_up_simpl_sidecond_hook := fun _ => ltac1:(zify_goal; xlia zchecker).
106+
Ltac2 Set bottom_up_simpl_sidecond_hook := fun _ => ltac1:(zify_goal; mp_lia zchecker).
107107

108-
Ltac word_lia_hook_for_split_merge ::= zify_goal; xlia zchecker.
108+
Ltac word_lia_hook_for_split_merge ::= zify_goal; mp_lia zchecker.
109109

110110
Ltac intros_until_trace :=
111111
repeat lazymatch goal with
@@ -856,7 +856,7 @@ Ltac conclusion_shape_based_step logger :=
856856
| |- bool_expr_branches _ _ _ _ =>
857857
logger ltac:(fun _ => idtac "Splitting bool_expr_branches");
858858
eapply BoolSpec_expr_branches;
859-
[ first [ eapply contradictory_branch; zify_goal; xlia zchecker
859+
[ first [ eapply contradictory_branch; zify_goal; mp_lia zchecker
860860
| intro ] .. | ]
861861
| |- then_branch_marker ?G =>
862862
logger ltac:(fun _ => idtac "Starting `then` branch");
@@ -1005,7 +1005,7 @@ Ltac sidecond_step logger := first
10051005
end;
10061006
logger ltac:(fun _ => idtac "eexists")
10071007
| (* tried first because it also solves some goals of shape (_ = _) and (_ /\ _) *)
1008-
zify_goal; xlia zchecker;
1008+
zify_goal; mp_lia zchecker;
10091009
logger ltac:(fun _ => idtac "zify_goal; xlia zchecker")
10101010
| safe_implication_step;
10111011
logger ltac:(fun _ => idtac "safe_implication_step")
@@ -1187,7 +1187,7 @@ Ltac predicates_safe_to_cancel hypPred conclPred :=
11871187
| array ?elem ?n2 ?vs2 => lazymatch hypPred with
11881188
| array elem ?n1 ?vs1 =>
11891189
assert_succeeds (idtac; assert (n1 = n2)
1190-
by (zify_goal; xlia zchecker));
1190+
by (zify_goal; mp_lia zchecker));
11911191
tryif is_evar vs2 then unify vs1 vs2 else idtac
11921192
end
11931193
| sepapps nil => lazymatch hypPred with
@@ -1215,7 +1215,7 @@ Ltac is_safe_to_cancel hypClause goalClause :=
12151215
| ?pred2 ?addr2 =>
12161216
first [ constr_eq addr1 addr2
12171217
| assert_succeeds (idtac; assert (addr1 = addr2)
1218-
by (zify_goal; xlia zchecker)) ];
1218+
by (zify_goal; mp_lia zchecker)) ];
12191219
predicates_safe_to_cancel pred1 pred2
12201220
end
12211221
end.

LiveVerif/src/LiveVerifExamples/Tests/SampleSideconds.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ Ltac standalone_solver_step :=
77
(* from step_hook in tree_set: *)
88
| lazymatch goal with
99
| |- ?A \/ ?B =>
10-
tryif (assert_succeeds (assert (~ A) by (zify_hyps; zify_goal; xlia zchecker)))
10+
tryif (assert_succeeds (assert (~ A) by (zify_hyps; zify_goal; mp_lia zchecker)))
1111
then right else
12-
tryif (assert_succeeds (assert (~ B) by (zify_hyps; zify_goal; xlia zchecker)))
12+
tryif (assert_succeeds (assert (~ B) by (zify_hyps; zify_goal; mp_lia zchecker)))
1313
then left else fail
1414
end
1515
| solve [auto 4 with nocore safe_core]

LiveVerif/src/LiveVerifExamples/mini_stagefright.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ Load LiveVerif.
88
Ltac step_hook ::=
99
lazymatch goal with
1010
| |- ?A \/ ?B =>
11-
tryif (assert_succeeds (assert (~ A) by (zify_goal; xlia zchecker)))
11+
tryif (assert_succeeds (assert (~ A) by (zify_goal; mp_lia zchecker)))
1212
then right else
13-
tryif (assert_succeeds (assert (~ B) by (zify_goal; xlia zchecker)))
13+
tryif (assert_succeeds (assert (~ B) by (zify_goal; mp_lia zchecker)))
1414
then left else fail
1515
end.
1616

LiveVerif/src/LiveVerifExamples/nt_uint8_string.v

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,14 @@ Derive strCmp SuchThat (fun_correct! strCmp) As strCmp_ok.
9090
[ | once (typeclasses eauto with purify) ];
9191
specialize (A \[p2' ^- p2_pre]); cbv beta in A;
9292
bottom_up_simpl_in_hyp A;
93-
specialize (A ltac:(zify_hyps; zify_goal; xlia zchecker)).
93+
specialize (A ltac:(zify_hyps; zify_goal; mp_lia zchecker)).
9494

9595
let A := constr:(#array) in
9696
eapply purify_array_ith_elem in A;
9797
[ | once (typeclasses eauto with purify) ];
9898
specialize (A \[p1' ^- p1_pre]); cbv beta in A;
9999
bottom_up_simpl_in_hyp A;
100-
specialize (A ltac:(zify_hyps; zify_goal; xlia zchecker)).
100+
specialize (A ltac:(zify_hyps; zify_goal; mp_lia zchecker)).
101101

102102
destr (\[p1' ^- p1_pre] =? len s1);
103103
destr (\[p2' ^- p2_pre] =? len s2);
@@ -162,7 +162,7 @@ Derive Strcmp SuchThat (fun_correct! Strcmp) As Strcmp_ok.
162162
repeat match goal with
163163
| H: with_mem _ (array _ _ _ _) |- _ =>
164164
eapply array1_to_elem' in H;
165-
[ new_mem_hyp H | zify_goal; xlia zchecker ]
165+
[ new_mem_hyp H | zify_goal; mp_lia zchecker ]
166166
end.
167167
bsimpl_in_hyps.
168168
steps.

LiveVerif/src/LiveVerifExamples/tree_set.v

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ Ltac step_hook ::=
163163
| H: _ |= bst' _ _ ?p, E: ?p = /[0] |- _ =>
164164
assert_fails (has_evar H); eapply (invert_bst'_null E) in H
165165
| H: _ |= bst' _ _ ?p, E: \[?p] = 0 |- _ =>
166-
eapply invert_bst'_null in H; [ | zify_goal; xlia zchecker ]
166+
eapply invert_bst'_null in H; [ | zify_goal; mp_lia zchecker ]
167167
| H: _ |= bst' _ _ ?p, N: ?p <> /[0] |- _ =>
168168
assert_fails (has_evar H); eapply (invert_bst'_nonnull N) in H
169169
| H: ?addr <> /[0] |- context[bst' ?sk_evar _ ?addr] =>
@@ -187,16 +187,16 @@ Ltac step_hook ::=
187187
end
188188
| H: ?res = ?c1 /\ _ \/ ?res = ?c2 /\ _
189189
|- ?res = ?c1 /\ _ \/ ?res = ?c2 /\ _ =>
190-
assert_succeeds (idtac; assert (c1 <> c2) by (zify_goal; xlia zchecker));
190+
assert_succeeds (idtac; assert (c1 <> c2) by (zify_goal; mp_lia zchecker));
191191
destruct H; [left|right]
192192
| |- ?A \/ ?B =>
193-
tryif (assert_succeeds (assert (~ A) by (zify_goal; xlia zchecker)))
193+
tryif (assert_succeeds (assert (~ A) by (zify_goal; mp_lia zchecker)))
194194
then right else
195-
tryif (assert_succeeds (assert (~ B) by (zify_goal; xlia zchecker)))
195+
tryif (assert_succeeds (assert (~ B) by (zify_goal; mp_lia zchecker)))
196196
then left else fail
197197
| H1: ?x <= ?y, H2: ?y <= ?x, C: ?s ?x |- ?s ?y =>
198-
(replace y with x by xlia zchecker); exact C
199-
| H: _ \/ _ |- _ => decompose [and or] H; clear H; try (exfalso; xlia zchecker); []
198+
(replace y with x by mp_lia zchecker); exact C
199+
| H: _ \/ _ |- _ => decompose [and or] H; clear H; try (exfalso; mp_lia zchecker); []
200200
| |- _ => solve [auto 3 with nocore safe_core]
201201
end.
202202

bedrock2/src/bedrock2/PurifyHeapletwise.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Ltac split_and_try_exact :=
1616
end.
1717

1818
Ltac fail_if_too_trivial t :=
19-
assert_fails (idtac; assert t by (split_and_try_exact; xlia zchecker)).
19+
assert_fails (idtac; assert t by (split_and_try_exact; mp_lia zchecker)).
2020

2121
Ltac puri_simpli_zify_hyp fastMode h t :=
2222
let pure := purified_hyp h t in
@@ -55,7 +55,7 @@ Inductive derivability_test_marker: Prop := mk_derivability_test_marker.
5555
Ltac clear_pure_hyp_if_derivable h tp :=
5656
tryif ident_starts_with __pure_ h then
5757
try (clear h; assert_succeeds (idtac; assert tp by
58-
(split_and_try_exact; zify_goal; xlia zchecker)))
58+
(split_and_try_exact; zify_goal; mp_lia zchecker)))
5959
else idtac.
6060

6161
Ltac clear_upto_marker marker :=

bedrock2/src/bedrock2/SepLib.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,6 @@ Require Import bedrock2.unzify.
410410

411411
#[export] Hint Resolve array_nil_is_emp : is_emp.
412412
#[export] Hint Extern 1 (is_emp (array ?elem ?n ?xs ?a) _) =>
413-
eapply (array_0_is_emp elem n xs a ltac:(zify_goal; xlia zchecker)) : is_emp.
413+
eapply (array_0_is_emp elem n xs a ltac:(zify_goal; mp_lia zchecker)) : is_emp.
414414
#[export] Hint Extern 1 (is_emp (array ?elem ?n ? ?a) _) =>
415-
eapply (anyval_array_0_is_emp elem n a ltac:(zify_goal; xlia zchecker)) : is_emp.
415+
eapply (anyval_array_0_is_emp elem n a ltac:(zify_goal; mp_lia zchecker)) : is_emp.

bedrock2/src/bedrock2/bottom_up_simpl_ltac1.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ Ltac debug_sidecond :=
241241
end;
242242
time "Zify.zify" Zify.zify;
243243
refine (@xlia _ _);
244-
time "xlia zchecker" xlia zchecker.
244+
time "xlia zchecker" mp_lia zchecker.
245245

246246
Ltac bottom_up_simpl_sidecond_hook := lia. (* OR xlia zchecker if already zified *)
247247

bedrock2/src/bedrock2/to_from_anybytes.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ Create HintDb fillable.
447447
: fillable.
448448

449449
#[export] Hint Extern 1 (fillable (array ?elem ?n) _) =>
450-
eapply array_fillable; [ xlia zchecker | eauto with fillable ]
450+
eapply array_fillable; [ mp_lia zchecker | eauto with fillable ]
451451
: fillable.
452452

453453
#[export] Hint Extern 20 (contiguous ?p ?n) =>

bedrock2/src/bedrock2/unzify.v

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ Ltac clear_if_dup h :=
787787

788788
Ltac do_clear_Z_hyp_if_derivable h :=
789789
let tp := type of h in
790-
try (clear h; assert_succeeds (idtac; assert tp by xlia zchecker)).
790+
try (clear h; assert_succeeds (idtac; assert tp by mp_lia zchecker)).
791791

792792
Ltac don't_clear_Z_hyp_if_derivable h := idtac.
793793

@@ -845,7 +845,7 @@ Require Import bedrock2.WordNotations. Local Open Scope word_scope.
845845
Section Tests.
846846
Local Set Ltac Backtrace.
847847

848-
Ltac rzify_lia := zify_hyps; zify_goal; xlia zchecker.
848+
Ltac rzify_lia := zify_hyps; zify_goal; mp_lia zchecker.
849849

850850
Goal forall (x y: Z), 0 <= x < y -> y < 2 ^ 32 -> x mod 2 ^ 32 < y mod 2 ^ 32.
851851
Proof. intros. rzify_lia. Succeed Qed. Abort.
@@ -867,7 +867,7 @@ Section Tests.
867867

868868
Goal forall (a b: word),
869869
word.signed (a ^+ b) = word.signed (b ^+ a).
870-
Proof. intros. zify_goal. xlia zchecker. Succeed Qed. Abort.
870+
Proof. intros. zify_goal. mp_lia zchecker. Succeed Qed. Abort.
871871

872872
Goal forall (a b c: word),
873873
word.signed (a ^+ b ^- c) = word.signed (word.opp c ^+ b ^+ a).
@@ -1052,7 +1052,7 @@ Section Tests.
10521052
\[w] = \[if c then /[in1] else /[in2]] ->
10531053
\[w] < 20.
10541054
Proof.
1055-
intros. zify_hyps. zify_goal. Fail xlia zchecker.
1055+
intros. zify_hyps. zify_goal. Fail mp_lia zchecker.
10561056
Abort.
10571057

10581058
Goal forall (left0 right : word) (xs : list word),

0 commit comments

Comments
 (0)