You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the fix for #568, we now add a unique-id to all abstract constants defined with scConstant. However, that has revealed another bug: When we have multiple import statements that import the same cryptol module (possibly via chasing module dependencies) we now get duplicate copies of the constants in the reloaded module. This breaks some of the s2n proof scripts. For example, if we create a file A.cry containing a function foo : [8] -> [8] and import it twice, we get a different foo the second time:
import "A.cry";
let foo1 = {{ foo }};
import "A.cry";
let foo2 = {{ foo }};
prove (offline_unint_smtlib2 ["foo"] "foo") {{ \x -> foo1 x == foo2 x }};
The goal is not provable by reflexivity as it should be. The same thing happens if instead of importing A.cry a second time, we import another module that transitively imports A.cry.
To fix the problem, we need to avoid re-translating previously-loaded cryptol modules to saw-core when we import a new one. References to functions in previously-loaded modules should use the saw-core constants that were defined when the earlier module was loaded.
The text was updated successfully, but these errors were encountered:
Since the fix for #568, we now add a unique-id to all abstract constants defined with
scConstant
. However, that has revealed another bug: When we have multipleimport
statements that import the same cryptol module (possibly via chasing module dependencies) we now get duplicate copies of the constants in the reloaded module. This breaks some of the s2n proof scripts. For example, if we create a fileA.cry
containing a functionfoo : [8] -> [8]
and import it twice, we get a differentfoo
the second time:The generated
foo.prove0.smt2
now contains:The goal is not provable by reflexivity as it should be. The same thing happens if instead of importing
A.cry
a second time, we import another module that transitively importsA.cry
.To fix the problem, we need to avoid re-translating previously-loaded cryptol modules to saw-core when we import a new one. References to functions in previously-loaded modules should use the saw-core constants that were defined when the earlier module was loaded.
The text was updated successfully, but these errors were encountered: