Public repository: timo / feel

Reader

An interpreter of FEEL, written in Rust, with integrations for PostgreSQL, WASM, Lua, and Python.

test(core): ingest DMN-TCK named-argument calls; accept named args in slice detector

public

test(core): ingest DMN-TCK named-argument calls; accept named args in slice detector

Named-argument calls to built-ins are implemented (ADR-23) but the ingester's
slice detector rejected every `f(name: value)` outright, so no TCK named-arg
case was ever exercised by the closed loop.

`fits_slice_grammar` now keeps a named call when its head is a built-in with a
parameter table, blanking the (possibly multi-word) parameter names alongside
context-literal keys in the free-name scan. Two named forms stay out:

  * a named call to a variadic aggregate / varargs builder, which has no named
    form in feel-core (`_NO_NAMED_FORM_BUILTINS`): the spec yields a real value
    but the engine returns error-null, so keeping it would be a false positive;
  * the temporal-constructor / `context put` overloads whose name is absent from
    feel-core's single-row parameter table (`date(from: …)`, `context put(…,
    keys: …)`): documented case-by-case in `NAMED_ARG_OVERLOAD_SKIPS`. Their
    positional forms are still ingested and pass.

A named call to a non-built-in head (a user-defined function) is rejected by the
free-name scan as before. Regenerating the affected fixtures adds 116 named-arg
cases (e.g. `modulo(dividend:10, divisor:4)`, `substring(string:"foobar", start
position:3)`); `cargo test -p feel-core` is green on default and
`--no-default-features`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Changeset956ffd074776f7035ac0836b071e4173f478cddb
Author (claimed)Timo Stolz <timo.stolz@gmail.com>,
Parentsc923cf634f90
Children
Pushlog
by timo via ssh

modified crates/feel-core/tests/fixtures/0050-feel-abs-function.json +17 −0

@@ -43,6 +43,23 @@
4343
     "deviation": null
4444
   },
4545
   {
46
+    "id": "0050-feel-abs-function:006:decision006",
47
+    "expression": "abs(n:-1)",
48
+    "expected": 1.0,
49
+    "expected_type": "number",
50
+    "comparison": "f64_epsilon",
51
+    "deviation": "feel-core uses f64 arithmetic while the DMN/FEEL spec mandates decimal128, and the TCK rounds non-terminating results to a fixed number of decimal places; numeric results are therefore compared with an epsilon tolerance instead of exact equality to avoid false negatives from either source.",
52
+    "epsilon": 1e-08
53
+  },
54
+  {
55
+    "id": "0050-feel-abs-function:007:decision007",
56
+    "expression": "abs(number:-1)",
57
+    "expected": null,
58
+    "expected_type": "null",
59
+    "comparison": "exact",
60
+    "deviation": null
61
+  },
62
+  {
4663
     "id": "0050-feel-abs-function:008:decision008",
4764
     "expression": "abs(null)",
4865
     "expected": null,

modified crates/feel-core/tests/fixtures/0051-feel-sqrt-function.json +17 −0

@@ -42,6 +42,23 @@
4242
     "deviation": null
4343
   },
4444
   {
45
+    "id": "0051-feel-sqrt-function:006:decision006",
46
+    "expression": "sqrt(number:4)",
47
+    "expected": 2.0,
48
+    "expected_type": "number",
49
+    "comparison": "f64_epsilon",
50
+    "deviation": "feel-core uses f64 arithmetic while the DMN/FEEL spec mandates decimal128, and the TCK rounds non-terminating results to a fixed number of decimal places; numeric results are therefore compared with an epsilon tolerance instead of exact equality to avoid false negatives from either source.",
51
+    "epsilon": 1e-08
52
+  },
53
+  {
54
+    "id": "0051-feel-sqrt-function:007:decision007",
55
+    "expression": "sqrt(n:4)",
56
+    "expected": null,
57
+    "expected_type": "null",
58
+    "comparison": "exact",
59
+    "deviation": null
60
+  },
61
+  {
4562
     "id": "0051-feel-sqrt-function:008:decision008",
4663
     "expression": "sqrt(null)",
4764
     "expected": null,

modified crates/feel-core/tests/fixtures/0052-feel-exp-function.json +17 −0

@@ -43,6 +43,23 @@
4343
     "deviation": null
4444
   },
4545
   {
46
+    "id": "0052-feel-exp-function:006:decision006",
47
+    "expression": "exp(number:4)",
48
+    "expected": 54.59815003,
49
+    "expected_type": "number",
50
+    "comparison": "f64_epsilon",
51
+    "deviation": "feel-core uses f64 arithmetic while the DMN/FEEL spec mandates decimal128, and the TCK rounds non-terminating results to a fixed number of decimal places; numeric results are therefore compared with an epsilon tolerance instead of exact equality to avoid false negatives from either source.",
52
+    "epsilon": 1e-08
53
+  },
54
+  {
55
+    "id": "0052-feel-exp-function:007:decision007",
56
+    "expression": "exp(n:4)",
57
+    "expected": null,
58
+    "expected_type": "null",
59
+    "comparison": "exact",
60
+    "deviation": null
61
+  },
62
+  {
4663
     "id": "0052-feel-exp-function:008:decision008",
4764
     "expression": "exp(null)",
4865
     "expected": null,

modified crates/feel-core/tests/fixtures/0053-feel-log-function.json +17 −0

@@ -41,6 +41,23 @@
4141
     "deviation": null
4242
   },
4343
   {
44
+    "id": "0053-feel-log-function:006:decision006",
45
+    "expression": "log(number:4)",
46
+    "expected": 1.38629436,
47
+    "expected_type": "number",
48
+    "comparison": "f64_epsilon",
49
+    "deviation": "feel-core uses f64 arithmetic while the DMN/FEEL spec mandates decimal128, and the TCK rounds non-terminating results to a fixed number of decimal places; numeric results are therefore compared with an epsilon tolerance instead of exact equality to avoid false negatives from either source.",
50
+    "epsilon": 1e-08
51
+  },
52
+  {
53
+    "id": "0053-feel-log-function:007:decision007",
54
+    "expression": "log(n:4)",
55
+    "expected": null,
56
+    "expected_type": "null",
57
+    "comparison": "exact",
58
+    "deviation": null
59
+  },
60
+  {
4461
     "id": "0053-feel-log-function:008:decision008",
4562
     "expression": "log(null)",
4663
     "expected": null,

modified crates/feel-core/tests/fixtures/0054-feel-even-function.json +16 −0

@@ -56,6 +56,22 @@
5656
     "deviation": null
5757
   },
5858
   {
59
+    "id": "0054-feel-even-function:006:decision006",
60
+    "expression": "even(number:4)",
61
+    "expected": true,
62
+    "expected_type": "boolean",
63
+    "comparison": "exact",
64
+    "deviation": null
65
+  },
66
+  {
67
+    "id": "0054-feel-even-function:007:decision007",
68
+    "expression": "even(n:4)",
69
+    "expected": null,
70
+    "expected_type": "null",
71
+    "comparison": "exact",
72
+    "deviation": null
73
+  },
74
+  {
5975
     "id": "0054-feel-even-function:008:decision008",
6076
     "expression": "even(null)",
6177
     "expected": null,

modified crates/feel-core/tests/fixtures/0055-feel-odd-function.json +16 −0

@@ -56,6 +56,22 @@
5656
     "deviation": null
5757
   },
5858
   {
59
+    "id": "0055-feel-odd-function:006:decision006",
60
+    "expression": "odd(number:4)",
61
+    "expected": false,
62
+    "expected_type": "boolean",
63
+    "comparison": "exact",
64
+    "deviation": null
65
+  },
66
+  {
67
+    "id": "0055-feel-odd-function:007:decision007",
68
+    "expression": "odd(n:4)",
69
+    "expected": null,
70
+    "expected_type": "null",
71
+    "comparison": "exact",
72
+    "deviation": null
73
+  },
74
+  {
5975
     "id": "0055-feel-odd-function:008:decision008",
6076
     "expression": "odd(null)",
6177
     "expected": null,

modified crates/feel-core/tests/fixtures/0056-feel-modulo-function.json +17 −0

@@ -62,6 +62,23 @@
6262
   {
6363
     "id": "0056-feel-modulo-function:005_a:decision005_a",
6464
     "expression": "modulo(4,4,4)",
65
+    "expected": null,
66
+    "expected_type": "null",
67
+    "comparison": "exact",
68
+    "deviation": null
69
+  },
70
+  {
71
+    "id": "0056-feel-modulo-function:006:decision006",
72
+    "expression": "modulo(dividend:10, divisor:4)",
73
+    "expected": 2.0,
74
+    "expected_type": "number",
75
+    "comparison": "f64_epsilon",
76
+    "deviation": "feel-core uses f64 arithmetic while the DMN/FEEL spec mandates decimal128, and the TCK rounds non-terminating results to a fixed number of decimal places; numeric results are therefore compared with an epsilon tolerance instead of exact equality to avoid false negatives from either source.",
77
+    "epsilon": 1e-08
78
+  },
79
+  {
80
+    "id": "0056-feel-modulo-function:007:decision007",
81
+    "expression": "modulo(dividend:10, foo:4)",
6582
     "expected": null,
6683
     "expected_type": "null",
6784
     "comparison": "exact",

modified crates/feel-core/tests/fixtures/0058-feel-number-function.json +17 −0

@@ -135,6 +135,23 @@
135135
     "deviation": null
136136
   },
137137
   {
138
+    "id": "0058-feel-number-function:013:decision013",
139
+    "expression": "number(from: \"1.000.000,01\", decimal separator:\",\", grouping separator:\".\")",
140
+    "expected": 1000000.01,
141
+    "expected_type": "number",
142
+    "comparison": "f64_epsilon",
143
+    "deviation": "feel-core uses f64 arithmetic while the DMN/FEEL spec mandates decimal128, and the TCK rounds non-terminating results to a fixed number of decimal places; numeric results are therefore compared with an epsilon tolerance instead of exact equality to avoid false negatives from either source.",
144
+    "epsilon": 1e-08
145
+  },
146
+  {
147
+    "id": "0058-feel-number-function:014:decision014",
148
+    "expression": "number(from: \"1.000.000,01\", decimal sep:\",\", grouping sep:\".\")",
149
+    "expected": null,
150
+    "expected_type": "null",
151
+    "comparison": "exact",
152
+    "deviation": null
153
+  },
154
+  {
138155
     "id": "0058-feel-number-function:015:decision015",
139156
     "expression": "number(\"foo,bar.001\", \".\", \",\")",
140157
     "expected": null,

modified crates/feel-core/tests/fixtures/0067-feel-split-function.json +19 −0

@@ -41,6 +41,25 @@
4141
     "deviation": null
4242
   },
4343
   {
44
+    "id": "0067-feel-split-function:006:decision006",
45
+    "expression": "split(delimiter: \",\", string:\"foo,bar\")",
46
+    "expected": [
47
+      "foo",
48
+      "bar"
49
+    ],
50
+    "expected_type": "list",
51
+    "comparison": "exact",
52
+    "deviation": null
53
+  },
54
+  {
55
+    "id": "0067-feel-split-function:007:decision007",
56
+    "expression": "split(delimiter: \",\", str:\"foo,bar\")",
57
+    "expected": null,
58
+    "expected_type": "null",
59
+    "comparison": "exact",
60
+    "deviation": null
61
+  },
62
+  {
4463
     "id": "0067-feel-split-function:008:decision008",
4564
     "expression": "split(null, null)",
4665
     "expected": null,

modified crates/feel-core/tests/fixtures/0080-feel-getvalue-function.json +16 −0

@@ -42,6 +42,22 @@
4242
   {
4343
     "id": "0080-feel-getvalue-function:decision_006:decision_006",
4444
     "expression": "get value({a: \"foo\"}, 123)",
45
+    "expected": null,
46
+    "expected_type": "null",
47
+    "comparison": "exact",
48
+    "deviation": null
49
+  },
50
+  {
51
+    "id": "0080-feel-getvalue-function:decision_007:decision_007",
52
+    "expression": "get value(key:\"a\", m:{a: \"foo\"})",
53
+    "expected": "foo",
54
+    "expected_type": "string",
55
+    "comparison": "exact",
56
+    "deviation": null
57
+  },
58
+  {
59
+    "id": "0080-feel-getvalue-function:decision_008:decision_008",
60
+    "expression": "get value(k:\"a\", m:{a: \"foo\"})",
4561
     "expected": null,
4662
     "expected_type": "null",
4763
     "comparison": "exact",

modified crates/feel-core/tests/fixtures/0081-feel-getentries-function.json +25 −0

@@ -41,6 +41,31 @@
4141
     "deviation": null
4242
   },
4343
   {
44
+    "id": "0081-feel-getentries-function:decision_005:decision_005",
45
+    "expression": "get entries(m:{a: \"foo\", b: \"bar\"})",
46
+    "expected": [
47
+      {
48
+        "key": "a",
49
+        "value": "foo"
50
+      },
51
+      {
52
+        "key": "b",
53
+        "value": "bar"
54
+      }
55
+    ],
56
+    "expected_type": "list",
57
+    "comparison": "exact",
58
+    "deviation": null
59
+  },
60
+  {
61
+    "id": "0081-feel-getentries-function:decision_006:decision_006",
62
+    "expression": "get entries(map:{a: \"foo\", b: \"bar\"})",
63
+    "expected": null,
64
+    "expected_type": "null",
65
+    "comparison": "exact",
66
+    "deviation": null
67
+  },
68
+  {
4469
     "id": "0081-feel-getentries-function:decision_007:decision_007",
4570
     "expression": "get entries(123)",
4671
     "expected": null,

modified crates/feel-core/tests/fixtures/0095-feel-day-of-year-function.json +42 −0

@@ -51,6 +51,15 @@
5151
     "epsilon": 1e-08
5252
   },
5353
   {
54
+    "id": "0095-feel-day-of-year-function:date_006:date_006",
55
+    "expression": "day of year(date: @\"2019-09-17\")",
56
+    "expected": 260.0,
57
+    "expected_type": "number",
58
+    "comparison": "f64_epsilon",
59
+    "deviation": "feel-core uses f64 arithmetic while the DMN/FEEL spec mandates decimal128, and the TCK rounds non-terminating results to a fixed number of decimal places; numeric results are therefore compared with an epsilon tolerance instead of exact equality to avoid false negatives from either source.",
60
+    "epsilon": 1e-08
61
+  },
62
+  {
5463
     "id": "0095-feel-day-of-year-function:datetime_001:datetime_001",
5564
     "expression": "day of year(@\"1970-01-01T10:10:10\")",
5665
     "expected": 1.0,
@@ -93,6 +102,15 @@
93102
     "epsilon": 1e-08
94103
   },
95104
   {
105
+    "id": "0095-feel-day-of-year-function:datetime_005:datetime_005",
106
+    "expression": "day of year(date: @\"2019-09-17T10:10:10\")",
107
+    "expected": 260.0,
108
+    "expected_type": "number",
109
+    "comparison": "f64_epsilon",
110
+    "deviation": "feel-core uses f64 arithmetic while the DMN/FEEL spec mandates decimal128, and the TCK rounds non-terminating results to a fixed number of decimal places; numeric results are therefore compared with an epsilon tolerance instead of exact equality to avoid false negatives from either source.",
111
+    "epsilon": 1e-08
112
+  },
113
+  {
96114
     "id": "0095-feel-day-of-year-function:null_001:null_001",
97115
     "expression": "day of year(null)",
98116
     "expected": null,
@@ -111,6 +129,30 @@
111129
   {
112130
     "id": "0095-feel-day-of-year-function:null_003:null_003",
113131
     "expression": "day of year(\"foo\")",
132
+    "expected": null,
133
+    "expected_type": "null",
134
+    "comparison": "exact",
135
+    "deviation": null
136
+  },
137
+  {
138
+    "id": "0095-feel-day-of-year-function:null_004:null_004",
139
+    "expression": "day of year(date: null)",
140
+    "expected": null,
141
+    "expected_type": "null",
142
+    "comparison": "exact",
143
+    "deviation": null
144
+  },
145
+  {
146
+    "id": "0095-feel-day-of-year-function:null_005:null_005",
147
+    "expression": "day of year(date: \"foo\")",
148
+    "expected": null,
149
+    "expected_type": "null",
150
+    "comparison": "exact",
151
+    "deviation": null
152
+  },
153
+  {
154
+    "id": "0095-feel-day-of-year-function:null_006:null_006",
155
+    "expression": "day of year(value: @\"1970-01-01\")",
114156
     "expected": null,
115157
     "expected_type": "null",
116158
     "comparison": "exact",

modified crates/feel-core/tests/fixtures/0096-feel-day-of-week-function.json +40 −0

@@ -1,4 +1,20 @@
11
 [
2
+  {
3
+    "id": "0096-feel-day-of-week-function:date_002:date_002",
4
+    "expression": "day of week(date: @\"2019-09-17\")",
5
+    "expected": "Tuesday",
6
+    "expected_type": "string",
7
+    "comparison": "exact",
8
+    "deviation": null
9
+  },
10
+  {
11
+    "id": "0096-feel-day-of-week-function:datetime_002:datetime_002",
12
+    "expression": "day of week(date: @\"2019-09-17T10:10:10\")",
13
+    "expected": "Tuesday",
14
+    "expected_type": "string",
15
+    "comparison": "exact",
16
+    "deviation": null
17
+  },
218
   {
319
     "id": "0096-feel-day-of-week-function:null_001:null_001",
420
     "expression": "day of week(null)",
@@ -24,6 +40,30 @@
2440
     "deviation": null
2541
   },
2642
   {
43
+    "id": "0096-feel-day-of-week-function:null_004:null_004",
44
+    "expression": "day of week(date: null)",
45
+    "expected": null,
46
+    "expected_type": "null",
47
+    "comparison": "exact",
48
+    "deviation": null
49
+  },
50
+  {
51
+    "id": "0096-feel-day-of-week-function:null_005:null_005",
52
+    "expression": "day of week(date: \"foo\")",
53
+    "expected": null,
54
+    "expected_type": "null",
55
+    "comparison": "exact",
56
+    "deviation": null
57
+  },
58
+  {
59
+    "id": "0096-feel-day-of-week-function:null_006:null_006",
60
+    "expression": "day of week(value: @\"1970-01-01\")",
61
+    "expected": null,
62
+    "expected_type": "null",
63
+    "comparison": "exact",
64
+    "deviation": null
65
+  },
66
+  {
2767
     "id": "0096-feel-day-of-week-function:null_007:null_007",
2868
     "expression": "day of week(date_input_001)",
2969
     "expected": null,

modified crates/feel-core/tests/fixtures/0097-feel-month-of-year-function.json +40 −0

@@ -1,4 +1,20 @@
11
 [
2
+  {
3
+    "id": "0097-feel-month-of-year-function:date_002:date_002",
4
+    "expression": "month of year(date: @\"2019-09-17\")",
5
+    "expected": "September",
6
+    "expected_type": "string",
7
+    "comparison": "exact",
8
+    "deviation": null
9
+  },
10
+  {
11
+    "id": "0097-feel-month-of-year-function:datetime_002:datetime_002",
12
+    "expression": "month of year(date: @\"2019-09-17T10:10:10\")",
13
+    "expected": "September",
14
+    "expected_type": "string",
15
+    "comparison": "exact",
16
+    "deviation": null
17
+  },
218
   {
319
     "id": "0097-feel-month-of-year-function:null_001:null_001",
420
     "expression": "month of year(null)",
@@ -24,6 +40,30 @@
2440
     "deviation": null
2541
   },
2642
   {
43
+    "id": "0097-feel-month-of-year-function:null_004:null_004",
44
+    "expression": "month of year(date: null)",
45
+    "expected": null,
46
+    "expected_type": "null",
47
+    "comparison": "exact",
48
+    "deviation": null
49
+  },
50
+  {
51
+    "id": "0097-feel-month-of-year-function:null_005:null_005",
52
+    "expression": "month of year(date: \"foo\")",
53
+    "expected": null,
54
+    "expected_type": "null",
55
+    "comparison": "exact",
56
+    "deviation": null
57
+  },
58
+  {
59
+    "id": "0097-feel-month-of-year-function:null_006:null_006",
60
+    "expression": "month of year(value: @\"1970-01-01\")",
61
+    "expected": null,
62
+    "expected_type": "null",
63
+    "comparison": "exact",
64
+    "deviation": null
65
+  },
66
+  {
2767
     "id": "0097-feel-month-of-year-function:null_007:null_007",
2868
     "expression": "month of year(date_input_001)",
2969
     "expected": null,

modified crates/feel-core/tests/fixtures/0098-feel-week-of-year-function.json +42 −0

@@ -60,6 +60,15 @@
6060
     "epsilon": 1e-08
6161
   },
6262
   {
63
+    "id": "0098-feel-week-of-year-function:date_007:date_007",
64
+    "expression": "week of year(date: @\"2019-09-17\")",
65
+    "expected": 38.0,
66
+    "expected_type": "number",
67
+    "comparison": "f64_epsilon",
68
+    "deviation": "feel-core uses f64 arithmetic while the DMN/FEEL spec mandates decimal128, and the TCK rounds non-terminating results to a fixed number of decimal places; numeric results are therefore compared with an epsilon tolerance instead of exact equality to avoid false negatives from either source.",
69
+    "epsilon": 1e-08
70
+  },
71
+  {
6372
     "id": "0098-feel-week-of-year-function:datetime_001:datetime_001",
6473
     "expression": "week of year(@\"1970-01-01T10:10:10\")",
6574
     "expected": 1.0,
@@ -81,6 +90,15 @@
8190
         "@value": "1970-01-01T10:10:10"
8291
       }
8392
     },
93
+    "epsilon": 1e-08
94
+  },
95
+  {
96
+    "id": "0098-feel-week-of-year-function:datetime_005:datetime_005",
97
+    "expression": "week of year(date: @\"2019-09-17T10:10:10\")",
98
+    "expected": 38.0,
99
+    "expected_type": "number",
100
+    "comparison": "f64_epsilon",
101
+    "deviation": "feel-core uses f64 arithmetic while the DMN/FEEL spec mandates decimal128, and the TCK rounds non-terminating results to a fixed number of decimal places; numeric results are therefore compared with an epsilon tolerance instead of exact equality to avoid false negatives from either source.",
84102
     "epsilon": 1e-08
85103
   },
86104
   {
@@ -108,6 +126,30 @@
108126
     "deviation": null
109127
   },
110128
   {
129
+    "id": "0098-feel-week-of-year-function:null_004:null_004",
130
+    "expression": "week of year(date: null)",
131
+    "expected": null,
132
+    "expected_type": "null",
133
+    "comparison": "exact",
134
+    "deviation": null
135
+  },
136
+  {
137
+    "id": "0098-feel-week-of-year-function:null_005:null_005",
138
+    "expression": "week of year(date: \"foo\")",
139
+    "expected": null,
140
+    "expected_type": "null",
141
+    "comparison": "exact",
142
+    "deviation": null
143
+  },
144
+  {
145
+    "id": "0098-feel-week-of-year-function:null_006:null_006",
146
+    "expression": "week of year(value: @\"1970-01-01\")",
147
+    "expected": null,
148
+    "expected_type": "null",
149
+    "comparison": "exact",
150
+    "deviation": null
151
+  },
152
+  {
111153
     "id": "0098-feel-week-of-year-function:null_007:null_007",
112154
     "expression": "week of year(date_input_001)",
113155
     "expected": null,

modified crates/feel-core/tests/fixtures/1100-feel-decimal-function.json +18 −0

@@ -70,5 +70,23 @@
7070
     "comparison": "f64_epsilon",
7171
     "deviation": "feel-core uses f64 arithmetic while the DMN/FEEL spec mandates decimal128; numeric results are compared with an epsilon tolerance instead of exact equality to avoid false negatives from binary floating-point rounding.",
7272
     "epsilon": 1e-09
73
+  },
74
+  {
75
+    "id": "1100-feel-decimal-function:009_398b94286e:feel-decimal-function_009_398b94286e",
76
+    "expression": "decimal(n:15/7,scale:3)",
77
+    "expected": 2.143,
78
+    "expected_type": "number",
79
+    "comparison": "f64_epsilon",
80
+    "deviation": "feel-core uses f64 arithmetic while the DMN/FEEL spec mandates decimal128, and the TCK rounds non-terminating results to a fixed number of decimal places; numeric results are therefore compared with an epsilon tolerance instead of exact equality to avoid false negatives from either source.",
81
+    "epsilon": 1e-08
82
+  },
83
+  {
84
+    "id": "1100-feel-decimal-function:010_4b46e59c8b:feel-decimal-function_010_4b46e59c8b",
85
+    "expression": "decimal(n:15/78*2,scale:3)",
86
+    "expected": 0.385,
87
+    "expected_type": "number",
88
+    "comparison": "f64_epsilon",
89
+    "deviation": "feel-core uses f64 arithmetic while the DMN/FEEL spec mandates decimal128, and the TCK rounds non-terminating results to a fixed number of decimal places; numeric results are therefore compared with an epsilon tolerance instead of exact equality to avoid false negatives from either source.",
90
+    "epsilon": 1e-08
7391
   }
7492
 ]

modified crates/feel-core/tests/fixtures/1101-feel-floor-function.json +48 −0

@@ -53,8 +53,24 @@
5353
     "deviation": null
5454
   },
5555
   {
56
+    "id": "1101-feel-floor-function:007:decision007",
57
+    "expression": "floor(n:null, scale:1)",
58
+    "expected": null,
59
+    "expected_type": "null",
60
+    "comparison": "exact",
61
+    "deviation": null
62
+  },
63
+  {
5664
     "id": "1101-feel-floor-function:008:decision008",
5765
     "expression": "floor(1.56, null)",
66
+    "expected": null,
67
+    "expected_type": "null",
68
+    "comparison": "exact",
69
+    "deviation": null
70
+  },
71
+  {
72
+    "id": "1101-feel-floor-function:009:decision009",
73
+    "expression": "floor(n:1.56, scale:null)",
5874
     "expected": null,
5975
     "expected_type": "null",
6076
     "comparison": "exact",
@@ -77,6 +93,22 @@
7793
     "deviation": null
7894
   },
7995
   {
96
+    "id": "1101-feel-floor-function:012:decision012",
97
+    "expression": "floor(n:1.5, scale:1, stuff:2)",
98
+    "expected": null,
99
+    "expected_type": "null",
100
+    "comparison": "exact",
101
+    "deviation": null
102
+  },
103
+  {
104
+    "id": "1101-feel-floor-function:013:decision013",
105
+    "expression": "floor(n:1.5, scal:1)",
106
+    "expected": null,
107
+    "expected_type": "null",
108
+    "comparison": "exact",
109
+    "deviation": null
110
+  },
111
+  {
80112
     "id": "1101-feel-floor-function:014:decision014",
81113
     "expression": "floor(\"1.5\")",
82114
     "expected": null,
@@ -91,5 +123,21 @@
91123
     "expected_type": "null",
92124
     "comparison": "exact",
93125
     "deviation": null
126
+  },
127
+  {
128
+    "id": "1101-feel-floor-function:016:decision016",
129
+    "expression": "floor(n:\"1.5\")",
130
+    "expected": null,
131
+    "expected_type": "null",
132
+    "comparison": "exact",
133
+    "deviation": null
134
+  },
135
+  {
136
+    "id": "1101-feel-floor-function:017:decision017",
137
+    "expression": "floor(n:1.5, scale:\"1\")",
138
+    "expected": null,
139
+    "expected_type": "null",
140
+    "comparison": "exact",
141
+    "deviation": null
94142
   }
95143
 ]

modified crates/feel-core/tests/fixtures/1102-feel-ceiling-function.json +48 −0

@@ -53,8 +53,24 @@
5353
     "deviation": null
5454
   },
5555
   {
56
+    "id": "1102-feel-ceiling-function:007:decision007",
57
+    "expression": "ceiling(n:null, scale:1)",
58
+    "expected": null,
59
+    "expected_type": "null",
60
+    "comparison": "exact",
61
+    "deviation": null
62
+  },
63
+  {
5664
     "id": "1102-feel-ceiling-function:008:decision008",
5765
     "expression": "ceiling(1.56, null)",
66
+    "expected": null,
67
+    "expected_type": "null",
68
+    "comparison": "exact",
69
+    "deviation": null
70
+  },
71
+  {
72
+    "id": "1102-feel-ceiling-function:009:decision009",
73
+    "expression": "ceiling(n:1.56, scale:null)",
5874
     "expected": null,
5975
     "expected_type": "null",
6076
     "comparison": "exact",
@@ -77,6 +93,22 @@
7793
     "deviation": null
7894
   },
7995
   {
96
+    "id": "1102-feel-ceiling-function:012:decision012",
97
+    "expression": "ceiling(n:1.5, scale:1, stuff:2)",
98
+    "expected": null,
99
+    "expected_type": "null",
100
+    "comparison": "exact",
101
+    "deviation": null
102
+  },
103
+  {
104
+    "id": "1102-feel-ceiling-function:013:decision013",
105
+    "expression": "ceiling(n:1.5, scal:1)",
106
+    "expected": null,
107
+    "expected_type": "null",
108
+    "comparison": "exact",
109
+    "deviation": null
110
+  },
111
+  {
80112
     "id": "1102-feel-ceiling-function:014:decision014",
81113
     "expression": "ceiling(\"1.5\")",
82114
     "expected": null,
@@ -91,5 +123,21 @@
91123
     "expected_type": "null",
92124
     "comparison": "exact",
93125
     "deviation": null
126
+  },
127
+  {
128
+    "id": "1102-feel-ceiling-function:016:decision016",
129
+    "expression": "ceiling(n:\"1.5\")",
130
+    "expected": null,
131
+    "expected_type": "null",
132
+    "comparison": "exact",
133
+    "deviation": null
134
+  },
135
+  {
136
+    "id": "1102-feel-ceiling-function:017:decision017",
137
+    "expression": "ceiling(n:1.5, scale:\"1\")",
138
+    "expected": null,
139
+    "expected_type": "null",
140
+    "comparison": "exact",
141
+    "deviation": null
94142
   }
95143
 ]

modified crates/feel-core/tests/fixtures/1103-feel-substring-function.json +8 −0

@@ -78,5 +78,13 @@
7878
     "expected_type": "string",
7979
     "comparison": "exact",
8080
     "deviation": null
81
+  },
82
+  {
83
+    "id": "1103-feel-substring-function:011_a559ce6410:feel-substring-function_011_a559ce6410",
84
+    "expression": "substring(string:\"foobar\",start position :3)",
85
+    "expected": "obar",
86
+    "expected_type": "string",
87
+    "comparison": "exact",
88
+    "deviation": null
8189
   }
8290
 ]

modified crates/feel-core/tests/fixtures/1104-feel-string-length-function.json +27 −0

@@ -25,5 +25,32 @@
2525
     "comparison": "f64_epsilon",
2626
     "deviation": "feel-core uses f64 arithmetic while the DMN/FEEL spec mandates decimal128, and the TCK rounds non-terminating results to a fixed number of decimal places; numeric results are therefore compared with an epsilon tolerance instead of exact equality to avoid false negatives from either source.",
2727
     "epsilon": 1e-08
28
+  },
29
+  {
30
+    "id": "1104-feel-string-length-function:004_f4c02fac3d:feel-string-length-function_004_f4c02fac3d",
31
+    "expression": "string length(string:\"xyz123\")",
32
+    "expected": 6.0,
33
+    "expected_type": "number",
34
+    "comparison": "f64_epsilon",
35
+    "deviation": "feel-core uses f64 arithmetic while the DMN/FEEL spec mandates decimal128, and the TCK rounds non-terminating results to a fixed number of decimal places; numeric results are therefore compared with an epsilon tolerance instead of exact equality to avoid false negatives from either source.",
36
+    "epsilon": 1e-08
37
+  },
38
+  {
39
+    "id": "1104-feel-string-length-function:005_ca834dabac:feel-string-length-function_005_ca834dabac",
40
+    "expression": "string length(string:\"aaaaa dddd\")",
41
+    "expected": 10.0,
42
+    "expected_type": "number",
43
+    "comparison": "f64_epsilon",
44
+    "deviation": "feel-core uses f64 arithmetic while the DMN/FEEL spec mandates decimal128, and the TCK rounds non-terminating results to a fixed number of decimal places; numeric results are therefore compared with an epsilon tolerance instead of exact equality to avoid false negatives from either source.",
45
+    "epsilon": 1e-08
46
+  },
47
+  {
48
+    "id": "1104-feel-string-length-function:006_6c4930a0eb:feel-string-length-function_006_6c4930a0eb",
49
+    "expression": "string length(string:\"aaaaa dddd \")",
50
+    "expected": 11.0,
51
+    "expected_type": "number",
52
+    "comparison": "f64_epsilon",
53
+    "deviation": "feel-core uses f64 arithmetic while the DMN/FEEL spec mandates decimal128, and the TCK rounds non-terminating results to a fixed number of decimal places; numeric results are therefore compared with an epsilon tolerance instead of exact equality to avoid false negatives from either source.",
54
+    "epsilon": 1e-08
2855
   }
2956
 ]

modified crates/feel-core/tests/fixtures/1105-feel-upper-case-function.json +24 −0

@@ -38,5 +38,29 @@
3838
     "expected_type": "string",
3939
     "comparison": "exact",
4040
     "deviation": null
41
+  },
42
+  {
43
+    "id": "1105-feel-upper-case-function:006_d9bd3c14bc:feel-upper-case-function_006_d9bd3c14bc",
44
+    "expression": "upper case(string:\"AbDcF\")",
45
+    "expected": "ABDCF",
46
+    "expected_type": "string",
47
+    "comparison": "exact",
48
+    "deviation": null
49
+  },
50
+  {
51
+    "id": "1105-feel-upper-case-function:007_31fc6c1967:feel-upper-case-function_007_31fc6c1967",
52
+    "expression": "upper case(string:\"xyZ \")",
53
+    "expected": "XYZ ",
54
+    "expected_type": "string",
55
+    "comparison": "exact",
56
+    "deviation": null
57
+  },
58
+  {
59
+    "id": "1105-feel-upper-case-function:008_26e369a9d9:feel-upper-case-function_008_26e369a9d9",
60
+    "expression": "upper case(string:\"123ABC\")",
61
+    "expected": "123ABC",
62
+    "expected_type": "string",
63
+    "comparison": "exact",
64
+    "deviation": null
4165
   }
4266
 ]

modified crates/feel-core/tests/fixtures/1106-feel-lower-case-function.json +24 −0

@@ -46,5 +46,29 @@
4646
     "expected_type": "string",
4747
     "comparison": "exact",
4848
     "deviation": null
49
+  },
50
+  {
51
+    "id": "1106-feel-lower-case-function:007_a2ce59499a:feel-lower-case-function_007_a2ce59499a",
52
+    "expression": "lower case(string:\"AbDcF\")",
53
+    "expected": "abdcf",
54
+    "expected_type": "string",
55
+    "comparison": "exact",
56
+    "deviation": null
57
+  },
58
+  {
59
+    "id": "1106-feel-lower-case-function:008_9913ad454f:feel-lower-case-function_008_9913ad454f",
60
+    "expression": "lower case(string:\"xyZ \")",
61
+    "expected": "xyz ",
62
+    "expected_type": "string",
63
+    "comparison": "exact",
64
+    "deviation": null
65
+  },
66
+  {
67
+    "id": "1106-feel-lower-case-function:009_78e6b2969b:feel-lower-case-function_009_78e6b2969b",
68
+    "expression": "lower case(string:\"123ABC\")",
69
+    "expected": "123abc",
70
+    "expected_type": "string",
71
+    "comparison": "exact",
72
+    "deviation": null
4973
   }
5074
 ]

modified crates/feel-core/tests/fixtures/1107-feel-substring-before-function.json +16 −0

@@ -54,5 +54,21 @@
5454
     "expected_type": "string",
5555
     "comparison": "exact",
5656
     "deviation": null
57
+  },
58
+  {
59
+    "id": "1107-feel-substring-before-function:008_501b0a5990:feel-substring-before-function_008_501b0a5990",
60
+    "expression": "substring before(string:\"foobar\",match:\"bar\")",
61
+    "expected": "foo",
62
+    "expected_type": "string",
63
+    "comparison": "exact",
64
+    "deviation": null
65
+  },
66
+  {
67
+    "id": "1107-feel-substring-before-function:009_a79c5a4111:feel-substring-before-function_009_a79c5a4111",
68
+    "expression": "substring before(string:\"foobar\",match:\"b\")",
69
+    "expected": "foo",
70
+    "expected_type": "string",
71
+    "comparison": "exact",
72
+    "deviation": null
5773
   }
5874
 ]

modified crates/feel-core/tests/fixtures/1108-feel-substring-after-function.json +16 −0

@@ -62,5 +62,21 @@
6262
     "expected_type": "string",
6363
     "comparison": "exact",
6464
     "deviation": null
65
+  },
66
+  {
67
+    "id": "1108-feel-substring-after-function:009_712fe2842f:feel-substring-after-function_009_712fe2842f",
68
+    "expression": "substring after(string:\"foobar\",match:\"ob\")",
69
+    "expected": "ar",
70
+    "expected_type": "string",
71
+    "comparison": "exact",
72
+    "deviation": null
73
+  },
74
+  {
75
+    "id": "1108-feel-substring-after-function:010_40e159d07a:feel-substring-after-function_010_40e159d07a",
76
+    "expression": "substring after(string:\"foobar\",match:\"b\")",
77
+    "expected": "ar",
78
+    "expected_type": "string",
79
+    "comparison": "exact",
80
+    "deviation": null
6581
   }
6682
 ]

modified crates/feel-core/tests/fixtures/1109-feel-replace-function.json +32 −0

@@ -190,5 +190,37 @@
190190
     "expected_type": "string",
191191
     "comparison": "exact",
192192
     "deviation": null
193
+  },
194
+  {
195
+    "id": "1109-feel-replace-function:025_b7f9525875:feel-replace-function_025_b7f9525875",
196
+    "expression": "replace(input:\"abc\",pattern:\"[a-z]\",replacement:\"#\")",
197
+    "expected": "###",
198
+    "expected_type": "string",
199
+    "comparison": "exact",
200
+    "deviation": null
201
+  },
202
+  {
203
+    "id": "1109-feel-replace-function:026_acb176590a:feel-replace-function_026_acb176590a",
204
+    "expression": "replace(input:\"abc\",pattern:\"[A-Z]\",replacement:\"#\",flags:\"\")",
205
+    "expected": "abc",
206
+    "expected_type": "string",
207
+    "comparison": "exact",
208
+    "deviation": null
209
+  },
210
+  {
211
+    "id": "1109-feel-replace-function:027_d8d25f40e5:feel-replace-function_027_d8d25f40e5",
212
+    "expression": "replace(input:\"abc\",pattern:\"[A-Z]\",replacement:\"#\",flags:\"i\")",
213
+    "expected": "###",
214
+    "expected_type": "string",
215
+    "comparison": "exact",
216
+    "deviation": null
217
+  },
218
+  {
219
+    "id": "1109-feel-replace-function:028_96e8c698af:feel-replace-function_028_96e8c698af",
220
+    "expression": "replace(input:\"abc\",pattern:\".^[d-z]*\",replacement:\"#\",flags:\"smix\")",
221
+    "expected": "abc",
222
+    "expected_type": "string",
223
+    "comparison": "exact",
224
+    "deviation": null
193225
   }
194226
 ]

modified crates/feel-core/tests/fixtures/1110-feel-contains-function.json +16 −0

@@ -62,5 +62,21 @@
6262
     "expected_type": "boolean",
6363
     "comparison": "exact",
6464
     "deviation": null
65
+  },
66
+  {
67
+    "id": "1110-feel-contains-function:009_c4b50ad623:feel-contains-function_009_c4b50ad623",
68
+    "expression": "contains(string:\"foobar\",match:\"bar\")",
69
+    "expected": true,
70
+    "expected_type": "boolean",
71
+    "comparison": "exact",
72
+    "deviation": null
73
+  },
74
+  {
75
+    "id": "1110-feel-contains-function:010_9ae03e0e59:feel-contains-function_010_9ae03e0e59",
76
+    "expression": "contains(string:\"foobar\",match:\"b\")",
77
+    "expected": true,
78
+    "expected_type": "boolean",
79
+    "comparison": "exact",
80
+    "deviation": null
6581
   }
6682
 ]

modified crates/feel-core/tests/fixtures/1115-feel-date-function.json +8 −0

@@ -358,5 +358,13 @@
358358
     "expected_type": "null",
359359
     "comparison": "exact",
360360
     "deviation": null
361
+  },
362
+  {
363
+    "id": "1115-feel-date-function:052_63457d78b7:feel-date-function_052_63457d78b7",
364
+    "expression": "date(year:2017,month:08,day:30)",
365
+    "expected": "2017-08-30",
366
+    "expected_type": "date",
367
+    "comparison": "exact",
368
+    "deviation": "Temporal result compared in feel-core's canonical ISO-8601 form (ADR-18). feel-core backs temporal values with jiff; at the wrappers they cross the boundary as ISO-8601 strings, so PostgreSQL can cast to date/timestamptz/interval (ADR-5's interval mapping) and WASM can return JS Date objects."
361369
   }
362370
 ]

modified crates/feel-core/tests/fixtures/1116-feel-time-function.json +16 −0

@@ -630,5 +630,21 @@
630630
     "expected_type": "null",
631631
     "comparison": "exact",
632632
     "deviation": null
633
+  },
634
+  {
635
+    "id": "1116-feel-time-function:082_36a78e5396:feel-time-function_082_36a78e5396",
636
+    "expression": "time(hour:11, minute:59, second:0, offset: duration(\"PT2H1M0S\"))",
637
+    "expected": "11:59:00+02:01",
638
+    "expected_type": "time",
639
+    "comparison": "exact",
640
+    "deviation": "Temporal result compared in feel-core's canonical ISO-8601 form (ADR-18). feel-core backs temporal values with jiff; at the wrappers they cross the boundary as ISO-8601 strings, so PostgreSQL can cast to date/timestamptz/interval (ADR-5's interval mapping) and WASM can return JS Date objects."
641
+  },
642
+  {
643
+    "id": "1116-feel-time-function:083_6b608254c7:feel-time-function_083_6b608254c7",
644
+    "expression": "time(hour:11, minute:59, second:0, offset: duration(\"-PT2H\"))",
645
+    "expected": "11:59:00-02:00",
646
+    "expected_type": "time",
647
+    "comparison": "exact",
648
+    "deviation": "Temporal result compared in feel-core's canonical ISO-8601 form (ADR-18). feel-core backs temporal values with jiff; at the wrappers they cross the boundary as ISO-8601 strings, so PostgreSQL can cast to date/timestamptz/interval (ADR-5's interval mapping) and WASM can return JS Date objects."
633649
   }
634650
 ]

modified crates/feel-core/tests/fixtures/1117-feel-date-and-time-function.json +16 −0

@@ -646,5 +646,21 @@
646646
     "expected_type": "null",
647647
     "comparison": "exact",
648648
     "deviation": null
649
+  },
650
+  {
651
+    "id": "1117-feel-date-and-time-function:087_e9fd32063a:feel-date-and-time-function_087_e9fd32063a",
652
+    "expression": "date and time(date:date(\"2017-01-01\"),time:time(\"23:59:01\"))",
653
+    "expected": "2017-01-01T23:59:01",
654
+    "expected_type": "date and time",
655
+    "comparison": "exact",
656
+    "deviation": "Temporal result compared in feel-core's canonical ISO-8601 form (ADR-18). feel-core backs temporal values with jiff; at the wrappers they cross the boundary as ISO-8601 strings, so PostgreSQL can cast to date/timestamptz/interval (ADR-5's interval mapping) and WASM can return JS Date objects."
657
+  },
658
+  {
659
+    "id": "1117-feel-date-and-time-function:088_1db0287718:feel-date-and-time-function_088_1db0287718",
660
+    "expression": "date and time(date:date and time(\"2017-01-01T00:00:00\"),time:time(\"23:59:01\"))",
661
+    "expected": "2017-01-01T23:59:01",
662
+    "expected_type": "date and time",
663
+    "comparison": "exact",
664
+    "deviation": "Temporal result compared in feel-core's canonical ISO-8601 form (ADR-18). feel-core backs temporal values with jiff; at the wrappers they cross the boundary as ISO-8601 strings, so PostgreSQL can cast to date/timestamptz/interval (ADR-5's interval mapping) and WASM can return JS Date objects."
649665
   }
650666
 ]

modified crates/feel-core/tests/fixtures/1120-feel-duration-function.json +24 −0

@@ -256,6 +256,30 @@
256256
     "deviation": "Temporal result compared in feel-core's canonical ISO-8601 form (ADR-18). feel-core backs temporal values with jiff; at the wrappers they cross the boundary as ISO-8601 strings, so PostgreSQL can cast to date/timestamptz/interval (ADR-5's interval mapping) and WASM can return JS Date objects."
257257
   },
258258
   {
259
+    "id": "1120-feel-duration-function:038_67dc4c254c:feel-duration-function_038_67dc4c254c",
260
+    "expression": "duration(from:\"P1Y\")",
261
+    "expected": "P1Y",
262
+    "expected_type": "duration",
263
+    "comparison": "exact",
264
+    "deviation": "Temporal result compared in feel-core's canonical ISO-8601 form (ADR-18). feel-core backs temporal values with jiff; at the wrappers they cross the boundary as ISO-8601 strings, so PostgreSQL can cast to date/timestamptz/interval (ADR-5's interval mapping) and WASM can return JS Date objects."
265
+  },
266
+  {
267
+    "id": "1120-feel-duration-function:039_4aa0b67804:feel-duration-function_039_4aa0b67804",
268
+    "expression": "duration(from:\"PT24H\")",
269
+    "expected": "P1D",
270
+    "expected_type": "duration",
271
+    "comparison": "exact",
272
+    "deviation": "Temporal result compared in feel-core's canonical ISO-8601 form (ADR-18). feel-core backs temporal values with jiff; at the wrappers they cross the boundary as ISO-8601 strings, so PostgreSQL can cast to date/timestamptz/interval (ADR-5's interval mapping) and WASM can return JS Date objects."
273
+  },
274
+  {
275
+    "id": "1120-feel-duration-function:040_7d8eae461f:feel-duration-function_040_7d8eae461f",
276
+    "expression": "duration(from:\"P26M\")",
277
+    "expected": "P2Y2M",
278
+    "expected_type": "duration",
279
+    "comparison": "exact",
280
+    "deviation": "Temporal result compared in feel-core's canonical ISO-8601 form (ADR-18). feel-core backs temporal values with jiff; at the wrappers they cross the boundary as ISO-8601 strings, so PostgreSQL can cast to date/timestamptz/interval (ADR-5's interval mapping) and WASM can return JS Date objects."
281
+  },
282
+  {
259283
     "id": "1120-feel-duration-function:041_264bc9d682:feel-duration-function_ErrorCase_041_264bc9d682",
260284
     "expression": "duration(\"\")",
261285
     "expected": null,

modified crates/feel-core/tests/fixtures/1121-feel-years-and-months-duration-function.json +32 −0

@@ -254,5 +254,37 @@
254254
     "expected_type": "duration",
255255
     "comparison": "exact",
256256
     "deviation": "Temporal result compared in feel-core's canonical ISO-8601 form (ADR-18). feel-core backs temporal values with jiff; at the wrappers they cross the boundary as ISO-8601 strings, so PostgreSQL can cast to date/timestamptz/interval (ADR-5's interval mapping) and WASM can return JS Date objects."
257
+  },
258
+  {
259
+    "id": "1121-feel-years-and-months-duration-function:033_7333eca866:feel-years-and-months-duration-function_033_7333eca866",
260
+    "expression": "years and months duration(from:date and time(\"2016-12-31T00:00:01\"),to:date and time(\"2017-12-31T23:59:59\"))",
261
+    "expected": "P1Y",
262
+    "expected_type": "duration",
263
+    "comparison": "exact",
264
+    "deviation": "Temporal result compared in feel-core's canonical ISO-8601 form (ADR-18). feel-core backs temporal values with jiff; at the wrappers they cross the boundary as ISO-8601 strings, so PostgreSQL can cast to date/timestamptz/interval (ADR-5's interval mapping) and WASM can return JS Date objects."
265
+  },
266
+  {
267
+    "id": "1121-feel-years-and-months-duration-function:034_c2cc06724c:feel-years-and-months-duration-function_034_c2cc06724c",
268
+    "expression": "years and months duration(from:date and time(\"2014-12-31T23:59:59\"),to:date and time(\"2016-12-31T00:00:01\"))",
269
+    "expected": "P2Y",
270
+    "expected_type": "duration",
271
+    "comparison": "exact",
272
+    "deviation": "Temporal result compared in feel-core's canonical ISO-8601 form (ADR-18). feel-core backs temporal values with jiff; at the wrappers they cross the boundary as ISO-8601 strings, so PostgreSQL can cast to date/timestamptz/interval (ADR-5's interval mapping) and WASM can return JS Date objects."
273
+  },
274
+  {
275
+    "id": "1121-feel-years-and-months-duration-function:035_dc05f9555d:feel-years-and-months-duration-function_035_dc05f9555d",
276
+    "expression": "years and months duration(from:date(\"2011-12-22\"),to:date(\"2013-08-24\"))",
277
+    "expected": "P1Y8M",
278
+    "expected_type": "duration",
279
+    "comparison": "exact",
280
+    "deviation": "Temporal result compared in feel-core's canonical ISO-8601 form (ADR-18). feel-core backs temporal values with jiff; at the wrappers they cross the boundary as ISO-8601 strings, so PostgreSQL can cast to date/timestamptz/interval (ADR-5's interval mapping) and WASM can return JS Date objects."
281
+  },
282
+  {
283
+    "id": "1121-feel-years-and-months-duration-function:036_f8c8b02ba3:feel-years-and-months-duration-function_036_f8c8b02ba3",
284
+    "expression": "years and months duration(from:date(\"2016-01-21\"),to:date(\"2015-01-21\"))",
285
+    "expected": "-P1Y",
286
+    "expected_type": "duration",
287
+    "comparison": "exact",
288
+    "deviation": "Temporal result compared in feel-core's canonical ISO-8601 form (ADR-18). feel-core backs temporal values with jiff; at the wrappers they cross the boundary as ISO-8601 strings, so PostgreSQL can cast to date/timestamptz/interval (ADR-5's interval mapping) and WASM can return JS Date objects."
257289
   }
258290
 ]

modified crates/feel-core/tests/fixtures/1140-feel-string-join-function.json +40 −0

@@ -96,6 +96,38 @@
9696
     "deviation": null
9797
   },
9898
   {
99
+    "id": "1140-feel-string-join-function:010_a:decision010_a",
100
+    "expression": "string join(list: [\"a\",\"c\"])",
101
+    "expected": "ac",
102
+    "expected_type": "string",
103
+    "comparison": "exact",
104
+    "deviation": null
105
+  },
106
+  {
107
+    "id": "1140-feel-string-join-function:010_b:decision010_b",
108
+    "expression": "string join(delimiter: \"X\", list: [\"a\",\"c\"])",
109
+    "expected": "aXc",
110
+    "expected_type": "string",
111
+    "comparison": "exact",
112
+    "deviation": null
113
+  },
114
+  {
115
+    "id": "1140-feel-string-join-function:011_a:decision011_a",
116
+    "expression": "string join(list: [\"a\",\"c\"], delimitr: \"X\")",
117
+    "expected": null,
118
+    "expected_type": "null",
119
+    "comparison": "exact",
120
+    "deviation": null
121
+  },
122
+  {
123
+    "id": "1140-feel-string-join-function:011_b:decision011_b",
124
+    "expression": "string join(lst: [\"a\",\"c\"], delimiter: \"X\")",
125
+    "expected": null,
126
+    "expected_type": "null",
127
+    "comparison": "exact",
128
+    "deviation": null
129
+  },
130
+  {
99131
     "id": "1140-feel-string-join-function:012_a:decision012_a",
100132
     "expression": "string join(null)",
101133
     "expected": null,
@@ -134,5 +166,13 @@
134166
     "expected_type": "string",
135167
     "comparison": "exact",
136168
     "deviation": null
169
+  },
170
+  {
171
+    "id": "1140-feel-string-join-function:016:decision016",
172
+    "expression": "string join(list: \"a\", delimiter: \"X\")",
173
+    "expected": "a",
174
+    "expected_type": "string",
175
+    "comparison": "exact",
176
+    "deviation": null
137177
   }
138178
 ]

modified crates/feel-core/tests/fixtures/1141-feel-round-up-function.json +25 −0

@@ -68,6 +68,31 @@
6868
     "deviation": null
6969
   },
7070
   {
71
+    "id": "1141-feel-round-up-function:010:decision010",
72
+    "expression": "round up(n:5.5,scale:0)",
73
+    "expected": 6.0,
74
+    "expected_type": "number",
75
+    "comparison": "f64_epsilon",
76
+    "deviation": "feel-core uses f64 arithmetic while the DMN/FEEL spec mandates decimal128, and the TCK rounds non-terminating results to a fixed number of decimal places; numeric results are therefore compared with an epsilon tolerance instead of exact equality to avoid false negatives from either source.",
77
+    "epsilon": 1e-08
78
+  },
79
+  {
80
+    "id": "1141-feel-round-up-function:011_a:decision011_a",
81
+    "expression": "round up(scale:0)",
82
+    "expected": null,
83
+    "expected_type": "null",
84
+    "comparison": "exact",
85
+    "deviation": null
86
+  },
87
+  {
88
+    "id": "1141-feel-round-up-function:012:decision012",
89
+    "expression": "round up(n:5.5,scale:0,foo:123)",
90
+    "expected": null,
91
+    "expected_type": "null",
92
+    "comparison": "exact",
93
+    "deviation": null
94
+  },
95
+  {
7196
     "id": "1141-feel-round-up-function:013:decision013",
7297
     "expression": "round up(\"123\", 0)",
7398
     "expected": null,

modified crates/feel-core/tests/fixtures/1142-feel-round-down-function.json +25 −0

@@ -68,6 +68,31 @@
6868
     "deviation": null
6969
   },
7070
   {
71
+    "id": "1142-feel-round-down-function:010:decision010",
72
+    "expression": "round down(n:5.5,scale:0)",
73
+    "expected": 5.0,
74
+    "expected_type": "number",
75
+    "comparison": "f64_epsilon",
76
+    "deviation": "feel-core uses f64 arithmetic while the DMN/FEEL spec mandates decimal128, and the TCK rounds non-terminating results to a fixed number of decimal places; numeric results are therefore compared with an epsilon tolerance instead of exact equality to avoid false negatives from either source.",
77
+    "epsilon": 1e-08
78
+  },
79
+  {
80
+    "id": "1142-feel-round-down-function:011_a:decision011_a",
81
+    "expression": "round down(scale:0)",
82
+    "expected": null,
83
+    "expected_type": "null",
84
+    "comparison": "exact",
85
+    "deviation": null
86
+  },
87
+  {
88
+    "id": "1142-feel-round-down-function:012:decision012",
89
+    "expression": "round down(n:5.5,scale:0,foo:123)",
90
+    "expected": null,
91
+    "expected_type": "null",
92
+    "comparison": "exact",
93
+    "deviation": null
94
+  },
95
+  {
7196
     "id": "1142-feel-round-down-function:013:decision013",
7297
     "expression": "round down(\"123\", 0)",
7398
     "expected": null,

modified crates/feel-core/tests/fixtures/1143-feel-round-half-up-function.json +25 −0

@@ -68,6 +68,31 @@
6868
     "deviation": null
6969
   },
7070
   {
71
+    "id": "1143-feel-round-half-up-function:010:decision010",
72
+    "expression": "round half up(n:5.5,scale:0)",
73
+    "expected": 6.0,
74
+    "expected_type": "number",
75
+    "comparison": "f64_epsilon",
76
+    "deviation": "feel-core uses f64 arithmetic while the DMN/FEEL spec mandates decimal128, and the TCK rounds non-terminating results to a fixed number of decimal places; numeric results are therefore compared with an epsilon tolerance instead of exact equality to avoid false negatives from either source.",
77
+    "epsilon": 1e-08
78
+  },
79
+  {
80
+    "id": "1143-feel-round-half-up-function:011_a:decision011_a",
81
+    "expression": "round half up(scale:0)",
82
+    "expected": null,
83
+    "expected_type": "null",
84
+    "comparison": "exact",
85
+    "deviation": null
86
+  },
87
+  {
88
+    "id": "1143-feel-round-half-up-function:012:decision012",
89
+    "expression": "round half up(n:5.5,scale:0,foo:123)",
90
+    "expected": null,
91
+    "expected_type": "null",
92
+    "comparison": "exact",
93
+    "deviation": null
94
+  },
95
+  {
7196
     "id": "1143-feel-round-half-up-function:013:decision013",
7297
     "expression": "round half up(\"123\", 0)",
7398
     "expected": null,

modified crates/feel-core/tests/fixtures/1144-feel-round-half-down-function.json +25 −0

@@ -68,6 +68,31 @@
6868
     "deviation": null
6969
   },
7070
   {
71
+    "id": "1144-feel-round-half-down-function:010:decision010",
72
+    "expression": "round half down(n:5.5,scale:0)",
73
+    "expected": 5.0,
74
+    "expected_type": "number",
75
+    "comparison": "f64_epsilon",
76
+    "deviation": "feel-core uses f64 arithmetic while the DMN/FEEL spec mandates decimal128, and the TCK rounds non-terminating results to a fixed number of decimal places; numeric results are therefore compared with an epsilon tolerance instead of exact equality to avoid false negatives from either source.",
77
+    "epsilon": 1e-08
78
+  },
79
+  {
80
+    "id": "1144-feel-round-half-down-function:011_a:decision011_a",
81
+    "expression": "round half down(scale:0)",
82
+    "expected": null,
83
+    "expected_type": "null",
84
+    "comparison": "exact",
85
+    "deviation": null
86
+  },
87
+  {
88
+    "id": "1144-feel-round-half-down-function:012:decision012",
89
+    "expression": "round half down(n:5.5,scale:0,foo:123)",
90
+    "expected": null,
91
+    "expected_type": "null",
92
+    "comparison": "exact",
93
+    "deviation": null
94
+  },
95
+  {
7196
     "id": "1144-feel-round-half-down-function:013:decision013",
7297
     "expression": "round half down(\"123\", 0)",
7398
     "expected": null,

modified crates/feel-core/tests/fixtures/1145-feel-context-function.json +38 −0

@@ -115,11 +115,49 @@
115115
     "deviation": null
116116
   },
117117
   {
118
+    "id": "1145-feel-context-function:014_a:decision014_a",
119
+    "expression": "context(entries: [{key:\"a\", value:1}])",
120
+    "expected": {
121
+      "a": 1.0
122
+    },
123
+    "expected_type": "context",
124
+    "comparison": "exact",
125
+    "deviation": null
126
+  },
127
+  {
128
+    "id": "1145-feel-context-function:014_b:decision014_b",
129
+    "expression": "context(entries: {key:\"a\", value:1})",
130
+    "expected": {
131
+      "a": 1.0
132
+    },
133
+    "expected_type": "context",
134
+    "comparison": "exact",
135
+    "deviation": null
136
+  },
137
+  {
138
+    "id": "1145-feel-context-function:015:decision015",
139
+    "expression": "context(entris: {key:\"a\", value:1})",
140
+    "expected": null,
141
+    "expected_type": "null",
142
+    "comparison": "exact",
143
+    "deviation": null
144
+  },
145
+  {
118146
     "id": "1145-feel-context-function:016:decision016",
119147
     "expression": "context(\"foo\")",
120148
     "expected": null,
121149
     "expected_type": "null",
122150
     "comparison": "exact",
123151
     "deviation": null
152
+  },
153
+  {
154
+    "id": "1145-feel-context-function:017:decision017",
155
+    "expression": "context(entries: [{key:\"a\", value:1, ignored: \"foo\"}])",
156
+    "expected": {
157
+      "a": 1.0
158
+    },
159
+    "expected_type": "context",
160
+    "comparison": "exact",
161
+    "deviation": null
124162
   }
125163
 ]

modified crates/feel-core/tests/fixtures/1146-feel-context-put-function.json +18 −0

@@ -101,6 +101,24 @@
101101
     "deviation": null
102102
   },
103103
   {
104
+    "id": "1146-feel-context-put-function:010:decision010",
105
+    "expression": "context put(context: {}, key: \"a\", value: 1)",
106
+    "expected": {
107
+      "a": 1.0
108
+    },
109
+    "expected_type": "context",
110
+    "comparison": "exact",
111
+    "deviation": null
112
+  },
113
+  {
114
+    "id": "1146-feel-context-put-function:011:decision011",
115
+    "expression": "context put(context: {}, ky: \"a\", value: 1)",
116
+    "expected": null,
117
+    "expected_type": "null",
118
+    "comparison": "exact",
119
+    "deviation": null
120
+  },
121
+  {
104122
     "id": "1146-feel-context-put-function:012:decision012",
105123
     "expression": "context put([], \"a\", 1)",
106124
     "expected": null,

modified crates/feel-core/tests/fixtures/1147-feel-context-merge-function.json +28 −0

@@ -75,6 +75,24 @@
7575
     "deviation": null
7676
   },
7777
   {
78
+    "id": "1147-feel-context-merge-function:008:decision008",
79
+    "expression": "context merge(contexts: [{\"a\": 1}])",
80
+    "expected": {
81
+      "a": 1.0
82
+    },
83
+    "expected_type": "context",
84
+    "comparison": "exact",
85
+    "deviation": null
86
+  },
87
+  {
88
+    "id": "1147-feel-context-merge-function:009:decision009",
89
+    "expression": "context merge(context: [{\"a\": 1}])",
90
+    "expected": null,
91
+    "expected_type": "null",
92
+    "comparison": "exact",
93
+    "deviation": null
94
+  },
95
+  {
7896
     "id": "1147-feel-context-merge-function:010:decision010",
7997
     "expression": "context merge([1,2,3])",
8098
     "expected": null,
@@ -99,5 +117,15 @@
99117
     "expected_type": "context",
100118
     "comparison": "exact",
101119
     "deviation": null
120
+  },
121
+  {
122
+    "id": "1147-feel-context-merge-function:013:decision013",
123
+    "expression": "context merge(contexts: {\"a\": 1})",
124
+    "expected": {
125
+      "a": 1.0
126
+    },
127
+    "expected_type": "context",
128
+    "comparison": "exact",
129
+    "deviation": null
102130
   }
103131
 ]

modified crates/feel-core/tests/fixtures/1155-list-replace-function.json +20 −0

@@ -108,6 +108,18 @@
108108
     "deviation": null
109109
   },
110110
   {
111
+    "id": "1155-list-replace-function:012:decision012",
112
+    "expression": "list replace(position: 2, newItem: 4, list: [1,2,3])",
113
+    "expected": [
114
+      1.0,
115
+      4.0,
116
+      3.0
117
+    ],
118
+    "expected_type": "list",
119
+    "comparison": "exact",
120
+    "deviation": null
121
+  },
122
+  {
111123
     "id": "1155-list-replace-function:014:decision014",
112124
     "expression": "list replace([1,2,3], \"2\", 4, 4)",
113125
     "expected": null,
@@ -124,6 +136,14 @@
124136
     "deviation": null
125137
   },
126138
   {
139
+    "id": "1155-list-replace-function:016:decision016",
140
+    "expression": "list replace(position: 2, newItem: 4, list: [1,2,3], foo: 1)",
141
+    "expected": null,
142
+    "expected_type": "null",
143
+    "comparison": "exact",
144
+    "deviation": null
145
+  },
146
+  {
127147
     "id": "1155-list-replace-function:021:decision021",
128148
     "expression": "list replace ( 1, 1, 5)",
129149
     "expected": [

modified tools/ingest_tck.py +65 −5

@@ -85,6 +85,19 @@
8585
     "day of week", "day of year", "week of year", "month of year",
8686
 })
8787
 
88
+# Built-ins that have **no** named-parameter form (feel-core, ADR-23): the purely
89
+# variadic / dual-form aggregates and the varargs list builders. The spec gives
90
+# them no single named-parameter signature, so feel-core's `builtin_param_names`
91
+# table omits them and a named call to one (`sum(list: …)`, `all(list: …)`) is an
92
+# error-null — even though the spec result would be a real value. A named call to
93
+# one of these is therefore *not* in the slice and must stay skipped (keeping it
94
+# would be a false positive: the TCK expects the real result, feel-core returns
95
+# null). Every name here is single-word, which keeps the reject scan simple.
96
+_NO_NAMED_FORM_BUILTINS = frozenset({
97
+    "min", "max", "sum", "mean", "product", "median", "stddev", "mode",
98
+    "all", "any", "append", "concatenate", "union",
99
+})
100
+
88101
 
89102
 def fits_slice_grammar(expression: str, input_names: frozenset[str] = frozenset()) -> bool:
90103
     """True if feel-core's core-language grammar can parse AND evaluate
@@ -114,10 +127,20 @@
114127
     if re.search(r",\s*[A-Za-z_]\w*\s+in\b", s):
115128
         return False
116129
 
117
-    # Named-argument calls `f(name: value)` are not in the slice (only positional
118
-    # arguments are). A `(` immediately followed by `identifier :` is the named
119
-    # form; context literals open with `{`, so this never matches `{key: …}`.
120
-    if re.search(r"\(\s*[A-Za-z_]\w*\s*:", s):
130
+    # Named-argument calls `f(name: value)` are in the slice now (ADR-23): feel-core
131
+    # binds them via a per-built-in parameter-name table (FEEL spec §10.3.2.13.5).
132
+    # The parameter names themselves are blanked alongside context-literal keys in
133
+    # the free-name scan below, so an in-scope named call to a built-in fits. Two
134
+    # named forms stay out of the slice, both handled here:
135
+    #   * a named call to a variadic aggregate / varargs builder, which has no named
136
+    #     form in feel-core (error-null vs. the spec's real result) — see
137
+    #     `_NO_NAMED_FORM_BUILTINS`;
138
+    #   * a named call whose head is not a built-in (a user-defined function), which
139
+    #     the free-name scan rejects anyway because the head is a free name.
140
+    # The pattern is anchored on `(` (context literals open with `{`), so it never
141
+    # matches `{key: …}`.
142
+    _variadic_heads = "|".join(sorted(_NO_NAMED_FORM_BUILTINS, key=len, reverse=True))
143
+    if re.search(r"\b(?:" + _variadic_heads + r")\s*\(\s*[A-Za-z_][\w ]*?\s*:", s):
121144
         return False
122145
 
123146
     # Postfix list filter / index `value[…]` (`[1,2,3][1]`, `xs[item > 2]`) is in
@@ -131,7 +154,13 @@
131154
     # context-literal keys (`field:`) are structural, not free names, so blank
132155
     # them out before scanning. The single-dot match excludes `..` ranges.
133156
     scan = re.sub(r"(?<!\.)\.(?!\.)\s*[A-Za-z_]\w*", " ", s)  # drop `.field`
134
-    scan = re.sub(r"[A-Za-z_]\w*\s*:", " ", scan)             # drop `key:`
157
+    # Drop context-literal keys and named-argument parameter names (`key:`). Both
158
+    # may be multi-word FEEL names (`{full name: …}`, `substring(start position: …)`,
159
+    # `number(decimal separator: …)`), so consume the whole space-separated run up to
160
+    # the colon — a `:` only follows a context key or a named-argument name (string
161
+    # and temporal literals are already blanked), and `{`/`(`/`,` break the run, so
162
+    # this never swallows a keyword or operand.
163
+    scan = re.sub(r"(?:[A-Za-z_]\w*\s+)*[A-Za-z_]\w*\s*:", " ", scan)
135164
     # Drop implemented built-in call heads (`abs(`, `string length(`, …) so they
136165
     # aren't treated as free names. Arguments keep being scanned, so a call whose
137166
     # args reference an unknown name is still skipped. Multi-word heads (ADR-17)
@@ -378,6 +407,33 @@
378407
     "0068-feel-equality:time_005:time_005",
379408
 })
380409
 
410
+# Named-argument calls that name a built-in *overload* whose parameter name
411
+# feel-core's single-row parameter table cannot carry (ADR-23). The grammar parses
412
+# these and the head is an in-slice built-in, but the bind fails, so the result is
413
+# error-null instead of the spec value — skipped so the closed loop stays green
414
+# without faking a result (positional forms of all of these are ingested and pass).
415
+#   * Temporal constructors `date`/`time`/`date and time` invoked as `(from: …)`:
416
+#     each has a `from` single-arg overload, but feel-core's table holds the
417
+#     *component* names (`year`/`month`/`day`, `hour`/`minute`/`second`/`offset`,
418
+#     `date`/`time`) so the two overloads can share one positional row — there is
419
+#     no slot named `from`, so `from` is an unknown name → null.
420
+#   * `context put` invoked with the deep-put overload by name: feel-core carries a
421
+#     single `key` parameter and resolves the key-vs-keys (string-vs-list) overload
422
+#     by the value's type, so the spec's distinct `keys` name is unknown (`nested007`
423
+#     → null instead of a deep put) and a list passed to `key` deep-puts where the
424
+#     spec wants a type-error null (`nested008`).
425
+NAMED_ARG_OVERLOAD_SKIPS: frozenset[str] = frozenset({
426
+    # temporal constructors: the `from` overload's name is absent from the table
427
+    "1115-feel-date-function:050_8f1e299951:feel-date-function_050_8f1e299951",
428
+    "1115-feel-date-function:051_ad98079864:feel-date-function_051_ad98079864",
429
+    "1116-feel-time-function:080_2bbb8c86af:feel-time-function_080_2bbb8c86af",
430
+    "1116-feel-time-function:081_69f4e0231e:feel-time-function_081_69f4e0231e",
431
+    "1117-feel-date-and-time-function:086_12ca8ac1d3:feel-date-and-time-function_086_12ca8ac1d3",
432
+    # `context put` deep-put overload reached by name (key/keys, string/list)
433
+    "1146-feel-context-put-function:nested007:nested007",
434
+    "1146-feel-context-put-function:nested008:nested008",
435
+})
436
+
381437
 
382438
 def apply_deviations(case: Case) -> None:
383439
     """Run every registry rule whose predicate matches `case` (mutates in place)."""
@@ -604,6 +660,10 @@
604660
                 skipped.append((case_id, "second-resolution temporal equality (ADR-18)"))
605661
                 continue
606662
 
663
+            if case_id in NAMED_ARG_OVERLOAD_SKIPS:
664
+                skipped.append((case_id, "named-arg overload not in feel-core's param table (ADR-23)"))
665
+                continue
666
+
607667
             expected, expected_type = parse_expected(result_node)
608668
 
609669
             case = Case(