SAW doesn't support importing parameteric Cryptol modules #2208
Labels
missing cryptol features
Issues about features in Cryptol that don't work in SAW
needs test
Issues for which we should add a regression test
subsystem: cryptol-saw-core
Issues related to Cryptol -> saw-core translation with cryptol-saw-core
type: feature request
Issues requesting a new feature or capability
usability
An issue that impedes efficient understanding and use
Milestone
If the user attempts to import a Cryptol source file that contains a parametric Cryptol module, SAW will produce an error.
Example
Assume that a local clone of
cryptol-specs
exists at/home/dummy/cryptol-specs
. The example below produces the subsequent error.Recommendations
The error message indicates the two mitigations a user can perform on the Cryptol to work around this limitation. They can either:
import"](https://galoisinc.github.io/cryptol/master/Modules.html#instantiation-by-parametrizing-declarations), and Cryptol supports a shorthand for performing this refactoring as
module X = Y { _ }`.A mechanism for choosing one of these options and having SAW perform the refactoring without creating a new Cryptol module would be a usability improvement. Alternatively, SAW could always import the module by using mitigation (1) (essentially, creating a module with parameterized declarations internally and then importing that).
In the long term, I believe the most principled approach is extending SAW with an understanding of parametric modules.
The text was updated successfully, but these errors were encountered: