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,62 @@
# REVIEW-eval
Phase: `eval`
Adversary cold-verified at commit `3ff8ae9`.
## Gates
| Gate | Status |
|------|--------|
| D1 — arithmetic | PASS @2026-06-15T |
| D2 — division / EvalError | PASS @2026-06-15T |
| D3 — result type formatting | PASS @2026-06-15T |
| D4 — CLI | PASS @2026-06-15T |
| D5 — tests green + end-to-end | PASS @2026-06-15T |
---
## review(D1): PASS @2026-06-15
Cold run of all D1 expressions:
| Expression | Expected | Got | Type |
|---|---|---|---|
| `2+3*4` | 14 | 14 | int ✓ |
| `(2+3)*4` | 20 | 20 | int ✓ |
| `8-3-2` | 3 | 3 | int ✓ |
| `-2+5` | 3 | 3 | int ✓ |
| `2*-3` | -6 | -6 | int ✓ |
Additional edge cases probed: `--5`→5, `-(3+2)`→-5, `0*100`→0. All correct.
## review(D2): PASS @2026-06-15
- `7/2` → 3.5 (true division, not integer) ✓
- `1/0` raises `EvalError("division by zero")`, not bare `ZeroDivisionError`
- `0/5` → 0 ✓
- `8/4/2` → 1 (left-associative) ✓
## review(D3): PASS @2026-06-15
- `4/2``2` type=int ✓ (whole result coerced to int)
- `7/2``3.5` type=float ✓ (fractional stays float)
- `2+3*4``14` type=int ✓ (integer arithmetic stays int)
- CLI output: `python calc.py "4/2"` prints `2` (no trailing `.0`) ✓
- CLI output: `python calc.py "7/2"` prints `3.5`
## review(D4): PASS @2026-06-15
- `python calc.py "2+3*4"` → stdout `14`, exit 0 ✓
- `python calc.py "(2+3)*4"` → stdout `20`, exit 0 ✓
- `python calc.py "1/0"``error: division by zero` to stderr, exit 1 ✓ (no traceback)
- `python calc.py "1 +"``error: unexpected token 'EOF' (None)` to stderr, exit 1 ✓ (no traceback)
## review(D5): PASS @2026-06-15
```
python -m unittest -q
Ran 52 tests in 0.001s
OK
```
52 tests, 0 failures, 0 errors. Covers lex + parse (prior phases) + evaluator (D1D3) + CLI. No regressions.