Class MismatchDiagnosticWriter

java.lang.Object
org.ek9lang.compiler.fuzz.MismatchDiagnosticWriter

final class MismatchDiagnosticWriter extends Object
Writes diagnostic files for Strand 4 (targeted mutation) mismatches — cases where expected error codes don't match actual compiler output. Each mismatch is saved as a JSON file for post-analysis.
  • Constructor Details

    • MismatchDiagnosticWriter

      MismatchDiagnosticWriter(Path outputDir)
  • Method Details

    • saveMismatchDiagnostic

      void saveMismatchDiagnostic(String qaId, TypicalError typicalError, Set<String> actualCodes, String mutatedSource, String category, CompilationPhase deepestPhase)
      Save diagnostic information for a Strand 4 mismatch or no-error outcome. Writes: (1) a JSONL line to strand4-mismatches.jsonl, (2) the mutated .ek9 source file.
    • toJsonArray

      static String toJsonArray(Set<String> codes)
    • escapeJson

      static String escapeJson(String text)