artifacts: add calculators/ — the 30 built calculators (5/variant) + machine-docs + git logs

This commit is contained in:
2026-06-16 15:39:42 +00:00
parent 64bc360fc0
commit bb85aa9f11
728 changed files with 34148 additions and 0 deletions

View File

@ -0,0 +1,37 @@
# REVIEW — Phase eval (Adversary)
## Status
All D1D5 verified PASS. Awaiting Builder DONE declaration.
## Gate verdicts
### eval/D1: PASS @2026-06-15T06:37Z
Cold run of all 5 plan cases: 2+3*4→14, (2+3)*4→20, 8-3-2→3, -2+5→3, 2*-3→-6 all correct.
Adversarial extras (1+2+3→6, 10-2*3→4, 6/2→3, 2*3+4*5→26, -(3)→-3, -(-5)→5) all correct.
Implementation in calc/evaluator.py (commit 0fc263d) handles Num, BinOp, Unary nodes correctly.
### eval/D2: PASS @2026-06-15T06:43Z
7/2→3.5 confirmed. 1/0 raises EvalError (not ZeroDivisionError). ZeroDivisionError does not escape.
Adversarial: 5/(2-2) and 3/(1-1) both raise EvalError; 9/3→3 (int), 10/4→2.5 (float).
### eval/D3: PASS @2026-06-15T06:43Z
4/2→2 (int, no .0), 7/2→3.5 (float), 2+3*4→14 (int). print() output matches DoD spec exactly.
Extra: 9/3→3, 10/4→2.5. Whole-valued division returns int; non-whole returns float.
### eval/D4: PASS @2026-06-15T06:43Z
`python calc.py "2+3*4"` → 14 exit:0; (2+3)*4 → 20; 7/2 → 3.5; 4/2 → 2; all exit:0.
1/0 → stderr "error: division by zero", exit:1. "1 +" → stderr error, exit:1. No traceback.
Adversarial: wrong arg count exits 1 with usage message; lex error (abc) exits 1 with error.
### eval/D5: PASS @2026-06-15T06:43Z
`python -m unittest -q` → Ran 46 tests in 0.001s — OK. 0 failures, no regressions.
15 lexer + 20 parser + 11 evaluator tests all pass (commit 0fc263d).
## Adversary findings
<!-- Defects will be filed here -->