kumi 0.0.27 → 0.0.28

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.
Files changed (137) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +10 -0
  3. data/README.md +24 -9
  4. data/data/functions/core/arithmetic.yaml +28 -8
  5. data/data/functions/core/boolean.yaml +8 -3
  6. data/data/functions/core/comparison.yaml +12 -4
  7. data/data/kernels/javascript/core/arithmetic.yaml +6 -2
  8. data/data/kernels/ruby/core/arithmetic.yaml +7 -2
  9. data/golden/array_element/expected/schema_ruby.rb +1 -1
  10. data/golden/array_index/expected/lir_00_unoptimized.txt +2 -2
  11. data/golden/array_index/expected/lir_01_hoist_scalar_references.txt +2 -2
  12. data/golden/array_index/expected/lir_02_inlined.txt +2 -2
  13. data/golden/array_index/expected/lir_03_cse.txt +2 -2
  14. data/golden/array_index/expected/lir_04_1_loop_fusion.txt +2 -2
  15. data/golden/array_index/expected/lir_04_loop_invcm.txt +2 -2
  16. data/golden/array_index/expected/lir_06_const_prop.txt +2 -2
  17. data/golden/array_index/expected/schema_ruby.rb +1 -1
  18. data/golden/array_index/expected/snast.txt +2 -2
  19. data/golden/array_operations/expected/lir_00_unoptimized.txt +2 -2
  20. data/golden/array_operations/expected/lir_01_hoist_scalar_references.txt +2 -2
  21. data/golden/array_operations/expected/lir_02_inlined.txt +2 -2
  22. data/golden/array_operations/expected/lir_03_cse.txt +2 -2
  23. data/golden/array_operations/expected/lir_04_1_loop_fusion.txt +2 -2
  24. data/golden/array_operations/expected/lir_04_loop_invcm.txt +2 -2
  25. data/golden/array_operations/expected/lir_06_const_prop.txt +2 -2
  26. data/golden/array_operations/expected/schema_ruby.rb +1 -1
  27. data/golden/array_operations/expected/snast.txt +2 -2
  28. data/golden/cascade_logic/expected/schema_ruby.rb +1 -1
  29. data/golden/chained_fusion/expected/schema_ruby.rb +1 -1
  30. data/golden/decimal_explicit/expected/lir_00_unoptimized.txt +2 -2
  31. data/golden/decimal_explicit/expected/lir_01_hoist_scalar_references.txt +2 -2
  32. data/golden/decimal_explicit/expected/lir_02_inlined.txt +6 -6
  33. data/golden/decimal_explicit/expected/lir_03_cse.txt +5 -5
  34. data/golden/decimal_explicit/expected/lir_04_1_loop_fusion.txt +5 -5
  35. data/golden/decimal_explicit/expected/lir_04_loop_invcm.txt +5 -5
  36. data/golden/decimal_explicit/expected/lir_06_const_prop.txt +5 -5
  37. data/golden/decimal_explicit/expected/schema_ruby.rb +1 -1
  38. data/golden/decimal_explicit/expected/snast.txt +2 -2
  39. data/golden/element_arrays/expected/schema_ruby.rb +1 -1
  40. data/golden/empty_and_null_inputs/expected/schema_ruby.rb +1 -1
  41. data/golden/function_overload/expected/schema_ruby.rb +1 -1
  42. data/golden/game_of_life/expected/schema_ruby.rb +1 -1
  43. data/golden/hash_keys/expected/schema_ruby.rb +1 -1
  44. data/golden/hash_value/expected/schema_ruby.rb +1 -1
  45. data/golden/hierarchical_complex/expected/lir_00_unoptimized.txt +3 -3
  46. data/golden/hierarchical_complex/expected/lir_01_hoist_scalar_references.txt +3 -3
  47. data/golden/hierarchical_complex/expected/lir_02_inlined.txt +3 -3
  48. data/golden/hierarchical_complex/expected/lir_03_cse.txt +3 -3
  49. data/golden/hierarchical_complex/expected/lir_04_1_loop_fusion.txt +3 -3
  50. data/golden/hierarchical_complex/expected/lir_04_loop_invcm.txt +3 -3
  51. data/golden/hierarchical_complex/expected/lir_06_const_prop.txt +3 -3
  52. data/golden/hierarchical_complex/expected/schema_ruby.rb +1 -1
  53. data/golden/hierarchical_complex/expected/snast.txt +3 -3
  54. data/golden/inline_rename_scope_leak/expected/schema_ruby.rb +1 -1
  55. data/golden/input_reference/expected/schema_ruby.rb +1 -1
  56. data/golden/interleaved_fusion/expected/lir_00_unoptimized.txt +1 -1
  57. data/golden/interleaved_fusion/expected/lir_01_hoist_scalar_references.txt +1 -1
  58. data/golden/interleaved_fusion/expected/lir_02_inlined.txt +2 -2
  59. data/golden/interleaved_fusion/expected/lir_03_cse.txt +2 -2
  60. data/golden/interleaved_fusion/expected/lir_04_1_loop_fusion.txt +2 -2
  61. data/golden/interleaved_fusion/expected/lir_04_loop_invcm.txt +2 -2
  62. data/golden/interleaved_fusion/expected/lir_06_const_prop.txt +2 -2
  63. data/golden/interleaved_fusion/expected/schema_ruby.rb +1 -1
  64. data/golden/interleaved_fusion/expected/snast.txt +1 -1
  65. data/golden/let_inline/expected/lir_00_unoptimized.txt +2 -2
  66. data/golden/let_inline/expected/lir_01_hoist_scalar_references.txt +2 -2
  67. data/golden/let_inline/expected/lir_02_inlined.txt +6 -6
  68. data/golden/let_inline/expected/lir_03_cse.txt +6 -6
  69. data/golden/let_inline/expected/lir_04_1_loop_fusion.txt +6 -6
  70. data/golden/let_inline/expected/lir_04_loop_invcm.txt +6 -6
  71. data/golden/let_inline/expected/lir_06_const_prop.txt +6 -6
  72. data/golden/let_inline/expected/schema_ruby.rb +1 -1
  73. data/golden/let_inline/expected/snast.txt +2 -2
  74. data/golden/loop_fusion/expected/schema_ruby.rb +1 -1
  75. data/golden/min_reduce_scope/expected/schema_ruby.rb +1 -1
  76. data/golden/mixed_dimensions/expected/schema_ruby.rb +1 -1
  77. data/golden/multirank_hoisting/expected/lir_00_unoptimized.txt +2 -2
  78. data/golden/multirank_hoisting/expected/lir_01_hoist_scalar_references.txt +2 -2
  79. data/golden/multirank_hoisting/expected/lir_02_inlined.txt +7 -7
  80. data/golden/multirank_hoisting/expected/lir_03_cse.txt +7 -7
  81. data/golden/multirank_hoisting/expected/lir_04_1_loop_fusion.txt +7 -7
  82. data/golden/multirank_hoisting/expected/lir_04_loop_invcm.txt +7 -7
  83. data/golden/multirank_hoisting/expected/lir_06_const_prop.txt +7 -7
  84. data/golden/multirank_hoisting/expected/schema_ruby.rb +1 -1
  85. data/golden/multirank_hoisting/expected/snast.txt +2 -2
  86. data/golden/nested_hash/expected/lir_00_unoptimized.txt +1 -1
  87. data/golden/nested_hash/expected/lir_01_hoist_scalar_references.txt +1 -1
  88. data/golden/nested_hash/expected/lir_02_inlined.txt +1 -1
  89. data/golden/nested_hash/expected/lir_03_cse.txt +1 -1
  90. data/golden/nested_hash/expected/lir_04_1_loop_fusion.txt +1 -1
  91. data/golden/nested_hash/expected/lir_04_loop_invcm.txt +1 -1
  92. data/golden/nested_hash/expected/lir_06_const_prop.txt +1 -1
  93. data/golden/nested_hash/expected/schema_ruby.rb +1 -1
  94. data/golden/nested_hash/expected/snast.txt +1 -1
  95. data/golden/reduction_broadcast/expected/schema_ruby.rb +1 -1
  96. data/golden/roll/expected/schema_ruby.rb +1 -1
  97. data/golden/shift/expected/schema_ruby.rb +1 -1
  98. data/golden/shift_2d/expected/schema_ruby.rb +1 -1
  99. data/golden/simple_math/expected/lir_00_unoptimized.txt +2 -2
  100. data/golden/simple_math/expected/lir_01_hoist_scalar_references.txt +2 -2
  101. data/golden/simple_math/expected/lir_02_inlined.txt +2 -2
  102. data/golden/simple_math/expected/lir_03_cse.txt +2 -2
  103. data/golden/simple_math/expected/lir_04_1_loop_fusion.txt +2 -2
  104. data/golden/simple_math/expected/lir_04_loop_invcm.txt +2 -2
  105. data/golden/simple_math/expected/lir_06_const_prop.txt +2 -2
  106. data/golden/simple_math/expected/schema_ruby.rb +1 -1
  107. data/golden/simple_math/expected/snast.txt +2 -2
  108. data/golden/streaming_basics/expected/lir_00_unoptimized.txt +3 -3
  109. data/golden/streaming_basics/expected/lir_01_hoist_scalar_references.txt +3 -3
  110. data/golden/streaming_basics/expected/lir_02_inlined.txt +9 -9
  111. data/golden/streaming_basics/expected/lir_03_cse.txt +7 -7
  112. data/golden/streaming_basics/expected/lir_04_1_loop_fusion.txt +7 -7
  113. data/golden/streaming_basics/expected/lir_04_loop_invcm.txt +7 -7
  114. data/golden/streaming_basics/expected/lir_06_const_prop.txt +7 -7
  115. data/golden/streaming_basics/expected/schema_ruby.rb +1 -1
  116. data/golden/streaming_basics/expected/snast.txt +3 -3
  117. data/golden/tuples/expected/schema_ruby.rb +1 -1
  118. data/golden/tuples_and_arrays/expected/schema_ruby.rb +1 -1
  119. data/golden/us_tax_2024/expected/lir_00_unoptimized.txt +6 -6
  120. data/golden/us_tax_2024/expected/lir_01_hoist_scalar_references.txt +6 -6
  121. data/golden/us_tax_2024/expected/lir_02_inlined.txt +71 -71
  122. data/golden/us_tax_2024/expected/lir_03_cse.txt +43 -43
  123. data/golden/us_tax_2024/expected/lir_04_1_loop_fusion.txt +48 -48
  124. data/golden/us_tax_2024/expected/lir_04_loop_invcm.txt +43 -43
  125. data/golden/us_tax_2024/expected/lir_06_const_prop.txt +43 -43
  126. data/golden/us_tax_2024/expected/schema_ruby.rb +1 -1
  127. data/golden/us_tax_2024/expected/snast.txt +6 -6
  128. data/golden/with_constants/expected/schema_ruby.rb +1 -1
  129. data/lib/kumi/core/analyzer/passes/nast_dimensional_analyzer_pass.rb +1 -1
  130. data/lib/kumi/core/error_reporter.rb +1 -1
  131. data/lib/kumi/core/errors.rb +1 -1
  132. data/lib/kumi/core/functions/overload_resolver.rb +57 -11
  133. data/lib/kumi/core/functions/type_categories.rb +44 -0
  134. data/lib/kumi/frontends/text.rb +33 -5
  135. data/lib/kumi/syntax/location.rb +5 -1
  136. data/lib/kumi/version.rb +1 -1
  137. metadata +2 -1
@@ -8,7 +8,7 @@
8
8
  (Declaration product
9
9
  %t4 = load_input "x" :: integer
10
10
  %t5 = load_input "y" :: integer
11
- %t6 = call core.mul(%t4, %t5) :: integer
11
+ %t6 = call core.mul:numeric(%t4, %t5) :: integer
12
12
  yield %t6
13
13
  )
14
14
  (Declaration difference
@@ -24,7 +24,7 @@
24
24
  %t13 = call core.add(%t11, %t12) :: integer
25
25
  %t14 = load_input "y" :: integer
26
26
  %t15 = const 2 :: integer
27
- %t16 = call core.mul(%t14, %t15) :: integer
27
+ %t16 = call core.mul:numeric(%t14, %t15) :: integer
28
28
  %t17 = make_tuple(%t10, %t13, %t16) :: tuple<integer, integer, integer>
29
29
  yield %t17
30
30
  )
@@ -8,7 +8,7 @@
8
8
  (Declaration product
9
9
  %t4 = load_input "x" :: integer
10
10
  %t5 = load_input "y" :: integer
11
- %t6 = call core.mul(%t4, %t5) :: integer
11
+ %t6 = call core.mul:numeric(%t4, %t5) :: integer
12
12
  yield %t6
13
13
  )
14
14
  (Declaration difference
@@ -24,7 +24,7 @@
24
24
  %t13 = call core.add(%t11, %t12) :: integer
25
25
  %t14 = load_input "y" :: integer
26
26
  %t15 = const 2 :: integer
27
- %t16 = call core.mul(%t14, %t15) :: integer
27
+ %t16 = call core.mul:numeric(%t14, %t15) :: integer
28
28
  %t17 = make_tuple(%t10, %t13, %t16) :: tuple<integer, integer, integer>
29
29
  yield %t17
30
30
  )
@@ -8,7 +8,7 @@
8
8
  (Declaration product
9
9
  %t4 = load_input "x" :: integer
10
10
  %t5 = load_input "y" :: integer
11
- %t6 = call core.mul(%t4, %t5) :: integer
11
+ %t6 = call core.mul:numeric(%t4, %t5) :: integer
12
12
  yield %t6
13
13
  )
14
14
  (Declaration difference
@@ -24,7 +24,7 @@
24
24
  %t13 = call core.add(%t11, %t12) :: integer
25
25
  %t14 = load_input "y" :: integer
26
26
  %t15 = const 2 :: integer
27
- %t16 = call core.mul(%t14, %t15) :: integer
27
+ %t16 = call core.mul:numeric(%t14, %t15) :: integer
28
28
  %t17 = make_tuple(%t10, %t13, %t16) :: tuple<integer, integer, integer>
29
29
  yield %t17
30
30
  )
@@ -8,7 +8,7 @@
8
8
  (Declaration product
9
9
  %t4 = load_input "x" :: integer
10
10
  %t5 = load_input "y" :: integer
11
- %t6 = call core.mul(%t4, %t5) :: integer
11
+ %t6 = call core.mul:numeric(%t4, %t5) :: integer
12
12
  yield %t6
13
13
  )
14
14
  (Declaration difference
@@ -24,7 +24,7 @@
24
24
  %t13 = call core.add(%t11, %t12) :: integer
25
25
  %t14 = load_input "y" :: integer
26
26
  %t15 = const 2 :: integer
27
- %t16 = call core.mul(%t14, %t15) :: integer
27
+ %t16 = call core.mul:numeric(%t14, %t15) :: integer
28
28
  %t17 = make_tuple(%t10, %t13, %t16) :: tuple<integer, integer, integer>
29
29
  yield %t17
30
30
  )
@@ -8,7 +8,7 @@
8
8
  (Declaration product
9
9
  %t4 = load_input "x" :: integer
10
10
  %t5 = load_input "y" :: integer
11
- %t6 = call core.mul(%t4, %t5) :: integer
11
+ %t6 = call core.mul:numeric(%t4, %t5) :: integer
12
12
  yield %t6
13
13
  )
14
14
  (Declaration difference
@@ -24,7 +24,7 @@
24
24
  %t13 = call core.add(%t11, %t12) :: integer
25
25
  %t14 = load_input "y" :: integer
26
26
  %t15 = const 2 :: integer
27
- %t16 = call core.mul(%t14, %t15) :: integer
27
+ %t16 = call core.mul:numeric(%t14, %t15) :: integer
28
28
  %t17 = make_tuple(%t10, %t13, %t16) :: tuple<integer, integer, integer>
29
29
  yield %t17
30
30
  )
@@ -8,7 +8,7 @@
8
8
  (Declaration product
9
9
  %t4 = load_input "x" :: integer
10
10
  %t5 = load_input "y" :: integer
11
- %t6 = call core.mul(%t4, %t5) :: integer
11
+ %t6 = call core.mul:numeric(%t4, %t5) :: integer
12
12
  yield %t6
13
13
  )
14
14
  (Declaration difference
@@ -24,7 +24,7 @@
24
24
  %t13 = call core.add(%t11, %t12) :: integer
25
25
  %t14 = load_input "y" :: integer
26
26
  %t15 = const 2 :: integer
27
- %t16 = call core.mul(%t14, %t15) :: integer
27
+ %t16 = call core.mul:numeric(%t14, %t15) :: integer
28
28
  %t17 = make_tuple(%t10, %t13, %t16) :: tuple<integer, integer, integer>
29
29
  yield %t17
30
30
  )
@@ -8,7 +8,7 @@
8
8
  (Declaration product
9
9
  %t4 = load_input "x" :: integer
10
10
  %t5 = load_input "y" :: integer
11
- %t6 = call core.mul(%t4, %t5) :: integer
11
+ %t6 = call core.mul:numeric(%t4, %t5) :: integer
12
12
  yield %t6
13
13
  )
14
14
  (Declaration difference
@@ -24,7 +24,7 @@
24
24
  %t13 = call core.add(%t11, %t12) :: integer
25
25
  %t14 = load_input "y" :: integer
26
26
  %t15 = const 2 :: integer
27
- %t16 = call core.mul(%t14, %t15) :: integer
27
+ %t16 = call core.mul:numeric(%t14, %t15) :: integer
28
28
  %t17 = make_tuple(%t10, %t13, %t16) :: tuple<integer, integer, integer>
29
29
  yield %t17
30
30
  )
@@ -1,5 +1,5 @@
1
1
  # Autogenerated by Kumi Codegen
2
- module Kumi::Compiled::KUMI_01c25ad1ae3550b0c23581f73407635ef18b1b5947933fe2edfdcbcef3253d37
2
+ module Kumi::Compiled::KUMI_d729bd10302a56f8a23981643e21bb67803d5850bc61ac80e268c592fdfb37d7
3
3
  def self.from(input_data = nil)
4
4
  instance = Object.new
5
5
  instance.extend(self)
@@ -6,7 +6,7 @@
6
6
  ) :: [] -> integer
7
7
  ) :: [] -> integer
8
8
  (VALUE product
9
- (Call :core.mul
9
+ (Call :core.mul:numeric
10
10
  (InputRef x key_chain=[]) :: [] -> integer
11
11
  (InputRef y key_chain=[]) :: [] -> integer
12
12
  ) :: [] -> integer
@@ -24,7 +24,7 @@
24
24
  (InputRef x key_chain=[]) :: [] -> integer
25
25
  (Const 10) :: [] -> integer
26
26
  ) :: [] -> integer
27
- (Call :core.mul
27
+ (Call :core.mul:numeric
28
28
  (InputRef y key_chain=[]) :: [] -> integer
29
29
  (Const 2) :: [] -> integer
30
30
  ) :: [] -> integer
@@ -4,7 +4,7 @@
4
4
  loop items id=L1 in %t1 as el=%items_el_2, idx=%items_i_3
5
5
  %t4 = load_field items_el_2["price"] :: float
6
6
  %t5 = load_field items_el_2["qty"] :: integer
7
- %t6 = call core.mul(%t4, %t5) :: float
7
+ %t6 = call core.mul:numeric(%t4, %t5) :: float
8
8
  yield %t6
9
9
  end_loop
10
10
  )
@@ -15,7 +15,7 @@
15
15
  %t11 = const 1.0 :: float
16
16
  %t12 = load_input "discount" :: float
17
17
  %t13 = call core.sub(%t11, %t12) :: float
18
- %t14 = call core.mul(%t10, %t13) :: float
18
+ %t14 = call core.mul:numeric(%t10, %t13) :: float
19
19
  yield %t14
20
20
  end_loop
21
21
  )
@@ -34,7 +34,7 @@
34
34
  %t24 = load_decl items_is_big axes=[items] :: boolean
35
35
  %t25 = load_decl items_subtotal axes=[items] :: float
36
36
  %t26 = const 0.9 :: float
37
- %t27 = call core.mul(%t25, %t26) :: float
37
+ %t27 = call core.mul:numeric(%t25, %t26) :: float
38
38
  %t28 = load_decl items_subtotal axes=[items] :: float
39
39
  %t29 = select %t24, %t27, %t28 :: float
40
40
  yield %t29
@@ -4,7 +4,7 @@
4
4
  loop items id=L1 in %t1 as el=%items_el_2, idx=%items_i_3
5
5
  %t4 = load_field items_el_2["price"] :: float
6
6
  %t5 = load_field items_el_2["qty"] :: integer
7
- %t6 = call core.mul(%t4, %t5) :: float
7
+ %t6 = call core.mul:numeric(%t4, %t5) :: float
8
8
  yield %t6
9
9
  end_loop
10
10
  )
@@ -15,7 +15,7 @@
15
15
  %t11 = const 1.0 :: float
16
16
  %t12 = load_input "discount" :: float
17
17
  %t13 = call core.sub(%t11, %t12) :: float
18
- %t14 = call core.mul(%t10, %t13) :: float
18
+ %t14 = call core.mul:numeric(%t10, %t13) :: float
19
19
  yield %t14
20
20
  end_loop
21
21
  )
@@ -34,7 +34,7 @@
34
34
  %t24 = load_decl items_is_big axes=[items] :: boolean
35
35
  %t25 = load_decl items_subtotal axes=[items] :: float
36
36
  %t26 = const 0.9 :: float
37
- %t27 = call core.mul(%t25, %t26) :: float
37
+ %t27 = call core.mul:numeric(%t25, %t26) :: float
38
38
  %t28 = load_decl items_subtotal axes=[items] :: float
39
39
  %t29 = select %t24, %t27, %t28 :: float
40
40
  yield %t29
@@ -4,7 +4,7 @@
4
4
  loop items id=L1 in %t1 as el=%items_el_2, idx=%items_i_3
5
5
  %t4 = load_field items_el_2["price"] :: float
6
6
  %t5 = load_field items_el_2["qty"] :: integer
7
- %t6 = call core.mul(%t4, %t5) :: float
7
+ %t6 = call core.mul:numeric(%t4, %t5) :: float
8
8
  yield %t6
9
9
  end_loop
10
10
  )
@@ -15,7 +15,7 @@
15
15
  %t11 = const 1.0 :: float
16
16
  %t12 = load_input "discount" :: float
17
17
  %t13 = call core.sub(%t11, %t12) :: float
18
- %t14 = call core.mul(%t10, %t13) :: float
18
+ %t14 = call core.mul:numeric(%t10, %t13) :: float
19
19
  yield %t14
20
20
  end_loop
21
21
  )
@@ -38,13 +38,13 @@
38
38
  %t52 = load_input "items" :: array
39
39
  %t53 = load_field items_el_22["price"] :: float
40
40
  %t54 = load_field items_el_22["qty"] :: integer
41
- %t55 = call core.mul(%t53, %t54) :: float
41
+ %t55 = call core.mul:numeric(%t53, %t54) :: float
42
42
  %t26 = const 0.9 :: float
43
- %t27 = call core.mul(%t55, %t26) :: float
43
+ %t27 = call core.mul:numeric(%t55, %t26) :: float
44
44
  %t56 = load_input "items" :: array
45
45
  %t57 = load_field items_el_22["price"] :: float
46
46
  %t58 = load_field items_el_22["qty"] :: integer
47
- %t59 = call core.mul(%t57, %t58) :: float
47
+ %t59 = call core.mul:numeric(%t57, %t58) :: float
48
48
  %t29 = select %t51, %t27, %t59 :: float
49
49
  yield %t29
50
50
  end_loop
@@ -66,7 +66,7 @@
66
66
  %t60 = load_input "items" :: array
67
67
  %t61 = load_field items_el_38["price"] :: float
68
68
  %t62 = load_field items_el_38["qty"] :: integer
69
- %t63 = call core.mul(%t61, %t62) :: float
69
+ %t63 = call core.mul:numeric(%t61, %t62) :: float
70
70
  %acc_36 = acc_add agg.sum(%acc_36, %t63) :: float
71
71
  end_loop
72
72
  %t41 = acc_load %acc_36 :: float
@@ -84,13 +84,13 @@
84
84
  %t75 = load_input "items" :: array
85
85
  %t76 = load_field items_el_44["price"] :: float
86
86
  %t77 = load_field items_el_44["qty"] :: integer
87
- %t78 = call core.mul(%t76, %t77) :: float
87
+ %t78 = call core.mul:numeric(%t76, %t77) :: float
88
88
  %t67 = const 0.9 :: float
89
- %t68 = call core.mul(%t78, %t67) :: float
89
+ %t68 = call core.mul:numeric(%t78, %t67) :: float
90
90
  %t79 = load_input "items" :: array
91
91
  %t80 = load_field items_el_44["price"] :: float
92
92
  %t81 = load_field items_el_44["qty"] :: integer
93
- %t82 = call core.mul(%t80, %t81) :: float
93
+ %t82 = call core.mul:numeric(%t80, %t81) :: float
94
94
  %t70 = select %t74, %t68, %t82 :: float
95
95
  %acc_42 = acc_add agg.sum(%acc_42, %t70) :: float
96
96
  end_loop
@@ -4,7 +4,7 @@
4
4
  loop items id=L1 in %t1 as el=%items_el_2, idx=%items_i_3
5
5
  %t4 = load_field items_el_2["price"] :: float
6
6
  %t5 = load_field items_el_2["qty"] :: integer
7
- %t6 = call core.mul(%t4, %t5) :: float
7
+ %t6 = call core.mul:numeric(%t4, %t5) :: float
8
8
  yield %t6
9
9
  end_loop
10
10
  )
@@ -15,7 +15,7 @@
15
15
  %t11 = const 1.0 :: float
16
16
  %t12 = load_input "discount" :: float
17
17
  %t13 = call core.sub(%t11, %t12) :: float
18
- %t14 = call core.mul(%t10, %t13) :: float
18
+ %t14 = call core.mul:numeric(%t10, %t13) :: float
19
19
  yield %t14
20
20
  end_loop
21
21
  )
@@ -36,8 +36,8 @@
36
36
  %t54 = load_field items_el_22["qty"] :: integer
37
37
  %t26 = const 0.9 :: float
38
38
  %t51 = call core.gt(%t49, %t50) :: boolean
39
- %t55 = call core.mul(%t49, %t54) :: float
40
- %t27 = call core.mul(%t55, %t26) :: float
39
+ %t55 = call core.mul:numeric(%t49, %t54) :: float
40
+ %t27 = call core.mul:numeric(%t55, %t26) :: float
41
41
  %t29 = select %t51, %t27, %t55 :: float
42
42
  yield %t29
43
43
  end_loop
@@ -58,7 +58,7 @@
58
58
  loop items id=L6 in %t37 as el=%items_el_38, idx=%items_i_39
59
59
  %t61 = load_field items_el_38["price"] :: float
60
60
  %t62 = load_field items_el_38["qty"] :: integer
61
- %t63 = call core.mul(%t61, %t62) :: float
61
+ %t63 = call core.mul:numeric(%t61, %t62) :: float
62
62
  %acc_36 = acc_add agg.sum(%acc_36, %t63) :: float
63
63
  end_loop
64
64
  %t41 = acc_load %acc_36 :: float
@@ -73,8 +73,8 @@
73
73
  %t77 = load_field items_el_44["qty"] :: integer
74
74
  %t67 = const 0.9 :: float
75
75
  %t74 = call core.gt(%t72, %t73) :: boolean
76
- %t78 = call core.mul(%t72, %t77) :: float
77
- %t68 = call core.mul(%t78, %t67) :: float
76
+ %t78 = call core.mul:numeric(%t72, %t77) :: float
77
+ %t68 = call core.mul:numeric(%t78, %t67) :: float
78
78
  %t70 = select %t74, %t68, %t78 :: float
79
79
  %acc_42 = acc_add agg.sum(%acc_42, %t70) :: float
80
80
  end_loop
@@ -4,7 +4,7 @@
4
4
  loop items id=L1 in %t1 as el=%items_el_2, idx=%items_i_3
5
5
  %t4 = load_field items_el_2["price"] :: float
6
6
  %t5 = load_field items_el_2["qty"] :: integer
7
- %t6 = call core.mul(%t4, %t5) :: float
7
+ %t6 = call core.mul:numeric(%t4, %t5) :: float
8
8
  yield %t6
9
9
  end_loop
10
10
  )
@@ -15,7 +15,7 @@
15
15
  %t11 = const 1.0 :: float
16
16
  %t12 = load_input "discount" :: float
17
17
  %t13 = call core.sub(%t11, %t12) :: float
18
- %t14 = call core.mul(%t10, %t13) :: float
18
+ %t14 = call core.mul:numeric(%t10, %t13) :: float
19
19
  yield %t14
20
20
  end_loop
21
21
  )
@@ -36,8 +36,8 @@
36
36
  %t54 = load_field items_el_22["qty"] :: integer
37
37
  %t26 = const 0.9 :: float
38
38
  %t51 = call core.gt(%t49, %t50) :: boolean
39
- %t55 = call core.mul(%t49, %t54) :: float
40
- %t27 = call core.mul(%t55, %t26) :: float
39
+ %t55 = call core.mul:numeric(%t49, %t54) :: float
40
+ %t27 = call core.mul:numeric(%t55, %t26) :: float
41
41
  %t29 = select %t51, %t27, %t55 :: float
42
42
  yield %t29
43
43
  end_loop
@@ -58,7 +58,7 @@
58
58
  loop items id=L6 in %t37 as el=%items_el_38, idx=%items_i_39
59
59
  %t61 = load_field items_el_38["price"] :: float
60
60
  %t62 = load_field items_el_38["qty"] :: integer
61
- %t63 = call core.mul(%t61, %t62) :: float
61
+ %t63 = call core.mul:numeric(%t61, %t62) :: float
62
62
  %acc_36 = acc_add agg.sum(%acc_36, %t63) :: float
63
63
  end_loop
64
64
  %t41 = acc_load %acc_36 :: float
@@ -73,8 +73,8 @@
73
73
  %t77 = load_field items_el_44["qty"] :: integer
74
74
  %t67 = const 0.9 :: float
75
75
  %t74 = call core.gt(%t72, %t73) :: boolean
76
- %t78 = call core.mul(%t72, %t77) :: float
77
- %t68 = call core.mul(%t78, %t67) :: float
76
+ %t78 = call core.mul:numeric(%t72, %t77) :: float
77
+ %t68 = call core.mul:numeric(%t78, %t67) :: float
78
78
  %t70 = select %t74, %t68, %t78 :: float
79
79
  %acc_42 = acc_add agg.sum(%acc_42, %t70) :: float
80
80
  end_loop
@@ -4,7 +4,7 @@
4
4
  loop items id=L1 in %t1 as el=%items_el_2, idx=%items_i_3
5
5
  %t4 = load_field items_el_2["price"] :: float
6
6
  %t5 = load_field items_el_2["qty"] :: integer
7
- %t6 = call core.mul(%t4, %t5) :: float
7
+ %t6 = call core.mul:numeric(%t4, %t5) :: float
8
8
  yield %t6
9
9
  end_loop
10
10
  )
@@ -15,7 +15,7 @@
15
15
  %t13 = call core.sub(%t11, %t12) :: float
16
16
  loop items id=L2 in %t7 as el=%items_el_8, idx=%items_i_9
17
17
  %t10 = load_field items_el_8["price"] :: float
18
- %t14 = call core.mul(%t10, %t13) :: float
18
+ %t14 = call core.mul:numeric(%t10, %t13) :: float
19
19
  yield %t14
20
20
  end_loop
21
21
  )
@@ -36,8 +36,8 @@
36
36
  %t49 = load_field items_el_22["price"] :: float
37
37
  %t54 = load_field items_el_22["qty"] :: integer
38
38
  %t51 = call core.gt(%t49, %t50) :: boolean
39
- %t55 = call core.mul(%t49, %t54) :: float
40
- %t27 = call core.mul(%t55, %t26) :: float
39
+ %t55 = call core.mul:numeric(%t49, %t54) :: float
40
+ %t27 = call core.mul:numeric(%t55, %t26) :: float
41
41
  %t29 = select %t51, %t27, %t55 :: float
42
42
  yield %t29
43
43
  end_loop
@@ -58,7 +58,7 @@
58
58
  loop items id=L6 in %t37 as el=%items_el_38, idx=%items_i_39
59
59
  %t61 = load_field items_el_38["price"] :: float
60
60
  %t62 = load_field items_el_38["qty"] :: integer
61
- %t63 = call core.mul(%t61, %t62) :: float
61
+ %t63 = call core.mul:numeric(%t61, %t62) :: float
62
62
  %acc_36 = acc_add agg.sum(%acc_36, %t63) :: float
63
63
  end_loop
64
64
  %t41 = acc_load %acc_36 :: float
@@ -73,8 +73,8 @@
73
73
  %t72 = load_field items_el_44["price"] :: float
74
74
  %t77 = load_field items_el_44["qty"] :: integer
75
75
  %t74 = call core.gt(%t72, %t73) :: boolean
76
- %t78 = call core.mul(%t72, %t77) :: float
77
- %t68 = call core.mul(%t78, %t67) :: float
76
+ %t78 = call core.mul:numeric(%t72, %t77) :: float
77
+ %t68 = call core.mul:numeric(%t78, %t67) :: float
78
78
  %t70 = select %t74, %t68, %t78 :: float
79
79
  %acc_42 = acc_add agg.sum(%acc_42, %t70) :: float
80
80
  end_loop
@@ -4,7 +4,7 @@
4
4
  loop items id=L1 in %t1 as el=%items_el_2, idx=%items_i_3
5
5
  %t4 = load_field items_el_2["price"] :: float
6
6
  %t5 = load_field items_el_2["qty"] :: integer
7
- %t6 = call core.mul(%t4, %t5) :: float
7
+ %t6 = call core.mul:numeric(%t4, %t5) :: float
8
8
  yield %t6
9
9
  end_loop
10
10
  )
@@ -15,7 +15,7 @@
15
15
  %t13 = call core.sub(%t11, %t12) :: float
16
16
  loop items id=L2 in %t7 as el=%items_el_8, idx=%items_i_9
17
17
  %t10 = load_field items_el_8["price"] :: float
18
- %t14 = call core.mul(%t10, %t13) :: float
18
+ %t14 = call core.mul:numeric(%t10, %t13) :: float
19
19
  yield %t14
20
20
  end_loop
21
21
  )
@@ -36,8 +36,8 @@
36
36
  %t49 = load_field items_el_22["price"] :: float
37
37
  %t54 = load_field items_el_22["qty"] :: integer
38
38
  %t51 = call core.gt(%t49, %t50) :: boolean
39
- %t55 = call core.mul(%t49, %t54) :: float
40
- %t27 = call core.mul(%t55, %t26) :: float
39
+ %t55 = call core.mul:numeric(%t49, %t54) :: float
40
+ %t27 = call core.mul:numeric(%t55, %t26) :: float
41
41
  %t29 = select %t51, %t27, %t55 :: float
42
42
  yield %t29
43
43
  end_loop
@@ -58,7 +58,7 @@
58
58
  loop items id=L6 in %t37 as el=%items_el_38, idx=%items_i_39
59
59
  %t61 = load_field items_el_38["price"] :: float
60
60
  %t62 = load_field items_el_38["qty"] :: integer
61
- %t63 = call core.mul(%t61, %t62) :: float
61
+ %t63 = call core.mul:numeric(%t61, %t62) :: float
62
62
  %acc_36 = acc_add agg.sum(%acc_36, %t63) :: float
63
63
  end_loop
64
64
  %t41 = acc_load %acc_36 :: float
@@ -73,8 +73,8 @@
73
73
  %t72 = load_field items_el_44["price"] :: float
74
74
  %t77 = load_field items_el_44["qty"] :: integer
75
75
  %t74 = call core.gt(%t72, %t73) :: boolean
76
- %t78 = call core.mul(%t72, %t77) :: float
77
- %t68 = call core.mul(%t78, %t67) :: float
76
+ %t78 = call core.mul:numeric(%t72, %t77) :: float
77
+ %t68 = call core.mul:numeric(%t78, %t67) :: float
78
78
  %t70 = select %t74, %t68, %t78 :: float
79
79
  %acc_42 = acc_add agg.sum(%acc_42, %t70) :: float
80
80
  end_loop
@@ -1,5 +1,5 @@
1
1
  # Autogenerated by Kumi Codegen
2
- module Kumi::Compiled::KUMI_e1cf5a39d9cce72668a167abe6fc8f84c427d0b38cc7759c0447e7822c722a43
2
+ module Kumi::Compiled::KUMI_03a2e9a0500bceafc56945b155f90c33cc1a23713c1b16b22908a76f6cc0d8c3
3
3
  def self.from(input_data = nil)
4
4
  instance = Object.new
5
5
  instance.extend(self)
@@ -1,12 +1,12 @@
1
1
  (SNAST
2
2
  (VALUE items_subtotal
3
- (Call :core.mul
3
+ (Call :core.mul:numeric
4
4
  (InputRef items.item.price key_chain=[]) :: [items] -> float
5
5
  (InputRef items.item.qty key_chain=[]) :: [items] -> integer
6
6
  ) :: [items] -> float
7
7
  ) :: [items] -> float
8
8
  (VALUE items_discounted
9
- (Call :core.mul
9
+ (Call :core.mul:numeric
10
10
  (InputRef items.item.price key_chain=[]) :: [items] -> float
11
11
  (Call :core.sub
12
12
  (Const 1.0) :: [] -> float
@@ -23,7 +23,7 @@
23
23
  (VALUE items_effective
24
24
  (Select
25
25
  (Ref items_is_big) :: [items] -> boolean
26
- (Call :core.mul
26
+ (Call :core.mul:numeric
27
27
  (Ref items_subtotal) :: [items] -> float
28
28
  (Const 0.9) :: [] -> float
29
29
  ) :: [items] -> float
@@ -1,5 +1,5 @@
1
1
  # Autogenerated by Kumi Codegen
2
- module Kumi::Compiled::KUMI_b939a357fe30dacac4c3f90205c870e934bd818e640e50a63e39d2c387541a60
2
+ module Kumi::Compiled::KUMI_f7ef5fcd350fe14b8092390d8fc3031fa401de46e5e5a7c5944436336aae60c5
3
3
  def self.from(input_data = nil)
4
4
  instance = Object.new
5
5
  instance.extend(self)
@@ -1,5 +1,5 @@
1
1
  # Autogenerated by Kumi Codegen
2
- module Kumi::Compiled::KUMI_b61e29419a3a15e4309079460b8a9fe1cb0cf4849c3f1d4264073c890a575c24
2
+ module Kumi::Compiled::KUMI_b29542da718e63a254f2e4a844b7515afaafc01da8055fa5e9c661f1ba347beb
3
3
  def self.from(input_data = nil)
4
4
  instance = Object.new
5
5
  instance.extend(self)
@@ -2,13 +2,13 @@
2
2
  (Declaration state_tax
3
3
  %t1 = load_input "income" :: float
4
4
  %t2 = load_input "state_rate" :: float
5
- %t3 = call core.mul(%t1, %t2) :: float
5
+ %t3 = call core.mul:numeric(%t1, %t2) :: float
6
6
  yield %t3
7
7
  )
8
8
  (Declaration local_tax
9
9
  %t4 = load_input "income" :: float
10
10
  %t5 = load_input "local_rate" :: float
11
- %t6 = call core.mul(%t4, %t5) :: float
11
+ %t6 = call core.mul:numeric(%t4, %t5) :: float
12
12
  yield %t6
13
13
  )
14
14
  (Declaration taxable
@@ -97,7 +97,7 @@
97
97
  loop rates id=L13 in %t68 as el=%rates_el_69, idx=%rates_i_70
98
98
  %t71 = load_decl amt axes=[statuses, rates] :: float
99
99
  %t72 = load_decl rate axes=[statuses, rates] :: float
100
- %t73 = call core.mul(%t71, %t72) :: float
100
+ %t73 = call core.mul:numeric(%t71, %t72) :: float
101
101
  %acc_67 = acc_add agg.sum(%acc_67, %t73) :: float
102
102
  end_loop
103
103
  %t74 = acc_load %acc_67 :: float
@@ -162,7 +162,7 @@
162
162
  %t113 = make_tuple(%t111, %t112) :: tuple<float, float>
163
163
  %t114 = fold %t113 fn="agg.min" :: float
164
164
  %t115 = const 0.062 :: float
165
- %t116 = call core.mul(%t114, %t115) :: float
165
+ %t116 = call core.mul:numeric(%t114, %t115) :: float
166
166
  yield %t116
167
167
  )
168
168
  (Declaration med_base_rate
@@ -172,7 +172,7 @@
172
172
  (Declaration med_tax
173
173
  %t118 = load_input "income" :: float
174
174
  %t119 = const 0.0145 :: float
175
- %t120 = call core.mul(%t118, %t119) :: float
175
+ %t120 = call core.mul:numeric(%t118, %t119) :: float
176
176
  yield %t120
177
177
  )
178
178
  (Declaration addl_med_rate
@@ -189,7 +189,7 @@
189
189
  %t129 = make_tuple(%t127, %t128) :: tuple<float, integer>
190
190
  %t130 = fold %t129 fn="agg.max" :: float
191
191
  %t131 = const 0.009 :: float
192
- %t132 = call core.mul(%t130, %t131) :: float
192
+ %t132 = call core.mul:numeric(%t130, %t131) :: float
193
193
  yield %t132
194
194
  end_loop
195
195
  )
@@ -2,13 +2,13 @@
2
2
  (Declaration state_tax
3
3
  %t1 = load_input "income" :: float
4
4
  %t2 = load_input "state_rate" :: float
5
- %t3 = call core.mul(%t1, %t2) :: float
5
+ %t3 = call core.mul:numeric(%t1, %t2) :: float
6
6
  yield %t3
7
7
  )
8
8
  (Declaration local_tax
9
9
  %t4 = load_input "income" :: float
10
10
  %t5 = load_input "local_rate" :: float
11
- %t6 = call core.mul(%t4, %t5) :: float
11
+ %t6 = call core.mul:numeric(%t4, %t5) :: float
12
12
  yield %t6
13
13
  )
14
14
  (Declaration taxable
@@ -97,7 +97,7 @@
97
97
  loop rates id=L13 in %t68 as el=%rates_el_69, idx=%rates_i_70
98
98
  %t71 = load_decl amt axes=[statuses, rates] :: float
99
99
  %t72 = load_decl rate axes=[statuses, rates] :: float
100
- %t73 = call core.mul(%t71, %t72) :: float
100
+ %t73 = call core.mul:numeric(%t71, %t72) :: float
101
101
  %acc_67 = acc_add agg.sum(%acc_67, %t73) :: float
102
102
  end_loop
103
103
  %t74 = acc_load %acc_67 :: float
@@ -162,7 +162,7 @@
162
162
  %t113 = make_tuple(%t111, %t112) :: tuple<float, float>
163
163
  %t114 = fold %t113 fn="agg.min" :: float
164
164
  %t115 = const 0.062 :: float
165
- %t116 = call core.mul(%t114, %t115) :: float
165
+ %t116 = call core.mul:numeric(%t114, %t115) :: float
166
166
  yield %t116
167
167
  )
168
168
  (Declaration med_base_rate
@@ -172,7 +172,7 @@
172
172
  (Declaration med_tax
173
173
  %t118 = load_input "income" :: float
174
174
  %t119 = const 0.0145 :: float
175
- %t120 = call core.mul(%t118, %t119) :: float
175
+ %t120 = call core.mul:numeric(%t118, %t119) :: float
176
176
  yield %t120
177
177
  )
178
178
  (Declaration addl_med_rate
@@ -189,7 +189,7 @@
189
189
  %t129 = make_tuple(%t127, %t128) :: tuple<float, integer>
190
190
  %t130 = fold %t129 fn="agg.max" :: float
191
191
  %t131 = const 0.009 :: float
192
- %t132 = call core.mul(%t130, %t131) :: float
192
+ %t132 = call core.mul:numeric(%t130, %t131) :: float
193
193
  yield %t132
194
194
  end_loop
195
195
  )