Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue851 #855

Merged
merged 3 commits into from
Jul 30, 2020
Merged

Issue851 #855

merged 3 commits into from
Jul 30, 2020

Conversation

brianhuffman
Copy link
Contributor

Rewrite function toExpr using a complete pattern match.

Fixes #851.

I'm still a little unsure about where exactly we should be using panic in this function, and where we should be using fail/guard/mzero.

@brianhuffman brianhuffman requested review from yav and robdockins July 30, 2020 17:56
Copy link
Contributor

@robdockins robdockins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a good improvement to me. My only concern is that it folds in what was a special case for 0-length sequences. It seems like that should be unnecessary, but it makes me suspicious that it is there.

src/Cryptol/Eval/Concrete.hs Show resolved Hide resolved
@brianhuffman brianhuffman merged commit f31ad90 into master Jul 30, 2020
brianhuffman pushed a commit to GaloisInc/cryptol-verifier that referenced this pull request Jul 31, 2020
This is accomplished by defining new dictionary constructors
in Cryptol.sawcore (currently mostly filled with `error` stubs)
and then adding cases to the translator to use them to
discharge class constraints.

NOTE: This revision of cryptol-verifier uses the cryptol library
functions `tIsRational` and `tIsFloat`, which were added in
GaloisInc/cryptol#855.

New instance rules:
  * Eq Rational
  * Cmp Rational
  * Zero Rational
  * Ring Rational
  * Field Rational
  * Round Rational
  * Literal Rational
  * Eq (Float e p)
  * Cmp (Float e p)
  * Field (Float e p)
  * Round (Float e p)
@brianhuffman brianhuffman deleted the issue851 branch September 9, 2020 18:13
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.

type mismatch in Cryptol.Eval.Concrete.toExpr
2 participants