Skip to content

Preserve more Cryptol numeric predicates in SAWCore types#3202

Draft
brianhuffman wants to merge 10 commits intomasterfrom
bh/cryptol-preserve-props
Draft

Preserve more Cryptol numeric predicates in SAWCore types#3202
brianhuffman wants to merge 10 commits intomasterfrom
bh/cryptol-preserve-props

Conversation

@brianhuffman
Copy link
Copy Markdown
Contributor

WIP

`PEqual` is no longer one of the "erased" proposition types in
the Cryptol importer, which means that any Cryptol function whose
type schema includes a numeric equality constraint will now have
that constraint as an argument in its SAWCore type.
The type of ecFromThenTo in Cryptol.sawcore has changed.
This is just for completeness, as `PTrue` should never actually
show up in any type-checked Cryptol terms.
`PGeq` is no longer one of the "erased" proposition types in
the Cryptol importer, which means that any Cryptol function whose
type schema includes a numeric inequality constraint will now have
that constraint as an argument in its SAWCore type.
Changes are caused by additions to Cryptol.sawcore.
@brianhuffman brianhuffman force-pushed the bh/cryptol-preserve-props branch 2 times, most recently from 355874a to a91522a Compare April 30, 2026 13:57
Any Cryptol function whose type schema includes a numeric
inequality constraint will now have that constraint as an
argument in its SAWCore type.
Any cryptol function whose type includes a `fin` constraint will
now have that constraint as an argument in its SAWCore type.
Translated Cryptol expressions now include proofs for `fin`
constraints.
This exercises the import of all Cryptol numeric
sequence primitives.
@brianhuffman brianhuffman force-pushed the bh/cryptol-preserve-props branch from a91522a to dd64670 Compare April 30, 2026 14:22
@brianhuffman
Copy link
Copy Markdown
Contributor Author

The SAW-exercises test is failing on a call to w4_unint_z3 where the function to be uninterpreted has a polymorphic type with a fin constraint. The way I'd like for this to work is actually very similar to how uninterpreted higher-order functions would work (#906). So I might put this PR on hold until that is done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant