Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[do not merge] profiling for lia in bsearch.v #98

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion bedrock2/src/Examples/bsearch.v
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,12 @@ Ltac lia3 :=
| |- _ => lia2
end.

Ltac lia4 := PreOmega.zify; rewrite ?Z2Nat.id in *; Z.div_to_equations; blia.
Ltac cond_hyps_factor :=
repeat match goal with
| [ H : ?x -> _, H' : ?x -> _ |- _ ] =>
pose proof (fun u : x => conj (H u) (H' u)); clear H H' end.

Ltac lia4 := PreOmega.zify; rewrite ?Z2Nat.id in *; Z.div_to_equations; cond_hyps_factor; blia.

Module Z.
Lemma mod_mul_l: forall (a b: Z), (b * a) mod b = 0.
Expand Down Expand Up @@ -233,6 +238,7 @@ Ltac unsigned_sidecond :=
wordOps_to_ZModArith;
repeat ZModArith_step ltac:(lia4).

Set Ltac Profiling.

Local Unset Simplex. (* COQBUG(9615) *)
Lemma bsearch_ok : program_logic_goal_for_function! bsearch.
Expand Down Expand Up @@ -306,3 +312,5 @@ Qed.
(* SortedListMap *)

Local Set Simplex.

Goal False. idtac "End of binary search profiling.". Abort.