Skip to content

3.0.0

Compare
Choose a tag to compare
@RyanGlScott RyanGlScott released this 27 Jun 11:43
· 383 commits to master since this release

Language changes

  • Cryptol now includes a redesigned module system that is significantly more expressive than in previous releases. The new module system includes the following features:

    • Nested modules: Modules may now be defined within other modules.

    • Named interfaces: An interface specifies the parameters to a module. Separating the interface from the parameter declarations makes it possible to have different parameters that use the same interface.

    • Top-level module constraints: These are useful to specify constraints between different module parameters (i.e., ones that come from different interfaces or multiple copies of the same interface).

    See the manual section for more information.

  • Declarations may now use numeric constraint guards. This is a feature that allows a function to behave differently depending on its numeric type parameters. See the manual section) for more information.

  • The foreign function interface (FFI) has been added, which allows Cryptol to call functions written in C. See the manual section for more information.

  • The unary - operator now has the same precedence as binary -, meaning expressions like -x^^2 will now parse as -(x^^2) instead of (-x)^^2. This is a breaking change. A warning has been added in cases where the behavior has changed, and can be disabled with :set warnPrefixAssoc=off.

  • Infix operators are now allowed in import lists: import M ((<+>)) will import only the operator <+> from module M.

  • lib/Array.cry now contains an arrayEq primitive. Like the other array-related primitives, this has no computational interpretation (and therefore cannot be used in the Cryptol interpreter), but it is useful for stating specifications that are used in SAW.

New features

  • Add a :time command to benchmark the evaluation time of expressions.

  • Add support for literate Cryptol using reStructuredText. Cryptol code is extracted from .. code-block:: cryptol and .. sourcecode:: cryptol directives.

  • Add a syntax highlight file for Vim, available in syntax-highlight/cryptol.vim

  • Add :new-seed and :set-seed commands to the REPL. These affect random test generation, and help write reproducable Cryptol scripts.

  • Add support for the CVC5 solver, which can be selected with :set prover=cvc5. If you want to specify a What4 or SBV backend, you can use :set prover=w4-cvc5 or :set prover=sbv-cvc5, respectively. (Note that sbv-cvc5 is non-functional on Windows at this time due to a downstream issue with CVC5 1.0.4 and earlier.)

  • Add :file-deps commands to the REPL and Python API. It shows information about the source files and dependencies of modules or Cryptol files.

Bug fixes