Unused lemma significantly slows down verification #437
Replies: 4 comments
-
|
I notice that the problematic lemma, |
Beta Was this translation helpful? Give feedback.
-
|
(As a reminder, we're now using the new Z3 arithmetic solver for nonlinear queries, which appears generally better at discharging nonlinear queries, and still has performance implications, but with different behavior from the old solver.) |
Beta Was this translation helpful? Give feedback.
-
|
@parno It's definitely related to the nonlinear queries. I haven't tried the exact experiment you suggest but during verification, Verus points out that it's waiting for the nonlinear assertions. Chris' fix for #306 may have had an impact on this. I just tested the two most recent Verus commits for verifying just the specific lemma. Before Chris' fix the smt times are 3900ms and 24400ms. After the fix I'm getting 200ms and 1800ms. Still a big difference but both times are a lot faster. Not sure what to make of that. Maybe just instability? |
Beta Was this translation helpful? Give feedback.
-
|
As this is likely a case of instability, I've filed it as one of the instability cases to investigate: #147 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The text below is something I wrote for my thesis. It's an example where simply having a lemma present in the context (but unused) causes verification to slow down a lot. I'm using this as an example of how simply changing the context can have a significant impact on Z3's performance.
But it occurred to me that this may actually be a bug in either Verus or Z3. Maybe related to the triggering weirdness reported in #306?
The text below are the instructions to reproduce that behavior. It likely also happens on newer Verus commits but I haven't checked.
$VNRK_PATHrefers to the path where theverified-nrkernelrepo is.We use Verus at commit 5356d52, the verified-nrkernel repository at
the newest commit on the branch timeout-lemma (https://github.com/utaal/verified-nrkernel/tree/timeout_lemma) and Z3 version 4.10.1.
We first run the command
and observe the following output:
Then we delete lines 43--48 in the file
page-table/pt_impl/l1.rs, which shouldbe the following ones:
Then we rerun the previous command and observe that the verification time is much shorter:
The single largest contributor to the changed verification time is a specific function. With the
following command we verify just that one function.
With lines 43--48 present, we see the following output:
With the lines removed, we see this output:
Beta Was this translation helpful? Give feedback.
All reactions