Class CompileClassifier
java.lang.Object
org.ek9lang.compiler.fuzz.CompileClassifier
Handles the compile-check-classify pipeline for fuzz-generated sources.
Manages ANTLR parse gate, in-process compilation through PRE_IR_CHECKS,
error code extraction, and crash classification.
Used by all 5 strands in
FuzzRunner.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final recordResult of a compilation: duplicate info plus the deepest phase reached.(package private) static final recordInformation about a duplicate variable detected during compilation (E50050). -
Constructor Summary
ConstructorsConstructorDescriptionCompileClassifier(Path crashDir, FuzzReporter reporter) Create a new compile classifier. -
Method Summary
Modifier and TypeMethodDescription(package private) List<CompilableSource> buildCompilableSources(List<NamedSource> namedSources) Build compilable sources from the named source list, each marked as dev.(package private) CompileClassifier.CompileResultcompileAndRecord(List<CompilableSource> compilableSources, List<NamedSource> namedSources, SharedThreadContext<CompilableProgram> sharedContext, FileHandling fileHandling, CompilerReporter compilerReporter, FuzzStatistics stats, Set<String> constructs, Set<String> controlFlow) Compile the sources and record results into the statistics collector.(package private) CompileClassifier.CompileResultcompileAndRecord(List<CompilableSource> compilableSources, List<NamedSource> namedSources, SharedThreadContext<CompilableProgram> sharedContext, FileHandling fileHandling, CompilerReporter compilerReporter, FuzzStatistics stats, Set<String> constructs, Set<String> controlFlow, String templateId, String strandId) Compile the sources through PACKAGING_POST_PROCESSING and record outcomes.extractErrorCodes(List<CompilableSource> compilableSources) Extract all error codes from the compiled sources' error listeners.(package private) static booleanCheck if an exception is a known compiler limitation rather than a real bug.(package private) booleanquickParse(String source) Quick ANTLR parse gate: returns true if the source parses without errors.
-
Constructor Details
-
CompileClassifier
CompileClassifier(Path crashDir, FuzzReporter reporter) Create a new compile classifier.- Parameters:
crashDir- directory to save crash-triggering source filesreporter- the fuzz reporter for saving crash files
-
-
Method Details
-
extractErrorCodes
Extract all error codes from the compiled sources' error listeners. -
quickParse
Quick ANTLR parse gate: returns true if the source parses without errors. Used to avoid sending unparseable sources through the full compilation pipeline. -
buildCompilableSources
Build compilable sources from the named source list, each marked as dev. -
isKnownLimitation
Check if an exception is a known compiler limitation rather than a real bug. Known limitations include unimplemented features that throw IllegalArgumentException with "not implemented" in the message.