Implements the five Push3 mutation operators and the meta-operator for the optimizer evolution pipeline: - mutateConstant: shifts a random integer literal by ±δ (clamped to 0) - swapOperator: swaps ADD↔SUB, MUL↔DIV, GT↔LT, GTE↔LTE - deleteInstruction: removes a random non-EXEC.IF instr; validates result - insertInstruction: inserts stack-neutral pair (push 0 + DYADIC.POP) - crossover: single-point crossover of two programs at instruction boundaries - mutate: applies N random mutations from the four single-program operators All mutations validate output via transpile() symbolic stack simulation. Invalid mutations silently return the original program. 35 unit tests cover all operators, edge cases (empty program, single instruction, deep stack), and the acceptance criterion that mutate(optimizer_v3, 3) produces ≥10 distinct valid variants in 20 trials. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
14 lines
296 B
JSON
14 lines
296 B
JSON
{
|
|
"compilerOptions": {
|
|
"target": "ES2022",
|
|
"module": "CommonJS",
|
|
"moduleResolution": "node",
|
|
"strict": true,
|
|
"esModuleInterop": true,
|
|
"skipLibCheck": true,
|
|
"outDir": "dist",
|
|
"rootDir": "."
|
|
},
|
|
"include": ["./**/*.ts"],
|
|
"exclude": ["node_modules", "dist"]
|
|
}
|