kumi 0.0.26 → 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 +17 -0
- data/CLAUDE.md +4 -0
- data/README.md +36 -12
- 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/functions/core/conversion.yaml +32 -0
- data/data/kernels/javascript/core/arithmetic.yaml +6 -2
- data/data/kernels/javascript/core/coercion.yaml +20 -0
- data/data/kernels/ruby/core/arithmetic.yaml +7 -2
- data/data/kernels/ruby/core/coercion.yaml +20 -0
- data/docs/ARCHITECTURE.md +277 -0
- data/docs/DEVELOPMENT.md +62 -0
- data/docs/FUNCTIONS.md +955 -0
- data/docs/SYNTAX.md +8 -0
- data/docs/VSCODE_EXTENSION.md +114 -0
- data/docs/functions-reference.json +1821 -0
- 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/ast.txt +38 -0
- data/golden/decimal_explicit/expected/input_plan.txt +3 -0
- data/golden/decimal_explicit/expected/lir_00_unoptimized.txt +30 -0
- data/golden/decimal_explicit/expected/lir_01_hoist_scalar_references.txt +30 -0
- data/golden/decimal_explicit/expected/lir_02_inlined.txt +44 -0
- data/golden/decimal_explicit/expected/lir_03_cse.txt +40 -0
- data/golden/decimal_explicit/expected/lir_04_1_loop_fusion.txt +40 -0
- data/golden/decimal_explicit/expected/lir_04_loop_invcm.txt +40 -0
- data/golden/decimal_explicit/expected/lir_06_const_prop.txt +40 -0
- data/golden/decimal_explicit/expected/nast.txt +30 -0
- data/golden/decimal_explicit/expected/schema_javascript.mjs +31 -0
- data/golden/decimal_explicit/expected/schema_ruby.rb +57 -0
- data/golden/decimal_explicit/expected/snast.txt +30 -0
- data/golden/decimal_explicit/expected.json +1 -0
- data/golden/decimal_explicit/input.json +5 -0
- data/golden/decimal_explicit/schema.kumi +14 -0
- 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/configuration.rb +6 -0
- 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/core/input/type_matcher.rb +8 -1
- data/lib/kumi/core/ruby_parser/input_builder.rb +2 -2
- data/lib/kumi/core/types/normalizer.rb +1 -0
- data/lib/kumi/core/types/validator.rb +2 -2
- data/lib/kumi/core/types.rb +2 -2
- data/lib/kumi/dev/golden/reporter.rb +9 -0
- data/lib/kumi/dev/golden/result.rb +3 -1
- data/lib/kumi/dev/golden/runtime_test.rb +25 -0
- data/lib/kumi/dev/golden/suite.rb +4 -4
- data/lib/kumi/dev/golden/value_normalizer.rb +80 -0
- data/lib/kumi/dev/golden.rb +21 -12
- data/lib/kumi/doc_generator/formatters/json.rb +39 -0
- data/lib/kumi/doc_generator/formatters/markdown.rb +175 -0
- data/lib/kumi/doc_generator/loader.rb +37 -0
- data/lib/kumi/doc_generator/merger.rb +54 -0
- data/lib/kumi/doc_generator.rb +4 -0
- data/lib/kumi/frontends/text.rb +33 -5
- data/lib/kumi/syntax/location.rb +5 -1
- data/lib/kumi/version.rb +1 -1
- data/vscode-extension/.gitignore +4 -0
- data/vscode-extension/README.md +59 -0
- data/vscode-extension/TESTING.md +151 -0
- data/vscode-extension/package.json +51 -0
- data/vscode-extension/src/extension.ts +295 -0
- data/vscode-extension/tsconfig.json +15 -0
- metadata +38 -1
@@ -0,0 +1,30 @@
|
|
1
|
+
(NAST
|
2
|
+
(VALUE price
|
3
|
+
(Call :to_decimal
|
4
|
+
(InputRef [:unit_price])
|
5
|
+
)
|
6
|
+
)
|
7
|
+
(VALUE rate
|
8
|
+
(Call :to_decimal
|
9
|
+
(InputRef [:tax_rate])
|
10
|
+
)
|
11
|
+
)
|
12
|
+
(VALUE subtotal
|
13
|
+
(Call :multiply
|
14
|
+
(Ref price)
|
15
|
+
(InputRef [:quantity])
|
16
|
+
)
|
17
|
+
)
|
18
|
+
(VALUE tax_amount
|
19
|
+
(Call :multiply
|
20
|
+
(Ref subtotal)
|
21
|
+
(Ref rate)
|
22
|
+
)
|
23
|
+
)
|
24
|
+
(VALUE total
|
25
|
+
(Call :add
|
26
|
+
(Ref subtotal)
|
27
|
+
(Ref tax_amount)
|
28
|
+
)
|
29
|
+
)
|
30
|
+
)
|
@@ -0,0 +1,31 @@
|
|
1
|
+
export function _subtotal(input) {
|
2
|
+
let t14 = input["unit_price"];
|
3
|
+
let t15 = typeof t14 === 'string' ? parseFloat(t14) : Number(t14);
|
4
|
+
let t6 = input["quantity"];
|
5
|
+
let t7 = t15 * t6;
|
6
|
+
return t7;
|
7
|
+
}
|
8
|
+
|
9
|
+
export function _tax_amount(input) {
|
10
|
+
let t19 = input["unit_price"];
|
11
|
+
let t20 = typeof t19 === 'string' ? parseFloat(t19) : Number(t19);
|
12
|
+
let t17 = input["quantity"];
|
13
|
+
let t18 = t20 * t17;
|
14
|
+
let t21 = input["tax_rate"];
|
15
|
+
let t22 = typeof t21 === 'string' ? parseFloat(t21) : Number(t21);
|
16
|
+
let t10 = t18 * t22;
|
17
|
+
return t10;
|
18
|
+
}
|
19
|
+
|
20
|
+
export function _total(input) {
|
21
|
+
let t26 = input["unit_price"];
|
22
|
+
let t27 = typeof t26 === 'string' ? parseFloat(t26) : Number(t26);
|
23
|
+
let t24 = input["quantity"];
|
24
|
+
let t25 = t27 * t24;
|
25
|
+
let t36 = input["tax_rate"];
|
26
|
+
let t37 = typeof t36 === 'string' ? parseFloat(t36) : Number(t36);
|
27
|
+
let t30 = t25 * t37;
|
28
|
+
let t13 = t25 + t30;
|
29
|
+
return t13;
|
30
|
+
}
|
31
|
+
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# Autogenerated by Kumi Codegen
|
2
|
+
module Kumi::Compiled::KUMI_9b539dbec6c421834eac549d365663229bd4d355bac776a2dd30eafcdd67df35
|
3
|
+
def self.from(input_data = nil)
|
4
|
+
instance = Object.new
|
5
|
+
instance.extend(self)
|
6
|
+
instance.instance_variable_set(:@input, input_data)
|
7
|
+
instance
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.__kumi_executable__
|
11
|
+
instance = Object.new
|
12
|
+
instance.extend(self)
|
13
|
+
instance
|
14
|
+
end
|
15
|
+
|
16
|
+
def update(input_data)
|
17
|
+
@input = @input.merge(input_data)
|
18
|
+
self
|
19
|
+
end
|
20
|
+
|
21
|
+
def [](name)
|
22
|
+
case name
|
23
|
+
when :subtotal then _subtotal
|
24
|
+
when :tax_amount then _tax_amount
|
25
|
+
when :total then _total
|
26
|
+
else raise KeyError, "Unknown declaration"
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
def _subtotal(input = @input)
|
31
|
+
t14 = input["unit_price"] || input[:unit_price]
|
32
|
+
t15 = t14.is_a?(BigDecimal) ? t14 : BigDecimal(t14.to_s)
|
33
|
+
t6 = input["quantity"] || input[:quantity]
|
34
|
+
t15 * t6
|
35
|
+
end
|
36
|
+
|
37
|
+
def _tax_amount(input = @input)
|
38
|
+
t19 = input["unit_price"] || input[:unit_price]
|
39
|
+
t20 = t19.is_a?(BigDecimal) ? t19 : BigDecimal(t19.to_s)
|
40
|
+
t17 = input["quantity"] || input[:quantity]
|
41
|
+
t18 = t20 * t17
|
42
|
+
t21 = input["tax_rate"] || input[:tax_rate]
|
43
|
+
t22 = t21.is_a?(BigDecimal) ? t21 : BigDecimal(t21.to_s)
|
44
|
+
t18 * t22
|
45
|
+
end
|
46
|
+
|
47
|
+
def _total(input = @input)
|
48
|
+
t26 = input["unit_price"] || input[:unit_price]
|
49
|
+
t27 = t26.is_a?(BigDecimal) ? t26 : BigDecimal(t26.to_s)
|
50
|
+
t24 = input["quantity"] || input[:quantity]
|
51
|
+
t25 = t27 * t24
|
52
|
+
t36 = input["tax_rate"] || input[:tax_rate]
|
53
|
+
t37 = t36.is_a?(BigDecimal) ? t36 : BigDecimal(t36.to_s)
|
54
|
+
t30 = t25 * t37
|
55
|
+
t25 + t30
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
(SNAST
|
2
|
+
(VALUE price
|
3
|
+
(Call :core.to_decimal
|
4
|
+
(InputRef unit_price key_chain=[]) :: [] -> string
|
5
|
+
) :: [] -> decimal
|
6
|
+
) :: [] -> decimal
|
7
|
+
(VALUE rate
|
8
|
+
(Call :core.to_decimal
|
9
|
+
(InputRef tax_rate key_chain=[]) :: [] -> string
|
10
|
+
) :: [] -> decimal
|
11
|
+
) :: [] -> decimal
|
12
|
+
(VALUE subtotal
|
13
|
+
(Call :core.mul:numeric
|
14
|
+
(Ref price) :: [] -> decimal
|
15
|
+
(InputRef quantity key_chain=[]) :: [] -> integer
|
16
|
+
) :: [] -> integer
|
17
|
+
) :: [] -> integer
|
18
|
+
(VALUE tax_amount
|
19
|
+
(Call :core.mul:numeric
|
20
|
+
(Ref subtotal) :: [] -> integer
|
21
|
+
(Ref rate) :: [] -> decimal
|
22
|
+
) :: [] -> integer
|
23
|
+
) :: [] -> integer
|
24
|
+
(VALUE total
|
25
|
+
(Call :core.add
|
26
|
+
(Ref subtotal) :: [] -> integer
|
27
|
+
(Ref tax_amount) :: [] -> integer
|
28
|
+
) :: [] -> integer
|
29
|
+
) :: [] -> integer
|
30
|
+
)
|
@@ -0,0 +1 @@
|
|
1
|
+
{"subtotal": "99.95", "tax_amount": "7.996", "total": "107.946"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
schema do
|
2
|
+
input do
|
3
|
+
string :unit_price
|
4
|
+
integer :quantity
|
5
|
+
string :tax_rate
|
6
|
+
end
|
7
|
+
|
8
|
+
let :price, to_decimal(input.unit_price)
|
9
|
+
let :rate, to_decimal(input.tax_rate)
|
10
|
+
|
11
|
+
value :subtotal, price * input.quantity
|
12
|
+
value :tax_amount, subtotal * rate
|
13
|
+
value :total, subtotal + tax_amount
|
14
|
+
end
|
@@ -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
|
@@ -1,27 +1,27 @@
|
|
1
1
|
(LIR
|
2
2
|
(Declaration x_sq
|
3
3
|
%t1 = load_input "x" :: integer
|
4
|
-
%t3 = call core.mul(%t1, %t1) :: integer
|
4
|
+
%t3 = call core.mul:numeric(%t1, %t1) :: integer
|
5
5
|
yield %t3
|
6
6
|
)
|
7
7
|
(Declaration y_sq
|
8
8
|
%t4 = load_input "y" :: integer
|
9
|
-
%t6 = call core.mul(%t4, %t4) :: integer
|
9
|
+
%t6 = call core.mul:numeric(%t4, %t4) :: integer
|
10
10
|
yield %t6
|
11
11
|
)
|
12
12
|
(Declaration distance_sq
|
13
13
|
%t13 = load_input "x" :: integer
|
14
|
-
%t15 = call core.mul(%t13, %t13) :: integer
|
14
|
+
%t15 = call core.mul:numeric(%t13, %t13) :: integer
|
15
15
|
%t16 = load_input "y" :: integer
|
16
|
-
%t18 = call core.mul(%t16, %t16) :: integer
|
16
|
+
%t18 = call core.mul:numeric(%t16, %t16) :: integer
|
17
17
|
%t9 = call core.add(%t15, %t18) :: integer
|
18
18
|
yield %t9
|
19
19
|
)
|
20
20
|
(Declaration distance
|
21
21
|
%t22 = load_input "x" :: integer
|
22
|
-
%t24 = call core.mul(%t22, %t22) :: integer
|
22
|
+
%t24 = call core.mul:numeric(%t22, %t22) :: integer
|
23
23
|
%t25 = load_input "y" :: integer
|
24
|
-
%t27 = call core.mul(%t25, %t25) :: integer
|
24
|
+
%t27 = call core.mul:numeric(%t25, %t25) :: integer
|
25
25
|
%t21 = call core.add(%t24, %t27) :: integer
|
26
26
|
%t11 = const 0.5 :: float
|
27
27
|
%t12 = call core.pow(%t21, %t11) :: float
|