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

addsimp could do more input checking; printing should not exit the REPL #319

Closed
msaaltink opened this issue Nov 5, 2018 · 1 comment · Fixed by #965
Closed

addsimp could do more input checking; printing should not exit the REPL #319

msaaltink opened this issue Nov 5, 2018 · 1 comment · Fixed by #965
Assignees
Labels
usability An issue that impedes efficient understanding and use
Milestone

Comments

@msaaltink
Copy link
Contributor

OK, I understand that this is an error on my part, adding a theorem that is not an equality to a simpset. That said, it is unfriendly of SAW to exit the REPL after printing this error message.

sawscript> t <- prove_print z3 {{ 1 > 0x0 }};
Valid
sawscript> ss1 <- addsimp t (cryptol_ss ())
sawscript> ss1
Rewrite Rules
=============
saw: ruleOfProp: Predicate not an equation: let { x@1 = Cryptol.TCNum 4
x@2 = Prelude.Vec 4 Prelude.Bool
x@3 = Cryptol.PLiteralSeqBool x@1
}
in Cryptol.ecGt x@2 (Cryptol.PCmpSeqBool x@1)
(Cryptol.ecNumber (Cryptol.TCNum 1) x@2 x@3)
(Cryptol.ecNumber (Cryptol.TCNum 0) x@2 x@3)
CallStack (from HasCallStack):
error, called at src/Verifier/SAW/Rewriter.hs:306:16 in saw-core-0.1-25ujyDMdmUBFqb9n24Ud3k:Verifier.SAW.Rewriter
$

@atomb atomb added the usability An issue that impedes efficient understanding and use label Apr 28, 2020
@atomb atomb added this to the 0.6 milestone May 5, 2020
@brianhuffman brianhuffman self-assigned this May 15, 2020
@atomb atomb modified the milestones: 0.6, 0.7 Aug 31, 2020
@brianhuffman
Copy link
Contributor

As of #954, this error no longer causes the REPL to exit. What we should do is make the error checking happen in addsimp instead of during printing.

brianhuffman pushed a commit to GaloisInc/saw-core that referenced this issue Dec 7, 2020
brianhuffman pushed a commit to GaloisInc/saw-core that referenced this issue Dec 9, 2020
brianhuffman pushed a commit that referenced this issue Dec 9, 2020
This patch includes PR GaloisInc/saw-core#112, which
implements error handling using the Maybe monad for
the creation of rewrite rules from equational theorems.

Fixes #319.
brianhuffman pushed a commit that referenced this issue Dec 9, 2020
This patch includes PR GaloisInc/saw-core#112, which
implements error handling using the Maybe monad for
the creation of rewrite rules from equational theorems.

Fixes #319.
brianhuffman pushed a commit that referenced this issue Dec 9, 2020
This patch includes PR GaloisInc/saw-core#112, which
implements error handling using the Maybe monad for
the creation of rewrite rules from equational theorems.

Fixes #319.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
usability An issue that impedes efficient understanding and use
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants