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

dumptests undocumented #611

Closed
kiniry opened this issue Jun 20, 2019 · 4 comments · Fixed by #1760
Closed

dumptests undocumented #611

kiniry opened this issue Jun 20, 2019 · 4 comments · Fixed by #1760
Assignees
Labels
docs LaTeX, markdown, literate haskell, or in-REPL documentation low-hanging fruit For issues that should be easy to fix priority For issues that should be solved sooner
Milestone

Comments

@kiniry
Copy link
Member

kiniry commented Jun 20, 2019

The dumptests REPL command was added by @david-christiansen, but it is undocumented in Programming Cryptol. There are also no examples of its use shipped with Cryptol.

@kiniry kiniry added docs LaTeX, markdown, literate haskell, or in-REPL documentation low-hanging fruit For issues that should be easy to fix labels Jun 20, 2019
@kiniry kiniry added this to the 2.8.0 milestone Jun 20, 2019
@atomb atomb modified the milestones: 2.8.0, 2.9.0 Sep 3, 2019
@weaversa
Copy link
Collaborator

weaversa commented Jun 3, 2020

Cryptol> :dumptests "test" \(x : [32]) -> x + 1

The expression is not of a testable type.
Type: [32] -> [32]

:dumptests only seems to support functions that return type Bit. I'm feeling like supporting expressions in general (not just theorems) would be helpful. Here I just want to generate some input/output pairs for a function so that when I modify/optimize/etc it I can test to see if I've messed it up.

@atomb atomb modified the milestones: 2.9.0, 3.0.0 Jul 28, 2020
@brianhuffman
Copy link
Contributor

We do have in-REPL documentation for :dumptests. So if we implement #612 to give us an auto-generated markdown file containing all the REPL command help text, we can just include that as an appendix to the book and that should take care of this issue as well.

@kiniry
Copy link
Member Author

kiniry commented Sep 27, 2024

Ensuring that dumpTests is in the Cryptol book and reference manual ASAP is now of high priority. CC @andrew-bivin @mccleeary-galois

@mccleeary-galois
Copy link
Contributor

Cryptol> :dumptests "test" \(x : [32]) -> x + 1

The expression is not of a testable type.
Type: [32] -> [32]

:dumptests only seems to support functions that return type Bit. I'm feeling like supporting expressions in general (not just theorems) would be helpful. Here I just want to generate some input/output pairs for a function so that when I modify/optimize/etc it I can test to see if I've messed it up.

Just an FYI this appears to be the functionality now in which it can work on any function and generate test vectors for you. See example in #1760

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs LaTeX, markdown, literate haskell, or in-REPL documentation low-hanging fruit For issues that should be easy to fix priority For issues that should be solved sooner
Projects
None yet
6 participants