Skip to content
This repository has been archived by the owner on Jun 9, 2021. It is now read-only.

Reimplement saw-core error with userError instead of panic. #61

Merged
merged 1 commit into from
Jul 29, 2020

Conversation

brianhuffman
Copy link
Contributor

This is a quick fix for #59.

Instead of panic, we now throw an asynchronous exception of type EvalError using function userError from module Verifier.SAW.Prim. This is not the perfect solution (throwIO would be better) but it is definitely better than panic, and calling the saw-core error function no longer will cause saw to exit.

@brianhuffman brianhuffman requested a review from robdockins July 29, 2020 19:37
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 an improvement to me.

Odd that Prim.userError doesn't seem to be used anywhere before this patch. I wonder if this was the intended use and it just didn't get hooked up somehow.

@brianhuffman brianhuffman merged commit 702dbfc into master Jul 29, 2020
brianhuffman pushed a commit to GaloisInc/saw-script that referenced this pull request Jul 29, 2020
…w4`.

PR GaloisInc/cryptol#774 changed cryptol's defaulting rules in such
a way that some indexing operators in `test_w4` are assigned different
types. PR GaloisInc/saw-core#61 was then necessary to avoid a panic;
also the out-of-bounds indexing tests have changed from expected
proof success to expected proof failure.
@brianhuffman brianhuffman deleted the issue59 branch October 8, 2020 00:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants