-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This patch adds two new SAWCore primitives: * `appendString : String -> String -> String`, which appends the underlying `Text` values in a `String`, and * `bytesToString : (n : Nat) -> Vec n (Vec 8 Bool) -> String`, which converts a Cryptol string (a sequence of 8-bit ASCII characters) to a SAWCore `String`. Moreover, this reimplements `ecError` in terms of `appendString`/`bytesToString` such that invoking the Cryptol `error` function from SAW will preserve the string passed to `error`. Previously, if you invoked the following in SAW: ``` sawscript> prove abc {{ error "Descriptive error message" : Bit }} ``` You would get: ``` Run-time error: encountered call to the Cryptol 'error' function ``` Now, you get: ``` Run-time error: encountered call to the Cryptol 'error' function: Descriptive error message ``` Fixes #1326.
- Loading branch information
1 parent
c8edab3
commit b9c7784
Showing
5 changed files
with
64 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters