This PR implements the option `mvcgen +jp` to employ a slightly lossy VC encoding for join points that prevents exponential VC blowup incurred by naïve splitting on control flow. ```lean def ifs_pure (n : Nat) : Id Nat := do let mut x := 0 if n > 0 then x := x + 1 else x := x + 2 if n > 1 then x := x + 3 else x := x + 4 if n > 2 then x := x + 1 else x := x + 2 if n > 3 then x := x + 1 else x := x + 2 if n > 4 then x := x + 1 else x := x + 2 if n > 5 then x := x + 1 else x := x + 2 return x theorem ifs_pure_triple : ⦃⌜True⌝⦄ ifs_pure n ⦃⇓ r => ⌜r > 0⌝⦄ := by unfold ifs_pure mvcgen +jp /- ... h✝⁵ : if n > 0 then x✝⁵ = 0 + 1 else x✝⁵ = 0 + 2 h✝⁴ : if n > 1 then x✝⁴ = x✝⁵ + 3 else x✝⁴ = x✝⁵ + 4 h✝³ : if n > 2 then x✝³ = x✝⁴ + 1 else x✝³ = x✝⁴ + 2 h✝² : if n > 3 then x✝² = x✝³ + 1 else x✝² = x✝³ + 2 h✝¹ : if n > 4 then x✝¹ = x✝² + 1 else x✝¹ = x✝² + 2 h✝ : if n > 5 then x✝ = x✝¹ + 1 else x✝ = x✝¹ + 2 ⊢ x✝ > 0 -/ grind ``` |
||
|---|---|---|
| .. | ||
| bench | ||
| compiler | ||
| elabissues | ||
| ir | ||
| lean | ||
| pkg | ||
| playground | ||
| plugin | ||
| simpperf | ||
| .gitignore | ||
| common.sh | ||
| lakefile.toml | ||
| lean-toolchain | ||