cryptol/lib/Cryptol
Rob Dockins 5bba75fbb6 Move the Cryptol implementations of pmod, pdiv and pmult into
a new `Cryptol::Reference` module. Change the evaluator API slightly
so that primitives can be bound to expressions, in addition to values.
We can use this to inject the reference implementations of the above
operations into the symbolic evaluators.

Because of the exact way evaluation environments are piped around,
the bound expression will be evaluated in the environment that
the primitive symbol is declared.  So, we can't just reference
the name of the reference implementation when we inject it.
Instead, we abuse the `EWhere` construct to add local definitions
corresponding to the entire module.  This works, but is a bit
unsatisfying, as any top-level CAFs will not be shared across
different invocations.  This doesn't matter for these
functions, but might for e.g, AES.
2020-10-27 10:51:10 -07:00
..
Reference.cry Move the Cryptol implementations of pmod, pdiv and pmult into 2020-10-27 10:51:10 -07:00