Typeclass system to make saw-core more readable #1845
Labels
needs design
Technical design work is needed for issue to progress
subsystem: saw-core
Issues related to the saw-core representation or the saw-core subsystem
type: feature request
Issues requesting a new feature or capability
usability
An issue that impedes efficient understanding and use
Milestone
If I understand my SAW history correctly, the saw-core language was originally intended as a purely intermediary language, only meant to be read by machines and devs. However, with all the recent development on rewriting proofs, saw-core is increasingly becoming a user-facing language. One major difficulty users have with the language is just how verbose it is – in particular, all the scaffolding of the typeclass system of Cryptol becomes explicit in saw-core, resulting in lots of terms starting with "
P
" (e.g.PSignedCmpSeq
) cluttering up saw-core terms and making them harder to understand.One way we could address this is to add a typeclass system to saw-core, and translate all the various Cryptol typeclasses into saw-core typeclasses. This would make the saw-core terms which are generated from Cryptol smaller, and therefore hopefully easier for users to read and work with.
Relevant to #1844, this change would also enable us to remove the ad-hoc
isort
andqsort
syntax without compromising any of the brevity of the existing saw-core Prelude functions – instead, we would simply addInhabited
andQuantType
typeclasses.There is a larger discussion to be had about what other steps we might want to take to make saw-core a easier for humans to use, but this would be a good first step.
The text was updated successfully, but these errors were encountered: