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
SAW core cannot currently handle a "module diamond", i.e., importing two modules which both import the same module. As a simplified example, if you start a SAW core file with
import Prelude; import Cryptol;
you will get the error
internal: Duplicate name "Array" being inserted into module linked_list
The issue appears to be that insImport in Verifier.SAW.Module calls insResolvedName on all names that are in scope in a module when that module is imported, including the names that module imports from other modules, and insResolvedName gets mad when the same name is inserted twice.
I think the easiest fix would be to make insResolvedName idempotent, so that two ResolvedNames with the same textual name can be added to the same module as long as they are equal. Another possibility would be to change either the calls to insImport or insImport itself to filter out ResolvedNames that are already in a module.
The text was updated successfully, but these errors were encountered:
SAW core cannot currently handle a "module diamond", i.e., importing two modules which both import the same module. As a simplified example, if you start a SAW core file with
import Prelude; import Cryptol;
you will get the error
internal: Duplicate name "Array" being inserted into module linked_list
The issue appears to be that
insImport
inVerifier.SAW.Module
callsinsResolvedName
on all names that are in scope in a module when that module is imported, including the names that module imports from other modules, andinsResolvedName
gets mad when the same name is inserted twice.I think the easiest fix would be to make
insResolvedName
idempotent, so that twoResolvedName
s with the same textual name can be added to the same module as long as they are equal. Another possibility would be to change either the calls toinsImport
orinsImport
itself to filter outResolvedName
s that are already in a module.The text was updated successfully, but these errors were encountered: