Skip to content

bug: bv_decide regression; proof that worked before now times out, and LRAT file sizes are much larger #5664

Description

@alexkeizer

Prerequisites

Please put an X between the brackets as you perform the following steps:

Description

Consider the following MWE:

import Std.Tactic.BVDecide

example
  (a k n : BitVec 64) :
  n < 18446744073709551615#64 - k →
    ((¬a + k + 1#64 - a ≤ a + k - a ∧ ¬a + k + 1#64 + n - a ≤ a + k - a) ∧
        ¬a - (a + k + 1#64) ≤ a + k + 1#64 + n - (a + k + 1#64)) ∧
      ¬a + k - (a + k + 1#64) ≤ a + k + 1#64 + n - (a + k + 1#64) := by
  bv_decide

On nightly-2024-09-10 this proof worked. On nightly-2024-10-08 it times out instead, even if we double the time limit to 120 seconds.

Context

Example extracted from LNSym, specifically, from Arm/Memory/SeparateProofs.lean.

Steps to Reproduce

  1. Open the MWE in nightly-2024-09-10, observe that the proof goes through
  2. Now change the toolchain to nightly-2024-10-08, and observe that it times out

Expected behavior: I expect the proof to go through

Actual behavior: It times out

Versions

nightly-2024-10-08 is the version with the bad behaviour.

Additional Information

If we use bv_decide? to generate an LRAT in the working version, we get a roughly 12MB file.
Using bv_check with that LRAT in the new version gives a type mismatch, but more surprisingly, if we then use bv_decide? in the new Lean version, it manages to spit out 300+ MB of LRAT before it gets killed (with the 120 second timeout).

We see a similar thing happen in other examples from that same PR, which do manage to go through in the new toolchain, but where the LRAT had to be regenerated and the new file is 10x larger than the old LRAT (in particular, now exceeding GitHub's limit for filesize).

Impact

Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions