Reduce the use of the fix
function in the Cryptol->SAWCore translation
#2089
Labels
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
unsoundness
Issues that can lead to unsoundness or false verification
Milestone
Currently, all recursive Cryptol functions are translated to SAWCore definitions involving the
fix
primitive. This poses several issues, including:fix
is unsound (see Makesummarize_verification
report whether definitions depend on unsafe primitives or axioms (e.g.,fix
) #2088). We should try to minimize uses offix
so that we can reduce the trusted code base.fix
function cannot be translated to Coq, so the less we usefix
in the Cryptol->SAWCore translation, the more Cryptol definitions we can port to Coq.In order to accomplish this, we will need to identify which recursive Cryptol definitions are guaranteed to terminate after a certain number of iterations and translate them to well-founded recursion primitives in SAWCore. For example, one common pattern is the "take a finite number of elements from an infinite stream pattern", e.g.,
While
[0 ...]
is an infinite sequence (and will never terminate on its own), the overall expressiontake`{5} [0 ...]
does terminate. We should identify this pattern and translate it to a SAWCore term that computes a finite prefix of[0 ...]
.The text was updated successfully, but these errors were encountered: