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

Test parse/pretty-print round tripping with randomly generated ASTs #69

Open
byorgey opened this issue Aug 8, 2017 · 2 comments
Open
Labels
C-Project A larger project that may take multiple days. S-Nice to have Minor importance U-Parsing U-Pretty Printing U-Syntax U-Testing Z-Student Good project for a student.

Comments

@byorgey
Copy link
Member

byorgey commented Aug 8, 2017

This should probably wait until after #61 , otherwise I bet it is going to be a lot of tedious work to get it set up all over again.

@byorgey
Copy link
Member Author

byorgey commented Oct 7, 2017

See also https://hackage.haskell.org/package/tree-diff which might come in handy for displaying test failures?

@byorgey
Copy link
Member Author

byorgey commented Jun 24, 2020

To give more detail: the idea here would be to use a library to generate random ASTs (such as testing-feat, but there are others that may be better/more appropriate, e.g. https://arxiv.org/pdf/1808.01520.pdf , http://hackage.haskell.org/package/dragen . testing-feat in particular seems pretty dead. Some research here would be required.) The random ASTs could be pretty-printed and then parsed, to ensure that we always get back the same AST we started with.

Edit: since writing the above comment I have taken over maintenance of testing-feat (see https://github.com/size-based/) so that is again a viable option.

@byorgey byorgey added the S-Nice to have Minor importance label Jun 24, 2020
@byorgey byorgey changed the title Use testing-feat to test parse/pretty-print round trip Use a random structure generation library to test parse/pretty-print round trip Feb 18, 2022
@byorgey byorgey added the Z-Student Good project for a student. label Apr 5, 2022
@byorgey byorgey changed the title Use a random structure generation library to test parse/pretty-print round trip Test parse/pretty-print round tripping with randomly generated ASTs Oct 14, 2024
@byorgey byorgey added C-Project A larger project that may take multiple days. and removed C-Moderate Effort Should take a moderate amount of time to address. labels Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Project A larger project that may take multiple days. S-Nice to have Minor importance U-Parsing U-Pretty Printing U-Syntax U-Testing Z-Student Good project for a student.
Projects
None yet
Development

No branches or pull requests

1 participant