Class UserMutationGenerator

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

public final class UserMutationGenerator extends Object
Mode 2: Mutation Testing. Given a user's working EK9 source, generates mutated variants — each with a single semantic change that preserves compilability but alters behaviour.

EK9-specific mutation categories differ from traditional tools because EK9 has no break/return/continue, is operator-heavy, has tri-state semantics, and enforces purity contracts.

  • Constructor Details

    • UserMutationGenerator

      public UserMutationGenerator()
  • Method Details

    • generate

      public List<UserMutationGenerator.MutationCandidate> generate(String source, int candidateCount, Random random)
      Generate mutation candidates from the given source. Each candidate has exactly one semantic change from the original.
      Parameters:
      source - the original (compilable) EK9 source
      candidateCount - maximum number of candidates to generate
      random - random source for mutation selection
      Returns:
      list of mutation candidates