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

Suggestion: use shift-validator to avoid early errors #21

Open
bakkot opened this issue May 16, 2021 · 0 comments
Open

Suggestion: use shift-validator to avoid early errors #21

bakkot opened this issue May 16, 2021 · 0 comments

Comments

@bakkot
Copy link

bakkot commented May 16, 2021

I saw in the readme

Ability to generate code without any early errors.

The fact that shift-fuzzer doesn't do this already is a bug, but not one I'm likely to get around to fixing for a while yet. In the mean time, though, you can use shift-validator to confirm that the generated ASTs represent real programs. Its default export tells you if an AST is valid. If you generate an invalid one, you can just re-roll.

Depending on the setup this might be slower than just letting the consumer choke the invalid programs, but it's an option to consider.

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

No branches or pull requests

1 participant