kumi 0.0.24 → 0.0.25

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 (108) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -0
  3. data/golden/array_element/expected/schema_ruby.rb +1 -1
  4. data/golden/array_index/expected/schema_ruby.rb +1 -1
  5. data/golden/array_operations/expected/schema_ruby.rb +1 -1
  6. data/golden/cascade_logic/expected/lir_02_inlined.txt +8 -8
  7. data/golden/cascade_logic/expected/schema_ruby.rb +1 -1
  8. data/golden/chained_fusion/expected/lir_02_inlined.txt +36 -36
  9. data/golden/chained_fusion/expected/lir_03_cse.txt +23 -23
  10. data/golden/chained_fusion/expected/lir_04_1_loop_fusion.txt +25 -25
  11. data/golden/chained_fusion/expected/lir_04_loop_invcm.txt +23 -23
  12. data/golden/chained_fusion/expected/lir_06_const_prop.txt +23 -23
  13. data/golden/chained_fusion/expected/schema_javascript.mjs +23 -23
  14. data/golden/chained_fusion/expected/schema_ruby.rb +28 -28
  15. data/golden/element_arrays/expected/schema_ruby.rb +1 -1
  16. data/golden/empty_and_null_inputs/expected/lir_02_inlined.txt +18 -18
  17. data/golden/empty_and_null_inputs/expected/lir_03_cse.txt +17 -17
  18. data/golden/empty_and_null_inputs/expected/lir_04_1_loop_fusion.txt +17 -17
  19. data/golden/empty_and_null_inputs/expected/lir_04_loop_invcm.txt +17 -17
  20. data/golden/empty_and_null_inputs/expected/lir_06_const_prop.txt +17 -17
  21. data/golden/empty_and_null_inputs/expected/schema_javascript.mjs +13 -13
  22. data/golden/empty_and_null_inputs/expected/schema_ruby.rb +18 -18
  23. data/golden/game_of_life/expected/lir_02_inlined.txt +1291 -1291
  24. data/golden/game_of_life/expected/lir_03_cse.txt +396 -396
  25. data/golden/game_of_life/expected/lir_04_1_loop_fusion.txt +396 -396
  26. data/golden/game_of_life/expected/lir_04_loop_invcm.txt +396 -396
  27. data/golden/game_of_life/expected/lir_06_const_prop.txt +396 -396
  28. data/golden/game_of_life/expected/schema_javascript.mjs +85 -85
  29. data/golden/game_of_life/expected/schema_ruby.rb +86 -86
  30. data/golden/hash_keys/expected/schema_ruby.rb +1 -1
  31. data/golden/hash_value/expected/schema_ruby.rb +1 -1
  32. data/golden/hierarchical_complex/expected/lir_02_inlined.txt +15 -15
  33. data/golden/hierarchical_complex/expected/lir_03_cse.txt +1 -1
  34. data/golden/hierarchical_complex/expected/lir_04_1_loop_fusion.txt +1 -1
  35. data/golden/hierarchical_complex/expected/lir_04_loop_invcm.txt +1 -1
  36. data/golden/hierarchical_complex/expected/lir_06_const_prop.txt +1 -1
  37. data/golden/hierarchical_complex/expected/schema_javascript.mjs +1 -1
  38. data/golden/hierarchical_complex/expected/schema_ruby.rb +2 -2
  39. data/golden/inline_rename_scope_leak/expected/schema_ruby.rb +1 -1
  40. data/golden/input_reference/expected/schema_ruby.rb +1 -1
  41. data/golden/interleaved_fusion/expected/lir_02_inlined.txt +35 -35
  42. data/golden/interleaved_fusion/expected/lir_03_cse.txt +26 -26
  43. data/golden/interleaved_fusion/expected/lir_04_1_loop_fusion.txt +27 -26
  44. data/golden/interleaved_fusion/expected/lir_04_loop_invcm.txt +26 -26
  45. data/golden/interleaved_fusion/expected/lir_06_const_prop.txt +26 -26
  46. data/golden/interleaved_fusion/expected/schema_javascript.mjs +23 -23
  47. data/golden/interleaved_fusion/expected/schema_ruby.rb +29 -29
  48. data/golden/let_inline/expected/schema_ruby.rb +1 -1
  49. data/golden/loop_fusion/expected/lir_02_inlined.txt +17 -17
  50. data/golden/loop_fusion/expected/lir_03_cse.txt +14 -14
  51. data/golden/loop_fusion/expected/lir_04_1_loop_fusion.txt +14 -14
  52. data/golden/loop_fusion/expected/lir_04_loop_invcm.txt +14 -14
  53. data/golden/loop_fusion/expected/lir_06_const_prop.txt +14 -14
  54. data/golden/loop_fusion/expected/schema_javascript.mjs +12 -12
  55. data/golden/loop_fusion/expected/schema_ruby.rb +16 -16
  56. data/golden/min_reduce_scope/expected/schema_ruby.rb +1 -1
  57. data/golden/mixed_dimensions/expected/lir_02_inlined.txt +5 -5
  58. data/golden/mixed_dimensions/expected/lir_03_cse.txt +5 -5
  59. data/golden/mixed_dimensions/expected/lir_04_1_loop_fusion.txt +5 -5
  60. data/golden/mixed_dimensions/expected/lir_04_loop_invcm.txt +5 -5
  61. data/golden/mixed_dimensions/expected/lir_06_const_prop.txt +5 -5
  62. data/golden/mixed_dimensions/expected/schema_javascript.mjs +3 -3
  63. data/golden/mixed_dimensions/expected/schema_ruby.rb +6 -6
  64. data/golden/multirank_hoisting/expected/lir_02_inlined.txt +48 -48
  65. data/golden/multirank_hoisting/expected/lir_03_cse.txt +35 -35
  66. data/golden/multirank_hoisting/expected/lir_04_1_loop_fusion.txt +35 -35
  67. data/golden/multirank_hoisting/expected/lir_04_loop_invcm.txt +35 -35
  68. data/golden/multirank_hoisting/expected/lir_06_const_prop.txt +35 -35
  69. data/golden/multirank_hoisting/expected/schema_javascript.mjs +34 -34
  70. data/golden/multirank_hoisting/expected/schema_ruby.rb +36 -36
  71. data/golden/nested_hash/expected/schema_ruby.rb +1 -1
  72. data/golden/reduction_broadcast/expected/lir_02_inlined.txt +30 -30
  73. data/golden/reduction_broadcast/expected/lir_03_cse.txt +22 -22
  74. data/golden/reduction_broadcast/expected/lir_04_1_loop_fusion.txt +22 -22
  75. data/golden/reduction_broadcast/expected/lir_04_loop_invcm.txt +22 -22
  76. data/golden/reduction_broadcast/expected/lir_06_const_prop.txt +22 -22
  77. data/golden/reduction_broadcast/expected/schema_javascript.mjs +18 -18
  78. data/golden/reduction_broadcast/expected/schema_ruby.rb +23 -23
  79. data/golden/roll/expected/schema_ruby.rb +1 -1
  80. data/golden/shift/expected/schema_ruby.rb +1 -1
  81. data/golden/shift_2d/expected/schema_ruby.rb +1 -1
  82. data/golden/simple_math/expected/schema_ruby.rb +1 -1
  83. data/golden/streaming_basics/expected/lir_02_inlined.txt +25 -25
  84. data/golden/streaming_basics/expected/lir_03_cse.txt +13 -13
  85. data/golden/streaming_basics/expected/lir_04_1_loop_fusion.txt +13 -13
  86. data/golden/streaming_basics/expected/lir_04_loop_invcm.txt +13 -13
  87. data/golden/streaming_basics/expected/lir_06_const_prop.txt +13 -13
  88. data/golden/streaming_basics/expected/schema_javascript.mjs +13 -13
  89. data/golden/streaming_basics/expected/schema_ruby.rb +14 -14
  90. data/golden/tuples/expected/schema_ruby.rb +1 -1
  91. data/golden/tuples_and_arrays/expected/lir_02_inlined.txt +16 -16
  92. data/golden/tuples_and_arrays/expected/lir_03_cse.txt +13 -13
  93. data/golden/tuples_and_arrays/expected/lir_04_1_loop_fusion.txt +13 -13
  94. data/golden/tuples_and_arrays/expected/lir_04_loop_invcm.txt +13 -13
  95. data/golden/tuples_and_arrays/expected/lir_06_const_prop.txt +13 -13
  96. data/golden/tuples_and_arrays/expected/schema_javascript.mjs +13 -13
  97. data/golden/tuples_and_arrays/expected/schema_ruby.rb +14 -14
  98. data/golden/us_tax_2024/expected/lir_02_inlined.txt +524 -524
  99. data/golden/us_tax_2024/expected/lir_03_cse.txt +283 -283
  100. data/golden/us_tax_2024/expected/lir_04_1_loop_fusion.txt +283 -283
  101. data/golden/us_tax_2024/expected/lir_04_loop_invcm.txt +320 -260
  102. data/golden/us_tax_2024/expected/lir_06_const_prop.txt +320 -260
  103. data/golden/us_tax_2024/expected/schema_javascript.mjs +24 -24
  104. data/golden/us_tax_2024/expected/schema_ruby.rb +25 -25
  105. data/golden/with_constants/expected/schema_ruby.rb +1 -1
  106. data/lib/kumi/core/analyzer/passes/lir/inline_declarations_pass.rb +118 -74
  107. data/lib/kumi/version.rb +1 -1
  108. metadata +1 -1
@@ -30,37 +30,37 @@
30
30
  loop departments id=L5 in %t19 as el=%departments_el_20, idx=%departments_i_21
31
31
  %acc36 = decl_acc :: integer
32
32
  %t37 = load_field departments_el_20["teams"] :: any
33
- %acc42 = decl_acc :: integer
34
- loop teams id=L8 in %t37 as el=%teams_el_6, idx=%teams_i_7
35
- %t38 = load_field teams_el_6["headcount"] :: integer
36
- %acc36 = acc_add agg.sum(%acc36, %t38) :: integer
37
- %t44 = load_field teams_el_6["team_name"] :: string
38
- %acc42 = acc_add agg.count(%acc42, %t44) :: integer
33
+ %acc44 = decl_acc :: integer
34
+ loop teams id=L8 in %t37 as el=%t38, idx=%t39
35
+ %t40 = load_field t38["headcount"] :: integer
36
+ %acc36 = acc_add agg.sum(%acc36, %t40) :: integer
37
+ %t48 = load_field t38["team_name"] :: string
38
+ %acc44 = acc_add agg.count(%acc44, %t48) :: integer
39
39
  end_loop
40
- %t39 = acc_load %acc36 :: integer
41
- %t45 = acc_load %acc42 :: integer
42
- %t24 = call core.div(%t39, %t45) :: float
40
+ %t41 = acc_load %acc36 :: integer
41
+ %t49 = acc_load %acc44 :: integer
42
+ %t24 = call core.div(%t41, %t49) :: float
43
43
  yield %t24
44
44
  end_loop
45
45
  )
46
46
  (Declaration is_above_average_team
47
47
  %t25 = load_input "departments" :: array
48
48
  loop departments id=L6 in %t25 as el=%departments_el_26, idx=%departments_i_27
49
- %t28 = load_field departments_el_26["teams"] :: any
50
- %acc52 = decl_acc :: integer
51
- %acc58 = decl_acc :: integer
52
- loop teams id=L10 in %t28 as el=%teams_el_6, idx=%teams_i_7
53
- %t54 = load_field teams_el_6["headcount"] :: integer
54
- %acc52 = acc_add agg.sum(%acc52, %t54) :: integer
55
- %t60 = load_field teams_el_6["team_name"] :: string
56
- %acc58 = acc_add agg.count(%acc58, %t60) :: integer
49
+ %acc56 = decl_acc :: integer
50
+ %t57 = load_field departments_el_26["teams"] :: any
51
+ %acc64 = decl_acc :: integer
52
+ loop teams id=L10 in %t57 as el=%t58, idx=%t59
53
+ %t60 = load_field t58["headcount"] :: integer
54
+ %acc56 = acc_add agg.sum(%acc56, %t60) :: integer
55
+ %t68 = load_field t58["team_name"] :: string
56
+ %acc64 = acc_add agg.count(%acc64, %t68) :: integer
57
57
  end_loop
58
- %t55 = acc_load %acc52 :: integer
59
- %t61 = acc_load %acc58 :: integer
60
- %t49 = call core.div(%t55, %t61) :: float
61
- loop teams id=L7 in %t28 as el=%teams_el_29, idx=%teams_i_30
58
+ %t61 = acc_load %acc56 :: integer
59
+ %t69 = acc_load %acc64 :: integer
60
+ %t53 = call core.div(%t61, %t69) :: float
61
+ loop teams id=L7 in %t57 as el=%teams_el_29, idx=%teams_i_30
62
62
  %t31 = load_field teams_el_29["headcount"] :: integer
63
- %t33 = call core.gt(%t31, %t49) :: boolean
63
+ %t33 = call core.gt(%t31, %t53) :: boolean
64
64
  yield %t33
65
65
  end_loop
66
66
  end_loop
@@ -30,37 +30,37 @@
30
30
  loop departments id=L5 in %t19 as el=%departments_el_20, idx=%departments_i_21
31
31
  %acc36 = decl_acc :: integer
32
32
  %t37 = load_field departments_el_20["teams"] :: any
33
- %acc42 = decl_acc :: integer
34
- loop teams id=L8 in %t37 as el=%teams_el_6, idx=%teams_i_7
35
- %t38 = load_field teams_el_6["headcount"] :: integer
36
- %acc36 = acc_add agg.sum(%acc36, %t38) :: integer
37
- %t44 = load_field teams_el_6["team_name"] :: string
38
- %acc42 = acc_add agg.count(%acc42, %t44) :: integer
33
+ %acc44 = decl_acc :: integer
34
+ loop teams id=L8 in %t37 as el=%t38, idx=%t39
35
+ %t40 = load_field t38["headcount"] :: integer
36
+ %acc36 = acc_add agg.sum(%acc36, %t40) :: integer
37
+ %t48 = load_field t38["team_name"] :: string
38
+ %acc44 = acc_add agg.count(%acc44, %t48) :: integer
39
39
  end_loop
40
- %t39 = acc_load %acc36 :: integer
41
- %t45 = acc_load %acc42 :: integer
42
- %t24 = call core.div(%t39, %t45) :: float
40
+ %t41 = acc_load %acc36 :: integer
41
+ %t49 = acc_load %acc44 :: integer
42
+ %t24 = call core.div(%t41, %t49) :: float
43
43
  yield %t24
44
44
  end_loop
45
45
  )
46
46
  (Declaration is_above_average_team
47
47
  %t25 = load_input "departments" :: array
48
48
  loop departments id=L6 in %t25 as el=%departments_el_26, idx=%departments_i_27
49
- %t28 = load_field departments_el_26["teams"] :: any
50
- %acc52 = decl_acc :: integer
51
- %acc58 = decl_acc :: integer
52
- loop teams id=L10 in %t28 as el=%teams_el_6, idx=%teams_i_7
53
- %t54 = load_field teams_el_6["headcount"] :: integer
54
- %acc52 = acc_add agg.sum(%acc52, %t54) :: integer
55
- %t60 = load_field teams_el_6["team_name"] :: string
56
- %acc58 = acc_add agg.count(%acc58, %t60) :: integer
49
+ %acc56 = decl_acc :: integer
50
+ %t57 = load_field departments_el_26["teams"] :: any
51
+ %acc64 = decl_acc :: integer
52
+ loop teams id=L10 in %t57 as el=%t58, idx=%t59
53
+ %t60 = load_field t58["headcount"] :: integer
54
+ %acc56 = acc_add agg.sum(%acc56, %t60) :: integer
55
+ %t68 = load_field t58["team_name"] :: string
56
+ %acc64 = acc_add agg.count(%acc64, %t68) :: integer
57
57
  end_loop
58
- %t55 = acc_load %acc52 :: integer
59
- %t61 = acc_load %acc58 :: integer
60
- %t49 = call core.div(%t55, %t61) :: float
61
- loop teams id=L7 in %t28 as el=%teams_el_29, idx=%teams_i_30
58
+ %t61 = acc_load %acc56 :: integer
59
+ %t69 = acc_load %acc64 :: integer
60
+ %t53 = call core.div(%t61, %t69) :: float
61
+ loop teams id=L7 in %t57 as el=%teams_el_29, idx=%teams_i_30
62
62
  %t31 = load_field teams_el_29["headcount"] :: integer
63
- %t33 = call core.gt(%t31, %t49) :: boolean
63
+ %t33 = call core.gt(%t31, %t53) :: boolean
64
64
  yield %t33
65
65
  end_loop
66
66
  end_loop
@@ -30,37 +30,37 @@
30
30
  loop departments id=L5 in %t19 as el=%departments_el_20, idx=%departments_i_21
31
31
  %acc36 = decl_acc :: integer
32
32
  %t37 = load_field departments_el_20["teams"] :: any
33
- %acc42 = decl_acc :: integer
34
- loop teams id=L8 in %t37 as el=%teams_el_6, idx=%teams_i_7
35
- %t38 = load_field teams_el_6["headcount"] :: integer
36
- %acc36 = acc_add agg.sum(%acc36, %t38) :: integer
37
- %t44 = load_field teams_el_6["team_name"] :: string
38
- %acc42 = acc_add agg.count(%acc42, %t44) :: integer
33
+ %acc44 = decl_acc :: integer
34
+ loop teams id=L8 in %t37 as el=%t38, idx=%t39
35
+ %t40 = load_field t38["headcount"] :: integer
36
+ %acc36 = acc_add agg.sum(%acc36, %t40) :: integer
37
+ %t48 = load_field t38["team_name"] :: string
38
+ %acc44 = acc_add agg.count(%acc44, %t48) :: integer
39
39
  end_loop
40
- %t39 = acc_load %acc36 :: integer
41
- %t45 = acc_load %acc42 :: integer
42
- %t24 = call core.div(%t39, %t45) :: float
40
+ %t41 = acc_load %acc36 :: integer
41
+ %t49 = acc_load %acc44 :: integer
42
+ %t24 = call core.div(%t41, %t49) :: float
43
43
  yield %t24
44
44
  end_loop
45
45
  )
46
46
  (Declaration is_above_average_team
47
47
  %t25 = load_input "departments" :: array
48
48
  loop departments id=L6 in %t25 as el=%departments_el_26, idx=%departments_i_27
49
- %t28 = load_field departments_el_26["teams"] :: any
50
- %acc52 = decl_acc :: integer
51
- %acc58 = decl_acc :: integer
52
- loop teams id=L10 in %t28 as el=%teams_el_6, idx=%teams_i_7
53
- %t54 = load_field teams_el_6["headcount"] :: integer
54
- %acc52 = acc_add agg.sum(%acc52, %t54) :: integer
55
- %t60 = load_field teams_el_6["team_name"] :: string
56
- %acc58 = acc_add agg.count(%acc58, %t60) :: integer
49
+ %acc56 = decl_acc :: integer
50
+ %t57 = load_field departments_el_26["teams"] :: any
51
+ %acc64 = decl_acc :: integer
52
+ loop teams id=L10 in %t57 as el=%t58, idx=%t59
53
+ %t60 = load_field t58["headcount"] :: integer
54
+ %acc56 = acc_add agg.sum(%acc56, %t60) :: integer
55
+ %t68 = load_field t58["team_name"] :: string
56
+ %acc64 = acc_add agg.count(%acc64, %t68) :: integer
57
57
  end_loop
58
- %t55 = acc_load %acc52 :: integer
59
- %t61 = acc_load %acc58 :: integer
60
- %t49 = call core.div(%t55, %t61) :: float
61
- loop teams id=L7 in %t28 as el=%teams_el_29, idx=%teams_i_30
58
+ %t61 = acc_load %acc56 :: integer
59
+ %t69 = acc_load %acc64 :: integer
60
+ %t53 = call core.div(%t61, %t69) :: float
61
+ loop teams id=L7 in %t57 as el=%teams_el_29, idx=%teams_i_30
62
62
  %t31 = load_field teams_el_29["headcount"] :: integer
63
- %t33 = call core.gt(%t31, %t49) :: boolean
63
+ %t33 = call core.gt(%t31, %t53) :: boolean
64
64
  yield %t33
65
65
  end_loop
66
66
  end_loop
@@ -30,37 +30,37 @@
30
30
  loop departments id=L5 in %t19 as el=%departments_el_20, idx=%departments_i_21
31
31
  %acc36 = decl_acc :: integer
32
32
  %t37 = load_field departments_el_20["teams"] :: any
33
- %acc42 = decl_acc :: integer
34
- loop teams id=L8 in %t37 as el=%teams_el_6, idx=%teams_i_7
35
- %t38 = load_field teams_el_6["headcount"] :: integer
36
- %acc36 = acc_add agg.sum(%acc36, %t38) :: integer
37
- %t44 = load_field teams_el_6["team_name"] :: string
38
- %acc42 = acc_add agg.count(%acc42, %t44) :: integer
33
+ %acc44 = decl_acc :: integer
34
+ loop teams id=L8 in %t37 as el=%t38, idx=%t39
35
+ %t40 = load_field t38["headcount"] :: integer
36
+ %acc36 = acc_add agg.sum(%acc36, %t40) :: integer
37
+ %t48 = load_field t38["team_name"] :: string
38
+ %acc44 = acc_add agg.count(%acc44, %t48) :: integer
39
39
  end_loop
40
- %t39 = acc_load %acc36 :: integer
41
- %t45 = acc_load %acc42 :: integer
42
- %t24 = call core.div(%t39, %t45) :: float
40
+ %t41 = acc_load %acc36 :: integer
41
+ %t49 = acc_load %acc44 :: integer
42
+ %t24 = call core.div(%t41, %t49) :: float
43
43
  yield %t24
44
44
  end_loop
45
45
  )
46
46
  (Declaration is_above_average_team
47
47
  %t25 = load_input "departments" :: array
48
48
  loop departments id=L6 in %t25 as el=%departments_el_26, idx=%departments_i_27
49
- %t28 = load_field departments_el_26["teams"] :: any
50
- %acc52 = decl_acc :: integer
51
- %acc58 = decl_acc :: integer
52
- loop teams id=L10 in %t28 as el=%teams_el_6, idx=%teams_i_7
53
- %t54 = load_field teams_el_6["headcount"] :: integer
54
- %acc52 = acc_add agg.sum(%acc52, %t54) :: integer
55
- %t60 = load_field teams_el_6["team_name"] :: string
56
- %acc58 = acc_add agg.count(%acc58, %t60) :: integer
49
+ %acc56 = decl_acc :: integer
50
+ %t57 = load_field departments_el_26["teams"] :: any
51
+ %acc64 = decl_acc :: integer
52
+ loop teams id=L10 in %t57 as el=%t58, idx=%t59
53
+ %t60 = load_field t58["headcount"] :: integer
54
+ %acc56 = acc_add agg.sum(%acc56, %t60) :: integer
55
+ %t68 = load_field t58["team_name"] :: string
56
+ %acc64 = acc_add agg.count(%acc64, %t68) :: integer
57
57
  end_loop
58
- %t55 = acc_load %acc52 :: integer
59
- %t61 = acc_load %acc58 :: integer
60
- %t49 = call core.div(%t55, %t61) :: float
61
- loop teams id=L7 in %t28 as el=%teams_el_29, idx=%teams_i_30
58
+ %t61 = acc_load %acc56 :: integer
59
+ %t69 = acc_load %acc64 :: integer
60
+ %t53 = call core.div(%t61, %t69) :: float
61
+ loop teams id=L7 in %t57 as el=%teams_el_29, idx=%teams_i_30
62
62
  %t31 = load_field teams_el_29["headcount"] :: integer
63
- %t33 = call core.gt(%t31, %t49) :: boolean
63
+ %t33 = call core.gt(%t31, %t53) :: boolean
64
64
  yield %t33
65
65
  end_loop
66
66
  end_loop
@@ -34,14 +34,14 @@ export function _avg_headcount_per_dept(input) {
34
34
  t19.forEach((departments_el_20, departments_i_21) => {
35
35
  let acc36 = 0;
36
36
  let t37 = departments_el_20["teams"];
37
- let acc42 = 0;
38
- t37.forEach((teams_el_6, teams_i_7) => {
39
- let t38 = teams_el_6["headcount"];
40
- acc36 += t38;
41
- let t44 = teams_el_6["team_name"];
42
- acc42 += 1;
37
+ let acc44 = 0;
38
+ t37.forEach((t38, t39) => {
39
+ let t40 = t38["headcount"];
40
+ acc36 += t40;
41
+ let t48 = t38["team_name"];
42
+ acc44 += 1;
43
43
  });
44
- let t24 = acc36 / acc42;
44
+ let t24 = acc36 / acc44;
45
45
  out.push(t24);
46
46
  });
47
47
  return out;
@@ -52,19 +52,19 @@ export function _is_above_average_team(input) {
52
52
  let t25 = input["departments"];
53
53
  t25.forEach((departments_el_26, departments_i_27) => {
54
54
  let out_1 = [];
55
- let t28 = departments_el_26["teams"];
56
- let acc52 = 0;
57
- let acc58 = 0;
58
- t28.forEach((teams_el_6, teams_i_7) => {
59
- let t54 = teams_el_6["headcount"];
60
- acc52 += t54;
61
- let t60 = teams_el_6["team_name"];
62
- acc58 += 1;
55
+ let acc56 = 0;
56
+ let t57 = departments_el_26["teams"];
57
+ let acc64 = 0;
58
+ t57.forEach((t58, t59) => {
59
+ let t60 = t58["headcount"];
60
+ acc56 += t60;
61
+ let t68 = t58["team_name"];
62
+ acc64 += 1;
63
63
  });
64
- let t49 = acc52 / acc58;
65
- t28.forEach((teams_el_29, teams_i_30) => {
64
+ let t53 = acc56 / acc64;
65
+ t57.forEach((teams_el_29, teams_i_30) => {
66
66
  let t31 = teams_el_29["headcount"];
67
- let t33 = t31 > t49;
67
+ let t33 = t31 > t53;
68
68
  out_1.push(t33);
69
69
  });
70
70
  out.push(out_1);
@@ -1,5 +1,5 @@
1
1
  # Autogenerated by Kumi Codegen
2
- module Kumi::Compiled::KUMI_447413afce4b3071c671c345fe6db361e3d9c77cd6429524b30a40dc63b3f760
2
+ module Kumi::Compiled::KUMI_798dac22208bafc0f2b7f93d43bef5ae4c1d550f52f4c3773c486db02058561a
3
3
  def self.from(input_data = nil)
4
4
  instance = Object.new
5
5
  instance.extend(self)
@@ -66,16 +66,16 @@ module Kumi::Compiled::KUMI_447413afce4b3071c671c345fe6db361e3d9c77cd6429524b30a
66
66
  t19.each_with_index do |departments_el_20, departments_i_21|
67
67
  acc36 = 0
68
68
  t37 = departments_el_20["teams"] || departments_el_20[:teams]
69
- acc42 = 0
70
- t37.each_with_index do |teams_el_6, teams_i_7|
71
- t38 = teams_el_6["headcount"] || teams_el_6[:headcount]
72
- acc36 += t38
73
- t44 = teams_el_6["team_name"] || teams_el_6[:team_name]
74
- acc42 += 1
69
+ acc44 = 0
70
+ t37.each_with_index do |t38, t39|
71
+ t40 = t38["headcount"] || t38[:headcount]
72
+ acc36 += t40
73
+ t48 = t38["team_name"] || t38[:team_name]
74
+ acc44 += 1
75
75
  end
76
- t39 = acc36
77
- t45 = acc42
78
- t24 = t39 / t45.to_f
76
+ t41 = acc36
77
+ t49 = acc44
78
+ t24 = t41 / t49.to_f
79
79
  out << t24
80
80
  end
81
81
  out
@@ -86,21 +86,21 @@ module Kumi::Compiled::KUMI_447413afce4b3071c671c345fe6db361e3d9c77cd6429524b30a
86
86
  t25 = input["departments"] || input[:departments]
87
87
  t25.each_with_index do |departments_el_26, departments_i_27|
88
88
  out_1 = []
89
- t28 = departments_el_26["teams"] || departments_el_26[:teams]
90
- acc52 = 0
91
- acc58 = 0
92
- t28.each_with_index do |teams_el_6, teams_i_7|
93
- t54 = teams_el_6["headcount"] || teams_el_6[:headcount]
94
- acc52 += t54
95
- t60 = teams_el_6["team_name"] || teams_el_6[:team_name]
96
- acc58 += 1
89
+ acc56 = 0
90
+ t57 = departments_el_26["teams"] || departments_el_26[:teams]
91
+ acc64 = 0
92
+ t57.each_with_index do |t58, t59|
93
+ t60 = t58["headcount"] || t58[:headcount]
94
+ acc56 += t60
95
+ t68 = t58["team_name"] || t58[:team_name]
96
+ acc64 += 1
97
97
  end
98
- t55 = acc52
99
- t61 = acc58
100
- t49 = t55 / t61.to_f
101
- t28.each_with_index do |teams_el_29, teams_i_30|
98
+ t61 = acc56
99
+ t69 = acc64
100
+ t53 = t61 / t69.to_f
101
+ t57.each_with_index do |teams_el_29, teams_i_30|
102
102
  t31 = teams_el_29["headcount"] || teams_el_29[:headcount]
103
- t33 = t31 > t49
103
+ t33 = t31 > t53
104
104
  out_1 << t33
105
105
  end
106
106
  out << out_1
@@ -1,5 +1,5 @@
1
1
  # Autogenerated by Kumi Codegen
2
- module Kumi::Compiled::KUMI_cfbcf7cb51fcc9e86ca004a8b3a97b403e94a17dab1ff27d148cdca41ad73688
2
+ module Kumi::Compiled::KUMI_db1001d7afa366cbc106f0cd804e44bfabd8a08bfd109b89c3fd14e89d14266b
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_412a073d6331291d712e4dc48c7415df553463848fb1f202ec080398449b0d6a
2
+ module Kumi::Compiled::KUMI_79b1226afef716b18baad35a6809f5d0b953aec078c87883fca2ae4c23029fe4
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_97a8784bdcc1349e1d5789fc4bbccf7733108a0c18ccf51bf0ca7f89e3a903a3
2
+ module Kumi::Compiled::KUMI_e33b43acb8aa4e0f0d667f040c07607dbc78bfc52c9993108d5fcfff1f5fb47a
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_b9f58390b5b40ee6d866aa2798a68b5e5d1c9232fd8a4222f07422ac91dd4b29
2
+ module Kumi::Compiled::KUMI_02882cbdd43383967e13d4c1a8f79cc5045859736335a160b1210f35f11b9f0f
3
3
  def self.from(input_data = nil)
4
4
  instance = Object.new
5
5
  instance.extend(self)
@@ -41,11 +41,11 @@
41
41
  %t55 = call core.mul(%t53, %t54) :: float
42
42
  %t26 = const 0.9 :: float
43
43
  %t27 = call core.mul(%t55, %t26) :: float
44
- %t52 = load_input "items" :: array
45
- %t53 = load_field items_el_22["price"] :: float
46
- %t54 = load_field items_el_22["qty"] :: integer
47
- %t55 = call core.mul(%t53, %t54) :: float
48
- %t29 = select %t51, %t27, %t55 :: float
44
+ %t56 = load_input "items" :: array
45
+ %t57 = load_field items_el_22["price"] :: float
46
+ %t58 = load_field items_el_22["qty"] :: integer
47
+ %t59 = call core.mul(%t57, %t58) :: float
48
+ %t29 = select %t51, %t27, %t59 :: float
49
49
  yield %t29
50
50
  end_loop
51
51
  )
@@ -63,11 +63,11 @@
63
63
  %acc_36 = decl_acc :: float
64
64
  %t37 = load_input "items" :: array
65
65
  loop items id=L6 in %t37 as el=%items_el_38, idx=%items_i_39
66
- %t56 = load_input "items" :: array
67
- %t57 = load_field items_el_38["price"] :: float
68
- %t58 = load_field items_el_38["qty"] :: integer
69
- %t59 = call core.mul(%t57, %t58) :: float
70
- %acc_36 = acc_add agg.sum(%acc_36, %t59) :: float
66
+ %t60 = load_input "items" :: array
67
+ %t61 = load_field items_el_38["price"] :: float
68
+ %t62 = load_field items_el_38["qty"] :: integer
69
+ %t63 = call core.mul(%t61, %t62) :: float
70
+ %acc_36 = acc_add agg.sum(%acc_36, %t63) :: float
71
71
  end_loop
72
72
  %t41 = acc_load %acc_36 :: float
73
73
  yield %t41
@@ -76,23 +76,23 @@
76
76
  %acc_42 = decl_acc :: float
77
77
  %t43 = load_input "items" :: array
78
78
  loop items id=L7 in %t43 as el=%items_el_44, idx=%items_i_45
79
- %t60 = load_input "items" :: array
80
- %t67 = load_input "items" :: array
81
- %t68 = load_field items_el_44["price"] :: float
82
- %t69 = const 100.0 :: float
83
- %t70 = call core.gt(%t68, %t69) :: boolean
84
- %t71 = load_input "items" :: array
85
- %t72 = load_field items_el_44["price"] :: float
86
- %t73 = load_field items_el_44["qty"] :: integer
87
- %t74 = call core.mul(%t72, %t73) :: float
88
- %t63 = const 0.9 :: float
89
- %t64 = call core.mul(%t74, %t63) :: float
79
+ %t64 = load_input "items" :: array
90
80
  %t71 = load_input "items" :: array
91
81
  %t72 = load_field items_el_44["price"] :: float
92
- %t73 = load_field items_el_44["qty"] :: integer
93
- %t74 = call core.mul(%t72, %t73) :: float
94
- %t66 = select %t70, %t64, %t74 :: float
95
- %acc_42 = acc_add agg.sum(%acc_42, %t66) :: float
82
+ %t73 = const 100.0 :: float
83
+ %t74 = call core.gt(%t72, %t73) :: boolean
84
+ %t75 = load_input "items" :: array
85
+ %t76 = load_field items_el_44["price"] :: float
86
+ %t77 = load_field items_el_44["qty"] :: integer
87
+ %t78 = call core.mul(%t76, %t77) :: float
88
+ %t67 = const 0.9 :: float
89
+ %t68 = call core.mul(%t78, %t67) :: float
90
+ %t79 = load_input "items" :: array
91
+ %t80 = load_field items_el_44["price"] :: float
92
+ %t81 = load_field items_el_44["qty"] :: integer
93
+ %t82 = call core.mul(%t80, %t81) :: float
94
+ %t70 = select %t74, %t68, %t82 :: float
95
+ %acc_42 = acc_add agg.sum(%acc_42, %t70) :: float
96
96
  end_loop
97
97
  %t47 = acc_load %acc_42 :: float
98
98
  yield %t47
@@ -56,10 +56,10 @@
56
56
  %acc_36 = decl_acc :: float
57
57
  %t37 = load_input "items" :: array
58
58
  loop items id=L6 in %t37 as el=%items_el_38, idx=%items_i_39
59
- %t57 = load_field items_el_38["price"] :: float
60
- %t58 = load_field items_el_38["qty"] :: integer
61
- %t59 = call core.mul(%t57, %t58) :: float
62
- %acc_36 = acc_add agg.sum(%acc_36, %t59) :: float
59
+ %t61 = load_field items_el_38["price"] :: float
60
+ %t62 = load_field items_el_38["qty"] :: integer
61
+ %t63 = call core.mul(%t61, %t62) :: float
62
+ %acc_36 = acc_add agg.sum(%acc_36, %t63) :: float
63
63
  end_loop
64
64
  %t41 = acc_load %acc_36 :: float
65
65
  yield %t41
@@ -68,15 +68,15 @@
68
68
  %acc_42 = decl_acc :: float
69
69
  %t43 = load_input "items" :: array
70
70
  loop items id=L7 in %t43 as el=%items_el_44, idx=%items_i_45
71
- %t68 = load_field items_el_44["price"] :: float
72
- %t69 = const 100.0 :: float
73
- %t73 = load_field items_el_44["qty"] :: integer
74
- %t63 = const 0.9 :: float
75
- %t70 = call core.gt(%t68, %t69) :: boolean
76
- %t74 = call core.mul(%t68, %t73) :: float
77
- %t64 = call core.mul(%t74, %t63) :: float
78
- %t66 = select %t70, %t64, %t74 :: float
79
- %acc_42 = acc_add agg.sum(%acc_42, %t66) :: float
71
+ %t72 = load_field items_el_44["price"] :: float
72
+ %t73 = const 100.0 :: float
73
+ %t77 = load_field items_el_44["qty"] :: integer
74
+ %t67 = const 0.9 :: float
75
+ %t74 = call core.gt(%t72, %t73) :: boolean
76
+ %t78 = call core.mul(%t72, %t77) :: float
77
+ %t68 = call core.mul(%t78, %t67) :: float
78
+ %t70 = select %t74, %t68, %t78 :: float
79
+ %acc_42 = acc_add agg.sum(%acc_42, %t70) :: float
80
80
  end_loop
81
81
  %t47 = acc_load %acc_42 :: float
82
82
  yield %t47
@@ -56,10 +56,10 @@
56
56
  %acc_36 = decl_acc :: float
57
57
  %t37 = load_input "items" :: array
58
58
  loop items id=L6 in %t37 as el=%items_el_38, idx=%items_i_39
59
- %t57 = load_field items_el_38["price"] :: float
60
- %t58 = load_field items_el_38["qty"] :: integer
61
- %t59 = call core.mul(%t57, %t58) :: float
62
- %acc_36 = acc_add agg.sum(%acc_36, %t59) :: float
59
+ %t61 = load_field items_el_38["price"] :: float
60
+ %t62 = load_field items_el_38["qty"] :: integer
61
+ %t63 = call core.mul(%t61, %t62) :: float
62
+ %acc_36 = acc_add agg.sum(%acc_36, %t63) :: float
63
63
  end_loop
64
64
  %t41 = acc_load %acc_36 :: float
65
65
  yield %t41
@@ -68,15 +68,15 @@
68
68
  %acc_42 = decl_acc :: float
69
69
  %t43 = load_input "items" :: array
70
70
  loop items id=L7 in %t43 as el=%items_el_44, idx=%items_i_45
71
- %t68 = load_field items_el_44["price"] :: float
72
- %t69 = const 100.0 :: float
73
- %t73 = load_field items_el_44["qty"] :: integer
74
- %t63 = const 0.9 :: float
75
- %t70 = call core.gt(%t68, %t69) :: boolean
76
- %t74 = call core.mul(%t68, %t73) :: float
77
- %t64 = call core.mul(%t74, %t63) :: float
78
- %t66 = select %t70, %t64, %t74 :: float
79
- %acc_42 = acc_add agg.sum(%acc_42, %t66) :: float
71
+ %t72 = load_field items_el_44["price"] :: float
72
+ %t73 = const 100.0 :: float
73
+ %t77 = load_field items_el_44["qty"] :: integer
74
+ %t67 = const 0.9 :: float
75
+ %t74 = call core.gt(%t72, %t73) :: boolean
76
+ %t78 = call core.mul(%t72, %t77) :: float
77
+ %t68 = call core.mul(%t78, %t67) :: float
78
+ %t70 = select %t74, %t68, %t78 :: float
79
+ %acc_42 = acc_add agg.sum(%acc_42, %t70) :: float
80
80
  end_loop
81
81
  %t47 = acc_load %acc_42 :: float
82
82
  yield %t47
@@ -56,10 +56,10 @@
56
56
  %acc_36 = decl_acc :: float
57
57
  %t37 = load_input "items" :: array
58
58
  loop items id=L6 in %t37 as el=%items_el_38, idx=%items_i_39
59
- %t57 = load_field items_el_38["price"] :: float
60
- %t58 = load_field items_el_38["qty"] :: integer
61
- %t59 = call core.mul(%t57, %t58) :: float
62
- %acc_36 = acc_add agg.sum(%acc_36, %t59) :: float
59
+ %t61 = load_field items_el_38["price"] :: float
60
+ %t62 = load_field items_el_38["qty"] :: integer
61
+ %t63 = call core.mul(%t61, %t62) :: float
62
+ %acc_36 = acc_add agg.sum(%acc_36, %t63) :: float
63
63
  end_loop
64
64
  %t41 = acc_load %acc_36 :: float
65
65
  yield %t41
@@ -67,16 +67,16 @@
67
67
  (Declaration cart_total_effective
68
68
  %acc_42 = decl_acc :: float
69
69
  %t43 = load_input "items" :: array
70
- %t69 = const 100.0 :: float
71
- %t63 = const 0.9 :: float
70
+ %t73 = const 100.0 :: float
71
+ %t67 = const 0.9 :: float
72
72
  loop items id=L7 in %t43 as el=%items_el_44, idx=%items_i_45
73
- %t68 = load_field items_el_44["price"] :: float
74
- %t73 = load_field items_el_44["qty"] :: integer
75
- %t70 = call core.gt(%t68, %t69) :: boolean
76
- %t74 = call core.mul(%t68, %t73) :: float
77
- %t64 = call core.mul(%t74, %t63) :: float
78
- %t66 = select %t70, %t64, %t74 :: float
79
- %acc_42 = acc_add agg.sum(%acc_42, %t66) :: float
73
+ %t72 = load_field items_el_44["price"] :: float
74
+ %t77 = load_field items_el_44["qty"] :: integer
75
+ %t74 = call core.gt(%t72, %t73) :: boolean
76
+ %t78 = call core.mul(%t72, %t77) :: float
77
+ %t68 = call core.mul(%t78, %t67) :: float
78
+ %t70 = select %t74, %t68, %t78 :: float
79
+ %acc_42 = acc_add agg.sum(%acc_42, %t70) :: float
80
80
  end_loop
81
81
  %t47 = acc_load %acc_42 :: float
82
82
  yield %t47
@@ -56,10 +56,10 @@
56
56
  %acc_36 = decl_acc :: float
57
57
  %t37 = load_input "items" :: array
58
58
  loop items id=L6 in %t37 as el=%items_el_38, idx=%items_i_39
59
- %t57 = load_field items_el_38["price"] :: float
60
- %t58 = load_field items_el_38["qty"] :: integer
61
- %t59 = call core.mul(%t57, %t58) :: float
62
- %acc_36 = acc_add agg.sum(%acc_36, %t59) :: float
59
+ %t61 = load_field items_el_38["price"] :: float
60
+ %t62 = load_field items_el_38["qty"] :: integer
61
+ %t63 = call core.mul(%t61, %t62) :: float
62
+ %acc_36 = acc_add agg.sum(%acc_36, %t63) :: float
63
63
  end_loop
64
64
  %t41 = acc_load %acc_36 :: float
65
65
  yield %t41
@@ -67,16 +67,16 @@
67
67
  (Declaration cart_total_effective
68
68
  %acc_42 = decl_acc :: float
69
69
  %t43 = load_input "items" :: array
70
- %t69 = const 100.0 :: float
71
- %t63 = const 0.9 :: float
70
+ %t73 = const 100.0 :: float
71
+ %t67 = const 0.9 :: float
72
72
  loop items id=L7 in %t43 as el=%items_el_44, idx=%items_i_45
73
- %t68 = load_field items_el_44["price"] :: float
74
- %t73 = load_field items_el_44["qty"] :: integer
75
- %t70 = call core.gt(%t68, %t69) :: boolean
76
- %t74 = call core.mul(%t68, %t73) :: float
77
- %t64 = call core.mul(%t74, %t63) :: float
78
- %t66 = select %t70, %t64, %t74 :: float
79
- %acc_42 = acc_add agg.sum(%acc_42, %t66) :: float
73
+ %t72 = load_field items_el_44["price"] :: float
74
+ %t77 = load_field items_el_44["qty"] :: integer
75
+ %t74 = call core.gt(%t72, %t73) :: boolean
76
+ %t78 = call core.mul(%t72, %t77) :: float
77
+ %t68 = call core.mul(%t78, %t67) :: float
78
+ %t70 = select %t74, %t68, %t78 :: float
79
+ %acc_42 = acc_add agg.sum(%acc_42, %t70) :: float
80
80
  end_loop
81
81
  %t47 = acc_load %acc_42 :: float
82
82
  yield %t47