Class AtnBasedGenerator
java.lang.Object
org.ek9lang.compiler.fuzz.AtnBasedGenerator
ATN-based random EK9 program generator.
Walks the ANTLR4 ATN (Augmented Transition Network) for the EK9 grammar,
making random choices at decision points to produce syntactically plausible programs.
Uses a template-based approach with ATN-generated details for high content density.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordResult of generating a program, including the source files, constructs, and control flow types used.static final recordA named source file with its filename and generated content. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGenerate a random EK9 program with guaranteed content using template-based generation.generateFromAtn(Random random) Generate a program by pure ATN walking (lower content density but broader grammar coverage).
-
Constructor Details
-
AtnBasedGenerator
public AtnBasedGenerator(int maxDepth)
-
-
Method Details
-
generate
Generate a random EK9 program with guaranteed content using template-based generation. Dispatches by probability: 40% single-file, 25% call-chain, 20% two-file, 15% three-file. -
generateFromAtn
-