Skip to content

Commit 33e872b

Browse files
committed
feat: add file that shows dramatic delta in instantiateMVars timings.
Shell: 1.59s versus VSCode: 18.5s for "instantiate metavars". tactic execution of Lean.Parser.Tactic.omega took 4.3s instantiate metavars took 1.97s share common exprs took 1.59s type checking took 1.35s process pre-definitions took 1.85s linting took 127ms elaboration took 690ms cumulative profiling times: attribute application 0.00283ms elaboration 690ms fix level params 46.1ms instantiate metavars 1.97s linting 127ms parsing 2.07ms process pre-definitions 1.85s share common exprs 1.59s simp 18.7ms tactic execution 4.3s type checking 1.35s typeclass inference 299ms tactic execution of Lean.Parser.Tactic.omega took 4.08s instantiate metavars took 18.5s share common exprs took 5.04s type checking took 1.09s process pre-definitions took 1.14s linting took 382ms elaboration took 3.06s
1 parent f14c278 commit 33e872b

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
-- from the shell:
2+
-- + tactic execution of Lean.Parser.Tactic.omega took 4.3s
3+
-- + instantiate metavars took 1.97s
4+
-- from VSCode:
5+
-- + tactic execution of Lean.Parser.Tactic.omega took 4.08s
6+
-- + instantiate metavars took 18.5s
7+
8+
set_option maxHeartbeats 0 -- runs out of heartbeats. Maybe that's an indication that the problem cannot be solved?
9+
set_option profiler true
10+
theorem t
11+
(six0 s0x0 : BitVec 64)
12+
(h_six0_nonzero : six0 ≠ 0)
13+
(h_s0x1 : s0x1 + 16#64 * (s0x0 - six0) + 16#64 = s0x1 + 16#64 * (s0x0 - (six0 - 1#64)))
14+
(h_s0x2 : s0x2 + 16#64 * (s0x0 - six0) + 16#64 = s0x2 + 16#64 * (s0x0 - (six0 - 1#64)))
15+
(h_assert_1 : six0 ≤ s0x0)
16+
(h_assert_3 : six1 = s0x1 + 16#64 * (s0x0 - six0))
17+
(h_assert_4 : six2 = s0x2 + 16#64 * (s0x0 - six0))
18+
(n : Nat)
19+
(addr : BitVec 64)
20+
(h_le : (s0x0 - (six0 - 1#64)).toNat ≤ s0x0.toNat)
21+
(h_upper_bound : addr.toNat + n ≤ 2 ^ 64)
22+
(h_upper_bound₂ : s0x2.toNat + s0x0.toNat * 162 ^ 64)
23+
(h_upper_bound₃ : s0x2.toNat + (16#64 * (s0x0 - (six0 - 1#64))).toNat ≤ 2 ^ 64)
24+
(h_width_lt : (16#64).toNat * (s0x0 - (six0 - 1#64)).toNat < 2 ^ 64)
25+
(hmemSeparate_omega : s0x1.toNat + s0x0.toNat * 162 ^ 64
26+
s0x2.toNat + s0x0.toNat * 162 ^ 64
27+
(s0x1.toNat + s0x0.toNat * 16 ≤ s0x2.toNat ∨ s0x1.toNat ≥ s0x2.toNat + s0x0.toNat * 16))
28+
(hmemLegal_omega : s0x1.toNat + s0x0.toNat * 162 ^ 64)
29+
(hmemLegal_omega : s0x2.toNat + s0x0.toNat * 162 ^ 64)
30+
(hmemSeparate_omega : s0x2.toNat + 16 % 2 ^ 64 * ((2 ^ 64 - (2 ^ 64 - 1 % 2 ^ 64 + six0.toNat) % 2 ^ 64 + s0x0.toNat) % 2 ^ 64) % 2 ^ 64
31+
2 ^ 64
32+
addr.toNat + n ≤ 2 ^ 64
33+
(s0x2.toNat +
34+
16 % 2 ^ 64 * ((2 ^ 64 - (2 ^ 64 - 1 % 2 ^ 64 + six0.toNat) % 2 ^ 64 + s0x0.toNat) % 2 ^ 64) % 2 ^ 64
35+
addr.toNat ∨
36+
s0x2.toNat ≥ addr.toNat + n))
37+
(hmemLegal_omega : addr.toNat + n ≤ 2 ^ 64) :
38+
s0x2.toNat + (16#64 * (s0x0 - six0)).toNat ≤ 2 ^ 64
39+
addr.toNat + n ≤ 2 ^ 64
40+
(s0x2.toNat + (16#64 * (s0x0 - six0)).toNat ≤ addr.toNat ∨ s0x2.toNat ≥ addr.toNat + n) := by
41+
bv_omega
42+

0 commit comments

Comments
 (0)