SAWCore fixes for variable name shadowing - #2961
Conversation
fa78881 to
10dee9d
Compare
fa47bc1 to
a9b1341
Compare
|
I located the problem with the ECDSA proof. In the saw-script/saw-central/src/SAWCentral/Proof.hs Lines 619 to 625 in 6ab55c1 Function saw-script/saw-central/src/SAWCentral/Proof.hs Lines 619 to 625 in 6ab55c1 However, this PR made this short-cut case a bit more conservative in the presence of free variables, forcing The quick fix is to strengthen the shortcut case so that it applies at least as often as it used to. However, this is really quite fragile: A mismatch in bound variable names somewhere would cause the super-exponential runtime again. The better fix is to make |
Fixes the second part of #2954.
WHNF evaluation automatically unfolds constant definitions, so the code for unfolding constants in scmConvertible was unreachable. Setting the 'unfoldConst' option to 'False' had no effect, and so we remove it.
a9b1341 to
a3659e1
Compare
Also make early-success condition more precise, to match its earlier behavior.
We also modify the "succeed early" test to be as precise as it was before: The terms are not required to be closed, they just need to avoid the names in the context.
We also update the succeed-early test to be more precise: We don't require the terms to be closed, they just have to avoid variables from the context.
a3659e1 to
b582a41
Compare
This PR fixes a few different SAWCore functions so that they work correctly on terms that have variable name shadowing.
scMatchscmConvertiblealphaEquivFixes #2939. Fixes #2954.
Currently marked as draft until I replace
[VarName]with a more efficient data structure for representing bound variable contexts.