kumi 0.0.22 → 0.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +60 -116
- data/golden/array_element/expected/schema_ruby.rb +1 -1
- data/golden/array_index/expected/schema_ruby.rb +1 -1
- data/golden/array_operations/expected/schema_ruby.rb +1 -1
- data/golden/cascade_logic/expected/schema_ruby.rb +1 -1
- data/golden/chained_fusion/expected/schema_ruby.rb +1 -1
- data/golden/element_arrays/expected/schema_ruby.rb +1 -1
- data/golden/empty_and_null_inputs/expected/schema_ruby.rb +1 -1
- data/golden/game_of_life/expected/lir_00_unoptimized.txt +33 -33
- data/golden/game_of_life/expected/lir_01_hoist_scalar_references.txt +33 -33
- data/golden/game_of_life/expected/lir_02_inlined.txt +296 -296
- data/golden/game_of_life/expected/lir_03_cse.txt +128 -128
- data/golden/game_of_life/expected/lir_04_1_loop_fusion.txt +128 -128
- data/golden/game_of_life/expected/lir_04_loop_invcm.txt +128 -128
- data/golden/game_of_life/expected/lir_06_const_prop.txt +128 -128
- data/golden/game_of_life/expected/schema_ruby.rb +1 -1
- data/golden/hash_keys/expected/schema_ruby.rb +1 -1
- data/golden/hash_keys/schema.kumi +4 -5
- data/golden/hash_value/expected/schema_ruby.rb +1 -1
- data/golden/hierarchical_complex/expected/schema_ruby.rb +1 -1
- data/golden/inline_rename_scope_leak/expected/ast.txt +48 -0
- data/golden/inline_rename_scope_leak/expected/input_plan.txt +10 -0
- data/golden/inline_rename_scope_leak/expected/lir_00_unoptimized.txt +35 -0
- data/golden/inline_rename_scope_leak/expected/lir_01_hoist_scalar_references.txt +35 -0
- data/golden/inline_rename_scope_leak/expected/lir_02_inlined.txt +49 -0
- data/golden/inline_rename_scope_leak/expected/lir_03_cse.txt +49 -0
- data/golden/inline_rename_scope_leak/expected/lir_04_1_loop_fusion.txt +49 -0
- data/golden/inline_rename_scope_leak/expected/lir_04_loop_invcm.txt +49 -0
- data/golden/inline_rename_scope_leak/expected/lir_06_const_prop.txt +49 -0
- data/golden/inline_rename_scope_leak/expected/nast.txt +31 -0
- data/golden/inline_rename_scope_leak/expected/schema_javascript.mjs +51 -0
- data/golden/inline_rename_scope_leak/expected/schema_ruby.rb +82 -0
- data/golden/inline_rename_scope_leak/expected/snast.txt +31 -0
- data/golden/inline_rename_scope_leak/expected.json +7 -0
- data/golden/inline_rename_scope_leak/input.json +4 -0
- data/golden/inline_rename_scope_leak/schema.kumi +24 -0
- data/golden/input_reference/expected/schema_ruby.rb +1 -1
- data/golden/interleaved_fusion/expected/schema_ruby.rb +1 -1
- data/golden/let_inline/expected/schema_ruby.rb +1 -1
- data/golden/loop_fusion/expected/schema_ruby.rb +1 -1
- data/golden/min_reduce_scope/expected/schema_ruby.rb +1 -1
- data/golden/mixed_dimensions/expected/schema_ruby.rb +1 -1
- data/golden/multirank_hoisting/expected/schema_ruby.rb +1 -1
- data/golden/nested_hash/expected/schema_ruby.rb +1 -1
- data/golden/reduction_broadcast/expected/schema_ruby.rb +1 -1
- data/golden/roll/expected/lir_00_unoptimized.txt +8 -8
- data/golden/roll/expected/lir_01_hoist_scalar_references.txt +8 -8
- data/golden/roll/expected/lir_02_inlined.txt +8 -8
- data/golden/roll/expected/lir_03_cse.txt +8 -8
- data/golden/roll/expected/lir_04_1_loop_fusion.txt +8 -8
- data/golden/roll/expected/lir_04_loop_invcm.txt +8 -8
- data/golden/roll/expected/lir_06_const_prop.txt +8 -8
- data/golden/roll/expected/schema_ruby.rb +1 -1
- data/golden/shift/expected/lir_00_unoptimized.txt +12 -12
- data/golden/shift/expected/lir_01_hoist_scalar_references.txt +12 -12
- data/golden/shift/expected/lir_02_inlined.txt +12 -12
- data/golden/shift/expected/lir_03_cse.txt +12 -12
- data/golden/shift/expected/lir_04_1_loop_fusion.txt +12 -12
- data/golden/shift/expected/lir_04_loop_invcm.txt +12 -12
- data/golden/shift/expected/lir_06_const_prop.txt +12 -12
- data/golden/shift/expected/schema_ruby.rb +1 -1
- data/golden/shift_2d/expected/lir_00_unoptimized.txt +48 -48
- data/golden/shift_2d/expected/lir_01_hoist_scalar_references.txt +48 -48
- data/golden/shift_2d/expected/lir_02_inlined.txt +48 -48
- data/golden/shift_2d/expected/lir_03_cse.txt +48 -48
- data/golden/shift_2d/expected/lir_04_1_loop_fusion.txt +48 -48
- data/golden/shift_2d/expected/lir_04_loop_invcm.txt +48 -48
- data/golden/shift_2d/expected/lir_06_const_prop.txt +48 -48
- data/golden/shift_2d/expected/schema_ruby.rb +1 -1
- data/golden/simple_math/expected/schema_ruby.rb +1 -1
- data/golden/streaming_basics/expected/schema_ruby.rb +1 -1
- data/golden/tuples/expected/lir_00_unoptimized.txt +4 -4
- data/golden/tuples/expected/lir_01_hoist_scalar_references.txt +4 -4
- data/golden/tuples/expected/lir_02_inlined.txt +4 -4
- data/golden/tuples/expected/lir_03_cse.txt +4 -4
- data/golden/tuples/expected/lir_04_1_loop_fusion.txt +4 -4
- data/golden/tuples/expected/lir_04_loop_invcm.txt +4 -4
- data/golden/tuples/expected/lir_06_const_prop.txt +4 -4
- data/golden/tuples/expected/schema_ruby.rb +1 -1
- data/golden/tuples_and_arrays/expected/lir_00_unoptimized.txt +1 -1
- data/golden/tuples_and_arrays/expected/lir_01_hoist_scalar_references.txt +1 -1
- data/golden/tuples_and_arrays/expected/lir_02_inlined.txt +2 -2
- data/golden/tuples_and_arrays/expected/lir_03_cse.txt +2 -2
- data/golden/tuples_and_arrays/expected/lir_04_1_loop_fusion.txt +2 -2
- data/golden/tuples_and_arrays/expected/lir_04_loop_invcm.txt +2 -2
- data/golden/tuples_and_arrays/expected/lir_06_const_prop.txt +2 -2
- data/golden/tuples_and_arrays/expected/schema_ruby.rb +1 -1
- data/golden/us_tax_2024/expected/ast.txt +865 -0
- data/golden/us_tax_2024/expected/input_plan.txt +61 -0
- data/golden/us_tax_2024/expected/lir_00_unoptimized.txt +901 -0
- data/golden/us_tax_2024/expected/lir_01_hoist_scalar_references.txt +901 -0
- data/golden/us_tax_2024/expected/lir_02_inlined.txt +5178 -0
- data/golden/us_tax_2024/expected/lir_03_cse.txt +2499 -0
- data/golden/us_tax_2024/expected/lir_04_1_loop_fusion.txt +2519 -0
- data/golden/us_tax_2024/expected/lir_04_loop_invcm.txt +2439 -0
- data/golden/us_tax_2024/expected/lir_06_const_prop.txt +2439 -0
- data/golden/us_tax_2024/expected/nast.txt +976 -0
- data/golden/us_tax_2024/expected/schema_javascript.mjs +584 -0
- data/golden/us_tax_2024/expected/schema_ruby.rb +639 -0
- data/golden/us_tax_2024/expected/snast.txt +976 -0
- data/golden/us_tax_2024/expected.json +1 -0
- data/golden/us_tax_2024/input.json +168 -0
- data/golden/us_tax_2024/schema.kumi +203 -0
- data/golden/with_constants/expected/schema_ruby.rb +1 -1
- data/lib/kumi/core/analyzer/passes/lir/inline_declarations_pass.rb +181 -105
- data/lib/kumi/core/analyzer/passes/output_schema_pass.rb +6 -4
- data/lib/kumi/core/functions/function_spec.rb +14 -8
- data/lib/kumi/core/functions/loader.rb +1 -1
- data/lib/kumi/version.rb +1 -1
- metadata +33 -1
@@ -0,0 +1,865 @@
|
|
1
|
+
(Root
|
2
|
+
inputs: [
|
3
|
+
(InputDeclaration :income :float)
|
4
|
+
(InputDeclaration :state_rate :float)
|
5
|
+
(InputDeclaration :local_rate :float)
|
6
|
+
(InputDeclaration :retirement_contrib :float)
|
7
|
+
(InputDeclaration :fed :hash
|
8
|
+
[
|
9
|
+
(InputDeclaration :single :hash
|
10
|
+
[
|
11
|
+
(InputDeclaration :std :float)
|
12
|
+
(InputDeclaration :rates :array
|
13
|
+
[
|
14
|
+
(InputDeclaration :bracket :hash
|
15
|
+
[
|
16
|
+
(InputDeclaration :lo :float)
|
17
|
+
(InputDeclaration :hi :float)
|
18
|
+
(InputDeclaration :rate :float)
|
19
|
+
]
|
20
|
+
)
|
21
|
+
]
|
22
|
+
)
|
23
|
+
]
|
24
|
+
)
|
25
|
+
(InputDeclaration :married_joint :hash
|
26
|
+
[
|
27
|
+
(InputDeclaration :std :float)
|
28
|
+
(InputDeclaration :rates :array
|
29
|
+
[
|
30
|
+
(InputDeclaration :bracket :hash
|
31
|
+
[
|
32
|
+
(InputDeclaration :lo :float)
|
33
|
+
(InputDeclaration :hi :float)
|
34
|
+
(InputDeclaration :rate :float)
|
35
|
+
]
|
36
|
+
)
|
37
|
+
]
|
38
|
+
)
|
39
|
+
]
|
40
|
+
)
|
41
|
+
(InputDeclaration :married_separate :hash
|
42
|
+
[
|
43
|
+
(InputDeclaration :std :float)
|
44
|
+
(InputDeclaration :rates :array
|
45
|
+
[
|
46
|
+
(InputDeclaration :bracket :hash
|
47
|
+
[
|
48
|
+
(InputDeclaration :lo :float)
|
49
|
+
(InputDeclaration :hi :float)
|
50
|
+
(InputDeclaration :rate :float)
|
51
|
+
]
|
52
|
+
)
|
53
|
+
]
|
54
|
+
)
|
55
|
+
]
|
56
|
+
)
|
57
|
+
(InputDeclaration :head_of_household :hash
|
58
|
+
[
|
59
|
+
(InputDeclaration :std :float)
|
60
|
+
(InputDeclaration :rates :array
|
61
|
+
[
|
62
|
+
(InputDeclaration :bracket :hash
|
63
|
+
[
|
64
|
+
(InputDeclaration :lo :float)
|
65
|
+
(InputDeclaration :hi :float)
|
66
|
+
(InputDeclaration :rate :float)
|
67
|
+
]
|
68
|
+
)
|
69
|
+
]
|
70
|
+
)
|
71
|
+
]
|
72
|
+
)
|
73
|
+
]
|
74
|
+
)
|
75
|
+
]
|
76
|
+
values: [
|
77
|
+
(ValueDeclaration :big_hi
|
78
|
+
(Literal 100000000000.0)
|
79
|
+
)
|
80
|
+
(ValueDeclaration :state_tax
|
81
|
+
(CallExpression :multiply
|
82
|
+
(InputReference :income)
|
83
|
+
(InputReference :state_rate)
|
84
|
+
)
|
85
|
+
)
|
86
|
+
(ValueDeclaration :local_tax
|
87
|
+
(CallExpression :multiply
|
88
|
+
(InputReference :income)
|
89
|
+
(InputReference :local_rate)
|
90
|
+
)
|
91
|
+
)
|
92
|
+
(ValueDeclaration :ss_wage_base
|
93
|
+
(Literal 168600.0)
|
94
|
+
)
|
95
|
+
(ValueDeclaration :ss_rate
|
96
|
+
(Literal 0.062)
|
97
|
+
)
|
98
|
+
(ValueDeclaration :med_base_rate
|
99
|
+
(Literal 0.0145)
|
100
|
+
)
|
101
|
+
(ValueDeclaration :addl_med_rate
|
102
|
+
(Literal 0.009)
|
103
|
+
)
|
104
|
+
(ValueDeclaration :addl_threshold_single
|
105
|
+
(Literal 200000.0)
|
106
|
+
)
|
107
|
+
(ValueDeclaration :addl_threshold_mj
|
108
|
+
(Literal 250000.0)
|
109
|
+
)
|
110
|
+
(ValueDeclaration :addl_threshold_ms
|
111
|
+
(Literal 125000.0)
|
112
|
+
)
|
113
|
+
(ValueDeclaration :addl_threshold_hoh
|
114
|
+
(Literal 200000.0)
|
115
|
+
)
|
116
|
+
(ValueDeclaration :taxable_single
|
117
|
+
(CallExpression :max
|
118
|
+
(ArrayExpression
|
119
|
+
(CallExpression :subtract
|
120
|
+
(InputReference :income)
|
121
|
+
(InputElementReference fed.single.std)
|
122
|
+
)
|
123
|
+
(Literal 0)
|
124
|
+
)
|
125
|
+
)
|
126
|
+
)
|
127
|
+
(ValueDeclaration :lo_s
|
128
|
+
(InputElementReference fed.single.rates.bracket.lo)
|
129
|
+
)
|
130
|
+
(ValueDeclaration :hi_s
|
131
|
+
(InputElementReference fed.single.rates.bracket.hi)
|
132
|
+
)
|
133
|
+
(ValueDeclaration :rate_s
|
134
|
+
(InputElementReference fed.single.rates.bracket.rate)
|
135
|
+
)
|
136
|
+
(ValueDeclaration :hi_s_eff
|
137
|
+
(CallExpression :select
|
138
|
+
(CallExpression :==
|
139
|
+
(DeclarationReference :hi_s)
|
140
|
+
(Literal -1)
|
141
|
+
)
|
142
|
+
(DeclarationReference :big_hi)
|
143
|
+
(DeclarationReference :hi_s)
|
144
|
+
)
|
145
|
+
)
|
146
|
+
(ValueDeclaration :amt_s
|
147
|
+
(CallExpression :clamp
|
148
|
+
(CallExpression :subtract
|
149
|
+
(DeclarationReference :taxable_single)
|
150
|
+
(DeclarationReference :lo_s)
|
151
|
+
)
|
152
|
+
(Literal 0)
|
153
|
+
(CallExpression :subtract
|
154
|
+
(DeclarationReference :hi_s_eff)
|
155
|
+
(DeclarationReference :lo_s)
|
156
|
+
)
|
157
|
+
)
|
158
|
+
)
|
159
|
+
(ValueDeclaration :fed_tax_single
|
160
|
+
(CallExpression :sum
|
161
|
+
(CallExpression :multiply
|
162
|
+
(DeclarationReference :amt_s)
|
163
|
+
(DeclarationReference :rate_s)
|
164
|
+
)
|
165
|
+
)
|
166
|
+
)
|
167
|
+
(ValueDeclaration :in_br_s
|
168
|
+
(CallExpression :and
|
169
|
+
(CallExpression :>=
|
170
|
+
(DeclarationReference :taxable_single)
|
171
|
+
(DeclarationReference :lo_s)
|
172
|
+
)
|
173
|
+
(CallExpression :<
|
174
|
+
(DeclarationReference :taxable_single)
|
175
|
+
(DeclarationReference :hi_s_eff)
|
176
|
+
)
|
177
|
+
)
|
178
|
+
)
|
179
|
+
(ValueDeclaration :fed_marginal_single
|
180
|
+
(CallExpression :sum_if
|
181
|
+
(DeclarationReference :rate_s)
|
182
|
+
(DeclarationReference :in_br_s)
|
183
|
+
)
|
184
|
+
)
|
185
|
+
(ValueDeclaration :fed_eff_single
|
186
|
+
(CallExpression :divide
|
187
|
+
(DeclarationReference :fed_tax_single)
|
188
|
+
(CallExpression :max
|
189
|
+
(ArrayExpression
|
190
|
+
(InputReference :income)
|
191
|
+
(Literal 1.0)
|
192
|
+
)
|
193
|
+
)
|
194
|
+
)
|
195
|
+
)
|
196
|
+
(ValueDeclaration :ss_tax_s
|
197
|
+
(CallExpression :multiply
|
198
|
+
(CallExpression :min
|
199
|
+
(ArrayExpression
|
200
|
+
(InputReference :income)
|
201
|
+
(DeclarationReference :ss_wage_base)
|
202
|
+
)
|
203
|
+
)
|
204
|
+
(DeclarationReference :ss_rate)
|
205
|
+
)
|
206
|
+
)
|
207
|
+
(ValueDeclaration :med_tax_s
|
208
|
+
(CallExpression :multiply
|
209
|
+
(InputReference :income)
|
210
|
+
(DeclarationReference :med_base_rate)
|
211
|
+
)
|
212
|
+
)
|
213
|
+
(ValueDeclaration :addl_med_tax_s
|
214
|
+
(CallExpression :multiply
|
215
|
+
(CallExpression :max
|
216
|
+
(ArrayExpression
|
217
|
+
(CallExpression :subtract
|
218
|
+
(InputReference :income)
|
219
|
+
(DeclarationReference :addl_threshold_single)
|
220
|
+
)
|
221
|
+
(Literal 0)
|
222
|
+
)
|
223
|
+
)
|
224
|
+
(DeclarationReference :addl_med_rate)
|
225
|
+
)
|
226
|
+
)
|
227
|
+
(ValueDeclaration :fica_tax_single
|
228
|
+
(CallExpression :add
|
229
|
+
(CallExpression :add
|
230
|
+
(DeclarationReference :ss_tax_s)
|
231
|
+
(DeclarationReference :med_tax_s)
|
232
|
+
)
|
233
|
+
(DeclarationReference :addl_med_tax_s)
|
234
|
+
)
|
235
|
+
)
|
236
|
+
(ValueDeclaration :fica_eff_single
|
237
|
+
(CallExpression :divide
|
238
|
+
(DeclarationReference :fica_tax_single)
|
239
|
+
(CallExpression :max
|
240
|
+
(ArrayExpression
|
241
|
+
(InputReference :income)
|
242
|
+
(Literal 1.0)
|
243
|
+
)
|
244
|
+
)
|
245
|
+
)
|
246
|
+
)
|
247
|
+
(ValueDeclaration :total_tax_single
|
248
|
+
(CallExpression :add
|
249
|
+
(CallExpression :add
|
250
|
+
(CallExpression :add
|
251
|
+
(DeclarationReference :fed_tax_single)
|
252
|
+
(DeclarationReference :fica_tax_single)
|
253
|
+
)
|
254
|
+
(DeclarationReference :state_tax)
|
255
|
+
)
|
256
|
+
(DeclarationReference :local_tax)
|
257
|
+
)
|
258
|
+
)
|
259
|
+
(ValueDeclaration :total_eff_single
|
260
|
+
(CallExpression :divide
|
261
|
+
(DeclarationReference :total_tax_single)
|
262
|
+
(CallExpression :max
|
263
|
+
(ArrayExpression
|
264
|
+
(InputReference :income)
|
265
|
+
(Literal 1.0)
|
266
|
+
)
|
267
|
+
)
|
268
|
+
)
|
269
|
+
)
|
270
|
+
(ValueDeclaration :after_tax_single
|
271
|
+
(CallExpression :subtract
|
272
|
+
(InputReference :income)
|
273
|
+
(DeclarationReference :total_tax_single)
|
274
|
+
)
|
275
|
+
)
|
276
|
+
(ValueDeclaration :take_home_single
|
277
|
+
(CallExpression :subtract
|
278
|
+
(DeclarationReference :after_tax_single)
|
279
|
+
(InputReference :retirement_contrib)
|
280
|
+
)
|
281
|
+
)
|
282
|
+
(ValueDeclaration :taxable_mj
|
283
|
+
(CallExpression :max
|
284
|
+
(ArrayExpression
|
285
|
+
(CallExpression :subtract
|
286
|
+
(InputReference :income)
|
287
|
+
(InputElementReference fed.married_joint.std)
|
288
|
+
)
|
289
|
+
(Literal 0)
|
290
|
+
)
|
291
|
+
)
|
292
|
+
)
|
293
|
+
(ValueDeclaration :lo_mj
|
294
|
+
(InputElementReference fed.married_joint.rates.bracket.lo)
|
295
|
+
)
|
296
|
+
(ValueDeclaration :hi_mj
|
297
|
+
(InputElementReference fed.married_joint.rates.bracket.hi)
|
298
|
+
)
|
299
|
+
(ValueDeclaration :rate_mj
|
300
|
+
(InputElementReference fed.married_joint.rates.bracket.rate)
|
301
|
+
)
|
302
|
+
(ValueDeclaration :hi_mj_eff
|
303
|
+
(CallExpression :select
|
304
|
+
(CallExpression :==
|
305
|
+
(DeclarationReference :hi_mj)
|
306
|
+
(Literal -1)
|
307
|
+
)
|
308
|
+
(DeclarationReference :big_hi)
|
309
|
+
(DeclarationReference :hi_mj)
|
310
|
+
)
|
311
|
+
)
|
312
|
+
(ValueDeclaration :amt_mj
|
313
|
+
(CallExpression :clamp
|
314
|
+
(CallExpression :subtract
|
315
|
+
(DeclarationReference :taxable_mj)
|
316
|
+
(DeclarationReference :lo_mj)
|
317
|
+
)
|
318
|
+
(Literal 0)
|
319
|
+
(CallExpression :subtract
|
320
|
+
(DeclarationReference :hi_mj_eff)
|
321
|
+
(DeclarationReference :lo_mj)
|
322
|
+
)
|
323
|
+
)
|
324
|
+
)
|
325
|
+
(ValueDeclaration :fed_tax_mj
|
326
|
+
(CallExpression :sum
|
327
|
+
(CallExpression :multiply
|
328
|
+
(DeclarationReference :amt_mj)
|
329
|
+
(DeclarationReference :rate_mj)
|
330
|
+
)
|
331
|
+
)
|
332
|
+
)
|
333
|
+
(ValueDeclaration :in_br_mj
|
334
|
+
(CallExpression :and
|
335
|
+
(CallExpression :>=
|
336
|
+
(DeclarationReference :taxable_mj)
|
337
|
+
(DeclarationReference :lo_mj)
|
338
|
+
)
|
339
|
+
(CallExpression :<
|
340
|
+
(DeclarationReference :taxable_mj)
|
341
|
+
(DeclarationReference :hi_mj_eff)
|
342
|
+
)
|
343
|
+
)
|
344
|
+
)
|
345
|
+
(ValueDeclaration :fed_marginal_mj
|
346
|
+
(CallExpression :sum_if
|
347
|
+
(DeclarationReference :rate_mj)
|
348
|
+
(DeclarationReference :in_br_mj)
|
349
|
+
)
|
350
|
+
)
|
351
|
+
(ValueDeclaration :fed_eff_mj
|
352
|
+
(CallExpression :divide
|
353
|
+
(DeclarationReference :fed_tax_mj)
|
354
|
+
(CallExpression :max
|
355
|
+
(ArrayExpression
|
356
|
+
(InputReference :income)
|
357
|
+
(Literal 1.0)
|
358
|
+
)
|
359
|
+
)
|
360
|
+
)
|
361
|
+
)
|
362
|
+
(ValueDeclaration :ss_tax_mj
|
363
|
+
(DeclarationReference :ss_tax_s)
|
364
|
+
)
|
365
|
+
(ValueDeclaration :med_tax_mj
|
366
|
+
(DeclarationReference :med_tax_s)
|
367
|
+
)
|
368
|
+
(ValueDeclaration :addl_med_tax_mj
|
369
|
+
(CallExpression :multiply
|
370
|
+
(CallExpression :max
|
371
|
+
(ArrayExpression
|
372
|
+
(CallExpression :subtract
|
373
|
+
(InputReference :income)
|
374
|
+
(DeclarationReference :addl_threshold_mj)
|
375
|
+
)
|
376
|
+
(Literal 0)
|
377
|
+
)
|
378
|
+
)
|
379
|
+
(DeclarationReference :addl_med_rate)
|
380
|
+
)
|
381
|
+
)
|
382
|
+
(ValueDeclaration :fica_tax_mj
|
383
|
+
(CallExpression :add
|
384
|
+
(CallExpression :add
|
385
|
+
(DeclarationReference :ss_tax_mj)
|
386
|
+
(DeclarationReference :med_tax_mj)
|
387
|
+
)
|
388
|
+
(DeclarationReference :addl_med_tax_mj)
|
389
|
+
)
|
390
|
+
)
|
391
|
+
(ValueDeclaration :fica_eff_mj
|
392
|
+
(CallExpression :divide
|
393
|
+
(DeclarationReference :fica_tax_mj)
|
394
|
+
(CallExpression :max
|
395
|
+
(ArrayExpression
|
396
|
+
(InputReference :income)
|
397
|
+
(Literal 1.0)
|
398
|
+
)
|
399
|
+
)
|
400
|
+
)
|
401
|
+
)
|
402
|
+
(ValueDeclaration :total_tax_mj
|
403
|
+
(CallExpression :add
|
404
|
+
(CallExpression :add
|
405
|
+
(CallExpression :add
|
406
|
+
(DeclarationReference :fed_tax_mj)
|
407
|
+
(DeclarationReference :fica_tax_mj)
|
408
|
+
)
|
409
|
+
(DeclarationReference :state_tax)
|
410
|
+
)
|
411
|
+
(DeclarationReference :local_tax)
|
412
|
+
)
|
413
|
+
)
|
414
|
+
(ValueDeclaration :total_eff_mj
|
415
|
+
(CallExpression :divide
|
416
|
+
(DeclarationReference :total_tax_mj)
|
417
|
+
(CallExpression :max
|
418
|
+
(ArrayExpression
|
419
|
+
(InputReference :income)
|
420
|
+
(Literal 1.0)
|
421
|
+
)
|
422
|
+
)
|
423
|
+
)
|
424
|
+
)
|
425
|
+
(ValueDeclaration :after_tax_mj
|
426
|
+
(CallExpression :subtract
|
427
|
+
(InputReference :income)
|
428
|
+
(DeclarationReference :total_tax_mj)
|
429
|
+
)
|
430
|
+
)
|
431
|
+
(ValueDeclaration :take_home_mj
|
432
|
+
(CallExpression :subtract
|
433
|
+
(DeclarationReference :after_tax_mj)
|
434
|
+
(InputReference :retirement_contrib)
|
435
|
+
)
|
436
|
+
)
|
437
|
+
(ValueDeclaration :taxable_ms
|
438
|
+
(CallExpression :max
|
439
|
+
(ArrayExpression
|
440
|
+
(CallExpression :subtract
|
441
|
+
(InputReference :income)
|
442
|
+
(InputElementReference fed.married_separate.std)
|
443
|
+
)
|
444
|
+
(Literal 0)
|
445
|
+
)
|
446
|
+
)
|
447
|
+
)
|
448
|
+
(ValueDeclaration :lo_ms
|
449
|
+
(InputElementReference fed.married_separate.rates.bracket.lo)
|
450
|
+
)
|
451
|
+
(ValueDeclaration :hi_ms
|
452
|
+
(InputElementReference fed.married_separate.rates.bracket.hi)
|
453
|
+
)
|
454
|
+
(ValueDeclaration :rate_ms
|
455
|
+
(InputElementReference fed.married_separate.rates.bracket.rate)
|
456
|
+
)
|
457
|
+
(ValueDeclaration :hi_ms_eff
|
458
|
+
(CallExpression :select
|
459
|
+
(CallExpression :==
|
460
|
+
(DeclarationReference :hi_ms)
|
461
|
+
(Literal -1)
|
462
|
+
)
|
463
|
+
(DeclarationReference :big_hi)
|
464
|
+
(DeclarationReference :hi_ms)
|
465
|
+
)
|
466
|
+
)
|
467
|
+
(ValueDeclaration :amt_ms
|
468
|
+
(CallExpression :clamp
|
469
|
+
(CallExpression :subtract
|
470
|
+
(DeclarationReference :taxable_ms)
|
471
|
+
(DeclarationReference :lo_ms)
|
472
|
+
)
|
473
|
+
(Literal 0)
|
474
|
+
(CallExpression :subtract
|
475
|
+
(DeclarationReference :hi_ms_eff)
|
476
|
+
(DeclarationReference :lo_ms)
|
477
|
+
)
|
478
|
+
)
|
479
|
+
)
|
480
|
+
(ValueDeclaration :fed_tax_ms
|
481
|
+
(CallExpression :sum
|
482
|
+
(CallExpression :multiply
|
483
|
+
(DeclarationReference :amt_ms)
|
484
|
+
(DeclarationReference :rate_ms)
|
485
|
+
)
|
486
|
+
)
|
487
|
+
)
|
488
|
+
(ValueDeclaration :in_br_ms
|
489
|
+
(CallExpression :and
|
490
|
+
(CallExpression :>=
|
491
|
+
(DeclarationReference :taxable_ms)
|
492
|
+
(DeclarationReference :lo_ms)
|
493
|
+
)
|
494
|
+
(CallExpression :<
|
495
|
+
(DeclarationReference :taxable_ms)
|
496
|
+
(DeclarationReference :hi_ms_eff)
|
497
|
+
)
|
498
|
+
)
|
499
|
+
)
|
500
|
+
(ValueDeclaration :fed_marginal_ms
|
501
|
+
(CallExpression :sum_if
|
502
|
+
(DeclarationReference :rate_ms)
|
503
|
+
(DeclarationReference :in_br_ms)
|
504
|
+
)
|
505
|
+
)
|
506
|
+
(ValueDeclaration :fed_eff_ms
|
507
|
+
(CallExpression :divide
|
508
|
+
(DeclarationReference :fed_tax_ms)
|
509
|
+
(CallExpression :max
|
510
|
+
(ArrayExpression
|
511
|
+
(InputReference :income)
|
512
|
+
(Literal 1.0)
|
513
|
+
)
|
514
|
+
)
|
515
|
+
)
|
516
|
+
)
|
517
|
+
(ValueDeclaration :ss_tax_ms
|
518
|
+
(DeclarationReference :ss_tax_s)
|
519
|
+
)
|
520
|
+
(ValueDeclaration :med_tax_ms
|
521
|
+
(DeclarationReference :med_tax_s)
|
522
|
+
)
|
523
|
+
(ValueDeclaration :addl_med_tax_ms
|
524
|
+
(CallExpression :multiply
|
525
|
+
(CallExpression :max
|
526
|
+
(ArrayExpression
|
527
|
+
(CallExpression :subtract
|
528
|
+
(InputReference :income)
|
529
|
+
(DeclarationReference :addl_threshold_ms)
|
530
|
+
)
|
531
|
+
(Literal 0)
|
532
|
+
)
|
533
|
+
)
|
534
|
+
(DeclarationReference :addl_med_rate)
|
535
|
+
)
|
536
|
+
)
|
537
|
+
(ValueDeclaration :fica_tax_ms
|
538
|
+
(CallExpression :add
|
539
|
+
(CallExpression :add
|
540
|
+
(DeclarationReference :ss_tax_ms)
|
541
|
+
(DeclarationReference :med_tax_ms)
|
542
|
+
)
|
543
|
+
(DeclarationReference :addl_med_tax_ms)
|
544
|
+
)
|
545
|
+
)
|
546
|
+
(ValueDeclaration :fica_eff_ms
|
547
|
+
(CallExpression :divide
|
548
|
+
(DeclarationReference :fica_tax_ms)
|
549
|
+
(CallExpression :max
|
550
|
+
(ArrayExpression
|
551
|
+
(InputReference :income)
|
552
|
+
(Literal 1.0)
|
553
|
+
)
|
554
|
+
)
|
555
|
+
)
|
556
|
+
)
|
557
|
+
(ValueDeclaration :total_tax_ms
|
558
|
+
(CallExpression :add
|
559
|
+
(CallExpression :add
|
560
|
+
(CallExpression :add
|
561
|
+
(DeclarationReference :fed_tax_ms)
|
562
|
+
(DeclarationReference :fica_tax_ms)
|
563
|
+
)
|
564
|
+
(DeclarationReference :state_tax)
|
565
|
+
)
|
566
|
+
(DeclarationReference :local_tax)
|
567
|
+
)
|
568
|
+
)
|
569
|
+
(ValueDeclaration :total_eff_ms
|
570
|
+
(CallExpression :divide
|
571
|
+
(DeclarationReference :total_tax_ms)
|
572
|
+
(CallExpression :max
|
573
|
+
(ArrayExpression
|
574
|
+
(InputReference :income)
|
575
|
+
(Literal 1.0)
|
576
|
+
)
|
577
|
+
)
|
578
|
+
)
|
579
|
+
)
|
580
|
+
(ValueDeclaration :after_tax_ms
|
581
|
+
(CallExpression :subtract
|
582
|
+
(InputReference :income)
|
583
|
+
(DeclarationReference :total_tax_ms)
|
584
|
+
)
|
585
|
+
)
|
586
|
+
(ValueDeclaration :take_home_ms
|
587
|
+
(CallExpression :subtract
|
588
|
+
(DeclarationReference :after_tax_ms)
|
589
|
+
(InputReference :retirement_contrib)
|
590
|
+
)
|
591
|
+
)
|
592
|
+
(ValueDeclaration :taxable_hoh
|
593
|
+
(CallExpression :max
|
594
|
+
(ArrayExpression
|
595
|
+
(CallExpression :subtract
|
596
|
+
(InputReference :income)
|
597
|
+
(InputElementReference fed.head_of_household.std)
|
598
|
+
)
|
599
|
+
(Literal 0)
|
600
|
+
)
|
601
|
+
)
|
602
|
+
)
|
603
|
+
(ValueDeclaration :lo_h
|
604
|
+
(InputElementReference fed.head_of_household.rates.bracket.lo)
|
605
|
+
)
|
606
|
+
(ValueDeclaration :hi_h
|
607
|
+
(InputElementReference fed.head_of_household.rates.bracket.hi)
|
608
|
+
)
|
609
|
+
(ValueDeclaration :rate_h
|
610
|
+
(InputElementReference fed.head_of_household.rates.bracket.rate)
|
611
|
+
)
|
612
|
+
(ValueDeclaration :hi_h_eff
|
613
|
+
(CallExpression :select
|
614
|
+
(CallExpression :==
|
615
|
+
(DeclarationReference :hi_h)
|
616
|
+
(Literal -1)
|
617
|
+
)
|
618
|
+
(DeclarationReference :big_hi)
|
619
|
+
(DeclarationReference :hi_h)
|
620
|
+
)
|
621
|
+
)
|
622
|
+
(ValueDeclaration :amt_h
|
623
|
+
(CallExpression :clamp
|
624
|
+
(CallExpression :subtract
|
625
|
+
(DeclarationReference :taxable_hoh)
|
626
|
+
(DeclarationReference :lo_h)
|
627
|
+
)
|
628
|
+
(Literal 0)
|
629
|
+
(CallExpression :subtract
|
630
|
+
(DeclarationReference :hi_h_eff)
|
631
|
+
(DeclarationReference :lo_h)
|
632
|
+
)
|
633
|
+
)
|
634
|
+
)
|
635
|
+
(ValueDeclaration :fed_tax_hoh
|
636
|
+
(CallExpression :sum
|
637
|
+
(CallExpression :multiply
|
638
|
+
(DeclarationReference :amt_h)
|
639
|
+
(DeclarationReference :rate_h)
|
640
|
+
)
|
641
|
+
)
|
642
|
+
)
|
643
|
+
(ValueDeclaration :in_br_h
|
644
|
+
(CallExpression :and
|
645
|
+
(CallExpression :>=
|
646
|
+
(DeclarationReference :taxable_hoh)
|
647
|
+
(DeclarationReference :lo_h)
|
648
|
+
)
|
649
|
+
(CallExpression :<
|
650
|
+
(DeclarationReference :taxable_hoh)
|
651
|
+
(DeclarationReference :hi_h_eff)
|
652
|
+
)
|
653
|
+
)
|
654
|
+
)
|
655
|
+
(ValueDeclaration :fed_marginal_hoh
|
656
|
+
(CallExpression :sum_if
|
657
|
+
(DeclarationReference :rate_h)
|
658
|
+
(DeclarationReference :in_br_h)
|
659
|
+
)
|
660
|
+
)
|
661
|
+
(ValueDeclaration :fed_eff_hoh
|
662
|
+
(CallExpression :divide
|
663
|
+
(DeclarationReference :fed_tax_hoh)
|
664
|
+
(CallExpression :max
|
665
|
+
(ArrayExpression
|
666
|
+
(InputReference :income)
|
667
|
+
(Literal 1.0)
|
668
|
+
)
|
669
|
+
)
|
670
|
+
)
|
671
|
+
)
|
672
|
+
(ValueDeclaration :ss_tax_h
|
673
|
+
(DeclarationReference :ss_tax_s)
|
674
|
+
)
|
675
|
+
(ValueDeclaration :med_tax_h
|
676
|
+
(DeclarationReference :med_tax_s)
|
677
|
+
)
|
678
|
+
(ValueDeclaration :addl_med_tax_h
|
679
|
+
(CallExpression :multiply
|
680
|
+
(CallExpression :max
|
681
|
+
(ArrayExpression
|
682
|
+
(CallExpression :subtract
|
683
|
+
(InputReference :income)
|
684
|
+
(DeclarationReference :addl_threshold_hoh)
|
685
|
+
)
|
686
|
+
(Literal 0)
|
687
|
+
)
|
688
|
+
)
|
689
|
+
(DeclarationReference :addl_med_rate)
|
690
|
+
)
|
691
|
+
)
|
692
|
+
(ValueDeclaration :fica_tax_hoh
|
693
|
+
(CallExpression :add
|
694
|
+
(CallExpression :add
|
695
|
+
(DeclarationReference :ss_tax_h)
|
696
|
+
(DeclarationReference :med_tax_h)
|
697
|
+
)
|
698
|
+
(DeclarationReference :addl_med_tax_h)
|
699
|
+
)
|
700
|
+
)
|
701
|
+
(ValueDeclaration :fica_eff_hoh
|
702
|
+
(CallExpression :divide
|
703
|
+
(DeclarationReference :fica_tax_hoh)
|
704
|
+
(CallExpression :max
|
705
|
+
(ArrayExpression
|
706
|
+
(InputReference :income)
|
707
|
+
(Literal 1.0)
|
708
|
+
)
|
709
|
+
)
|
710
|
+
)
|
711
|
+
)
|
712
|
+
(ValueDeclaration :total_tax_hoh
|
713
|
+
(CallExpression :add
|
714
|
+
(CallExpression :add
|
715
|
+
(CallExpression :add
|
716
|
+
(DeclarationReference :fed_tax_hoh)
|
717
|
+
(DeclarationReference :fica_tax_hoh)
|
718
|
+
)
|
719
|
+
(DeclarationReference :state_tax)
|
720
|
+
)
|
721
|
+
(DeclarationReference :local_tax)
|
722
|
+
)
|
723
|
+
)
|
724
|
+
(ValueDeclaration :total_eff_hoh
|
725
|
+
(CallExpression :divide
|
726
|
+
(DeclarationReference :total_tax_hoh)
|
727
|
+
(CallExpression :max
|
728
|
+
(ArrayExpression
|
729
|
+
(InputReference :income)
|
730
|
+
(Literal 1.0)
|
731
|
+
)
|
732
|
+
)
|
733
|
+
)
|
734
|
+
)
|
735
|
+
(ValueDeclaration :after_tax_hoh
|
736
|
+
(CallExpression :subtract
|
737
|
+
(InputReference :income)
|
738
|
+
(DeclarationReference :total_tax_hoh)
|
739
|
+
)
|
740
|
+
)
|
741
|
+
(ValueDeclaration :take_home_hoh
|
742
|
+
(CallExpression :subtract
|
743
|
+
(DeclarationReference :after_tax_hoh)
|
744
|
+
(InputReference :retirement_contrib)
|
745
|
+
)
|
746
|
+
)
|
747
|
+
(ValueDeclaration :summary
|
748
|
+
(HashExpression
|
749
|
+
((Literal :single) (HashExpression
|
750
|
+
((Literal :federal) (HashExpression
|
751
|
+
((Literal :marginal) (DeclarationReference :fed_marginal_single))
|
752
|
+
((Literal :effective) (DeclarationReference :fed_eff_single))
|
753
|
+
((Literal :tax) (DeclarationReference :fed_tax_single))
|
754
|
+
))
|
755
|
+
((Literal :fica) (HashExpression
|
756
|
+
((Literal :effective) (DeclarationReference :fica_eff_single))
|
757
|
+
((Literal :tax) (DeclarationReference :fica_tax_single))
|
758
|
+
))
|
759
|
+
((Literal :state) (HashExpression
|
760
|
+
((Literal :marginal) (InputReference :state_rate))
|
761
|
+
((Literal :effective) (InputReference :state_rate))
|
762
|
+
((Literal :tax) (DeclarationReference :state_tax))
|
763
|
+
))
|
764
|
+
((Literal :local) (HashExpression
|
765
|
+
((Literal :marginal) (InputReference :local_rate))
|
766
|
+
((Literal :effective) (InputReference :local_rate))
|
767
|
+
((Literal :tax) (DeclarationReference :local_tax))
|
768
|
+
))
|
769
|
+
((Literal :total) (HashExpression
|
770
|
+
((Literal :effective) (DeclarationReference :total_eff_single))
|
771
|
+
((Literal :tax) (DeclarationReference :total_tax_single))
|
772
|
+
))
|
773
|
+
((Literal :after_tax) (DeclarationReference :after_tax_single))
|
774
|
+
((Literal :retirement_contrib) (InputReference :retirement_contrib))
|
775
|
+
((Literal :take_home) (DeclarationReference :take_home_single))
|
776
|
+
))
|
777
|
+
((Literal :married_joint) (HashExpression
|
778
|
+
((Literal :federal) (HashExpression
|
779
|
+
((Literal :marginal) (DeclarationReference :fed_marginal_mj))
|
780
|
+
((Literal :effective) (DeclarationReference :fed_eff_mj))
|
781
|
+
((Literal :tax) (DeclarationReference :fed_tax_mj))
|
782
|
+
))
|
783
|
+
((Literal :fica) (HashExpression
|
784
|
+
((Literal :effective) (DeclarationReference :fica_eff_mj))
|
785
|
+
((Literal :tax) (DeclarationReference :fica_tax_mj))
|
786
|
+
))
|
787
|
+
((Literal :state) (HashExpression
|
788
|
+
((Literal :marginal) (InputReference :state_rate))
|
789
|
+
((Literal :effective) (InputReference :state_rate))
|
790
|
+
((Literal :tax) (DeclarationReference :state_tax))
|
791
|
+
))
|
792
|
+
((Literal :local) (HashExpression
|
793
|
+
((Literal :marginal) (InputReference :local_rate))
|
794
|
+
((Literal :effective) (InputReference :local_rate))
|
795
|
+
((Literal :tax) (DeclarationReference :local_tax))
|
796
|
+
))
|
797
|
+
((Literal :total) (HashExpression
|
798
|
+
((Literal :effective) (DeclarationReference :total_eff_mj))
|
799
|
+
((Literal :tax) (DeclarationReference :total_tax_mj))
|
800
|
+
))
|
801
|
+
((Literal :after_tax) (DeclarationReference :after_tax_mj))
|
802
|
+
((Literal :retirement_contrib) (InputReference :retirement_contrib))
|
803
|
+
((Literal :take_home) (DeclarationReference :take_home_mj))
|
804
|
+
))
|
805
|
+
((Literal :married_separate) (HashExpression
|
806
|
+
((Literal :federal) (HashExpression
|
807
|
+
((Literal :marginal) (DeclarationReference :fed_marginal_ms))
|
808
|
+
((Literal :effective) (DeclarationReference :fed_eff_ms))
|
809
|
+
((Literal :tax) (DeclarationReference :fed_tax_ms))
|
810
|
+
))
|
811
|
+
((Literal :fica) (HashExpression
|
812
|
+
((Literal :effective) (DeclarationReference :fica_eff_ms))
|
813
|
+
((Literal :tax) (DeclarationReference :fica_tax_ms))
|
814
|
+
))
|
815
|
+
((Literal :state) (HashExpression
|
816
|
+
((Literal :marginal) (InputReference :state_rate))
|
817
|
+
((Literal :effective) (InputReference :state_rate))
|
818
|
+
((Literal :tax) (DeclarationReference :state_tax))
|
819
|
+
))
|
820
|
+
((Literal :local) (HashExpression
|
821
|
+
((Literal :marginal) (InputReference :local_rate))
|
822
|
+
((Literal :effective) (InputReference :local_rate))
|
823
|
+
((Literal :tax) (DeclarationReference :local_tax))
|
824
|
+
))
|
825
|
+
((Literal :total) (HashExpression
|
826
|
+
((Literal :effective) (DeclarationReference :total_eff_ms))
|
827
|
+
((Literal :tax) (DeclarationReference :total_tax_ms))
|
828
|
+
))
|
829
|
+
((Literal :after_tax) (DeclarationReference :after_tax_ms))
|
830
|
+
((Literal :retirement_contrib) (InputReference :retirement_contrib))
|
831
|
+
((Literal :take_home) (DeclarationReference :take_home_ms))
|
832
|
+
))
|
833
|
+
((Literal :head_of_household) (HashExpression
|
834
|
+
((Literal :federal) (HashExpression
|
835
|
+
((Literal :marginal) (DeclarationReference :fed_marginal_hoh))
|
836
|
+
((Literal :effective) (DeclarationReference :fed_eff_hoh))
|
837
|
+
((Literal :tax) (DeclarationReference :fed_tax_hoh))
|
838
|
+
))
|
839
|
+
((Literal :fica) (HashExpression
|
840
|
+
((Literal :effective) (DeclarationReference :fica_eff_hoh))
|
841
|
+
((Literal :tax) (DeclarationReference :fica_tax_hoh))
|
842
|
+
))
|
843
|
+
((Literal :state) (HashExpression
|
844
|
+
((Literal :marginal) (InputReference :state_rate))
|
845
|
+
((Literal :effective) (InputReference :state_rate))
|
846
|
+
((Literal :tax) (DeclarationReference :state_tax))
|
847
|
+
))
|
848
|
+
((Literal :local) (HashExpression
|
849
|
+
((Literal :marginal) (InputReference :local_rate))
|
850
|
+
((Literal :effective) (InputReference :local_rate))
|
851
|
+
((Literal :tax) (DeclarationReference :local_tax))
|
852
|
+
))
|
853
|
+
((Literal :total) (HashExpression
|
854
|
+
((Literal :effective) (DeclarationReference :total_eff_hoh))
|
855
|
+
((Literal :tax) (DeclarationReference :total_tax_hoh))
|
856
|
+
))
|
857
|
+
((Literal :after_tax) (DeclarationReference :after_tax_hoh))
|
858
|
+
((Literal :retirement_contrib) (InputReference :retirement_contrib))
|
859
|
+
((Literal :take_home) (DeclarationReference :take_home_hoh))
|
860
|
+
))
|
861
|
+
)
|
862
|
+
)
|
863
|
+
]
|
864
|
+
traits: []
|
865
|
+
)
|