Class UserMutationGenerator
java.lang.Object
org.ek9lang.compiler.fuzz.UserMutationGenerator
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA mutation candidate: the mutated source with metadata. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGenerate mutation candidates from the given source.
-
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 sourcecandidateCount- maximum number of candidates to generaterandom- random source for mutation selection- Returns:
- list of mutation candidates
-