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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/README.md +24 -9
- data/data/functions/core/arithmetic.yaml +28 -8
- data/data/functions/core/boolean.yaml +8 -3
- data/data/functions/core/comparison.yaml +12 -4
- data/data/kernels/javascript/core/arithmetic.yaml +6 -2
- data/data/kernels/ruby/core/arithmetic.yaml +7 -2
- data/golden/array_element/expected/schema_ruby.rb +1 -1
- data/golden/array_index/expected/lir_00_unoptimized.txt +2 -2
- data/golden/array_index/expected/lir_01_hoist_scalar_references.txt +2 -2
- data/golden/array_index/expected/lir_02_inlined.txt +2 -2
- data/golden/array_index/expected/lir_03_cse.txt +2 -2
- data/golden/array_index/expected/lir_04_1_loop_fusion.txt +2 -2
- data/golden/array_index/expected/lir_04_loop_invcm.txt +2 -2
- data/golden/array_index/expected/lir_06_const_prop.txt +2 -2
- data/golden/array_index/expected/schema_ruby.rb +1 -1
- data/golden/array_index/expected/snast.txt +2 -2
- data/golden/array_operations/expected/lir_00_unoptimized.txt +2 -2
- data/golden/array_operations/expected/lir_01_hoist_scalar_references.txt +2 -2
- data/golden/array_operations/expected/lir_02_inlined.txt +2 -2
- data/golden/array_operations/expected/lir_03_cse.txt +2 -2
- data/golden/array_operations/expected/lir_04_1_loop_fusion.txt +2 -2
- data/golden/array_operations/expected/lir_04_loop_invcm.txt +2 -2
- data/golden/array_operations/expected/lir_06_const_prop.txt +2 -2
- data/golden/array_operations/expected/schema_ruby.rb +1 -1
- data/golden/array_operations/expected/snast.txt +2 -2
- data/golden/cascade_logic/expected/schema_ruby.rb +1 -1
- data/golden/chained_fusion/expected/schema_ruby.rb +1 -1
- data/golden/decimal_explicit/expected/lir_00_unoptimized.txt +2 -2
- data/golden/decimal_explicit/expected/lir_01_hoist_scalar_references.txt +2 -2
- data/golden/decimal_explicit/expected/lir_02_inlined.txt +6 -6
- data/golden/decimal_explicit/expected/lir_03_cse.txt +5 -5
- data/golden/decimal_explicit/expected/lir_04_1_loop_fusion.txt +5 -5
- data/golden/decimal_explicit/expected/lir_04_loop_invcm.txt +5 -5
- data/golden/decimal_explicit/expected/lir_06_const_prop.txt +5 -5
- data/golden/decimal_explicit/expected/schema_ruby.rb +1 -1
- data/golden/decimal_explicit/expected/snast.txt +2 -2
- data/golden/element_arrays/expected/schema_ruby.rb +1 -1
- data/golden/empty_and_null_inputs/expected/schema_ruby.rb +1 -1
- data/golden/function_overload/expected/schema_ruby.rb +1 -1
- data/golden/game_of_life/expected/schema_ruby.rb +1 -1
- data/golden/hash_keys/expected/schema_ruby.rb +1 -1
- data/golden/hash_value/expected/schema_ruby.rb +1 -1
- data/golden/hierarchical_complex/expected/lir_00_unoptimized.txt +3 -3
- data/golden/hierarchical_complex/expected/lir_01_hoist_scalar_references.txt +3 -3
- data/golden/hierarchical_complex/expected/lir_02_inlined.txt +3 -3
- data/golden/hierarchical_complex/expected/lir_03_cse.txt +3 -3
- data/golden/hierarchical_complex/expected/lir_04_1_loop_fusion.txt +3 -3
- data/golden/hierarchical_complex/expected/lir_04_loop_invcm.txt +3 -3
- data/golden/hierarchical_complex/expected/lir_06_const_prop.txt +3 -3
- data/golden/hierarchical_complex/expected/schema_ruby.rb +1 -1
- data/golden/hierarchical_complex/expected/snast.txt +3 -3
- data/golden/inline_rename_scope_leak/expected/schema_ruby.rb +1 -1
- data/golden/input_reference/expected/schema_ruby.rb +1 -1
- data/golden/interleaved_fusion/expected/lir_00_unoptimized.txt +1 -1
- data/golden/interleaved_fusion/expected/lir_01_hoist_scalar_references.txt +1 -1
- data/golden/interleaved_fusion/expected/lir_02_inlined.txt +2 -2
- data/golden/interleaved_fusion/expected/lir_03_cse.txt +2 -2
- data/golden/interleaved_fusion/expected/lir_04_1_loop_fusion.txt +2 -2
- data/golden/interleaved_fusion/expected/lir_04_loop_invcm.txt +2 -2
- data/golden/interleaved_fusion/expected/lir_06_const_prop.txt +2 -2
- data/golden/interleaved_fusion/expected/schema_ruby.rb +1 -1
- data/golden/interleaved_fusion/expected/snast.txt +1 -1
- data/golden/let_inline/expected/lir_00_unoptimized.txt +2 -2
- data/golden/let_inline/expected/lir_01_hoist_scalar_references.txt +2 -2
- data/golden/let_inline/expected/lir_02_inlined.txt +6 -6
- data/golden/let_inline/expected/lir_03_cse.txt +6 -6
- data/golden/let_inline/expected/lir_04_1_loop_fusion.txt +6 -6
- data/golden/let_inline/expected/lir_04_loop_invcm.txt +6 -6
- data/golden/let_inline/expected/lir_06_const_prop.txt +6 -6
- data/golden/let_inline/expected/schema_ruby.rb +1 -1
- data/golden/let_inline/expected/snast.txt +2 -2
- 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/lir_00_unoptimized.txt +2 -2
- data/golden/multirank_hoisting/expected/lir_01_hoist_scalar_references.txt +2 -2
- data/golden/multirank_hoisting/expected/lir_02_inlined.txt +7 -7
- data/golden/multirank_hoisting/expected/lir_03_cse.txt +7 -7
- data/golden/multirank_hoisting/expected/lir_04_1_loop_fusion.txt +7 -7
- data/golden/multirank_hoisting/expected/lir_04_loop_invcm.txt +7 -7
- data/golden/multirank_hoisting/expected/lir_06_const_prop.txt +7 -7
- data/golden/multirank_hoisting/expected/schema_ruby.rb +1 -1
- data/golden/multirank_hoisting/expected/snast.txt +2 -2
- data/golden/nested_hash/expected/lir_00_unoptimized.txt +1 -1
- data/golden/nested_hash/expected/lir_01_hoist_scalar_references.txt +1 -1
- data/golden/nested_hash/expected/lir_02_inlined.txt +1 -1
- data/golden/nested_hash/expected/lir_03_cse.txt +1 -1
- data/golden/nested_hash/expected/lir_04_1_loop_fusion.txt +1 -1
- data/golden/nested_hash/expected/lir_04_loop_invcm.txt +1 -1
- data/golden/nested_hash/expected/lir_06_const_prop.txt +1 -1
- data/golden/nested_hash/expected/schema_ruby.rb +1 -1
- data/golden/nested_hash/expected/snast.txt +1 -1
- data/golden/reduction_broadcast/expected/schema_ruby.rb +1 -1
- data/golden/roll/expected/schema_ruby.rb +1 -1
- data/golden/shift/expected/schema_ruby.rb +1 -1
- data/golden/shift_2d/expected/schema_ruby.rb +1 -1
- data/golden/simple_math/expected/lir_00_unoptimized.txt +2 -2
- data/golden/simple_math/expected/lir_01_hoist_scalar_references.txt +2 -2
- data/golden/simple_math/expected/lir_02_inlined.txt +2 -2
- data/golden/simple_math/expected/lir_03_cse.txt +2 -2
- data/golden/simple_math/expected/lir_04_1_loop_fusion.txt +2 -2
- data/golden/simple_math/expected/lir_04_loop_invcm.txt +2 -2
- data/golden/simple_math/expected/lir_06_const_prop.txt +2 -2
- data/golden/simple_math/expected/schema_ruby.rb +1 -1
- data/golden/simple_math/expected/snast.txt +2 -2
- data/golden/streaming_basics/expected/lir_00_unoptimized.txt +3 -3
- data/golden/streaming_basics/expected/lir_01_hoist_scalar_references.txt +3 -3
- data/golden/streaming_basics/expected/lir_02_inlined.txt +9 -9
- data/golden/streaming_basics/expected/lir_03_cse.txt +7 -7
- data/golden/streaming_basics/expected/lir_04_1_loop_fusion.txt +7 -7
- data/golden/streaming_basics/expected/lir_04_loop_invcm.txt +7 -7
- data/golden/streaming_basics/expected/lir_06_const_prop.txt +7 -7
- data/golden/streaming_basics/expected/schema_ruby.rb +1 -1
- data/golden/streaming_basics/expected/snast.txt +3 -3
- data/golden/tuples/expected/schema_ruby.rb +1 -1
- data/golden/tuples_and_arrays/expected/schema_ruby.rb +1 -1
- data/golden/us_tax_2024/expected/lir_00_unoptimized.txt +6 -6
- data/golden/us_tax_2024/expected/lir_01_hoist_scalar_references.txt +6 -6
- data/golden/us_tax_2024/expected/lir_02_inlined.txt +71 -71
- data/golden/us_tax_2024/expected/lir_03_cse.txt +43 -43
- data/golden/us_tax_2024/expected/lir_04_1_loop_fusion.txt +48 -48
- data/golden/us_tax_2024/expected/lir_04_loop_invcm.txt +43 -43
- data/golden/us_tax_2024/expected/lir_06_const_prop.txt +43 -43
- data/golden/us_tax_2024/expected/schema_ruby.rb +1 -1
- data/golden/us_tax_2024/expected/snast.txt +6 -6
- data/golden/with_constants/expected/schema_ruby.rb +1 -1
- data/lib/kumi/core/analyzer/passes/nast_dimensional_analyzer_pass.rb +1 -1
- data/lib/kumi/core/error_reporter.rb +1 -1
- data/lib/kumi/core/errors.rb +1 -1
- data/lib/kumi/core/functions/overload_resolver.rb +57 -11
- data/lib/kumi/core/functions/type_categories.rb +44 -0
- data/lib/kumi/frontends/text.rb +33 -5
- data/lib/kumi/syntax/location.rb +5 -1
- data/lib/kumi/version.rb +1 -1
- metadata +2 -1
@@ -13,31 +13,31 @@
|
|
13
13
|
%t14 = load_input "unit_price" :: string
|
14
14
|
%t15 = call core.to_decimal(%t14) :: decimal
|
15
15
|
%t6 = load_input "quantity" :: integer
|
16
|
-
%t7 = call core.mul(%t15, %t6) :: integer
|
16
|
+
%t7 = call core.mul:numeric(%t15, %t6) :: integer
|
17
17
|
yield %t7
|
18
18
|
)
|
19
19
|
(Declaration tax_amount
|
20
20
|
%t19 = load_input "unit_price" :: string
|
21
21
|
%t20 = call core.to_decimal(%t19) :: decimal
|
22
22
|
%t17 = load_input "quantity" :: integer
|
23
|
-
%t18 = call core.mul(%t20, %t17) :: integer
|
23
|
+
%t18 = call core.mul:numeric(%t20, %t17) :: integer
|
24
24
|
%t21 = load_input "tax_rate" :: string
|
25
25
|
%t22 = call core.to_decimal(%t21) :: decimal
|
26
|
-
%t10 = call core.mul(%t18, %t22) :: integer
|
26
|
+
%t10 = call core.mul:numeric(%t18, %t22) :: integer
|
27
27
|
yield %t10
|
28
28
|
)
|
29
29
|
(Declaration total
|
30
30
|
%t26 = load_input "unit_price" :: string
|
31
31
|
%t27 = call core.to_decimal(%t26) :: decimal
|
32
32
|
%t24 = load_input "quantity" :: integer
|
33
|
-
%t25 = call core.mul(%t27, %t24) :: integer
|
33
|
+
%t25 = call core.mul:numeric(%t27, %t24) :: integer
|
34
34
|
%t34 = load_input "unit_price" :: string
|
35
35
|
%t35 = call core.to_decimal(%t34) :: decimal
|
36
36
|
%t32 = load_input "quantity" :: integer
|
37
|
-
%t33 = call core.mul(%t35, %t32) :: integer
|
37
|
+
%t33 = call core.mul:numeric(%t35, %t32) :: integer
|
38
38
|
%t36 = load_input "tax_rate" :: string
|
39
39
|
%t37 = call core.to_decimal(%t36) :: decimal
|
40
|
-
%t30 = call core.mul(%t33, %t37) :: integer
|
40
|
+
%t30 = call core.mul:numeric(%t33, %t37) :: integer
|
41
41
|
%t13 = call core.add(%t25, %t30) :: integer
|
42
42
|
yield %t13
|
43
43
|
)
|
@@ -13,27 +13,27 @@
|
|
13
13
|
%t14 = load_input "unit_price" :: string
|
14
14
|
%t15 = call core.to_decimal(%t14) :: decimal
|
15
15
|
%t6 = load_input "quantity" :: integer
|
16
|
-
%t7 = call core.mul(%t15, %t6) :: integer
|
16
|
+
%t7 = call core.mul:numeric(%t15, %t6) :: integer
|
17
17
|
yield %t7
|
18
18
|
)
|
19
19
|
(Declaration tax_amount
|
20
20
|
%t19 = load_input "unit_price" :: string
|
21
21
|
%t20 = call core.to_decimal(%t19) :: decimal
|
22
22
|
%t17 = load_input "quantity" :: integer
|
23
|
-
%t18 = call core.mul(%t20, %t17) :: integer
|
23
|
+
%t18 = call core.mul:numeric(%t20, %t17) :: integer
|
24
24
|
%t21 = load_input "tax_rate" :: string
|
25
25
|
%t22 = call core.to_decimal(%t21) :: decimal
|
26
|
-
%t10 = call core.mul(%t18, %t22) :: integer
|
26
|
+
%t10 = call core.mul:numeric(%t18, %t22) :: integer
|
27
27
|
yield %t10
|
28
28
|
)
|
29
29
|
(Declaration total
|
30
30
|
%t26 = load_input "unit_price" :: string
|
31
31
|
%t27 = call core.to_decimal(%t26) :: decimal
|
32
32
|
%t24 = load_input "quantity" :: integer
|
33
|
-
%t25 = call core.mul(%t27, %t24) :: integer
|
33
|
+
%t25 = call core.mul:numeric(%t27, %t24) :: integer
|
34
34
|
%t36 = load_input "tax_rate" :: string
|
35
35
|
%t37 = call core.to_decimal(%t36) :: decimal
|
36
|
-
%t30 = call core.mul(%t25, %t37) :: integer
|
36
|
+
%t30 = call core.mul:numeric(%t25, %t37) :: integer
|
37
37
|
%t13 = call core.add(%t25, %t30) :: integer
|
38
38
|
yield %t13
|
39
39
|
)
|
@@ -13,27 +13,27 @@
|
|
13
13
|
%t14 = load_input "unit_price" :: string
|
14
14
|
%t15 = call core.to_decimal(%t14) :: decimal
|
15
15
|
%t6 = load_input "quantity" :: integer
|
16
|
-
%t7 = call core.mul(%t15, %t6) :: integer
|
16
|
+
%t7 = call core.mul:numeric(%t15, %t6) :: integer
|
17
17
|
yield %t7
|
18
18
|
)
|
19
19
|
(Declaration tax_amount
|
20
20
|
%t19 = load_input "unit_price" :: string
|
21
21
|
%t20 = call core.to_decimal(%t19) :: decimal
|
22
22
|
%t17 = load_input "quantity" :: integer
|
23
|
-
%t18 = call core.mul(%t20, %t17) :: integer
|
23
|
+
%t18 = call core.mul:numeric(%t20, %t17) :: integer
|
24
24
|
%t21 = load_input "tax_rate" :: string
|
25
25
|
%t22 = call core.to_decimal(%t21) :: decimal
|
26
|
-
%t10 = call core.mul(%t18, %t22) :: integer
|
26
|
+
%t10 = call core.mul:numeric(%t18, %t22) :: integer
|
27
27
|
yield %t10
|
28
28
|
)
|
29
29
|
(Declaration total
|
30
30
|
%t26 = load_input "unit_price" :: string
|
31
31
|
%t27 = call core.to_decimal(%t26) :: decimal
|
32
32
|
%t24 = load_input "quantity" :: integer
|
33
|
-
%t25 = call core.mul(%t27, %t24) :: integer
|
33
|
+
%t25 = call core.mul:numeric(%t27, %t24) :: integer
|
34
34
|
%t36 = load_input "tax_rate" :: string
|
35
35
|
%t37 = call core.to_decimal(%t36) :: decimal
|
36
|
-
%t30 = call core.mul(%t25, %t37) :: integer
|
36
|
+
%t30 = call core.mul:numeric(%t25, %t37) :: integer
|
37
37
|
%t13 = call core.add(%t25, %t30) :: integer
|
38
38
|
yield %t13
|
39
39
|
)
|
@@ -13,27 +13,27 @@
|
|
13
13
|
%t14 = load_input "unit_price" :: string
|
14
14
|
%t15 = call core.to_decimal(%t14) :: decimal
|
15
15
|
%t6 = load_input "quantity" :: integer
|
16
|
-
%t7 = call core.mul(%t15, %t6) :: integer
|
16
|
+
%t7 = call core.mul:numeric(%t15, %t6) :: integer
|
17
17
|
yield %t7
|
18
18
|
)
|
19
19
|
(Declaration tax_amount
|
20
20
|
%t19 = load_input "unit_price" :: string
|
21
21
|
%t20 = call core.to_decimal(%t19) :: decimal
|
22
22
|
%t17 = load_input "quantity" :: integer
|
23
|
-
%t18 = call core.mul(%t20, %t17) :: integer
|
23
|
+
%t18 = call core.mul:numeric(%t20, %t17) :: integer
|
24
24
|
%t21 = load_input "tax_rate" :: string
|
25
25
|
%t22 = call core.to_decimal(%t21) :: decimal
|
26
|
-
%t10 = call core.mul(%t18, %t22) :: integer
|
26
|
+
%t10 = call core.mul:numeric(%t18, %t22) :: integer
|
27
27
|
yield %t10
|
28
28
|
)
|
29
29
|
(Declaration total
|
30
30
|
%t26 = load_input "unit_price" :: string
|
31
31
|
%t27 = call core.to_decimal(%t26) :: decimal
|
32
32
|
%t24 = load_input "quantity" :: integer
|
33
|
-
%t25 = call core.mul(%t27, %t24) :: integer
|
33
|
+
%t25 = call core.mul:numeric(%t27, %t24) :: integer
|
34
34
|
%t36 = load_input "tax_rate" :: string
|
35
35
|
%t37 = call core.to_decimal(%t36) :: decimal
|
36
|
-
%t30 = call core.mul(%t25, %t37) :: integer
|
36
|
+
%t30 = call core.mul:numeric(%t25, %t37) :: integer
|
37
37
|
%t13 = call core.add(%t25, %t30) :: integer
|
38
38
|
yield %t13
|
39
39
|
)
|
@@ -13,27 +13,27 @@
|
|
13
13
|
%t14 = load_input "unit_price" :: string
|
14
14
|
%t15 = call core.to_decimal(%t14) :: decimal
|
15
15
|
%t6 = load_input "quantity" :: integer
|
16
|
-
%t7 = call core.mul(%t15, %t6) :: integer
|
16
|
+
%t7 = call core.mul:numeric(%t15, %t6) :: integer
|
17
17
|
yield %t7
|
18
18
|
)
|
19
19
|
(Declaration tax_amount
|
20
20
|
%t19 = load_input "unit_price" :: string
|
21
21
|
%t20 = call core.to_decimal(%t19) :: decimal
|
22
22
|
%t17 = load_input "quantity" :: integer
|
23
|
-
%t18 = call core.mul(%t20, %t17) :: integer
|
23
|
+
%t18 = call core.mul:numeric(%t20, %t17) :: integer
|
24
24
|
%t21 = load_input "tax_rate" :: string
|
25
25
|
%t22 = call core.to_decimal(%t21) :: decimal
|
26
|
-
%t10 = call core.mul(%t18, %t22) :: integer
|
26
|
+
%t10 = call core.mul:numeric(%t18, %t22) :: integer
|
27
27
|
yield %t10
|
28
28
|
)
|
29
29
|
(Declaration total
|
30
30
|
%t26 = load_input "unit_price" :: string
|
31
31
|
%t27 = call core.to_decimal(%t26) :: decimal
|
32
32
|
%t24 = load_input "quantity" :: integer
|
33
|
-
%t25 = call core.mul(%t27, %t24) :: integer
|
33
|
+
%t25 = call core.mul:numeric(%t27, %t24) :: integer
|
34
34
|
%t36 = load_input "tax_rate" :: string
|
35
35
|
%t37 = call core.to_decimal(%t36) :: decimal
|
36
|
-
%t30 = call core.mul(%t25, %t37) :: integer
|
36
|
+
%t30 = call core.mul:numeric(%t25, %t37) :: integer
|
37
37
|
%t13 = call core.add(%t25, %t30) :: integer
|
38
38
|
yield %t13
|
39
39
|
)
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Autogenerated by Kumi Codegen
|
2
|
-
module Kumi::Compiled::
|
2
|
+
module Kumi::Compiled::KUMI_9b539dbec6c421834eac549d365663229bd4d355bac776a2dd30eafcdd67df35
|
3
3
|
def self.from(input_data = nil)
|
4
4
|
instance = Object.new
|
5
5
|
instance.extend(self)
|
@@ -10,13 +10,13 @@
|
|
10
10
|
) :: [] -> decimal
|
11
11
|
) :: [] -> decimal
|
12
12
|
(VALUE subtotal
|
13
|
-
(Call :core.mul
|
13
|
+
(Call :core.mul:numeric
|
14
14
|
(Ref price) :: [] -> decimal
|
15
15
|
(InputRef quantity key_chain=[]) :: [] -> integer
|
16
16
|
) :: [] -> integer
|
17
17
|
) :: [] -> integer
|
18
18
|
(VALUE tax_amount
|
19
|
-
(Call :core.mul
|
19
|
+
(Call :core.mul:numeric
|
20
20
|
(Ref subtotal) :: [] -> integer
|
21
21
|
(Ref rate) :: [] -> decimal
|
22
22
|
) :: [] -> integer
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Autogenerated by Kumi Codegen
|
2
|
-
module Kumi::Compiled::
|
2
|
+
module Kumi::Compiled::KUMI_075dddecf843737e72d3cc6f295b8be10ea997b710cacd3cfefab04c36a4bf61
|
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::
|
2
|
+
module Kumi::Compiled::KUMI_f3a048072b5d7d4c224708534b4d9552a65107d88ee22fd9c8e7ac081f434154
|
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::
|
2
|
+
module Kumi::Compiled::KUMI_df1ca4e3610de4f6ae487d214d4142800da16678b6569ff706706f309c72c1f9
|
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::
|
2
|
+
module Kumi::Compiled::KUMI_54123b2529e2556517fc96fc41a7180da286d83fb0ceb0173c8ba23f0cd8f39e
|
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::
|
2
|
+
module Kumi::Compiled::KUMI_05f04a7f7f9e7b9dc3d2add76e4836f7713dbdd2cbbf366c9b11bcada52b04c9
|
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::
|
2
|
+
module Kumi::Compiled::KUMI_40b55ddbe4f7177b1c6ab5ce9e066428c76f04e03106b95b24cd042b598c729f
|
3
3
|
def self.from(input_data = nil)
|
4
4
|
instance = Object.new
|
5
5
|
instance.extend(self)
|
@@ -66,16 +66,16 @@
|
|
66
66
|
%t59 = call core.and(%t55, %t58) :: boolean
|
67
67
|
%t60 = load_field employees_el_53["salary"] :: float
|
68
68
|
%t61 = const 0.3 :: float
|
69
|
-
%t62 = call core.mul(%t60, %t61) :: float
|
69
|
+
%t62 = call core.mul:numeric(%t60, %t61) :: float
|
70
70
|
%t63 = load_decl high_performer axes=[regions, offices, teams, employees] :: boolean
|
71
71
|
%t64 = load_decl top_team axes=[regions, offices, teams] :: boolean
|
72
72
|
%t65 = call core.and(%t63, %t64) :: boolean
|
73
73
|
%t66 = load_field employees_el_53["salary"] :: float
|
74
74
|
%t67 = const 0.2 :: float
|
75
|
-
%t68 = call core.mul(%t66, %t67) :: float
|
75
|
+
%t68 = call core.mul:numeric(%t66, %t67) :: float
|
76
76
|
%t69 = load_field employees_el_53["salary"] :: float
|
77
77
|
%t70 = const 0.05 :: float
|
78
|
-
%t71 = call core.mul(%t69, %t70) :: float
|
78
|
+
%t71 = call core.mul:numeric(%t69, %t70) :: float
|
79
79
|
%t72 = select %t65, %t68, %t71 :: float
|
80
80
|
%t73 = select %t59, %t62, %t72 :: float
|
81
81
|
yield %t73
|
@@ -66,16 +66,16 @@
|
|
66
66
|
%t59 = call core.and(%t55, %t58) :: boolean
|
67
67
|
%t60 = load_field employees_el_53["salary"] :: float
|
68
68
|
%t61 = const 0.3 :: float
|
69
|
-
%t62 = call core.mul(%t60, %t61) :: float
|
69
|
+
%t62 = call core.mul:numeric(%t60, %t61) :: float
|
70
70
|
%t63 = load_decl high_performer axes=[regions, offices, teams, employees] :: boolean
|
71
71
|
%t64 = load_decl top_team axes=[regions, offices, teams] :: boolean
|
72
72
|
%t65 = call core.and(%t63, %t64) :: boolean
|
73
73
|
%t66 = load_field employees_el_53["salary"] :: float
|
74
74
|
%t67 = const 0.2 :: float
|
75
|
-
%t68 = call core.mul(%t66, %t67) :: float
|
75
|
+
%t68 = call core.mul:numeric(%t66, %t67) :: float
|
76
76
|
%t69 = load_field employees_el_53["salary"] :: float
|
77
77
|
%t70 = const 0.05 :: float
|
78
|
-
%t71 = call core.mul(%t69, %t70) :: float
|
78
|
+
%t71 = call core.mul:numeric(%t69, %t70) :: float
|
79
79
|
%t72 = select %t65, %t68, %t71 :: float
|
80
80
|
%t73 = select %t59, %t62, %t72 :: float
|
81
81
|
yield %t73
|
@@ -89,7 +89,7 @@
|
|
89
89
|
%t59 = call core.and(%t80, %t58) :: boolean
|
90
90
|
%t60 = load_field employees_el_53["salary"] :: float
|
91
91
|
%t61 = const 0.3 :: float
|
92
|
-
%t62 = call core.mul(%t60, %t61) :: float
|
92
|
+
%t62 = call core.mul:numeric(%t60, %t61) :: float
|
93
93
|
%t94 = load_input "regions" :: array
|
94
94
|
%t95 = load_field regions_el_44["offices"] :: any
|
95
95
|
%t96 = load_field offices_el_47["teams"] :: any
|
@@ -100,10 +100,10 @@
|
|
100
100
|
%t65 = call core.and(%t100, %t106) :: boolean
|
101
101
|
%t66 = load_field employees_el_53["salary"] :: float
|
102
102
|
%t67 = const 0.2 :: float
|
103
|
-
%t68 = call core.mul(%t66, %t67) :: float
|
103
|
+
%t68 = call core.mul:numeric(%t66, %t67) :: float
|
104
104
|
%t69 = load_field employees_el_53["salary"] :: float
|
105
105
|
%t70 = const 0.05 :: float
|
106
|
-
%t71 = call core.mul(%t69, %t70) :: float
|
106
|
+
%t71 = call core.mul:numeric(%t69, %t70) :: float
|
107
107
|
%t72 = select %t65, %t68, %t71 :: float
|
108
108
|
%t73 = select %t59, %t62, %t72 :: float
|
109
109
|
yield %t73
|
@@ -72,12 +72,12 @@
|
|
72
72
|
%t59 = call core.and(%t80, %t58) :: boolean
|
73
73
|
%t60 = load_field employees_el_53["salary"] :: float
|
74
74
|
%t61 = const 0.3 :: float
|
75
|
-
%t62 = call core.mul(%t60, %t61) :: float
|
75
|
+
%t62 = call core.mul:numeric(%t60, %t61) :: float
|
76
76
|
%t65 = call core.and(%t80, %t93) :: boolean
|
77
77
|
%t67 = const 0.2 :: float
|
78
|
-
%t68 = call core.mul(%t60, %t67) :: float
|
78
|
+
%t68 = call core.mul:numeric(%t60, %t67) :: float
|
79
79
|
%t70 = const 0.05 :: float
|
80
|
-
%t71 = call core.mul(%t60, %t70) :: float
|
80
|
+
%t71 = call core.mul:numeric(%t60, %t70) :: float
|
81
81
|
%t72 = select %t65, %t68, %t71 :: float
|
82
82
|
%t73 = select %t59, %t62, %t72 :: float
|
83
83
|
yield %t73
|
@@ -72,12 +72,12 @@
|
|
72
72
|
%t59 = call core.and(%t80, %t58) :: boolean
|
73
73
|
%t60 = load_field employees_el_53["salary"] :: float
|
74
74
|
%t61 = const 0.3 :: float
|
75
|
-
%t62 = call core.mul(%t60, %t61) :: float
|
75
|
+
%t62 = call core.mul:numeric(%t60, %t61) :: float
|
76
76
|
%t65 = call core.and(%t80, %t93) :: boolean
|
77
77
|
%t67 = const 0.2 :: float
|
78
|
-
%t68 = call core.mul(%t60, %t67) :: float
|
78
|
+
%t68 = call core.mul:numeric(%t60, %t67) :: float
|
79
79
|
%t70 = const 0.05 :: float
|
80
|
-
%t71 = call core.mul(%t60, %t70) :: float
|
80
|
+
%t71 = call core.mul:numeric(%t60, %t70) :: float
|
81
81
|
%t72 = select %t65, %t68, %t71 :: float
|
82
82
|
%t73 = select %t59, %t62, %t72 :: float
|
83
83
|
yield %t73
|
@@ -74,10 +74,10 @@
|
|
74
74
|
%t58 = call core.and(%t87, %t93) :: boolean
|
75
75
|
%t59 = call core.and(%t80, %t58) :: boolean
|
76
76
|
%t60 = load_field employees_el_53["salary"] :: float
|
77
|
-
%t62 = call core.mul(%t60, %t61) :: float
|
77
|
+
%t62 = call core.mul:numeric(%t60, %t61) :: float
|
78
78
|
%t65 = call core.and(%t80, %t93) :: boolean
|
79
|
-
%t68 = call core.mul(%t60, %t67) :: float
|
80
|
-
%t71 = call core.mul(%t60, %t70) :: float
|
79
|
+
%t68 = call core.mul:numeric(%t60, %t67) :: float
|
80
|
+
%t71 = call core.mul:numeric(%t60, %t70) :: float
|
81
81
|
%t72 = select %t65, %t68, %t71 :: float
|
82
82
|
%t73 = select %t59, %t62, %t72 :: float
|
83
83
|
yield %t73
|
@@ -74,10 +74,10 @@
|
|
74
74
|
%t58 = call core.and(%t87, %t93) :: boolean
|
75
75
|
%t59 = call core.and(%t80, %t58) :: boolean
|
76
76
|
%t60 = load_field employees_el_53["salary"] :: float
|
77
|
-
%t62 = call core.mul(%t60, %t61) :: float
|
77
|
+
%t62 = call core.mul:numeric(%t60, %t61) :: float
|
78
78
|
%t65 = call core.and(%t80, %t93) :: boolean
|
79
|
-
%t68 = call core.mul(%t60, %t67) :: float
|
80
|
-
%t71 = call core.mul(%t60, %t70) :: float
|
79
|
+
%t68 = call core.mul:numeric(%t60, %t67) :: float
|
80
|
+
%t71 = call core.mul:numeric(%t60, %t70) :: float
|
81
81
|
%t72 = select %t65, %t68, %t71 :: float
|
82
82
|
%t73 = select %t59, %t62, %t72 :: float
|
83
83
|
yield %t73
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Autogenerated by Kumi Codegen
|
2
|
-
module Kumi::Compiled::
|
2
|
+
module Kumi::Compiled::KUMI_099c2720617317480db14bda8e1f2704e1b767347edf80b2a6beb02e671962dc
|
3
3
|
def self.from(input_data = nil)
|
4
4
|
instance = Object.new
|
5
5
|
instance.extend(self)
|
@@ -26,7 +26,7 @@
|
|
26
26
|
(Ref top_team) :: [regions, offices, teams] -> boolean
|
27
27
|
) :: [regions, offices, teams, employees] -> boolean
|
28
28
|
) :: [regions, offices, teams, employees] -> boolean
|
29
|
-
(Call :core.mul
|
29
|
+
(Call :core.mul:numeric
|
30
30
|
(InputRef regions.region.offices.office.teams.team.employees.employee.salary key_chain=[]) :: [regions, offices, teams, employees] -> float
|
31
31
|
(Const 0.3) :: [] -> float
|
32
32
|
) :: [regions, offices, teams, employees] -> float
|
@@ -35,11 +35,11 @@
|
|
35
35
|
(Ref high_performer) :: [regions, offices, teams, employees] -> boolean
|
36
36
|
(Ref top_team) :: [regions, offices, teams] -> boolean
|
37
37
|
) :: [regions, offices, teams, employees] -> boolean
|
38
|
-
(Call :core.mul
|
38
|
+
(Call :core.mul:numeric
|
39
39
|
(InputRef regions.region.offices.office.teams.team.employees.employee.salary key_chain=[]) :: [regions, offices, teams, employees] -> float
|
40
40
|
(Const 0.2) :: [] -> float
|
41
41
|
) :: [regions, offices, teams, employees] -> float
|
42
|
-
(Call :core.mul
|
42
|
+
(Call :core.mul:numeric
|
43
43
|
(InputRef regions.region.offices.office.teams.team.employees.employee.salary key_chain=[]) :: [regions, offices, teams, employees] -> float
|
44
44
|
(Const 0.05) :: [] -> float
|
45
45
|
) :: [regions, offices, teams, employees] -> float
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Autogenerated by Kumi Codegen
|
2
|
-
module Kumi::Compiled::
|
2
|
+
module Kumi::Compiled::KUMI_3032bccd1b0376f309ad8f6a4df1386cd3c2b527c2af7e28c4ad37f3ba9955c0
|
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::
|
2
|
+
module Kumi::Compiled::KUMI_4941e7b5bc2ba6002c111242862f0e469d878a5effea6dde9366d05ac6dbd7fa
|
3
3
|
def self.from(input_data = nil)
|
4
4
|
instance = Object.new
|
5
5
|
instance.extend(self)
|
@@ -17,7 +17,7 @@
|
|
17
17
|
loop departments id=L3 in %t10 as el=%departments_el_11, idx=%departments_i_12
|
18
18
|
%t13 = load_decl total_payroll axes=[departments] :: integer
|
19
19
|
%t14 = const 0.15 :: float
|
20
|
-
%t15 = call core.mul(%t13, %t14) :: float
|
20
|
+
%t15 = call core.mul:numeric(%t13, %t14) :: float
|
21
21
|
yield %t15
|
22
22
|
end_loop
|
23
23
|
)
|
@@ -17,7 +17,7 @@
|
|
17
17
|
loop departments id=L3 in %t10 as el=%departments_el_11, idx=%departments_i_12
|
18
18
|
%t13 = load_decl total_payroll axes=[departments] :: integer
|
19
19
|
%t14 = const 0.15 :: float
|
20
|
-
%t15 = call core.mul(%t13, %t14) :: float
|
20
|
+
%t15 = call core.mul:numeric(%t13, %t14) :: float
|
21
21
|
yield %t15
|
22
22
|
end_loop
|
23
23
|
)
|
@@ -24,7 +24,7 @@
|
|
24
24
|
end_loop
|
25
25
|
%t45 = acc_load %acc40 :: integer
|
26
26
|
%t14 = const 0.15 :: float
|
27
|
-
%t15 = call core.mul(%t45, %t14) :: float
|
27
|
+
%t15 = call core.mul:numeric(%t45, %t14) :: float
|
28
28
|
yield %t15
|
29
29
|
end_loop
|
30
30
|
)
|
@@ -68,7 +68,7 @@
|
|
68
68
|
end_loop
|
69
69
|
%t65 = acc_load %acc60 :: integer
|
70
70
|
%t56 = const 0.15 :: float
|
71
|
-
%t57 = call core.mul(%t65, %t56) :: float
|
71
|
+
%t57 = call core.mul:numeric(%t65, %t56) :: float
|
72
72
|
%t66 = load_input "departments" :: array
|
73
73
|
%acc68 = decl_acc :: integer
|
74
74
|
%t69 = load_field departments_el_31["employees"] :: any
|
@@ -23,7 +23,7 @@
|
|
23
23
|
%acc40 = acc_add agg.sum(%acc40, %t44) :: integer
|
24
24
|
end_loop
|
25
25
|
%t45 = acc_load %acc40 :: integer
|
26
|
-
%t15 = call core.mul(%t45, %t14) :: float
|
26
|
+
%t15 = call core.mul:numeric(%t45, %t14) :: float
|
27
27
|
yield %t15
|
28
28
|
end_loop
|
29
29
|
)
|
@@ -69,7 +69,7 @@
|
|
69
69
|
%t53 = acc_load %acc48 :: integer
|
70
70
|
%t65 = acc_load %acc60 :: integer
|
71
71
|
%t78 = acc_load %acc68 :: integer
|
72
|
-
%t57 = call core.mul(%t65, %t56) :: float
|
72
|
+
%t57 = call core.mul:numeric(%t65, %t56) :: float
|
73
73
|
%t37 = make_object{name: %t33, payroll: %t53, tax: %t57, managers: %t78} :: object
|
74
74
|
yield %t37
|
75
75
|
end_loop
|
@@ -23,7 +23,7 @@
|
|
23
23
|
%acc40 = acc_add agg.sum(%acc40, %t44) :: integer
|
24
24
|
end_loop
|
25
25
|
%t45 = acc_load %acc40 :: integer
|
26
|
-
%t15 = call core.mul(%t45, %t14) :: float
|
26
|
+
%t15 = call core.mul:numeric(%t45, %t14) :: float
|
27
27
|
yield %t15
|
28
28
|
end_loop
|
29
29
|
)
|
@@ -70,7 +70,7 @@
|
|
70
70
|
%t53 = acc_load %acc48 :: integer
|
71
71
|
%t65 = acc_load %acc60 :: integer
|
72
72
|
%t78 = acc_load %acc68 :: integer
|
73
|
-
%t57 = call core.mul(%t65, %t56) :: float
|
73
|
+
%t57 = call core.mul:numeric(%t65, %t56) :: float
|
74
74
|
%t37 = make_object{name: %t33, payroll: %t53, tax: %t57, managers: %t78} :: object
|
75
75
|
yield %t37
|
76
76
|
end_loop
|
@@ -23,7 +23,7 @@
|
|
23
23
|
%acc40 = acc_add agg.sum(%acc40, %t44) :: integer
|
24
24
|
end_loop
|
25
25
|
%t45 = acc_load %acc40 :: integer
|
26
|
-
%t15 = call core.mul(%t45, %t14) :: float
|
26
|
+
%t15 = call core.mul:numeric(%t45, %t14) :: float
|
27
27
|
yield %t15
|
28
28
|
end_loop
|
29
29
|
)
|
@@ -69,7 +69,7 @@
|
|
69
69
|
%t53 = acc_load %acc48 :: integer
|
70
70
|
%t65 = acc_load %acc60 :: integer
|
71
71
|
%t78 = acc_load %acc68 :: integer
|
72
|
-
%t57 = call core.mul(%t65, %t56) :: float
|
72
|
+
%t57 = call core.mul:numeric(%t65, %t56) :: float
|
73
73
|
%t37 = make_object{name: %t33, payroll: %t53, tax: %t57, managers: %t78} :: object
|
74
74
|
yield %t37
|
75
75
|
end_loop
|
@@ -23,7 +23,7 @@
|
|
23
23
|
%acc40 = acc_add agg.sum(%acc40, %t44) :: integer
|
24
24
|
end_loop
|
25
25
|
%t45 = acc_load %acc40 :: integer
|
26
|
-
%t15 = call core.mul(%t45, %t14) :: float
|
26
|
+
%t15 = call core.mul:numeric(%t45, %t14) :: float
|
27
27
|
yield %t15
|
28
28
|
end_loop
|
29
29
|
)
|
@@ -69,7 +69,7 @@
|
|
69
69
|
%t53 = acc_load %acc48 :: integer
|
70
70
|
%t65 = acc_load %acc60 :: integer
|
71
71
|
%t78 = acc_load %acc68 :: integer
|
72
|
-
%t57 = call core.mul(%t65, %t56) :: float
|
72
|
+
%t57 = call core.mul:numeric(%t65, %t56) :: float
|
73
73
|
%t37 = make_object{name: %t33, payroll: %t53, tax: %t57, managers: %t78} :: object
|
74
74
|
yield %t37
|
75
75
|
end_loop
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Autogenerated by Kumi Codegen
|
2
|
-
module Kumi::Compiled::
|
2
|
+
module Kumi::Compiled::KUMI_268bb6d2c7e77fc017d3663634d0ab22efda83be044c30ee54714a6805e47e30
|
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 x_sq
|
3
3
|
%t1 = load_input "x" :: integer
|
4
4
|
%t2 = load_input "x" :: integer
|
5
|
-
%t3 = call core.mul(%t1, %t2) :: integer
|
5
|
+
%t3 = call core.mul:numeric(%t1, %t2) :: integer
|
6
6
|
yield %t3
|
7
7
|
)
|
8
8
|
(Declaration y_sq
|
9
9
|
%t4 = load_input "y" :: 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 distance_sq
|
@@ -2,13 +2,13 @@
|
|
2
2
|
(Declaration x_sq
|
3
3
|
%t1 = load_input "x" :: integer
|
4
4
|
%t2 = load_input "x" :: integer
|
5
|
-
%t3 = call core.mul(%t1, %t2) :: integer
|
5
|
+
%t3 = call core.mul:numeric(%t1, %t2) :: integer
|
6
6
|
yield %t3
|
7
7
|
)
|
8
8
|
(Declaration y_sq
|
9
9
|
%t4 = load_input "y" :: 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 distance_sq
|
@@ -2,32 +2,32 @@
|
|
2
2
|
(Declaration x_sq
|
3
3
|
%t1 = load_input "x" :: integer
|
4
4
|
%t2 = load_input "x" :: integer
|
5
|
-
%t3 = call core.mul(%t1, %t2) :: integer
|
5
|
+
%t3 = call core.mul:numeric(%t1, %t2) :: integer
|
6
6
|
yield %t3
|
7
7
|
)
|
8
8
|
(Declaration y_sq
|
9
9
|
%t4 = load_input "y" :: 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 distance_sq
|
15
15
|
%t13 = load_input "x" :: integer
|
16
16
|
%t14 = load_input "x" :: integer
|
17
|
-
%t15 = call core.mul(%t13, %t14) :: integer
|
17
|
+
%t15 = call core.mul:numeric(%t13, %t14) :: integer
|
18
18
|
%t16 = load_input "y" :: integer
|
19
19
|
%t17 = load_input "y" :: integer
|
20
|
-
%t18 = call core.mul(%t16, %t17) :: integer
|
20
|
+
%t18 = call core.mul:numeric(%t16, %t17) :: integer
|
21
21
|
%t9 = call core.add(%t15, %t18) :: integer
|
22
22
|
yield %t9
|
23
23
|
)
|
24
24
|
(Declaration distance
|
25
25
|
%t22 = load_input "x" :: integer
|
26
26
|
%t23 = load_input "x" :: integer
|
27
|
-
%t24 = call core.mul(%t22, %t23) :: integer
|
27
|
+
%t24 = call core.mul:numeric(%t22, %t23) :: integer
|
28
28
|
%t25 = load_input "y" :: integer
|
29
29
|
%t26 = load_input "y" :: integer
|
30
|
-
%t27 = call core.mul(%t25, %t26) :: integer
|
30
|
+
%t27 = call core.mul:numeric(%t25, %t26) :: integer
|
31
31
|
%t21 = call core.add(%t24, %t27) :: integer
|
32
32
|
%t11 = const 0.5 :: float
|
33
33
|
%t12 = call core.pow(%t21, %t11) :: float
|