I want to work on java grammar for tree-sitter which seems to be abandoned for a few months. It would be nice to use property-based testing so I thought about whether there are tools which can take a given grammar in some way and be used to generate random AST and code from it.
So the property would look like
data OtherValidJavaAst = undefined
data TreeSitterAst = undefined
transform : TreeSitterAst -> OtherValidJavaAst
genAst : Gen OtherValidAst
genCode : OtherValidAst -> String
parseTreeSitter : String -> TreeSitterAst
parsesEqually : ValidJavaAst -> Boolean
parsesEqually ast = transform (parseTreeSitter (genCode ast)) == ast