Log
548351365d73
docs: ADR-41 + ROADMAP/README — 0008-LX-arithmetic structured-input coverage
public
docs: ADR-41 + ROADMAP/README — 0008-LX-arithmetic structured-input coverage
Records that the compliance-level-2 suite required no engine changes: the
ingester already handled <component> nesting, the harness already bound nested
JSON objects as Value::Context, and path access already resolved correctly.
Updates the running suite count to 2961 cases / 96 files.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
modified
DECISIONS.md
+27 −0
@@ -1948,3 +1948,30 @@
1948 1948 - **Unit tests** (`number_literals_rule35` in `lib.rs` ): direct coverage of `.872` , 1949 1949 `-.872` , `1.2e3` , `1E-3` , `.5e2` so the regex widening has non-fixture verification. 1950 1950 **Suite 2946 → 2958.** 1951 + 1952 +## ADR-41: 0008-LX-arithmetic — structured-input + path access (compliance-level-2) 1953 + 1954 +- **Context:** The compliance-level-2 suite `0008-LX-arithmetic` exercises a single 1955 + literal-expression decision `payment` (standard amortized-loan monthly-payment formula) 1956 + over a structured `tLoan` input (`principal` , `rate` , `termMonths : number` ). The 1957 + expression `(loan.principal*loan.rate/12)/(1-(1+loan.rate/12)**-loan.termMonths)` 1958 + combines all five arithmetic operators, unary minus tighter than `**` (ADR-8), and 1959 + path access into a context value. Three test cases vary the loan parameters and 1960 + expect floating-point decimal results. 1961 + 1962 +- **Decision:** Ingest the suite as-is — no engine or ingester changes were required. 1963 + The ingester already converts `<inputNode><component>` children to a nested dict 1964 + (see `parse_input_value` in `tools/ingest_tck.py` ); the test harness binds a nested 1965 + JSON object as `Value::Context` (via `json_to_value` in `fixtures_test.rs` ); path 1966 + access on a context value already resolves correctly; and `fits_slice_grammar` accepts 1967 + the expression because `loan` is a captured input name and `.field` members are 1968 + blanked. Numeric results use `f64_epsilon` comparison (epsilon=1e-8) via the 1969 + `decimal-vs-f64` deviation (ADR-2 / ADR-6). 1970 + 1971 +- **Consequence:** The suite confirms structured-input binding and path-access 1972 + conformance in the fixture-driven test for the first time. The f64 error for the 1973 + loan values (~1e-11 absolute) is well within the 1e-8 epsilon, so no epsilon 1974 + widening was needed. 1975 + 1976 +- **Fixtures ingested:** `0008-LX-arithmetic` (compliance-level-2) — 3 cases, 1977 + `f64_epsilon` . **Suite 2958 → 2961.**
modified
README.md
+3 −2
@@ -137,7 +137,7 @@
137 137 `context put` *overloads* whose name is absent from the single-row table 138 138 (`date(from: …)` , `context put(…, keys: …)` ; see `NAMED_ARG_OVERLOAD_SKIPS` ). 139 139 140 -The fixtures used by the test (95 files, ~2958 self-contained cases) are 140 +The fixtures used by the test (96 files, ~2961 self-contained cases) are 141 141 regenerated by pointing the script at each TCK dir, e.g.: 142 142 143 143 ``` sh
@@ -158,7 +158,8 @@
158 158 -o crates/feel-core/tests/fixtures/0070-instance-of.json 159 159 ``` 160 160 161 -The other ingested dirs include `0100/0101/0102-feel-constants` (compliance-level-2, 161 +The other ingested dirs include `0008-LX-arithmetic` (compliance-level-2, structured-input 162 +loan payment formula; ADR-41), `0100/0101/0102-feel-constants` (compliance-level-2, 162 163 boolean/number/string literal constants; ADR-40), `0105-feel-math` (compliance-level-2), 163 164 `0064` /`0065` /`0066` (and/or/not), `0071-feel-between` , `0075-feel-exponent` , 164 165 `0099-arithmetic-negation` , the single-word `feel-*-function` dirs (ADR-15), and
modified
ROADMAP.md
+7 −1
@@ -7,7 +7,7 @@
7 7 without re-deriving the analysis. 8 8 9 9 Coverage figures are case counts from `tools/ingest_tck.py` over the DMN-TCK 10 -compliance-level-3 suites. Today the fixture suite is **2958 cases / 95 files** 10 +compliance-level-3 suites. Today the fixture suite is **2961 cases / 96 files** 11 11 (`cargo test -p feel-core --test fixtures_test -- --nocapture` ). 12 12 13 13 ---
@@ -262,6 +262,12 @@
262 262 allow a leading-dot mantissa (`.872` ) or an exponent (`1.2e3` ); widened to full 263 263 rule-35 coverage. No ingester or grammar change needed — `fits_slice_grammar` 264 264 already admitted these expressions. **Suite 2946 → 2958.** 265 +- **Structured-input + path access — `0008-LX-arithmetic`** ✅ **shipped (ADR-41).** 266 + `0008-LX-arithmetic` (compliance-level-2) — 3 cases: loan payment formula 267 + `(loan.principal*loan.rate/12)/(1-(1+loan.rate/12)**-loan.termMonths)` with 268 + a structured `tLoan` context input. No engine or ingester change was needed — 269 + `<component>` nesting, `Value::Context` binding, and path access were already 270 + fully operational. **Suite 2958 → 2961.** 265 271 - **Emoji / non-XID names** as bare context keys (`{🐎: "bar"}` , 266 272 `0083-feel-unicode` ) — the lexer accepts XID identifiers only; 2 cases skipped 267 273 (`NON_XID_NAME_SKIPS` ).