kumi 0.0.23 → 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 +3 -0
- data/README.md +2 -2
- 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/version.rb +1 -1
- metadata +33 -1
@@ -0,0 +1,976 @@
|
|
1
|
+
(NAST
|
2
|
+
(VALUE state_tax
|
3
|
+
(Call :"core.mul"
|
4
|
+
(InputRef [:income])
|
5
|
+
(InputRef [:state_rate])
|
6
|
+
)
|
7
|
+
)
|
8
|
+
(VALUE local_tax
|
9
|
+
(Call :"core.mul"
|
10
|
+
(InputRef [:income])
|
11
|
+
(InputRef [:local_rate])
|
12
|
+
)
|
13
|
+
)
|
14
|
+
(VALUE taxable_single
|
15
|
+
(Call :"agg.max"
|
16
|
+
(Tuple
|
17
|
+
(Call :"core.sub"
|
18
|
+
(InputRef [:income])
|
19
|
+
(InputRef [:fed, :single, :std])
|
20
|
+
)
|
21
|
+
(Const 0)
|
22
|
+
)
|
23
|
+
)
|
24
|
+
)
|
25
|
+
(VALUE lo_s
|
26
|
+
(InputRef [:fed, :single, :rates, :bracket, :lo])
|
27
|
+
)
|
28
|
+
(VALUE hi_s
|
29
|
+
(InputRef [:fed, :single, :rates, :bracket, :hi])
|
30
|
+
)
|
31
|
+
(VALUE rate_s
|
32
|
+
(InputRef [:fed, :single, :rates, :bracket, :rate])
|
33
|
+
)
|
34
|
+
(VALUE big_hi
|
35
|
+
(Const 100000000000.0)
|
36
|
+
)
|
37
|
+
(VALUE hi_s_eff
|
38
|
+
(Call :__select__
|
39
|
+
(Call :"core.eq"
|
40
|
+
(Ref hi_s)
|
41
|
+
(Const -1)
|
42
|
+
)
|
43
|
+
(Ref big_hi)
|
44
|
+
(Ref hi_s)
|
45
|
+
)
|
46
|
+
)
|
47
|
+
(VALUE amt_s
|
48
|
+
(Call :"core.clamp"
|
49
|
+
(Call :"core.sub"
|
50
|
+
(Ref taxable_single)
|
51
|
+
(Ref lo_s)
|
52
|
+
)
|
53
|
+
(Const 0)
|
54
|
+
(Call :"core.sub"
|
55
|
+
(Ref hi_s_eff)
|
56
|
+
(Ref lo_s)
|
57
|
+
)
|
58
|
+
)
|
59
|
+
)
|
60
|
+
(VALUE fed_tax_single
|
61
|
+
(Call :"agg.sum"
|
62
|
+
(Call :"core.mul"
|
63
|
+
(Ref amt_s)
|
64
|
+
(Ref rate_s)
|
65
|
+
)
|
66
|
+
)
|
67
|
+
)
|
68
|
+
(VALUE in_br_s
|
69
|
+
(Call :"core.and"
|
70
|
+
(Call :"core.gte"
|
71
|
+
(Ref taxable_single)
|
72
|
+
(Ref lo_s)
|
73
|
+
)
|
74
|
+
(Call :"core.lt"
|
75
|
+
(Ref taxable_single)
|
76
|
+
(Ref hi_s_eff)
|
77
|
+
)
|
78
|
+
)
|
79
|
+
)
|
80
|
+
(VALUE fed_marginal_single
|
81
|
+
(Call :sum
|
82
|
+
(Call :__select__
|
83
|
+
(Ref in_br_s)
|
84
|
+
(Ref rate_s)
|
85
|
+
(Const 0)
|
86
|
+
)
|
87
|
+
)
|
88
|
+
)
|
89
|
+
(VALUE fed_eff_single
|
90
|
+
(Call :"core.div"
|
91
|
+
(Ref fed_tax_single)
|
92
|
+
(Call :"agg.max"
|
93
|
+
(Tuple
|
94
|
+
(InputRef [:income])
|
95
|
+
(Const 1.0)
|
96
|
+
)
|
97
|
+
)
|
98
|
+
)
|
99
|
+
)
|
100
|
+
(VALUE ss_wage_base
|
101
|
+
(Const 168600.0)
|
102
|
+
)
|
103
|
+
(VALUE ss_rate
|
104
|
+
(Const 0.062)
|
105
|
+
)
|
106
|
+
(VALUE ss_tax_s
|
107
|
+
(Call :"core.mul"
|
108
|
+
(Call :"agg.min"
|
109
|
+
(Tuple
|
110
|
+
(InputRef [:income])
|
111
|
+
(Ref ss_wage_base)
|
112
|
+
)
|
113
|
+
)
|
114
|
+
(Ref ss_rate)
|
115
|
+
)
|
116
|
+
)
|
117
|
+
(VALUE med_base_rate
|
118
|
+
(Const 0.0145)
|
119
|
+
)
|
120
|
+
(VALUE med_tax_s
|
121
|
+
(Call :"core.mul"
|
122
|
+
(InputRef [:income])
|
123
|
+
(Ref med_base_rate)
|
124
|
+
)
|
125
|
+
)
|
126
|
+
(VALUE addl_threshold_single
|
127
|
+
(Const 200000.0)
|
128
|
+
)
|
129
|
+
(VALUE addl_med_rate
|
130
|
+
(Const 0.009)
|
131
|
+
)
|
132
|
+
(VALUE addl_med_tax_s
|
133
|
+
(Call :"core.mul"
|
134
|
+
(Call :"agg.max"
|
135
|
+
(Tuple
|
136
|
+
(Call :"core.sub"
|
137
|
+
(InputRef [:income])
|
138
|
+
(Ref addl_threshold_single)
|
139
|
+
)
|
140
|
+
(Const 0)
|
141
|
+
)
|
142
|
+
)
|
143
|
+
(Ref addl_med_rate)
|
144
|
+
)
|
145
|
+
)
|
146
|
+
(VALUE fica_tax_single
|
147
|
+
(Call :"core.add"
|
148
|
+
(Call :"core.add"
|
149
|
+
(Ref ss_tax_s)
|
150
|
+
(Ref med_tax_s)
|
151
|
+
)
|
152
|
+
(Ref addl_med_tax_s)
|
153
|
+
)
|
154
|
+
)
|
155
|
+
(VALUE fica_eff_single
|
156
|
+
(Call :"core.div"
|
157
|
+
(Ref fica_tax_single)
|
158
|
+
(Call :"agg.max"
|
159
|
+
(Tuple
|
160
|
+
(InputRef [:income])
|
161
|
+
(Const 1.0)
|
162
|
+
)
|
163
|
+
)
|
164
|
+
)
|
165
|
+
)
|
166
|
+
(VALUE total_tax_single
|
167
|
+
(Call :"core.add"
|
168
|
+
(Call :"core.add"
|
169
|
+
(Call :"core.add"
|
170
|
+
(Ref fed_tax_single)
|
171
|
+
(Ref fica_tax_single)
|
172
|
+
)
|
173
|
+
(Ref state_tax)
|
174
|
+
)
|
175
|
+
(Ref local_tax)
|
176
|
+
)
|
177
|
+
)
|
178
|
+
(VALUE total_eff_single
|
179
|
+
(Call :"core.div"
|
180
|
+
(Ref total_tax_single)
|
181
|
+
(Call :"agg.max"
|
182
|
+
(Tuple
|
183
|
+
(InputRef [:income])
|
184
|
+
(Const 1.0)
|
185
|
+
)
|
186
|
+
)
|
187
|
+
)
|
188
|
+
)
|
189
|
+
(VALUE after_tax_single
|
190
|
+
(Call :"core.sub"
|
191
|
+
(InputRef [:income])
|
192
|
+
(Ref total_tax_single)
|
193
|
+
)
|
194
|
+
)
|
195
|
+
(VALUE take_home_single
|
196
|
+
(Call :"core.sub"
|
197
|
+
(Ref after_tax_single)
|
198
|
+
(InputRef [:retirement_contrib])
|
199
|
+
)
|
200
|
+
)
|
201
|
+
(VALUE taxable_mj
|
202
|
+
(Call :"agg.max"
|
203
|
+
(Tuple
|
204
|
+
(Call :"core.sub"
|
205
|
+
(InputRef [:income])
|
206
|
+
(InputRef [:fed, :married_joint, :std])
|
207
|
+
)
|
208
|
+
(Const 0)
|
209
|
+
)
|
210
|
+
)
|
211
|
+
)
|
212
|
+
(VALUE lo_mj
|
213
|
+
(InputRef [:fed, :married_joint, :rates, :bracket, :lo])
|
214
|
+
)
|
215
|
+
(VALUE hi_mj
|
216
|
+
(InputRef [:fed, :married_joint, :rates, :bracket, :hi])
|
217
|
+
)
|
218
|
+
(VALUE rate_mj
|
219
|
+
(InputRef [:fed, :married_joint, :rates, :bracket, :rate])
|
220
|
+
)
|
221
|
+
(VALUE hi_mj_eff
|
222
|
+
(Call :__select__
|
223
|
+
(Call :"core.eq"
|
224
|
+
(Ref hi_mj)
|
225
|
+
(Const -1)
|
226
|
+
)
|
227
|
+
(Ref big_hi)
|
228
|
+
(Ref hi_mj)
|
229
|
+
)
|
230
|
+
)
|
231
|
+
(VALUE amt_mj
|
232
|
+
(Call :"core.clamp"
|
233
|
+
(Call :"core.sub"
|
234
|
+
(Ref taxable_mj)
|
235
|
+
(Ref lo_mj)
|
236
|
+
)
|
237
|
+
(Const 0)
|
238
|
+
(Call :"core.sub"
|
239
|
+
(Ref hi_mj_eff)
|
240
|
+
(Ref lo_mj)
|
241
|
+
)
|
242
|
+
)
|
243
|
+
)
|
244
|
+
(VALUE fed_tax_mj
|
245
|
+
(Call :"agg.sum"
|
246
|
+
(Call :"core.mul"
|
247
|
+
(Ref amt_mj)
|
248
|
+
(Ref rate_mj)
|
249
|
+
)
|
250
|
+
)
|
251
|
+
)
|
252
|
+
(VALUE in_br_mj
|
253
|
+
(Call :"core.and"
|
254
|
+
(Call :"core.gte"
|
255
|
+
(Ref taxable_mj)
|
256
|
+
(Ref lo_mj)
|
257
|
+
)
|
258
|
+
(Call :"core.lt"
|
259
|
+
(Ref taxable_mj)
|
260
|
+
(Ref hi_mj_eff)
|
261
|
+
)
|
262
|
+
)
|
263
|
+
)
|
264
|
+
(VALUE fed_marginal_mj
|
265
|
+
(Call :sum
|
266
|
+
(Call :__select__
|
267
|
+
(Ref in_br_mj)
|
268
|
+
(Ref rate_mj)
|
269
|
+
(Const 0)
|
270
|
+
)
|
271
|
+
)
|
272
|
+
)
|
273
|
+
(VALUE fed_eff_mj
|
274
|
+
(Call :"core.div"
|
275
|
+
(Ref fed_tax_mj)
|
276
|
+
(Call :"agg.max"
|
277
|
+
(Tuple
|
278
|
+
(InputRef [:income])
|
279
|
+
(Const 1.0)
|
280
|
+
)
|
281
|
+
)
|
282
|
+
)
|
283
|
+
)
|
284
|
+
(VALUE ss_tax_mj
|
285
|
+
(Ref ss_tax_s)
|
286
|
+
)
|
287
|
+
(VALUE med_tax_mj
|
288
|
+
(Ref med_tax_s)
|
289
|
+
)
|
290
|
+
(VALUE addl_threshold_mj
|
291
|
+
(Const 250000.0)
|
292
|
+
)
|
293
|
+
(VALUE addl_med_tax_mj
|
294
|
+
(Call :"core.mul"
|
295
|
+
(Call :"agg.max"
|
296
|
+
(Tuple
|
297
|
+
(Call :"core.sub"
|
298
|
+
(InputRef [:income])
|
299
|
+
(Ref addl_threshold_mj)
|
300
|
+
)
|
301
|
+
(Const 0)
|
302
|
+
)
|
303
|
+
)
|
304
|
+
(Ref addl_med_rate)
|
305
|
+
)
|
306
|
+
)
|
307
|
+
(VALUE fica_tax_mj
|
308
|
+
(Call :"core.add"
|
309
|
+
(Call :"core.add"
|
310
|
+
(Ref ss_tax_mj)
|
311
|
+
(Ref med_tax_mj)
|
312
|
+
)
|
313
|
+
(Ref addl_med_tax_mj)
|
314
|
+
)
|
315
|
+
)
|
316
|
+
(VALUE fica_eff_mj
|
317
|
+
(Call :"core.div"
|
318
|
+
(Ref fica_tax_mj)
|
319
|
+
(Call :"agg.max"
|
320
|
+
(Tuple
|
321
|
+
(InputRef [:income])
|
322
|
+
(Const 1.0)
|
323
|
+
)
|
324
|
+
)
|
325
|
+
)
|
326
|
+
)
|
327
|
+
(VALUE total_tax_mj
|
328
|
+
(Call :"core.add"
|
329
|
+
(Call :"core.add"
|
330
|
+
(Call :"core.add"
|
331
|
+
(Ref fed_tax_mj)
|
332
|
+
(Ref fica_tax_mj)
|
333
|
+
)
|
334
|
+
(Ref state_tax)
|
335
|
+
)
|
336
|
+
(Ref local_tax)
|
337
|
+
)
|
338
|
+
)
|
339
|
+
(VALUE total_eff_mj
|
340
|
+
(Call :"core.div"
|
341
|
+
(Ref total_tax_mj)
|
342
|
+
(Call :"agg.max"
|
343
|
+
(Tuple
|
344
|
+
(InputRef [:income])
|
345
|
+
(Const 1.0)
|
346
|
+
)
|
347
|
+
)
|
348
|
+
)
|
349
|
+
)
|
350
|
+
(VALUE after_tax_mj
|
351
|
+
(Call :"core.sub"
|
352
|
+
(InputRef [:income])
|
353
|
+
(Ref total_tax_mj)
|
354
|
+
)
|
355
|
+
)
|
356
|
+
(VALUE take_home_mj
|
357
|
+
(Call :"core.sub"
|
358
|
+
(Ref after_tax_mj)
|
359
|
+
(InputRef [:retirement_contrib])
|
360
|
+
)
|
361
|
+
)
|
362
|
+
(VALUE taxable_ms
|
363
|
+
(Call :"agg.max"
|
364
|
+
(Tuple
|
365
|
+
(Call :"core.sub"
|
366
|
+
(InputRef [:income])
|
367
|
+
(InputRef [:fed, :married_separate, :std])
|
368
|
+
)
|
369
|
+
(Const 0)
|
370
|
+
)
|
371
|
+
)
|
372
|
+
)
|
373
|
+
(VALUE lo_ms
|
374
|
+
(InputRef [:fed, :married_separate, :rates, :bracket, :lo])
|
375
|
+
)
|
376
|
+
(VALUE hi_ms
|
377
|
+
(InputRef [:fed, :married_separate, :rates, :bracket, :hi])
|
378
|
+
)
|
379
|
+
(VALUE rate_ms
|
380
|
+
(InputRef [:fed, :married_separate, :rates, :bracket, :rate])
|
381
|
+
)
|
382
|
+
(VALUE hi_ms_eff
|
383
|
+
(Call :__select__
|
384
|
+
(Call :"core.eq"
|
385
|
+
(Ref hi_ms)
|
386
|
+
(Const -1)
|
387
|
+
)
|
388
|
+
(Ref big_hi)
|
389
|
+
(Ref hi_ms)
|
390
|
+
)
|
391
|
+
)
|
392
|
+
(VALUE amt_ms
|
393
|
+
(Call :"core.clamp"
|
394
|
+
(Call :"core.sub"
|
395
|
+
(Ref taxable_ms)
|
396
|
+
(Ref lo_ms)
|
397
|
+
)
|
398
|
+
(Const 0)
|
399
|
+
(Call :"core.sub"
|
400
|
+
(Ref hi_ms_eff)
|
401
|
+
(Ref lo_ms)
|
402
|
+
)
|
403
|
+
)
|
404
|
+
)
|
405
|
+
(VALUE fed_tax_ms
|
406
|
+
(Call :"agg.sum"
|
407
|
+
(Call :"core.mul"
|
408
|
+
(Ref amt_ms)
|
409
|
+
(Ref rate_ms)
|
410
|
+
)
|
411
|
+
)
|
412
|
+
)
|
413
|
+
(VALUE in_br_ms
|
414
|
+
(Call :"core.and"
|
415
|
+
(Call :"core.gte"
|
416
|
+
(Ref taxable_ms)
|
417
|
+
(Ref lo_ms)
|
418
|
+
)
|
419
|
+
(Call :"core.lt"
|
420
|
+
(Ref taxable_ms)
|
421
|
+
(Ref hi_ms_eff)
|
422
|
+
)
|
423
|
+
)
|
424
|
+
)
|
425
|
+
(VALUE fed_marginal_ms
|
426
|
+
(Call :sum
|
427
|
+
(Call :__select__
|
428
|
+
(Ref in_br_ms)
|
429
|
+
(Ref rate_ms)
|
430
|
+
(Const 0)
|
431
|
+
)
|
432
|
+
)
|
433
|
+
)
|
434
|
+
(VALUE fed_eff_ms
|
435
|
+
(Call :"core.div"
|
436
|
+
(Ref fed_tax_ms)
|
437
|
+
(Call :"agg.max"
|
438
|
+
(Tuple
|
439
|
+
(InputRef [:income])
|
440
|
+
(Const 1.0)
|
441
|
+
)
|
442
|
+
)
|
443
|
+
)
|
444
|
+
)
|
445
|
+
(VALUE ss_tax_ms
|
446
|
+
(Ref ss_tax_s)
|
447
|
+
)
|
448
|
+
(VALUE med_tax_ms
|
449
|
+
(Ref med_tax_s)
|
450
|
+
)
|
451
|
+
(VALUE addl_threshold_ms
|
452
|
+
(Const 125000.0)
|
453
|
+
)
|
454
|
+
(VALUE addl_med_tax_ms
|
455
|
+
(Call :"core.mul"
|
456
|
+
(Call :"agg.max"
|
457
|
+
(Tuple
|
458
|
+
(Call :"core.sub"
|
459
|
+
(InputRef [:income])
|
460
|
+
(Ref addl_threshold_ms)
|
461
|
+
)
|
462
|
+
(Const 0)
|
463
|
+
)
|
464
|
+
)
|
465
|
+
(Ref addl_med_rate)
|
466
|
+
)
|
467
|
+
)
|
468
|
+
(VALUE fica_tax_ms
|
469
|
+
(Call :"core.add"
|
470
|
+
(Call :"core.add"
|
471
|
+
(Ref ss_tax_ms)
|
472
|
+
(Ref med_tax_ms)
|
473
|
+
)
|
474
|
+
(Ref addl_med_tax_ms)
|
475
|
+
)
|
476
|
+
)
|
477
|
+
(VALUE fica_eff_ms
|
478
|
+
(Call :"core.div"
|
479
|
+
(Ref fica_tax_ms)
|
480
|
+
(Call :"agg.max"
|
481
|
+
(Tuple
|
482
|
+
(InputRef [:income])
|
483
|
+
(Const 1.0)
|
484
|
+
)
|
485
|
+
)
|
486
|
+
)
|
487
|
+
)
|
488
|
+
(VALUE total_tax_ms
|
489
|
+
(Call :"core.add"
|
490
|
+
(Call :"core.add"
|
491
|
+
(Call :"core.add"
|
492
|
+
(Ref fed_tax_ms)
|
493
|
+
(Ref fica_tax_ms)
|
494
|
+
)
|
495
|
+
(Ref state_tax)
|
496
|
+
)
|
497
|
+
(Ref local_tax)
|
498
|
+
)
|
499
|
+
)
|
500
|
+
(VALUE total_eff_ms
|
501
|
+
(Call :"core.div"
|
502
|
+
(Ref total_tax_ms)
|
503
|
+
(Call :"agg.max"
|
504
|
+
(Tuple
|
505
|
+
(InputRef [:income])
|
506
|
+
(Const 1.0)
|
507
|
+
)
|
508
|
+
)
|
509
|
+
)
|
510
|
+
)
|
511
|
+
(VALUE after_tax_ms
|
512
|
+
(Call :"core.sub"
|
513
|
+
(InputRef [:income])
|
514
|
+
(Ref total_tax_ms)
|
515
|
+
)
|
516
|
+
)
|
517
|
+
(VALUE take_home_ms
|
518
|
+
(Call :"core.sub"
|
519
|
+
(Ref after_tax_ms)
|
520
|
+
(InputRef [:retirement_contrib])
|
521
|
+
)
|
522
|
+
)
|
523
|
+
(VALUE taxable_hoh
|
524
|
+
(Call :"agg.max"
|
525
|
+
(Tuple
|
526
|
+
(Call :"core.sub"
|
527
|
+
(InputRef [:income])
|
528
|
+
(InputRef [:fed, :head_of_household, :std])
|
529
|
+
)
|
530
|
+
(Const 0)
|
531
|
+
)
|
532
|
+
)
|
533
|
+
)
|
534
|
+
(VALUE lo_h
|
535
|
+
(InputRef [:fed, :head_of_household, :rates, :bracket, :lo])
|
536
|
+
)
|
537
|
+
(VALUE hi_h
|
538
|
+
(InputRef [:fed, :head_of_household, :rates, :bracket, :hi])
|
539
|
+
)
|
540
|
+
(VALUE rate_h
|
541
|
+
(InputRef [:fed, :head_of_household, :rates, :bracket, :rate])
|
542
|
+
)
|
543
|
+
(VALUE hi_h_eff
|
544
|
+
(Call :__select__
|
545
|
+
(Call :"core.eq"
|
546
|
+
(Ref hi_h)
|
547
|
+
(Const -1)
|
548
|
+
)
|
549
|
+
(Ref big_hi)
|
550
|
+
(Ref hi_h)
|
551
|
+
)
|
552
|
+
)
|
553
|
+
(VALUE amt_h
|
554
|
+
(Call :"core.clamp"
|
555
|
+
(Call :"core.sub"
|
556
|
+
(Ref taxable_hoh)
|
557
|
+
(Ref lo_h)
|
558
|
+
)
|
559
|
+
(Const 0)
|
560
|
+
(Call :"core.sub"
|
561
|
+
(Ref hi_h_eff)
|
562
|
+
(Ref lo_h)
|
563
|
+
)
|
564
|
+
)
|
565
|
+
)
|
566
|
+
(VALUE fed_tax_hoh
|
567
|
+
(Call :"agg.sum"
|
568
|
+
(Call :"core.mul"
|
569
|
+
(Ref amt_h)
|
570
|
+
(Ref rate_h)
|
571
|
+
)
|
572
|
+
)
|
573
|
+
)
|
574
|
+
(VALUE in_br_h
|
575
|
+
(Call :"core.and"
|
576
|
+
(Call :"core.gte"
|
577
|
+
(Ref taxable_hoh)
|
578
|
+
(Ref lo_h)
|
579
|
+
)
|
580
|
+
(Call :"core.lt"
|
581
|
+
(Ref taxable_hoh)
|
582
|
+
(Ref hi_h_eff)
|
583
|
+
)
|
584
|
+
)
|
585
|
+
)
|
586
|
+
(VALUE fed_marginal_hoh
|
587
|
+
(Call :sum
|
588
|
+
(Call :__select__
|
589
|
+
(Ref in_br_h)
|
590
|
+
(Ref rate_h)
|
591
|
+
(Const 0)
|
592
|
+
)
|
593
|
+
)
|
594
|
+
)
|
595
|
+
(VALUE fed_eff_hoh
|
596
|
+
(Call :"core.div"
|
597
|
+
(Ref fed_tax_hoh)
|
598
|
+
(Call :"agg.max"
|
599
|
+
(Tuple
|
600
|
+
(InputRef [:income])
|
601
|
+
(Const 1.0)
|
602
|
+
)
|
603
|
+
)
|
604
|
+
)
|
605
|
+
)
|
606
|
+
(VALUE ss_tax_h
|
607
|
+
(Ref ss_tax_s)
|
608
|
+
)
|
609
|
+
(VALUE med_tax_h
|
610
|
+
(Ref med_tax_s)
|
611
|
+
)
|
612
|
+
(VALUE addl_threshold_hoh
|
613
|
+
(Const 200000.0)
|
614
|
+
)
|
615
|
+
(VALUE addl_med_tax_h
|
616
|
+
(Call :"core.mul"
|
617
|
+
(Call :"agg.max"
|
618
|
+
(Tuple
|
619
|
+
(Call :"core.sub"
|
620
|
+
(InputRef [:income])
|
621
|
+
(Ref addl_threshold_hoh)
|
622
|
+
)
|
623
|
+
(Const 0)
|
624
|
+
)
|
625
|
+
)
|
626
|
+
(Ref addl_med_rate)
|
627
|
+
)
|
628
|
+
)
|
629
|
+
(VALUE fica_tax_hoh
|
630
|
+
(Call :"core.add"
|
631
|
+
(Call :"core.add"
|
632
|
+
(Ref ss_tax_h)
|
633
|
+
(Ref med_tax_h)
|
634
|
+
)
|
635
|
+
(Ref addl_med_tax_h)
|
636
|
+
)
|
637
|
+
)
|
638
|
+
(VALUE fica_eff_hoh
|
639
|
+
(Call :"core.div"
|
640
|
+
(Ref fica_tax_hoh)
|
641
|
+
(Call :"agg.max"
|
642
|
+
(Tuple
|
643
|
+
(InputRef [:income])
|
644
|
+
(Const 1.0)
|
645
|
+
)
|
646
|
+
)
|
647
|
+
)
|
648
|
+
)
|
649
|
+
(VALUE total_tax_hoh
|
650
|
+
(Call :"core.add"
|
651
|
+
(Call :"core.add"
|
652
|
+
(Call :"core.add"
|
653
|
+
(Ref fed_tax_hoh)
|
654
|
+
(Ref fica_tax_hoh)
|
655
|
+
)
|
656
|
+
(Ref state_tax)
|
657
|
+
)
|
658
|
+
(Ref local_tax)
|
659
|
+
)
|
660
|
+
)
|
661
|
+
(VALUE total_eff_hoh
|
662
|
+
(Call :"core.div"
|
663
|
+
(Ref total_tax_hoh)
|
664
|
+
(Call :"agg.max"
|
665
|
+
(Tuple
|
666
|
+
(InputRef [:income])
|
667
|
+
(Const 1.0)
|
668
|
+
)
|
669
|
+
)
|
670
|
+
)
|
671
|
+
)
|
672
|
+
(VALUE after_tax_hoh
|
673
|
+
(Call :"core.sub"
|
674
|
+
(InputRef [:income])
|
675
|
+
(Ref total_tax_hoh)
|
676
|
+
)
|
677
|
+
)
|
678
|
+
(VALUE take_home_hoh
|
679
|
+
(Call :"core.sub"
|
680
|
+
(Ref after_tax_hoh)
|
681
|
+
(InputRef [:retirement_contrib])
|
682
|
+
)
|
683
|
+
)
|
684
|
+
(VALUE summary
|
685
|
+
(Hash
|
686
|
+
(Pair single
|
687
|
+
(Hash
|
688
|
+
(Pair federal
|
689
|
+
(Hash
|
690
|
+
(Pair marginal
|
691
|
+
(Ref fed_marginal_single)
|
692
|
+
)
|
693
|
+
(Pair effective
|
694
|
+
(Ref fed_eff_single)
|
695
|
+
)
|
696
|
+
(Pair tax
|
697
|
+
(Ref fed_tax_single)
|
698
|
+
)
|
699
|
+
)
|
700
|
+
)
|
701
|
+
(Pair fica
|
702
|
+
(Hash
|
703
|
+
(Pair effective
|
704
|
+
(Ref fica_eff_single)
|
705
|
+
)
|
706
|
+
(Pair tax
|
707
|
+
(Ref fica_tax_single)
|
708
|
+
)
|
709
|
+
)
|
710
|
+
)
|
711
|
+
(Pair state
|
712
|
+
(Hash
|
713
|
+
(Pair marginal
|
714
|
+
(InputRef [:state_rate])
|
715
|
+
)
|
716
|
+
(Pair effective
|
717
|
+
(InputRef [:state_rate])
|
718
|
+
)
|
719
|
+
(Pair tax
|
720
|
+
(Ref state_tax)
|
721
|
+
)
|
722
|
+
)
|
723
|
+
)
|
724
|
+
(Pair local
|
725
|
+
(Hash
|
726
|
+
(Pair marginal
|
727
|
+
(InputRef [:local_rate])
|
728
|
+
)
|
729
|
+
(Pair effective
|
730
|
+
(InputRef [:local_rate])
|
731
|
+
)
|
732
|
+
(Pair tax
|
733
|
+
(Ref local_tax)
|
734
|
+
)
|
735
|
+
)
|
736
|
+
)
|
737
|
+
(Pair total
|
738
|
+
(Hash
|
739
|
+
(Pair effective
|
740
|
+
(Ref total_eff_single)
|
741
|
+
)
|
742
|
+
(Pair tax
|
743
|
+
(Ref total_tax_single)
|
744
|
+
)
|
745
|
+
)
|
746
|
+
)
|
747
|
+
(Pair after_tax
|
748
|
+
(Ref after_tax_single)
|
749
|
+
)
|
750
|
+
(Pair retirement_contrib
|
751
|
+
(InputRef [:retirement_contrib])
|
752
|
+
)
|
753
|
+
(Pair take_home
|
754
|
+
(Ref take_home_single)
|
755
|
+
)
|
756
|
+
)
|
757
|
+
)
|
758
|
+
(Pair married_joint
|
759
|
+
(Hash
|
760
|
+
(Pair federal
|
761
|
+
(Hash
|
762
|
+
(Pair marginal
|
763
|
+
(Ref fed_marginal_mj)
|
764
|
+
)
|
765
|
+
(Pair effective
|
766
|
+
(Ref fed_eff_mj)
|
767
|
+
)
|
768
|
+
(Pair tax
|
769
|
+
(Ref fed_tax_mj)
|
770
|
+
)
|
771
|
+
)
|
772
|
+
)
|
773
|
+
(Pair fica
|
774
|
+
(Hash
|
775
|
+
(Pair effective
|
776
|
+
(Ref fica_eff_mj)
|
777
|
+
)
|
778
|
+
(Pair tax
|
779
|
+
(Ref fica_tax_mj)
|
780
|
+
)
|
781
|
+
)
|
782
|
+
)
|
783
|
+
(Pair state
|
784
|
+
(Hash
|
785
|
+
(Pair marginal
|
786
|
+
(InputRef [:state_rate])
|
787
|
+
)
|
788
|
+
(Pair effective
|
789
|
+
(InputRef [:state_rate])
|
790
|
+
)
|
791
|
+
(Pair tax
|
792
|
+
(Ref state_tax)
|
793
|
+
)
|
794
|
+
)
|
795
|
+
)
|
796
|
+
(Pair local
|
797
|
+
(Hash
|
798
|
+
(Pair marginal
|
799
|
+
(InputRef [:local_rate])
|
800
|
+
)
|
801
|
+
(Pair effective
|
802
|
+
(InputRef [:local_rate])
|
803
|
+
)
|
804
|
+
(Pair tax
|
805
|
+
(Ref local_tax)
|
806
|
+
)
|
807
|
+
)
|
808
|
+
)
|
809
|
+
(Pair total
|
810
|
+
(Hash
|
811
|
+
(Pair effective
|
812
|
+
(Ref total_eff_mj)
|
813
|
+
)
|
814
|
+
(Pair tax
|
815
|
+
(Ref total_tax_mj)
|
816
|
+
)
|
817
|
+
)
|
818
|
+
)
|
819
|
+
(Pair after_tax
|
820
|
+
(Ref after_tax_mj)
|
821
|
+
)
|
822
|
+
(Pair retirement_contrib
|
823
|
+
(InputRef [:retirement_contrib])
|
824
|
+
)
|
825
|
+
(Pair take_home
|
826
|
+
(Ref take_home_mj)
|
827
|
+
)
|
828
|
+
)
|
829
|
+
)
|
830
|
+
(Pair married_separate
|
831
|
+
(Hash
|
832
|
+
(Pair federal
|
833
|
+
(Hash
|
834
|
+
(Pair marginal
|
835
|
+
(Ref fed_marginal_ms)
|
836
|
+
)
|
837
|
+
(Pair effective
|
838
|
+
(Ref fed_eff_ms)
|
839
|
+
)
|
840
|
+
(Pair tax
|
841
|
+
(Ref fed_tax_ms)
|
842
|
+
)
|
843
|
+
)
|
844
|
+
)
|
845
|
+
(Pair fica
|
846
|
+
(Hash
|
847
|
+
(Pair effective
|
848
|
+
(Ref fica_eff_ms)
|
849
|
+
)
|
850
|
+
(Pair tax
|
851
|
+
(Ref fica_tax_ms)
|
852
|
+
)
|
853
|
+
)
|
854
|
+
)
|
855
|
+
(Pair state
|
856
|
+
(Hash
|
857
|
+
(Pair marginal
|
858
|
+
(InputRef [:state_rate])
|
859
|
+
)
|
860
|
+
(Pair effective
|
861
|
+
(InputRef [:state_rate])
|
862
|
+
)
|
863
|
+
(Pair tax
|
864
|
+
(Ref state_tax)
|
865
|
+
)
|
866
|
+
)
|
867
|
+
)
|
868
|
+
(Pair local
|
869
|
+
(Hash
|
870
|
+
(Pair marginal
|
871
|
+
(InputRef [:local_rate])
|
872
|
+
)
|
873
|
+
(Pair effective
|
874
|
+
(InputRef [:local_rate])
|
875
|
+
)
|
876
|
+
(Pair tax
|
877
|
+
(Ref local_tax)
|
878
|
+
)
|
879
|
+
)
|
880
|
+
)
|
881
|
+
(Pair total
|
882
|
+
(Hash
|
883
|
+
(Pair effective
|
884
|
+
(Ref total_eff_ms)
|
885
|
+
)
|
886
|
+
(Pair tax
|
887
|
+
(Ref total_tax_ms)
|
888
|
+
)
|
889
|
+
)
|
890
|
+
)
|
891
|
+
(Pair after_tax
|
892
|
+
(Ref after_tax_ms)
|
893
|
+
)
|
894
|
+
(Pair retirement_contrib
|
895
|
+
(InputRef [:retirement_contrib])
|
896
|
+
)
|
897
|
+
(Pair take_home
|
898
|
+
(Ref take_home_ms)
|
899
|
+
)
|
900
|
+
)
|
901
|
+
)
|
902
|
+
(Pair head_of_household
|
903
|
+
(Hash
|
904
|
+
(Pair federal
|
905
|
+
(Hash
|
906
|
+
(Pair marginal
|
907
|
+
(Ref fed_marginal_hoh)
|
908
|
+
)
|
909
|
+
(Pair effective
|
910
|
+
(Ref fed_eff_hoh)
|
911
|
+
)
|
912
|
+
(Pair tax
|
913
|
+
(Ref fed_tax_hoh)
|
914
|
+
)
|
915
|
+
)
|
916
|
+
)
|
917
|
+
(Pair fica
|
918
|
+
(Hash
|
919
|
+
(Pair effective
|
920
|
+
(Ref fica_eff_hoh)
|
921
|
+
)
|
922
|
+
(Pair tax
|
923
|
+
(Ref fica_tax_hoh)
|
924
|
+
)
|
925
|
+
)
|
926
|
+
)
|
927
|
+
(Pair state
|
928
|
+
(Hash
|
929
|
+
(Pair marginal
|
930
|
+
(InputRef [:state_rate])
|
931
|
+
)
|
932
|
+
(Pair effective
|
933
|
+
(InputRef [:state_rate])
|
934
|
+
)
|
935
|
+
(Pair tax
|
936
|
+
(Ref state_tax)
|
937
|
+
)
|
938
|
+
)
|
939
|
+
)
|
940
|
+
(Pair local
|
941
|
+
(Hash
|
942
|
+
(Pair marginal
|
943
|
+
(InputRef [:local_rate])
|
944
|
+
)
|
945
|
+
(Pair effective
|
946
|
+
(InputRef [:local_rate])
|
947
|
+
)
|
948
|
+
(Pair tax
|
949
|
+
(Ref local_tax)
|
950
|
+
)
|
951
|
+
)
|
952
|
+
)
|
953
|
+
(Pair total
|
954
|
+
(Hash
|
955
|
+
(Pair effective
|
956
|
+
(Ref total_eff_hoh)
|
957
|
+
)
|
958
|
+
(Pair tax
|
959
|
+
(Ref total_tax_hoh)
|
960
|
+
)
|
961
|
+
)
|
962
|
+
)
|
963
|
+
(Pair after_tax
|
964
|
+
(Ref after_tax_hoh)
|
965
|
+
)
|
966
|
+
(Pair retirement_contrib
|
967
|
+
(InputRef [:retirement_contrib])
|
968
|
+
)
|
969
|
+
(Pair take_home
|
970
|
+
(Ref take_home_hoh)
|
971
|
+
)
|
972
|
+
)
|
973
|
+
)
|
974
|
+
)
|
975
|
+
)
|
976
|
+
)
|