diff --git a/optimizer/src/main/java/dev/cel/optimizer/MutableAst.java b/optimizer/src/main/java/dev/cel/optimizer/MutableAst.java index 1a466df67..bf813eef4 100644 --- a/optimizer/src/main/java/dev/cel/optimizer/MutableAst.java +++ b/optimizer/src/main/java/dev/cel/optimizer/MutableAst.java @@ -130,7 +130,11 @@ public CelAbstractSyntaxTree replaceSubtree( CelAbstractSyntaxTree ast, CelExpr newExpr, long exprIdToReplace) { return replaceSubtreeWithNewAst( ast, - CelAbstractSyntaxTree.newParsedAst(newExpr, CelSource.newBuilder().build()), + CelAbstractSyntaxTree.newParsedAst( + newExpr, + // Copy the macro call information to the new AST such that macro call map can be + // normalized post-replacement. + CelSource.newBuilder().addAllMacroCalls(ast.getSource().getMacroCalls()).build()), exprIdToReplace); } @@ -571,7 +575,11 @@ private static CelSource combine(CelSource celSource1, CelSource celSource2) { macroMap.putAll(celSource1.getMacroCalls()); macroMap.putAll(celSource2.getMacroCalls()); - return CelSource.newBuilder().addAllMacroCalls(macroMap.buildOrThrow()).build(); + return CelSource.newBuilder() + .addAllExtensions(celSource1.getExtensions()) + .addAllExtensions(celSource2.getExtensions()) + .addAllMacroCalls(macroMap.buildOrThrow()) + .build(); } /** @@ -589,7 +597,8 @@ private CelAbstractSyntaxTree stabilizeAst(CelAbstractSyntaxTree ast, long seedE return CelAbstractSyntaxTree.newParsedAst(newExprBuilder.build(), ast.getSource()); } - CelSource.Builder sourceBuilder = CelSource.newBuilder(); + CelSource.Builder sourceBuilder = + CelSource.newBuilder().addAllExtensions(ast.getSource().getExtensions()); // Update the macro call IDs and their call IDs for (Entry macroCall : ast.getSource().getMacroCalls().entrySet()) { long macroId = macroCall.getKey(); diff --git a/optimizer/src/main/java/dev/cel/optimizer/optimizers/ConstantFoldingOptimizer.java b/optimizer/src/main/java/dev/cel/optimizer/optimizers/ConstantFoldingOptimizer.java index 716cdafc6..f913c3d37 100644 --- a/optimizer/src/main/java/dev/cel/optimizer/optimizers/ConstantFoldingOptimizer.java +++ b/optimizer/src/main/java/dev/cel/optimizer/optimizers/ConstantFoldingOptimizer.java @@ -85,22 +85,21 @@ public OptimizationResult optimize(CelNavigableAst navigableAst, Cel cel) if (iterCount >= constantFoldingOptions.maxIterationLimit()) { throw new IllegalStateException("Max iteration count reached."); } - Optional foldableExpr = + Optional foldableExpr = navigableAst .getRoot() .allNodes() .filter(ConstantFoldingOptimizer::canFold) - .map(CelNavigableExpr::expr) - .filter(expr -> !visitedExprs.contains(expr)) + .filter(node -> !visitedExprs.contains(node.expr())) .findAny(); if (!foldableExpr.isPresent()) { break; } - visitedExprs.add(foldableExpr.get()); + visitedExprs.add(foldableExpr.get().expr()); Optional mutatedAst; // Attempt to prune if it is a non-strict call - mutatedAst = maybePruneBranches(navigableAst.getAst(), foldableExpr.get()); + mutatedAst = maybePruneBranches(navigableAst.getAst(), foldableExpr.get().expr()); if (!mutatedAst.isPresent()) { // Evaluate the call then fold mutatedAst = maybeFold(cel, navigableAst.getAst(), foldableExpr.get()); @@ -150,7 +149,7 @@ private static boolean canFold(CelNavigableExpr navigableExpr) { } if (functionName.equals(Operator.IN.getFunction())) { - return true; + return canFoldInOperator(navigableExpr); } // Default case: all call arguments must be constants. If the argument is a container (ex: @@ -166,6 +165,30 @@ private static boolean canFold(CelNavigableExpr navigableExpr) { } } + private static boolean canFoldInOperator(CelNavigableExpr navigableExpr) { + ImmutableList allIdents = + navigableExpr + .allNodes() + .filter(node -> node.getKind().equals(Kind.IDENT)) + .collect(toImmutableList()); + for (CelNavigableExpr identNode : allIdents) { + CelNavigableExpr parent = identNode.parent().orElse(null); + while (parent != null) { + if (parent.getKind().equals(Kind.COMPREHENSION)) { + if (parent.expr().comprehension().accuVar().equals(identNode.expr().ident().name())) { + // Prevent folding a subexpression if it contains a variable declared by a + // comprehension. The subexpression cannot be compiled without the full context of the + // surrounding comprehension. + return false; + } + } + parent = parent.parent().orElse(null); + } + } + + return true; + } + private static boolean areChildrenArgConstant(CelNavigableExpr expr) { if (expr.getKind().equals(Kind.CONSTANT)) { return true; @@ -195,10 +218,10 @@ private static boolean isNestedComprehension(CelNavigableExpr expr) { } private Optional maybeFold( - Cel cel, CelAbstractSyntaxTree ast, CelExpr expr) throws CelOptimizationException { + Cel cel, CelAbstractSyntaxTree ast, CelNavigableExpr node) throws CelOptimizationException { Object result; try { - result = CelExprUtil.evaluateExpr(cel, expr); + result = CelExprUtil.evaluateExpr(cel, node.expr()); } catch (CelValidationException | CelEvaluationException e) { throw new CelOptimizationException( "Constant folding failure. Failed to evaluate subtree due to: " + e.getMessage(), e); @@ -209,11 +232,11 @@ private Optional maybeFold( // ex2: optional.ofNonZeroValue(5) -> optional.of(5) if (result instanceof Optional) { Optional optResult = ((Optional) result); - return maybeRewriteOptional(optResult, ast, expr); + return maybeRewriteOptional(optResult, ast, node.expr()); } return maybeAdaptEvaluatedResult(result) - .map(celExpr -> mutableAst.replaceSubtree(ast, celExpr, expr.id())); + .map(celExpr -> mutableAst.replaceSubtree(ast, celExpr, node.id())); } private Optional maybeAdaptEvaluatedResult(Object result) { diff --git a/optimizer/src/main/java/dev/cel/optimizer/optimizers/SubexpressionOptimizer.java b/optimizer/src/main/java/dev/cel/optimizer/optimizers/SubexpressionOptimizer.java index 214785123..2ecc21d16 100644 --- a/optimizer/src/main/java/dev/cel/optimizer/optimizers/SubexpressionOptimizer.java +++ b/optimizer/src/main/java/dev/cel/optimizer/optimizers/SubexpressionOptimizer.java @@ -25,7 +25,6 @@ import com.google.common.base.Verify; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Iterables; import com.google.common.collect.Streams; import com.google.errorprone.annotations.CanIgnoreReturnValue; import dev.cel.bundle.Cel; @@ -58,6 +57,7 @@ import dev.cel.parser.Operator; import java.util.ArrayList; import java.util.Arrays; +import java.util.Comparator; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -509,10 +509,11 @@ private Optional findCseCandidateWithRecursionDepth( ImmutableList allNodes = CelNavigableAst.fromAst(ast) .getRoot() - .allNodes(TraversalOrder.POST_ORDER) + .allNodes(TraversalOrder.PRE_ORDER) .filter(this::canEliminate) .filter(node -> node.height() <= recursionLimit) .filter(node -> !areSemanticallyEqual(ast.getExpr(), node.expr())) + .sorted(Comparator.comparingInt(CelNavigableExpr::height).reversed()) .collect(toImmutableList()); if (allNodes.isEmpty()) { @@ -523,9 +524,23 @@ private Optional findCseCandidateWithRecursionDepth( if (commonSubexpr.isPresent()) { return commonSubexpr; } + // If there's no common subexpr, just return the one with the highest height that's still below - // the recursion limit. - return Optional.of(Iterables.getLast(allNodes)); + // the recursion limit, but only if it actually needs to be extracted due to exceeding the + // recursion limit. + boolean astHasMoreExtractableSubexprs = + CelNavigableAst.fromAst(ast) + .getRoot() + .allNodes(TraversalOrder.POST_ORDER) + .filter(node -> node.height() > recursionLimit) + .anyMatch(this::canEliminate); + if (astHasMoreExtractableSubexprs) { + return Optional.of(allNodes.get(0)); + } + + // The height of the remaining subexpression is already below the recursion limit. No need to + // extract. + return Optional.empty(); } private Optional findCseCandidateWithCommonSubexpr( @@ -705,13 +720,15 @@ public abstract static class Builder { *

Note that expressions containing no common subexpressions may become a candidate for * extraction to satisfy the max depth requirement. * - *

This is a no-op if {@link #enableCelBlock} is set to false, or the configured value is - * less than 1. + *

This is a no-op if {@link #enableCelBlock} is set to false, the configured value is less + * than 1, or no subexpression needs to be extracted because the entire expression is already + * under the designated limit. * *

Examples: * *

    *
  1. a.b.c with depth 1 -> cel.@block([x.b, @index0.c], @index1) + *
  2. a.b.c with depth 3 -> a.b.c *
  3. a.b + a.b.c.d with depth 3 -> cel.@block([a.b, @index0.c.d], @index0 + @index1) *
* diff --git a/optimizer/src/test/java/dev/cel/optimizer/MutableAstTest.java b/optimizer/src/test/java/dev/cel/optimizer/MutableAstTest.java index da8ecfb7b..50c8cbb21 100644 --- a/optimizer/src/test/java/dev/cel/optimizer/MutableAstTest.java +++ b/optimizer/src/test/java/dev/cel/optimizer/MutableAstTest.java @@ -122,7 +122,7 @@ public void mutableAst_macro_sourceMacroCallsPopulated() throws Exception { } @Test - public void mutableAst_astContainsTaggedExtension_retained() throws Exception { + public void replaceSubtree_astContainsTaggedExtension_retained() throws Exception { CelAbstractSyntaxTree ast = CEL.compile("has(TestAllTypes{}.single_int32)").getAst(); Extension extension = Extension.create("test", Version.of(1, 1)); CelSource celSource = ast.getSource().toBuilder().addAllExtensions(extension).build(); @@ -137,6 +137,35 @@ public void mutableAst_astContainsTaggedExtension_retained() throws Exception { assertThat(mutatedAst.getSource().getExtensions()).containsExactly(extension); } + @Test + public void replaceSubtreeWithNewAst_astsContainTaggedExtension_retained() throws Exception { + // Setup first AST with a test extension + CelAbstractSyntaxTree ast = CEL.compile("has(TestAllTypes{}.single_int32)").getAst(); + Extension extension = Extension.create("test", Version.of(1, 1)); + ast = + CelAbstractSyntaxTree.newCheckedAst( + ast.getExpr(), + ast.getSource().toBuilder().addAllExtensions(extension).build(), + ast.getReferenceMap(), + ast.getTypeMap()); + // Setup second AST with another test extension + CelAbstractSyntaxTree astToReplaceWith = CEL.compile("cel.bind(a, true, a)").getAst(); + Extension extension2 = Extension.create("test2", Version.of(2, 2)); + astToReplaceWith = + CelAbstractSyntaxTree.newCheckedAst( + astToReplaceWith.getExpr(), + astToReplaceWith.getSource().toBuilder().addAllExtensions(extension2).build(), + astToReplaceWith.getReferenceMap(), + astToReplaceWith.getTypeMap()); + + // Mutate the original AST with the new AST at the root + CelAbstractSyntaxTree mutatedAst = + MUTABLE_AST.replaceSubtreeWithNewAst(ast, astToReplaceWith, ast.getExpr().id()); + + // Expect that both the extensions are merged + assertThat(mutatedAst.getSource().getExtensions()).containsExactly(extension, extension2); + } + @Test @TestParameters("{source: '[1].exists(x, x > 0)', expectedMacroCallSize: 1}") @TestParameters( diff --git a/optimizer/src/test/java/dev/cel/optimizer/optimizers/ConstantFoldingOptimizerTest.java b/optimizer/src/test/java/dev/cel/optimizer/optimizers/ConstantFoldingOptimizerTest.java index 2ed564cc9..ddadd5a20 100644 --- a/optimizer/src/test/java/dev/cel/optimizer/optimizers/ConstantFoldingOptimizerTest.java +++ b/optimizer/src/test/java/dev/cel/optimizer/optimizers/ConstantFoldingOptimizerTest.java @@ -26,6 +26,7 @@ import dev.cel.common.types.ListType; import dev.cel.common.types.MapType; import dev.cel.common.types.SimpleType; +import dev.cel.extensions.CelExtensions; import dev.cel.extensions.CelOptionalLibrary; import dev.cel.optimizer.CelOptimizationException; import dev.cel.optimizer.CelOptimizer; @@ -48,7 +49,7 @@ public class ConstantFoldingOptimizerTest { .addVar("map_var", MapType.create(SimpleType.STRING, SimpleType.STRING)) .addMessageTypes(TestAllTypes.getDescriptor()) .setContainer("dev.cel.testing.testdata.proto3") - .addCompilerLibraries(CelOptionalLibrary.INSTANCE) + .addCompilerLibraries(CelExtensions.bindings(), CelOptionalLibrary.INSTANCE) .addRuntimeLibraries(CelOptionalLibrary.INSTANCE) .build(); @@ -159,6 +160,8 @@ public class ConstantFoldingOptimizerTest { "{source: '{\"a\": dyn([1, 2]), \"b\": x}', expected: '{\"a\": [1, 2], \"b\": x}'}") @TestParameters("{source: 'map_var[?\"key\"]', expected: 'map_var[?\"key\"]'}") @TestParameters("{source: '\"abc\" in list_var', expected: '\"abc\" in list_var'}") + @TestParameters( + "{source: 'cel.bind(r0, [1, 2, 3], cel.bind(r1, 1 in r0, r1))', expected: 'true'}") // TODO: Support folding lists with mixed types. This requires mutable lists. // @TestParameters("{source: 'dyn([1]) + [1.0]'}") public void constantFold_success(String source, String expected) throws Exception { @@ -198,6 +201,10 @@ public void constantFold_success(String source, String expected) throws Exceptio @TestParameters( "{source: '[{}, {\"a\": 1}, {\"b\": 2}].filter(m, has(x.a))', expected:" + " '[{}, {\"a\": 1}, {\"b\": 2}].filter(m, has(x.a))'}") + @TestParameters( + "{source: 'cel.bind(r0, [1, 2, 3], cel.bind(r1, 1 in r0 && 2 in x, r1))', expected:" + + " 'cel.bind(r0, [1, 2, 3], cel.bind(r1, 1 in r0 && 2 in x, r1))'}") + @TestParameters("{source: 'false ? false : cel.bind(a, x, a)', expected: 'cel.bind(a, x, a)'}") public void constantFold_macros_macroCallMetadataPopulated(String source, String expected) throws Exception { Cel cel = @@ -207,7 +214,7 @@ public void constantFold_macros_macroCallMetadataPopulated(String source, String .addMessageTypes(TestAllTypes.getDescriptor()) .setStandardMacros(CelStandardMacro.STANDARD_MACROS) .setOptions(CelOptions.current().populateMacroCalls(true).build()) - .addCompilerLibraries(CelOptionalLibrary.INSTANCE) + .addCompilerLibraries(CelExtensions.bindings(), CelOptionalLibrary.INSTANCE) .addRuntimeLibraries(CelOptionalLibrary.INSTANCE) .build(); CelOptimizer celOptimizer = @@ -241,6 +248,8 @@ public void constantFold_macros_macroCallMetadataPopulated(String source, String @TestParameters( "{source: '[{}, {\"a\": 1}, {\"b\": 2}].filter(m, has({\"a\": true}.a)) == " + " [{}, {\"a\": 1}, {\"b\": 2}]'}") + @TestParameters("{source: 'cel.bind(r0, [1, 2, 3], cel.bind(r1, 1 in r0 && 2 in r0, r1))'}") + @TestParameters("{source: 'false ? false : cel.bind(a, true, a)'}") public void constantFold_macros_withoutMacroCallMetadata(String source) throws Exception { Cel cel = CelFactory.standardCelBuilder() @@ -249,7 +258,7 @@ public void constantFold_macros_withoutMacroCallMetadata(String source) throws E .addMessageTypes(TestAllTypes.getDescriptor()) .setStandardMacros(CelStandardMacro.STANDARD_MACROS) .setOptions(CelOptions.current().populateMacroCalls(false).build()) - .addCompilerLibraries(CelOptionalLibrary.INSTANCE) + .addCompilerLibraries(CelExtensions.bindings(), CelOptionalLibrary.INSTANCE) .addRuntimeLibraries(CelOptionalLibrary.INSTANCE) .build(); CelOptimizer celOptimizer = diff --git a/optimizer/src/test/java/dev/cel/optimizer/optimizers/SubexpressionOptimizerBaselineTest.java b/optimizer/src/test/java/dev/cel/optimizer/optimizers/SubexpressionOptimizerBaselineTest.java index 278a79976..ca3e0f77a 100644 --- a/optimizer/src/test/java/dev/cel/optimizer/optimizers/SubexpressionOptimizerBaselineTest.java +++ b/optimizer/src/test/java/dev/cel/optimizer/optimizers/SubexpressionOptimizerBaselineTest.java @@ -101,7 +101,7 @@ public void allOptimizers_producesSameEvaluationResult( CEL.createProgram(ast) .eval(ImmutableMap.of("msg", TEST_ALL_TYPES_INPUT, "x", 5L, "opt_x", Optional.of(5L))); - CelAbstractSyntaxTree optimizedAst = cseTestOptimizer.celOptimizer.optimize(ast); + CelAbstractSyntaxTree optimizedAst = cseTestOptimizer.cseOptimizer.optimize(ast); Object optimizedEvalResult = CEL.createProgram(optimizedAst) @@ -119,7 +119,39 @@ public void subexpression_unparsed() throws Exception { boolean resultPrinted = false; for (CseTestOptimizer cseTestOptimizer : CseTestOptimizer.values()) { String optimizerName = cseTestOptimizer.name(); - CelAbstractSyntaxTree optimizedAst = cseTestOptimizer.celOptimizer.optimize(ast); + CelAbstractSyntaxTree optimizedAst = cseTestOptimizer.cseOptimizer.optimize(ast); + if (!resultPrinted) { + Object optimizedEvalResult = + CEL.createProgram(optimizedAst) + .eval( + ImmutableMap.of( + "msg", TEST_ALL_TYPES_INPUT, "x", 5L, "opt_x", Optional.of(5L))); + testOutput().println("Result: " + optimizedEvalResult); + resultPrinted = true; + } + try { + testOutput().printf("[%s]: %s", optimizerName, CEL_UNPARSER.unparse(optimizedAst)); + } catch (RuntimeException e) { + testOutput().printf("[%s]: Unparse Error: %s", optimizerName, e); + } + testOutput().println(); + } + testOutput().println(); + } + } + + @Test + public void constfold_before_subexpression_unparsed() throws Exception { + for (CseTestCase cseTestCase : CseTestCase.values()) { + testOutput().println("Test case: " + cseTestCase.name()); + testOutput().println("Source: " + cseTestCase.source); + testOutput().println("=====>"); + CelAbstractSyntaxTree ast = CEL.compile(cseTestCase.source).getAst(); + boolean resultPrinted = false; + for (CseTestOptimizer cseTestOptimizer : CseTestOptimizer.values()) { + String optimizerName = cseTestOptimizer.name(); + CelAbstractSyntaxTree optimizedAst = + cseTestOptimizer.cseWithConstFoldingOptimizer.optimize(ast); if (!resultPrinted) { Object optimizedEvalResult = CEL.createProgram(optimizedAst) @@ -149,7 +181,7 @@ public void subexpression_ast(@TestParameter CseTestOptimizer cseTestOptimizer) testOutput().println("Source: " + cseTestCase.source); testOutput().println("=====>"); CelAbstractSyntaxTree ast = CEL.compile(cseTestCase.source).getAst(); - CelAbstractSyntaxTree optimizedAst = cseTestOptimizer.celOptimizer.optimize(ast); + CelAbstractSyntaxTree optimizedAst = cseTestOptimizer.cseOptimizer.optimize(ast); testOutput().println(optimizedAst.getExpr()); } } @@ -339,10 +371,17 @@ private enum CseTestOptimizer { BLOCK_RECURSION_DEPTH_9( OPTIMIZER_COMMON_OPTIONS.toBuilder().subexpressionMaxRecursionDepth(9).build()); - private final CelOptimizer celOptimizer; + private final CelOptimizer cseOptimizer; + private final CelOptimizer cseWithConstFoldingOptimizer; CseTestOptimizer(SubexpressionOptimizerOptions option) { - this.celOptimizer = newCseOptimizer(CEL, option); + this.cseOptimizer = newCseOptimizer(CEL, option); + this.cseWithConstFoldingOptimizer = + CelOptimizerFactory.standardCelOptimizerBuilder(CEL) + .addAstOptimizers( + ConstantFoldingOptimizer.getInstance(), + SubexpressionOptimizer.newInstance(option)) + .build(); } } diff --git a/optimizer/src/test/resources/constfold_before_subexpression_unparsed.baseline b/optimizer/src/test/resources/constfold_before_subexpression_unparsed.baseline new file mode 100644 index 000000000..2ebaf7ac2 --- /dev/null +++ b/optimizer/src/test/resources/constfold_before_subexpression_unparsed.baseline @@ -0,0 +1,655 @@ +Test case: SIZE_1 +Source: size([1,2]) + size([1,2]) + 1 == 5 +=====> +Result: true +[CASCADED_BINDS]: true +[BLOCK_COMMON_SUBEXPR_ONLY]: true +[BLOCK_RECURSION_DEPTH_1]: true +[BLOCK_RECURSION_DEPTH_2]: true +[BLOCK_RECURSION_DEPTH_3]: true +[BLOCK_RECURSION_DEPTH_4]: true +[BLOCK_RECURSION_DEPTH_5]: true +[BLOCK_RECURSION_DEPTH_6]: true +[BLOCK_RECURSION_DEPTH_7]: true +[BLOCK_RECURSION_DEPTH_8]: true +[BLOCK_RECURSION_DEPTH_9]: true + +Test case: SIZE_2 +Source: 2 + size([1,2]) + size([1,2]) + 1 == 7 +=====> +Result: true +[CASCADED_BINDS]: true +[BLOCK_COMMON_SUBEXPR_ONLY]: true +[BLOCK_RECURSION_DEPTH_1]: true +[BLOCK_RECURSION_DEPTH_2]: true +[BLOCK_RECURSION_DEPTH_3]: true +[BLOCK_RECURSION_DEPTH_4]: true +[BLOCK_RECURSION_DEPTH_5]: true +[BLOCK_RECURSION_DEPTH_6]: true +[BLOCK_RECURSION_DEPTH_7]: true +[BLOCK_RECURSION_DEPTH_8]: true +[BLOCK_RECURSION_DEPTH_9]: true + +Test case: SIZE_3 +Source: size([0]) + size([0]) + size([1,2]) + size([1,2]) == 6 +=====> +Result: true +[CASCADED_BINDS]: true +[BLOCK_COMMON_SUBEXPR_ONLY]: true +[BLOCK_RECURSION_DEPTH_1]: true +[BLOCK_RECURSION_DEPTH_2]: true +[BLOCK_RECURSION_DEPTH_3]: true +[BLOCK_RECURSION_DEPTH_4]: true +[BLOCK_RECURSION_DEPTH_5]: true +[BLOCK_RECURSION_DEPTH_6]: true +[BLOCK_RECURSION_DEPTH_7]: true +[BLOCK_RECURSION_DEPTH_8]: true +[BLOCK_RECURSION_DEPTH_9]: true + +Test case: SIZE_4 +Source: 5 + size([0]) + size([0]) + size([1,2]) + size([1,2]) + size([1,2,3]) + size([1,2,3]) == 17 +=====> +Result: true +[CASCADED_BINDS]: true +[BLOCK_COMMON_SUBEXPR_ONLY]: true +[BLOCK_RECURSION_DEPTH_1]: true +[BLOCK_RECURSION_DEPTH_2]: true +[BLOCK_RECURSION_DEPTH_3]: true +[BLOCK_RECURSION_DEPTH_4]: true +[BLOCK_RECURSION_DEPTH_5]: true +[BLOCK_RECURSION_DEPTH_6]: true +[BLOCK_RECURSION_DEPTH_7]: true +[BLOCK_RECURSION_DEPTH_8]: true +[BLOCK_RECURSION_DEPTH_9]: true + +Test case: TIMESTAMP +Source: timestamp(int(timestamp(1000000000))).getFullYear() + timestamp(int(timestamp(75))).getFullYear() + timestamp(int(timestamp(50))).getFullYear() + timestamp(int(timestamp(1000000000))).getFullYear() + timestamp(int(timestamp(50))).getSeconds() + timestamp(int(timestamp(200))).getFullYear() + timestamp(int(timestamp(200))).getFullYear() + timestamp(int(timestamp(75))).getMinutes() + timestamp(int(timestamp(1000000000))).getFullYear() == 13934 +=====> +Result: true +[CASCADED_BINDS]: true +[BLOCK_COMMON_SUBEXPR_ONLY]: true +[BLOCK_RECURSION_DEPTH_1]: true +[BLOCK_RECURSION_DEPTH_2]: true +[BLOCK_RECURSION_DEPTH_3]: true +[BLOCK_RECURSION_DEPTH_4]: true +[BLOCK_RECURSION_DEPTH_5]: true +[BLOCK_RECURSION_DEPTH_6]: true +[BLOCK_RECURSION_DEPTH_7]: true +[BLOCK_RECURSION_DEPTH_8]: true +[BLOCK_RECURSION_DEPTH_9]: true + +Test case: MAP_INDEX +Source: {"a": 2}["a"] + {"a": 2}["a"] * {"a": 2}["a"] == 6 +=====> +Result: true +[CASCADED_BINDS]: true +[BLOCK_COMMON_SUBEXPR_ONLY]: true +[BLOCK_RECURSION_DEPTH_1]: true +[BLOCK_RECURSION_DEPTH_2]: true +[BLOCK_RECURSION_DEPTH_3]: true +[BLOCK_RECURSION_DEPTH_4]: true +[BLOCK_RECURSION_DEPTH_5]: true +[BLOCK_RECURSION_DEPTH_6]: true +[BLOCK_RECURSION_DEPTH_7]: true +[BLOCK_RECURSION_DEPTH_8]: true +[BLOCK_RECURSION_DEPTH_9]: true + +Test case: NESTED_MAP_CONSTRUCTION +Source: {'a': {'b': 1}, 'c': {'b': 1}, 'd': {'e': {'b': 1}}, 'e': {'e': {'b': 1}}} +=====> +Result: {a={b=1}, c={b=1}, d={e={b=1}}, e={e={b=1}}} +[CASCADED_BINDS]: cel.bind(@r0, {"b": 1}, cel.bind(@r1, {"e": @r0}, {"a": @r0, "c": @r0, "d": @r1, "e": @r1})) +[BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([{"b": 1}, {"e": @index0}], {"a": @index0, "c": @index0, "d": @index1, "e": @index1}) +[BLOCK_RECURSION_DEPTH_1]: cel.@block([{"b": 1}, {"e": @index0}], {"a": @index0, "c": @index0, "d": @index1, "e": @index1}) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([{"e": {"b": 1}}, {"b": 1}], {"a": @index1, "c": @index1, "d": @index0, "e": @index0}) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([{"e": {"b": 1}}, {"b": 1}], {"a": @index1, "c": @index1, "d": @index0, "e": @index0}) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([{"e": {"b": 1}}, {"b": 1}], {"a": @index1, "c": @index1, "d": @index0, "e": @index0}) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([{"e": {"b": 1}}, {"b": 1}], {"a": @index1, "c": @index1, "d": @index0, "e": @index0}) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([{"e": {"b": 1}}, {"b": 1}], {"a": @index1, "c": @index1, "d": @index0, "e": @index0}) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([{"e": {"b": 1}}, {"b": 1}], {"a": @index1, "c": @index1, "d": @index0, "e": @index0}) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([{"e": {"b": 1}}, {"b": 1}], {"a": @index1, "c": @index1, "d": @index0, "e": @index0}) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([{"e": {"b": 1}}, {"b": 1}], {"a": @index1, "c": @index1, "d": @index0, "e": @index0}) + +Test case: NESTED_LIST_CONSTRUCTION +Source: [1, [1,2,3,4], 2, [1,2,3,4], 5, [1,2,3,4], 7, [[1,2], [1,2,3,4]], [1,2]] +=====> +Result: [1, [1, 2, 3, 4], 2, [1, 2, 3, 4], 5, [1, 2, 3, 4], 7, [[1, 2], [1, 2, 3, 4]], [1, 2]] +[CASCADED_BINDS]: cel.bind(@r0, [1, 2, 3, 4], cel.bind(@r1, [1, 2], [1, @r0, 2, @r0, 5, @r0, 7, [@r1, @r0], @r1])) +[BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([[1, 2, 3, 4], [1, 2]], [1, @index0, 2, @index0, 5, @index0, 7, [@index1, @index0], @index1]) +[BLOCK_RECURSION_DEPTH_1]: cel.@block([[1, 2, 3, 4], [1, 2], [@index1, @index0]], [1, @index0, 2, @index0, 5, @index0, 7, @index2, @index1]) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([[1, 2, 3, 4], [1, 2]], [1, @index0, 2, @index0, 5, @index0, 7, [@index1, @index0], @index1]) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([[1, 2, 3, 4], [1, 2]], [1, @index0, 2, @index0, 5, @index0, 7, [@index1, @index0], @index1]) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([[1, 2, 3, 4], [1, 2]], [1, @index0, 2, @index0, 5, @index0, 7, [@index1, @index0], @index1]) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([[1, 2, 3, 4], [1, 2]], [1, @index0, 2, @index0, 5, @index0, 7, [@index1, @index0], @index1]) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([[1, 2, 3, 4], [1, 2]], [1, @index0, 2, @index0, 5, @index0, 7, [@index1, @index0], @index1]) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([[1, 2, 3, 4], [1, 2]], [1, @index0, 2, @index0, 5, @index0, 7, [@index1, @index0], @index1]) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([[1, 2, 3, 4], [1, 2]], [1, @index0, 2, @index0, 5, @index0, 7, [@index1, @index0], @index1]) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([[1, 2, 3, 4], [1, 2]], [1, @index0, 2, @index0, 5, @index0, 7, [@index1, @index0], @index1]) + +Test case: SELECT +Source: msg.single_int64 + msg.single_int64 == 6 +=====> +Result: true +[CASCADED_BINDS]: cel.bind(@r0, msg.single_int64, @r0 + @r0) == 6 +[BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([msg.single_int64], @index0 + @index0 == 6) +[BLOCK_RECURSION_DEPTH_1]: cel.@block([msg.single_int64, @index0 + @index0], @index1 == 6) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([msg.single_int64], @index0 + @index0 == 6) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([msg.single_int64], @index0 + @index0 == 6) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([msg.single_int64], @index0 + @index0 == 6) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([msg.single_int64], @index0 + @index0 == 6) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([msg.single_int64], @index0 + @index0 == 6) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([msg.single_int64], @index0 + @index0 == 6) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([msg.single_int64], @index0 + @index0 == 6) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([msg.single_int64], @index0 + @index0 == 6) + +Test case: SELECT_NESTED_1 +Source: msg.oneof_type.payload.single_int64 + msg.oneof_type.payload.single_int32 + msg.oneof_type.payload.single_int64 + msg.single_int64 + msg.oneof_type.payload.oneof_type.payload.single_int64 == 31 +=====> +Result: true +[CASCADED_BINDS]: cel.bind(@r0, msg.oneof_type.payload, cel.bind(@r1, @r0.single_int64, @r1 + @r0.single_int32 + @r1) + msg.single_int64 + @r0.oneof_type.payload.single_int64) == 31 +[BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([msg.oneof_type.payload, @index0.single_int64], @index1 + @index0.single_int32 + @index1 + msg.single_int64 + @index0.oneof_type.payload.single_int64 == 31) +[BLOCK_RECURSION_DEPTH_1]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, @index1.single_int32, @index2 + @index3, @index4 + @index2, msg.single_int64, @index5 + @index6, @index1.oneof_type, @index8.payload, @index9.single_int64, @index7 + @index10], @index11 == 31) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([msg.oneof_type.payload, @index0.single_int64, @index1 + @index0.single_int32, @index2 + @index1 + msg.single_int64, @index0.oneof_type.payload, @index3 + @index4.single_int64], @index5 == 31) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([msg.oneof_type.payload.single_int64, msg.oneof_type.payload, @index0 + @index1.single_int32 + @index0, @index1.oneof_type.payload.single_int64, @index2 + msg.single_int64 + @index3], @index4 == 31) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([msg.oneof_type.payload.single_int64, msg.oneof_type.payload, @index0 + @index1.single_int32 + @index0 + msg.single_int64, @index2 + @index1.oneof_type.payload.single_int64], @index3 == 31) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([msg.oneof_type.payload.single_int64, msg.oneof_type.payload, @index0 + @index1.single_int32 + @index0 + msg.single_int64 + @index1.oneof_type.payload.single_int64], @index2 == 31) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([msg.oneof_type.payload.single_int64, msg.oneof_type.payload], @index0 + @index1.single_int32 + @index0 + msg.single_int64 + @index1.oneof_type.payload.single_int64 == 31) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([msg.oneof_type.payload.single_int64, msg.oneof_type.payload], @index0 + @index1.single_int32 + @index0 + msg.single_int64 + @index1.oneof_type.payload.single_int64 == 31) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([msg.oneof_type.payload.single_int64, msg.oneof_type.payload], @index0 + @index1.single_int32 + @index0 + msg.single_int64 + @index1.oneof_type.payload.single_int64 == 31) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([msg.oneof_type.payload.single_int64, msg.oneof_type.payload], @index0 + @index1.single_int32 + @index0 + msg.single_int64 + @index1.oneof_type.payload.single_int64 == 31) + +Test case: SELECT_NESTED_2 +Source: true || msg.oneof_type.payload.oneof_type.payload.oneof_type.payload.oneof_type.payload.single_bool || msg.oneof_type.payload.oneof_type.payload.oneof_type.child.child.payload.single_bool +=====> +Result: true +[CASCADED_BINDS]: true +[BLOCK_COMMON_SUBEXPR_ONLY]: true +[BLOCK_RECURSION_DEPTH_1]: true +[BLOCK_RECURSION_DEPTH_2]: true +[BLOCK_RECURSION_DEPTH_3]: true +[BLOCK_RECURSION_DEPTH_4]: true +[BLOCK_RECURSION_DEPTH_5]: true +[BLOCK_RECURSION_DEPTH_6]: true +[BLOCK_RECURSION_DEPTH_7]: true +[BLOCK_RECURSION_DEPTH_8]: true +[BLOCK_RECURSION_DEPTH_9]: true + +Test case: SELECT_NESTED_MESSAGE_MAP_INDEX_1 +Source: msg.oneof_type.payload.map_int32_int64[1] + msg.oneof_type.payload.map_int32_int64[1] + msg.oneof_type.payload.map_int32_int64[1] == 15 +=====> +Result: true +[CASCADED_BINDS]: cel.bind(@r0, msg.oneof_type.payload.map_int32_int64[1], @r0 + @r0 + @r0) == 15 +[BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([msg.oneof_type.payload.map_int32_int64[1]], @index0 + @index0 + @index0 == 15) +[BLOCK_RECURSION_DEPTH_1]: cel.@block([msg.oneof_type, @index0.payload, @index1.map_int32_int64, @index2[1], @index3 + @index3, @index4 + @index3], @index5 == 15) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([msg.oneof_type.payload, @index0.map_int32_int64[1], @index1 + @index1 + @index1], @index2 == 15) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([msg.oneof_type.payload.map_int32_int64, @index0[1]], @index1 + @index1 + @index1 == 15) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([msg.oneof_type.payload.map_int32_int64[1]], @index0 + @index0 + @index0 == 15) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([msg.oneof_type.payload.map_int32_int64[1]], @index0 + @index0 + @index0 == 15) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([msg.oneof_type.payload.map_int32_int64[1]], @index0 + @index0 + @index0 == 15) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([msg.oneof_type.payload.map_int32_int64[1]], @index0 + @index0 + @index0 == 15) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([msg.oneof_type.payload.map_int32_int64[1]], @index0 + @index0 + @index0 == 15) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([msg.oneof_type.payload.map_int32_int64[1]], @index0 + @index0 + @index0 == 15) + +Test case: SELECT_NESTED_MESSAGE_MAP_INDEX_2 +Source: msg.oneof_type.payload.map_int32_int64[0] + msg.oneof_type.payload.map_int32_int64[1] + msg.oneof_type.payload.map_int32_int64[2] == 8 +=====> +Result: true +[CASCADED_BINDS]: cel.bind(@r0, msg.oneof_type.payload.map_int32_int64, @r0[0] + @r0[1] + @r0[2]) == 8 +[BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([msg.oneof_type.payload.map_int32_int64], @index0[0] + @index0[1] + @index0[2] == 8) +[BLOCK_RECURSION_DEPTH_1]: cel.@block([msg.oneof_type, @index0.payload, @index1.map_int32_int64, @index2[0], @index2[1], @index3 + @index4, @index2[2], @index5 + @index6], @index7 == 8) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([msg.oneof_type.payload, @index0.map_int32_int64, @index1[0] + @index1[1], @index2 + @index1[2]], @index3 == 8) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([msg.oneof_type.payload.map_int32_int64, @index0[0] + @index0[1] + @index0[2]], @index1 == 8) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([msg.oneof_type.payload.map_int32_int64], @index0[0] + @index0[1] + @index0[2] == 8) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([msg.oneof_type.payload.map_int32_int64], @index0[0] + @index0[1] + @index0[2] == 8) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([msg.oneof_type.payload.map_int32_int64], @index0[0] + @index0[1] + @index0[2] == 8) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([msg.oneof_type.payload.map_int32_int64], @index0[0] + @index0[1] + @index0[2] == 8) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([msg.oneof_type.payload.map_int32_int64], @index0[0] + @index0[1] + @index0[2] == 8) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([msg.oneof_type.payload.map_int32_int64], @index0[0] + @index0[1] + @index0[2] == 8) + +Test case: SELECT_NESTED_NO_COMMON_SUBEXPR +Source: msg.oneof_type.payload.oneof_type.payload.oneof_type.payload.oneof_type.payload.single_int64 +=====> +Result: 0 +[CASCADED_BINDS]: msg.oneof_type.payload.oneof_type.payload.oneof_type.payload.oneof_type.payload.single_int64 +[BLOCK_COMMON_SUBEXPR_ONLY]: msg.oneof_type.payload.oneof_type.payload.oneof_type.payload.oneof_type.payload.single_int64 +[BLOCK_RECURSION_DEPTH_1]: cel.@block([msg.oneof_type, @index0.payload, @index1.oneof_type, @index2.payload, @index3.oneof_type, @index4.payload, @index5.oneof_type, @index6.payload], @index7.single_int64) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([msg.oneof_type.payload, @index0.oneof_type.payload, @index1.oneof_type.payload, @index2.oneof_type.payload], @index3.single_int64) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([msg.oneof_type.payload.oneof_type, @index0.payload.oneof_type.payload], @index1.oneof_type.payload.single_int64) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([msg.oneof_type.payload.oneof_type.payload, @index0.oneof_type.payload.oneof_type.payload], @index1.single_int64) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([msg.oneof_type.payload.oneof_type.payload.oneof_type], @index0.payload.oneof_type.payload.single_int64) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([msg.oneof_type.payload.oneof_type.payload.oneof_type.payload], @index0.oneof_type.payload.single_int64) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([msg.oneof_type.payload.oneof_type.payload.oneof_type.payload.oneof_type], @index0.payload.single_int64) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([msg.oneof_type.payload.oneof_type.payload.oneof_type.payload.oneof_type.payload], @index0.single_int64) +[BLOCK_RECURSION_DEPTH_9]: msg.oneof_type.payload.oneof_type.payload.oneof_type.payload.oneof_type.payload.single_int64 + +Test case: TERNARY +Source: (msg.single_int64 > 0 ? msg.single_int64 : 0) == 3 +=====> +Result: true +[CASCADED_BINDS]: cel.bind(@r0, msg.single_int64, (@r0 > 0) ? @r0 : 0) == 3 +[BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([msg.single_int64], ((@index0 > 0) ? @index0 : 0) == 3) +[BLOCK_RECURSION_DEPTH_1]: cel.@block([msg.single_int64, @index0 > 0, @index1 ? @index0 : 0], @index2 == 3) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([msg.single_int64, (@index0 > 0) ? @index0 : 0], @index1 == 3) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([msg.single_int64], ((@index0 > 0) ? @index0 : 0) == 3) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([msg.single_int64], ((@index0 > 0) ? @index0 : 0) == 3) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([msg.single_int64], ((@index0 > 0) ? @index0 : 0) == 3) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([msg.single_int64], ((@index0 > 0) ? @index0 : 0) == 3) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([msg.single_int64], ((@index0 > 0) ? @index0 : 0) == 3) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([msg.single_int64], ((@index0 > 0) ? @index0 : 0) == 3) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([msg.single_int64], ((@index0 > 0) ? @index0 : 0) == 3) + +Test case: TERNARY_BIND_RHS_ONLY +Source: false ? false : (msg.single_int64) + ((msg.single_int64 + 1) * 2) == 11 +=====> +Result: true +[CASCADED_BINDS]: cel.bind(@r0, msg.single_int64, @r0 + (@r0 + 1) * 2) == 11 +[BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([msg.single_int64], @index0 + (@index0 + 1) * 2 == 11) +[BLOCK_RECURSION_DEPTH_1]: cel.@block([msg.single_int64, @index0 + 1, @index1 * 2, @index0 + @index2], @index3 == 11) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([msg.single_int64, (@index0 + 1) * 2], @index0 + @index1 == 11) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([msg.single_int64, @index0 + (@index0 + 1) * 2], @index1 == 11) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([msg.single_int64], @index0 + (@index0 + 1) * 2 == 11) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([msg.single_int64], @index0 + (@index0 + 1) * 2 == 11) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([msg.single_int64], @index0 + (@index0 + 1) * 2 == 11) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([msg.single_int64], @index0 + (@index0 + 1) * 2 == 11) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([msg.single_int64], @index0 + (@index0 + 1) * 2 == 11) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([msg.single_int64], @index0 + (@index0 + 1) * 2 == 11) + +Test case: NESTED_TERNARY +Source: (msg.single_int64 > 0 ? (msg.single_int32 > 0 ? msg.single_int64 + msg.single_int32 : 0) : 0) == 8 +=====> +Result: true +[CASCADED_BINDS]: cel.bind(@r0, msg.single_int64, (@r0 > 0) ? cel.bind(@r1, msg.single_int32, (@r1 > 0) ? (@r0 + @r1) : 0) : 0) == 8 +[BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([msg.single_int64, msg.single_int32], ((@index0 > 0) ? ((@index1 > 0) ? (@index0 + @index1) : 0) : 0) == 8) +[BLOCK_RECURSION_DEPTH_1]: cel.@block([msg.single_int64, msg.single_int32, @index0 > 0, @index1 > 0, @index0 + @index1, @index3 ? @index4 : 0, @index2 ? @index5 : 0], @index6 == 8) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([msg.single_int64, msg.single_int32, (@index1 > 0) ? (@index0 + @index1) : 0, (@index0 > 0) ? @index2 : 0], @index3 == 8) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([msg.single_int64, msg.single_int32, (@index0 > 0) ? ((@index1 > 0) ? (@index0 + @index1) : 0) : 0], @index2 == 8) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([msg.single_int64, msg.single_int32], ((@index0 > 0) ? ((@index1 > 0) ? (@index0 + @index1) : 0) : 0) == 8) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([msg.single_int64, msg.single_int32], ((@index0 > 0) ? ((@index1 > 0) ? (@index0 + @index1) : 0) : 0) == 8) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([msg.single_int64, msg.single_int32], ((@index0 > 0) ? ((@index1 > 0) ? (@index0 + @index1) : 0) : 0) == 8) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([msg.single_int64, msg.single_int32], ((@index0 > 0) ? ((@index1 > 0) ? (@index0 + @index1) : 0) : 0) == 8) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([msg.single_int64, msg.single_int32], ((@index0 > 0) ? ((@index1 > 0) ? (@index0 + @index1) : 0) : 0) == 8) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([msg.single_int64, msg.single_int32], ((@index0 > 0) ? ((@index1 > 0) ? (@index0 + @index1) : 0) : 0) == 8) + +Test case: MULTIPLE_MACROS_1 +Source: size([[1].exists(i, i > 0)]) + size([[1].exists(j, j > 0)]) + size([[2].exists(k, k > 1)]) + size([[2].exists(l, l > 1)]) == 4 +=====> +Result: true +[CASCADED_BINDS]: true +[BLOCK_COMMON_SUBEXPR_ONLY]: true +[BLOCK_RECURSION_DEPTH_1]: true +[BLOCK_RECURSION_DEPTH_2]: true +[BLOCK_RECURSION_DEPTH_3]: true +[BLOCK_RECURSION_DEPTH_4]: true +[BLOCK_RECURSION_DEPTH_5]: true +[BLOCK_RECURSION_DEPTH_6]: true +[BLOCK_RECURSION_DEPTH_7]: true +[BLOCK_RECURSION_DEPTH_8]: true +[BLOCK_RECURSION_DEPTH_9]: true + +Test case: MULTIPLE_MACROS_2 +Source: [[1].exists(i, i > 0)] + [[1].exists(j, j > 0)] + [['a'].exists(k, k == 'a')] + [['a'].exists(l, l == 'a')] == [true, true, true, true] +=====> +Result: true +[CASCADED_BINDS]: true +[BLOCK_COMMON_SUBEXPR_ONLY]: true +[BLOCK_RECURSION_DEPTH_1]: true +[BLOCK_RECURSION_DEPTH_2]: true +[BLOCK_RECURSION_DEPTH_3]: true +[BLOCK_RECURSION_DEPTH_4]: true +[BLOCK_RECURSION_DEPTH_5]: true +[BLOCK_RECURSION_DEPTH_6]: true +[BLOCK_RECURSION_DEPTH_7]: true +[BLOCK_RECURSION_DEPTH_8]: true +[BLOCK_RECURSION_DEPTH_9]: true + +Test case: NESTED_MACROS +Source: [1,2,3].map(i, [1, 2, 3].map(i, i + 1)) == [[2, 3, 4], [2, 3, 4], [2, 3, 4]] +=====> +Result: true +[CASCADED_BINDS]: true +[BLOCK_COMMON_SUBEXPR_ONLY]: true +[BLOCK_RECURSION_DEPTH_1]: true +[BLOCK_RECURSION_DEPTH_2]: true +[BLOCK_RECURSION_DEPTH_3]: true +[BLOCK_RECURSION_DEPTH_4]: true +[BLOCK_RECURSION_DEPTH_5]: true +[BLOCK_RECURSION_DEPTH_6]: true +[BLOCK_RECURSION_DEPTH_7]: true +[BLOCK_RECURSION_DEPTH_8]: true +[BLOCK_RECURSION_DEPTH_9]: true + +Test case: NESTED_MACROS_2 +Source: [1, 2].map(y, [1, 2, 3].filter(x, x == y)) == [[1], [2]] +=====> +Result: true +[CASCADED_BINDS]: true +[BLOCK_COMMON_SUBEXPR_ONLY]: true +[BLOCK_RECURSION_DEPTH_1]: true +[BLOCK_RECURSION_DEPTH_2]: true +[BLOCK_RECURSION_DEPTH_3]: true +[BLOCK_RECURSION_DEPTH_4]: true +[BLOCK_RECURSION_DEPTH_5]: true +[BLOCK_RECURSION_DEPTH_6]: true +[BLOCK_RECURSION_DEPTH_7]: true +[BLOCK_RECURSION_DEPTH_8]: true +[BLOCK_RECURSION_DEPTH_9]: true + +Test case: INCLUSION_LIST +Source: 1 in [1,2,3] && 2 in [1,2,3] && 3 in [3, [1,2,3]] && 1 in [1,2,3] +=====> +Result: true +[CASCADED_BINDS]: true +[BLOCK_COMMON_SUBEXPR_ONLY]: true +[BLOCK_RECURSION_DEPTH_1]: true +[BLOCK_RECURSION_DEPTH_2]: true +[BLOCK_RECURSION_DEPTH_3]: true +[BLOCK_RECURSION_DEPTH_4]: true +[BLOCK_RECURSION_DEPTH_5]: true +[BLOCK_RECURSION_DEPTH_6]: true +[BLOCK_RECURSION_DEPTH_7]: true +[BLOCK_RECURSION_DEPTH_8]: true +[BLOCK_RECURSION_DEPTH_9]: true + +Test case: INCLUSION_MAP +Source: 2 in {'a': 1, 2: {true: false}, 3: {true: false}} +=====> +Result: true +[CASCADED_BINDS]: true +[BLOCK_COMMON_SUBEXPR_ONLY]: true +[BLOCK_RECURSION_DEPTH_1]: true +[BLOCK_RECURSION_DEPTH_2]: true +[BLOCK_RECURSION_DEPTH_3]: true +[BLOCK_RECURSION_DEPTH_4]: true +[BLOCK_RECURSION_DEPTH_5]: true +[BLOCK_RECURSION_DEPTH_6]: true +[BLOCK_RECURSION_DEPTH_7]: true +[BLOCK_RECURSION_DEPTH_8]: true +[BLOCK_RECURSION_DEPTH_9]: true + +Test case: MACRO_ITER_VAR_NOT_REFERENCED +Source: [1,2].map(i, [1, 2].map(i, [3,4])) == [[[3, 4], [3, 4]], [[3, 4], [3, 4]]] +=====> +Result: true +[CASCADED_BINDS]: true +[BLOCK_COMMON_SUBEXPR_ONLY]: true +[BLOCK_RECURSION_DEPTH_1]: true +[BLOCK_RECURSION_DEPTH_2]: true +[BLOCK_RECURSION_DEPTH_3]: true +[BLOCK_RECURSION_DEPTH_4]: true +[BLOCK_RECURSION_DEPTH_5]: true +[BLOCK_RECURSION_DEPTH_6]: true +[BLOCK_RECURSION_DEPTH_7]: true +[BLOCK_RECURSION_DEPTH_8]: true +[BLOCK_RECURSION_DEPTH_9]: true + +Test case: MACRO_SHADOWED_VARIABLE +Source: [x - 1 > 3 ? x - 1 : 5].exists(x, x - 1 > 3) || x - 1 > 3 +=====> +Result: true +[CASCADED_BINDS]: cel.bind(@r0, x - 1, cel.bind(@r1, @r0 > 3, [@r1 ? @r0 : 5].exists(@c0:0, @c0:0 - 1 > 3) || @r1)) +[BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([x - 1, @index0 > 3], [@index1 ? @index0 : 5].exists(@c0:0, @c0:0 - 1 > 3) || @index1) +[BLOCK_RECURSION_DEPTH_1]: cel.@block([x - 1, @index0 > 3, @index1 ? @index0 : 5, [@index2], @c0:0 - 1, @index4 > 3, @x0:0 || @index5], @index3.exists(@c0:0, @index5) || @index1) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([x - 1 > 3, @index0 ? (x - 1) : 5, @c0:0 - 1 > 3, [@index1], @x0:0 || @index2], @index3.exists(@c0:0, @index2) || @index0) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([x - 1 > 3, [@index0 ? (x - 1) : 5], @x0:0 || @c0:0 - 1 > 3, @index1.exists(@c0:0, @c0:0 - 1 > 3)], @index3 || @index0) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([x - 1 > 3, [@index0 ? (x - 1) : 5].exists(@c0:0, @c0:0 - 1 > 3)], @index1 || @index0) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([x - 1 > 3], [@index0 ? (x - 1) : 5].exists(@c0:0, @c0:0 - 1 > 3) || @index0) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([x - 1 > 3], [@index0 ? (x - 1) : 5].exists(@c0:0, @c0:0 - 1 > 3) || @index0) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([x - 1 > 3], [@index0 ? (x - 1) : 5].exists(@c0:0, @c0:0 - 1 > 3) || @index0) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([x - 1 > 3], [@index0 ? (x - 1) : 5].exists(@c0:0, @c0:0 - 1 > 3) || @index0) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([x - 1 > 3], [@index0 ? (x - 1) : 5].exists(@c0:0, @c0:0 - 1 > 3) || @index0) + +Test case: MACRO_SHADOWED_VARIABLE_2 +Source: ["foo", "bar"].map(x, [x + x, x + x]).map(x, [x + x, x + x]) +=====> +Result: [[[foofoo, foofoo, foofoo, foofoo], [foofoo, foofoo, foofoo, foofoo]], [[barbar, barbar, barbar, barbar], [barbar, barbar, barbar, barbar]]] +[CASCADED_BINDS]: [cel.bind(@r0, ["foofoo", "foofoo", "foofoo", "foofoo"], [@r0, @r0]), cel.bind(@r1, ["barbar", "barbar", "barbar", "barbar"], [@r1, @r1])] +[BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([["foofoo", "foofoo", "foofoo", "foofoo"], ["barbar", "barbar", "barbar", "barbar"]], [[@index0, @index0], [@index1, @index1]]) +[BLOCK_RECURSION_DEPTH_1]: cel.@block([["foofoo", "foofoo", "foofoo", "foofoo"], ["barbar", "barbar", "barbar", "barbar"], [@index0, @index0], [@index1, @index1]], [@index2, @index3]) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([["foofoo", "foofoo", "foofoo", "foofoo"], ["barbar", "barbar", "barbar", "barbar"]], [[@index0, @index0], [@index1, @index1]]) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([["foofoo", "foofoo", "foofoo", "foofoo"], ["barbar", "barbar", "barbar", "barbar"]], [[@index0, @index0], [@index1, @index1]]) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([["foofoo", "foofoo", "foofoo", "foofoo"], ["barbar", "barbar", "barbar", "barbar"]], [[@index0, @index0], [@index1, @index1]]) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([["foofoo", "foofoo", "foofoo", "foofoo"], ["barbar", "barbar", "barbar", "barbar"]], [[@index0, @index0], [@index1, @index1]]) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([["foofoo", "foofoo", "foofoo", "foofoo"], ["barbar", "barbar", "barbar", "barbar"]], [[@index0, @index0], [@index1, @index1]]) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([["foofoo", "foofoo", "foofoo", "foofoo"], ["barbar", "barbar", "barbar", "barbar"]], [[@index0, @index0], [@index1, @index1]]) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([["foofoo", "foofoo", "foofoo", "foofoo"], ["barbar", "barbar", "barbar", "barbar"]], [[@index0, @index0], [@index1, @index1]]) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([["foofoo", "foofoo", "foofoo", "foofoo"], ["barbar", "barbar", "barbar", "barbar"]], [[@index0, @index0], [@index1, @index1]]) + +Test case: PRESENCE_TEST +Source: has({'a': true}.a) && {'a':true}['a'] +=====> +Result: true +[CASCADED_BINDS]: true +[BLOCK_COMMON_SUBEXPR_ONLY]: true +[BLOCK_RECURSION_DEPTH_1]: true +[BLOCK_RECURSION_DEPTH_2]: true +[BLOCK_RECURSION_DEPTH_3]: true +[BLOCK_RECURSION_DEPTH_4]: true +[BLOCK_RECURSION_DEPTH_5]: true +[BLOCK_RECURSION_DEPTH_6]: true +[BLOCK_RECURSION_DEPTH_7]: true +[BLOCK_RECURSION_DEPTH_8]: true +[BLOCK_RECURSION_DEPTH_9]: true + +Test case: PRESENCE_TEST_WITH_TERNARY +Source: (has(msg.oneof_type.payload) ? msg.oneof_type.payload.single_int64 : 0) == 10 +=====> +Result: true +[CASCADED_BINDS]: cel.bind(@r0, msg.oneof_type, has(@r0.payload) ? @r0.payload.single_int64 : 0) == 10 +[BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([msg.oneof_type], (has(@index0.payload) ? @index0.payload.single_int64 : 0) == 10) +[BLOCK_RECURSION_DEPTH_1]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64], (has(@index0.payload) ? @index2 : 0) == 10) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([msg.oneof_type, @index0.payload.single_int64, has(@index0.payload) ? @index1 : 0], @index2 == 10) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([msg.oneof_type, has(@index0.payload) ? @index0.payload.single_int64 : 0], @index1 == 10) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([msg.oneof_type], (has(@index0.payload) ? @index0.payload.single_int64 : 0) == 10) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([msg.oneof_type], (has(@index0.payload) ? @index0.payload.single_int64 : 0) == 10) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([msg.oneof_type], (has(@index0.payload) ? @index0.payload.single_int64 : 0) == 10) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([msg.oneof_type], (has(@index0.payload) ? @index0.payload.single_int64 : 0) == 10) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([msg.oneof_type], (has(@index0.payload) ? @index0.payload.single_int64 : 0) == 10) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([msg.oneof_type], (has(@index0.payload) ? @index0.payload.single_int64 : 0) == 10) + +Test case: PRESENCE_TEST_WITH_TERNARY_2 +Source: (has(msg.oneof_type.payload) ? msg.oneof_type.payload.single_int64 : msg.oneof_type.payload.single_int64 * 0) == 10 +=====> +Result: true +[CASCADED_BINDS]: cel.bind(@r0, msg.oneof_type, cel.bind(@r1, @r0.payload.single_int64, has(@r0.payload) ? @r1 : (@r1 * 0))) == 10 +[BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([msg.oneof_type, @index0.payload.single_int64], (has(@index0.payload) ? @index1 : (@index1 * 0)) == 10) +[BLOCK_RECURSION_DEPTH_1]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, @index2 * 0], (has(@index0.payload) ? @index2 : @index3) == 10) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([msg.oneof_type.payload, @index0.single_int64, msg.oneof_type, has(@index2.payload) ? @index1 : (@index1 * 0)], @index3 == 10) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([msg.oneof_type.payload.single_int64, has(msg.oneof_type.payload) ? @index0 : (@index0 * 0)], @index1 == 10) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([msg.oneof_type.payload.single_int64], (has(msg.oneof_type.payload) ? @index0 : (@index0 * 0)) == 10) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([msg.oneof_type.payload.single_int64], (has(msg.oneof_type.payload) ? @index0 : (@index0 * 0)) == 10) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([msg.oneof_type.payload.single_int64], (has(msg.oneof_type.payload) ? @index0 : (@index0 * 0)) == 10) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([msg.oneof_type.payload.single_int64], (has(msg.oneof_type.payload) ? @index0 : (@index0 * 0)) == 10) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([msg.oneof_type.payload.single_int64], (has(msg.oneof_type.payload) ? @index0 : (@index0 * 0)) == 10) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([msg.oneof_type.payload.single_int64], (has(msg.oneof_type.payload) ? @index0 : (@index0 * 0)) == 10) + +Test case: PRESENCE_TEST_WITH_TERNARY_3 +Source: (has(msg.oneof_type.payload.single_int64) ? msg.oneof_type.payload.single_int64 : msg.oneof_type.payload.single_int64 * 0) == 10 +=====> +Result: true +[CASCADED_BINDS]: cel.bind(@r0, msg.oneof_type.payload, cel.bind(@r1, @r0.single_int64, has(@r0.single_int64) ? @r1 : (@r1 * 0))) == 10 +[BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([msg.oneof_type.payload, @index0.single_int64], (has(@index0.single_int64) ? @index1 : (@index1 * 0)) == 10) +[BLOCK_RECURSION_DEPTH_1]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, @index2 * 0], (has(@index1.single_int64) ? @index2 : @index3) == 10) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([msg.oneof_type.payload, @index0.single_int64, has(@index0.single_int64) ? @index1 : (@index1 * 0)], @index2 == 10) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([msg.oneof_type.payload.single_int64, msg.oneof_type.payload], (has(@index1.single_int64) ? @index0 : (@index0 * 0)) == 10) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([msg.oneof_type.payload.single_int64, has(msg.oneof_type.payload.single_int64) ? @index0 : (@index0 * 0)], @index1 == 10) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([msg.oneof_type.payload.single_int64], (has(msg.oneof_type.payload.single_int64) ? @index0 : (@index0 * 0)) == 10) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([msg.oneof_type.payload.single_int64], (has(msg.oneof_type.payload.single_int64) ? @index0 : (@index0 * 0)) == 10) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([msg.oneof_type.payload.single_int64], (has(msg.oneof_type.payload.single_int64) ? @index0 : (@index0 * 0)) == 10) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([msg.oneof_type.payload.single_int64], (has(msg.oneof_type.payload.single_int64) ? @index0 : (@index0 * 0)) == 10) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([msg.oneof_type.payload.single_int64], (has(msg.oneof_type.payload.single_int64) ? @index0 : (@index0 * 0)) == 10) + +Test case: PRESENCE_TEST_WITH_TERNARY_NESTED +Source: (has(msg.oneof_type) && has(msg.oneof_type.payload) && has(msg.oneof_type.payload.single_int64)) ? ((has(msg.oneof_type.payload.map_string_string) && has(msg.oneof_type.payload.map_string_string.key)) ? msg.oneof_type.payload.map_string_string.key == 'A' : false) : false +=====> +Result: true +[CASCADED_BINDS]: cel.bind(@r0, msg.oneof_type, cel.bind(@r1, @r0.payload, (has(msg.oneof_type) && has(@r0.payload) && has(@r1.single_int64)) ? cel.bind(@r2, @r1.map_string_string, (has(@r1.map_string_string) && has(@r2.key)) ? (@r2.key == "A") : false) : false)) +[BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([msg.oneof_type, @index0.payload, @index1.map_string_string], (has(msg.oneof_type) && has(@index0.payload) && has(@index1.single_int64)) ? ((has(@index1.map_string_string) && has(@index2.key)) ? (@index2.key == "A") : false) : false) +[BLOCK_RECURSION_DEPTH_1]: cel.@block([msg.oneof_type, @index0.payload, @index1.map_string_string, @index2.key, @index3 == "A"], (has(msg.oneof_type) && has(@index0.payload) && has(@index1.single_int64)) ? ((has(@index1.map_string_string) && has(@index2.key)) ? @index4 : false) : false) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([msg.oneof_type.payload, @index0.map_string_string, has(@index0.map_string_string) && has(@index1.key), @index1.key == "A", msg.oneof_type, has(msg.oneof_type) && has(@index4.payload), @index5 && has(@index0.single_int64)], @index6 ? (@index2 ? @index3 : false) : false) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([msg.oneof_type.payload.map_string_string, msg.oneof_type.payload, has(msg.oneof_type) && has(msg.oneof_type.payload), (has(@index1.map_string_string) && has(@index0.key)) ? (@index0.key == "A") : false], (@index2 && has(@index1.single_int64)) ? @index3 : false) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([msg.oneof_type.payload.map_string_string, msg.oneof_type.payload, has(msg.oneof_type) && has(msg.oneof_type.payload) && has(@index1.single_int64)], @index2 ? ((has(@index1.map_string_string) && has(@index0.key)) ? (@index0.key == "A") : false) : false) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([msg.oneof_type.payload.map_string_string, msg.oneof_type.payload], (has(msg.oneof_type) && has(msg.oneof_type.payload) && has(@index1.single_int64)) ? ((has(@index1.map_string_string) && has(@index0.key)) ? (@index0.key == "A") : false) : false) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([msg.oneof_type.payload.map_string_string, msg.oneof_type.payload], (has(msg.oneof_type) && has(msg.oneof_type.payload) && has(@index1.single_int64)) ? ((has(@index1.map_string_string) && has(@index0.key)) ? (@index0.key == "A") : false) : false) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([msg.oneof_type.payload.map_string_string, msg.oneof_type.payload], (has(msg.oneof_type) && has(msg.oneof_type.payload) && has(@index1.single_int64)) ? ((has(@index1.map_string_string) && has(@index0.key)) ? (@index0.key == "A") : false) : false) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([msg.oneof_type.payload.map_string_string, msg.oneof_type.payload], (has(msg.oneof_type) && has(msg.oneof_type.payload) && has(@index1.single_int64)) ? ((has(@index1.map_string_string) && has(@index0.key)) ? (@index0.key == "A") : false) : false) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([msg.oneof_type.payload.map_string_string, msg.oneof_type.payload], (has(msg.oneof_type) && has(msg.oneof_type.payload) && has(@index1.single_int64)) ? ((has(@index1.map_string_string) && has(@index0.key)) ? (@index0.key == "A") : false) : false) + +Test case: OPTIONAL_LIST +Source: [10, ?optional.none(), [?optional.none(), ?opt_x], [?optional.none(), ?opt_x]] == [10, [5], [5]] +=====> +Result: true +[CASCADED_BINDS]: cel.bind(@r0, optional.none(), [10, ?@r0, [?opt_x], [?@r0, ?opt_x]]) == cel.bind(@r1, [5], [10, @r1, @r1]) +[BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([optional.none(), [5]], [10, ?@index0, [?opt_x], [?@index0, ?opt_x]] == [10, @index1, @index1]) +[BLOCK_RECURSION_DEPTH_1]: cel.@block([optional.none(), [5], [?opt_x], [?@index0, ?opt_x], [10, ?@index0, @index2, @index3], [10, @index1, @index1]], @index4 == @index5) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([optional.none(), [5], [10, ?@index0, [?opt_x], [?@index0, ?opt_x]]], @index2 == [10, @index1, @index1]) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([optional.none(), [5]], [10, ?@index0, [?opt_x], [?@index0, ?opt_x]] == [10, @index1, @index1]) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([optional.none(), [5]], [10, ?@index0, [?opt_x], [?@index0, ?opt_x]] == [10, @index1, @index1]) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([optional.none(), [5]], [10, ?@index0, [?opt_x], [?@index0, ?opt_x]] == [10, @index1, @index1]) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([optional.none(), [5]], [10, ?@index0, [?opt_x], [?@index0, ?opt_x]] == [10, @index1, @index1]) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([optional.none(), [5]], [10, ?@index0, [?opt_x], [?@index0, ?opt_x]] == [10, @index1, @index1]) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([optional.none(), [5]], [10, ?@index0, [?opt_x], [?@index0, ?opt_x]] == [10, @index1, @index1]) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([optional.none(), [5]], [10, ?@index0, [?opt_x], [?@index0, ?opt_x]] == [10, @index1, @index1]) + +Test case: OPTIONAL_MAP +Source: {?'hello': optional.of('hello')}['hello'] + {?'hello': optional.of('hello')}['hello'] == 'hellohello' +=====> +Result: true +[CASCADED_BINDS]: true +[BLOCK_COMMON_SUBEXPR_ONLY]: true +[BLOCK_RECURSION_DEPTH_1]: true +[BLOCK_RECURSION_DEPTH_2]: true +[BLOCK_RECURSION_DEPTH_3]: true +[BLOCK_RECURSION_DEPTH_4]: true +[BLOCK_RECURSION_DEPTH_5]: true +[BLOCK_RECURSION_DEPTH_6]: true +[BLOCK_RECURSION_DEPTH_7]: true +[BLOCK_RECURSION_DEPTH_8]: true +[BLOCK_RECURSION_DEPTH_9]: true + +Test case: OPTIONAL_MAP_CHAINED +Source: {?'key': optional.of('test')}[?'bogus'].or({'key': 'test'}[?'bogus']).orValue({'key': 'test'}['key']) == 'test' +=====> +Result: true +[CASCADED_BINDS]: true +[BLOCK_COMMON_SUBEXPR_ONLY]: true +[BLOCK_RECURSION_DEPTH_1]: true +[BLOCK_RECURSION_DEPTH_2]: true +[BLOCK_RECURSION_DEPTH_3]: true +[BLOCK_RECURSION_DEPTH_4]: true +[BLOCK_RECURSION_DEPTH_5]: true +[BLOCK_RECURSION_DEPTH_6]: true +[BLOCK_RECURSION_DEPTH_7]: true +[BLOCK_RECURSION_DEPTH_8]: true +[BLOCK_RECURSION_DEPTH_9]: true + +Test case: OPTIONAL_MESSAGE +Source: TestAllTypes{?single_int64: optional.ofNonZeroValue(1), ?single_int32: optional.of(4)}.single_int32 + TestAllTypes{?single_int64: optional.ofNonZeroValue(1), ?single_int32: optional.of(4)}.single_int64 == 5 +=====> +Result: true +[CASCADED_BINDS]: true +[BLOCK_COMMON_SUBEXPR_ONLY]: true +[BLOCK_RECURSION_DEPTH_1]: true +[BLOCK_RECURSION_DEPTH_2]: true +[BLOCK_RECURSION_DEPTH_3]: true +[BLOCK_RECURSION_DEPTH_4]: true +[BLOCK_RECURSION_DEPTH_5]: true +[BLOCK_RECURSION_DEPTH_6]: true +[BLOCK_RECURSION_DEPTH_7]: true +[BLOCK_RECURSION_DEPTH_8]: true +[BLOCK_RECURSION_DEPTH_9]: true + +Test case: CALL +Source: ('h' + 'e' + 'l' + 'l' + 'o' + ' world').matches('h' + 'e' + 'l' + 'l' + 'o') +=====> +Result: true +[CASCADED_BINDS]: true +[BLOCK_COMMON_SUBEXPR_ONLY]: true +[BLOCK_RECURSION_DEPTH_1]: true +[BLOCK_RECURSION_DEPTH_2]: true +[BLOCK_RECURSION_DEPTH_3]: true +[BLOCK_RECURSION_DEPTH_4]: true +[BLOCK_RECURSION_DEPTH_5]: true +[BLOCK_RECURSION_DEPTH_6]: true +[BLOCK_RECURSION_DEPTH_7]: true +[BLOCK_RECURSION_DEPTH_8]: true +[BLOCK_RECURSION_DEPTH_9]: true + +Test case: CALL_ARGUMENT_NESTED_NO_COMMON_SUBEXPR +Source: 'hello world'.matches('h' + 'e' + 'l' + 'l' + 'o') +=====> +Result: true +[CASCADED_BINDS]: true +[BLOCK_COMMON_SUBEXPR_ONLY]: true +[BLOCK_RECURSION_DEPTH_1]: true +[BLOCK_RECURSION_DEPTH_2]: true +[BLOCK_RECURSION_DEPTH_3]: true +[BLOCK_RECURSION_DEPTH_4]: true +[BLOCK_RECURSION_DEPTH_5]: true +[BLOCK_RECURSION_DEPTH_6]: true +[BLOCK_RECURSION_DEPTH_7]: true +[BLOCK_RECURSION_DEPTH_8]: true +[BLOCK_RECURSION_DEPTH_9]: true + +Test case: CALL_TARGET_NESTED_NO_COMMON_SUBEXPR +Source: ('h' + 'e' + 'l' + 'l' + 'o' + ' world').matches('hello') +=====> +Result: true +[CASCADED_BINDS]: true +[BLOCK_COMMON_SUBEXPR_ONLY]: true +[BLOCK_RECURSION_DEPTH_1]: true +[BLOCK_RECURSION_DEPTH_2]: true +[BLOCK_RECURSION_DEPTH_3]: true +[BLOCK_RECURSION_DEPTH_4]: true +[BLOCK_RECURSION_DEPTH_5]: true +[BLOCK_RECURSION_DEPTH_6]: true +[BLOCK_RECURSION_DEPTH_7]: true +[BLOCK_RECURSION_DEPTH_8]: true +[BLOCK_RECURSION_DEPTH_9]: true + +Test case: CALL_BOTH_ARGUMENT_TARGET_NESTED_NO_COMMON_SUBEXPR +Source: ('h' + 'e' + 'l' + 'l' + 'o' + ' world').matches('w' + 'o' + 'r' + 'l' + 'd') +=====> +Result: true +[CASCADED_BINDS]: true +[BLOCK_COMMON_SUBEXPR_ONLY]: true +[BLOCK_RECURSION_DEPTH_1]: true +[BLOCK_RECURSION_DEPTH_2]: true +[BLOCK_RECURSION_DEPTH_3]: true +[BLOCK_RECURSION_DEPTH_4]: true +[BLOCK_RECURSION_DEPTH_5]: true +[BLOCK_RECURSION_DEPTH_6]: true +[BLOCK_RECURSION_DEPTH_7]: true +[BLOCK_RECURSION_DEPTH_8]: true +[BLOCK_RECURSION_DEPTH_9]: true + +Test case: CUSTOM_FUNCTION_INELIMINABLE +Source: non_pure_custom_func(msg.oneof_type.payload.single_int64) + non_pure_custom_func(msg.oneof_type.payload.single_int32) + non_pure_custom_func(msg.oneof_type.payload.single_int64) + non_pure_custom_func(msg.single_int64) +=====> +Result: 31 +[CASCADED_BINDS]: cel.bind(@r0, msg.oneof_type.payload, cel.bind(@r1, @r0.single_int64, non_pure_custom_func(@r1) + non_pure_custom_func(@r0.single_int32) + non_pure_custom_func(@r1))) + non_pure_custom_func(msg.single_int64) +[BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([msg.oneof_type.payload, @index0.single_int64], non_pure_custom_func(@index1) + non_pure_custom_func(@index0.single_int32) + non_pure_custom_func(@index1) + non_pure_custom_func(msg.single_int64)) +[BLOCK_RECURSION_DEPTH_1]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64], non_pure_custom_func(@index2) + non_pure_custom_func(@index1.single_int32) + non_pure_custom_func(@index2) + non_pure_custom_func(msg.single_int64)) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([msg.oneof_type.payload, @index0.single_int64], non_pure_custom_func(@index1) + non_pure_custom_func(@index0.single_int32) + non_pure_custom_func(@index1) + non_pure_custom_func(msg.single_int64)) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([msg.oneof_type.payload.single_int64], non_pure_custom_func(@index0) + non_pure_custom_func(msg.oneof_type.payload.single_int32) + non_pure_custom_func(@index0) + non_pure_custom_func(msg.single_int64)) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([msg.oneof_type.payload.single_int64], non_pure_custom_func(@index0) + non_pure_custom_func(msg.oneof_type.payload.single_int32) + non_pure_custom_func(@index0) + non_pure_custom_func(msg.single_int64)) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([msg.oneof_type.payload.single_int64], non_pure_custom_func(@index0) + non_pure_custom_func(msg.oneof_type.payload.single_int32) + non_pure_custom_func(@index0) + non_pure_custom_func(msg.single_int64)) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([msg.oneof_type.payload.single_int64], non_pure_custom_func(@index0) + non_pure_custom_func(msg.oneof_type.payload.single_int32) + non_pure_custom_func(@index0) + non_pure_custom_func(msg.single_int64)) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([msg.oneof_type.payload.single_int64], non_pure_custom_func(@index0) + non_pure_custom_func(msg.oneof_type.payload.single_int32) + non_pure_custom_func(@index0) + non_pure_custom_func(msg.single_int64)) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([msg.oneof_type.payload.single_int64], non_pure_custom_func(@index0) + non_pure_custom_func(msg.oneof_type.payload.single_int32) + non_pure_custom_func(@index0) + non_pure_custom_func(msg.single_int64)) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([msg.oneof_type.payload.single_int64], non_pure_custom_func(@index0) + non_pure_custom_func(msg.oneof_type.payload.single_int32) + non_pure_custom_func(@index0) + non_pure_custom_func(msg.single_int64)) + +Test case: CUSTOM_FUNCTION_ELIMINABLE +Source: pure_custom_func(msg.oneof_type.payload.single_int64) + pure_custom_func(msg.oneof_type.payload.single_int32) + pure_custom_func(msg.oneof_type.payload.single_int64) + pure_custom_func(msg.single_int64) +=====> +Result: 31 +[CASCADED_BINDS]: cel.bind(@r0, msg.oneof_type.payload, cel.bind(@r1, pure_custom_func(@r0.single_int64), @r1 + pure_custom_func(@r0.single_int32) + @r1)) + pure_custom_func(msg.single_int64) +[BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([msg.oneof_type.payload, pure_custom_func(@index0.single_int64)], @index1 + pure_custom_func(@index0.single_int32) + @index1 + pure_custom_func(msg.single_int64)) +[BLOCK_RECURSION_DEPTH_1]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, pure_custom_func(@index2), @index1.single_int32, pure_custom_func(@index4), @index3 + @index5, @index6 + @index3, msg.single_int64, pure_custom_func(@index8)], @index7 + @index9) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([msg.oneof_type.payload, pure_custom_func(@index0.single_int64), pure_custom_func(@index0.single_int32), @index1 + @index2 + @index1, pure_custom_func(msg.single_int64)], @index3 + @index4) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([msg.oneof_type.payload.single_int64, pure_custom_func(@index0), msg.oneof_type.payload.single_int32, @index1 + pure_custom_func(@index2) + @index1], @index3 + pure_custom_func(msg.single_int64)) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([pure_custom_func(msg.oneof_type.payload.single_int64), pure_custom_func(msg.oneof_type.payload.single_int32)], @index0 + @index1 + @index0 + pure_custom_func(msg.single_int64)) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([pure_custom_func(msg.oneof_type.payload.single_int64), @index0 + pure_custom_func(msg.oneof_type.payload.single_int32)], @index1 + @index0 + pure_custom_func(msg.single_int64)) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([pure_custom_func(msg.oneof_type.payload.single_int64), @index0 + pure_custom_func(msg.oneof_type.payload.single_int32) + @index0], @index1 + pure_custom_func(msg.single_int64)) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([pure_custom_func(msg.oneof_type.payload.single_int64)], @index0 + pure_custom_func(msg.oneof_type.payload.single_int32) + @index0 + pure_custom_func(msg.single_int64)) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([pure_custom_func(msg.oneof_type.payload.single_int64)], @index0 + pure_custom_func(msg.oneof_type.payload.single_int32) + @index0 + pure_custom_func(msg.single_int64)) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([pure_custom_func(msg.oneof_type.payload.single_int64)], @index0 + pure_custom_func(msg.oneof_type.payload.single_int32) + @index0 + pure_custom_func(msg.single_int64)) diff --git a/optimizer/src/test/resources/large_expressions_block_recursion_depth_3.baseline b/optimizer/src/test/resources/large_expressions_block_recursion_depth_3.baseline index 832173f88..24138a632 100644 --- a/optimizer/src/test/resources/large_expressions_block_recursion_depth_3.baseline +++ b/optimizer/src/test/resources/large_expressions_block_recursion_depth_3.baseline @@ -2,16 +2,16 @@ Test case: CALC_FOUR_COMMON_SUBEXPR Source: [1] + [1,2] + [1,2,3] + [1,2,3,4] + [1] + [1,2] + [1,2,3] + [1,2,3,4] + [1] + [1,2] + [1,2,3] + [1,2,3,4] + [1] + [1,2] + [1,2,3] + [1,2,3,4] + [1] + [1,2] + [1,2,3] + [1,2,3,4] + [1] + [1,2] + [1,2,3] + [1,2,3,4] + [1] + [1,2] + [1,2,3] + [1,2,3,4] + [1] + [1,2] + [1,2,3] + [1,2,3,4] + [1] + [1,2] + [1,2,3] + [1,2,3,4] + [1] + [1,2] + [1,2,3] + [1,2,3,4] + [1] + [1,2] + [1,2,3] + [1,2,3,4] + [1] + [1,2] + [1,2,3] + [1,2,3,4] + [1] + [1,2] + [1,2,3] + [1,2,3,4] + [1] + [1,2] + [1,2,3] + [1,2,3,4] + [1] + [1,2] + [1,2,3] + [1,2,3,4] + [1] + [1,2] + [1,2,3] + [1,2,3,4] + [1] + [1,2] + [1,2,3] + [1,2,3,4] + [1] + [1,2] + [1,2,3] + [1,2,3,4] + [1] + [1,2] + [1,2,3] + [1,2,3,4] + [1] + [1,2] + [1,2,3] + [1,2,3,4] + [1] + [1,2] + [1,2,3] + [1,2,3,4] + [1] + [1,2] + [1,2,3] + [1,2,3,4] + [1] + [1,2] + [1,2,3] + [1,2,3,4] + [1] + [1,2] + [1,2,3] + [1,2,3,4] + [1] + [1,2] + [1,2,3] + [1,2,3,4] + [1] + [1,2] + [1,2,3] + [1,2,3,4] + [1] + [1,2] + [1,2,3] + [1,2,3,4] + [1] + [1,2] + [1,2,3] + [1,2,3,4] + [1] + [1,2] + [1,2,3] + [1,2,3,4] + [1] + [1,2] + [1,2,3] + [1,2,3,4] + [1] + [1,2] + [1,2,3] + [1,2,3,4] + [1] + [1,2] + [1,2,3] + [1,2,3,4] + [1] + [1,2] + [1,2,3] + [1,2,3,4] + [1] + [1,2] + [1,2,3] + [1,2,3,4] + [1] + [1,2] + [1,2,3] + [1,2,3,4] + [1] + [1,2] + [1,2,3] + [1,2,3,4] + [1] + [1,2] + [1,2,3] + [1,2,3,4] + [1] + [1,2] + [1,2,3] + [1,2,3,4] + [1] + [1,2] + [1,2,3] + [1,2,3,4] + [1] + [1,2] + [1,2,3] + [1,2,3,4] =====> Result: [1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4] -Unparsed: cel.@block([[1], [1, 2], [1, 2, 3], [1, 2, 3, 4], @index0 + @index1 + @index2 + @index3, @index4 + @index0 + @index1 + @index2, @index5 + @index3 + @index0 + @index1, @index6 + @index2 + @index3 + @index0, @index7 + @index1 + @index2 + @index3, @index8 + @index0 + @index1 + @index2, @index9 + @index3 + @index0 + @index1, @index10 + @index2 + @index3 + @index0, @index11 + @index1 + @index2 + @index3, @index12 + @index0 + @index1 + @index2, @index13 + @index3 + @index0 + @index1, @index14 + @index2 + @index3 + @index0, @index15 + @index1 + @index2 + @index3, @index16 + @index0 + @index1 + @index2, @index17 + @index3 + @index0 + @index1, @index18 + @index2 + @index3 + @index0, @index19 + @index1 + @index2 + @index3, @index20 + @index0 + @index1 + @index2, @index21 + @index3 + @index0 + @index1, @index22 + @index2 + @index3 + @index0, @index23 + @index1 + @index2 + @index3, @index24 + @index0 + @index1 + @index2, @index25 + @index3 + @index0 + @index1, @index26 + @index2 + @index3 + @index0, @index27 + @index1 + @index2 + @index3, @index28 + @index0 + @index1 + @index2, @index29 + @index3 + @index0 + @index1, @index30 + @index2 + @index3 + @index0, @index31 + @index1 + @index2 + @index3, @index32 + @index0 + @index1 + @index2, @index33 + @index3 + @index0 + @index1, @index34 + @index2 + @index3 + @index0, @index35 + @index1 + @index2 + @index3, @index36 + @index0 + @index1 + @index2, @index37 + @index3 + @index0 + @index1, @index38 + @index2 + @index3 + @index0, @index39 + @index1 + @index2 + @index3, @index40 + @index0 + @index1 + @index2, @index41 + @index3 + @index0 + @index1, @index42 + @index2 + @index3 + @index0, @index43 + @index1 + @index2 + @index3, @index44 + @index0 + @index1 + @index2, @index45 + @index3 + @index0 + @index1, @index46 + @index2 + @index3 + @index0, @index47 + @index1 + @index2 + @index3, @index48 + @index0 + @index1 + @index2, @index49 + @index3 + @index0 + @index1, @index50 + @index2 + @index3 + @index0, @index51 + @index1 + @index2 + @index3, @index52 + @index0 + @index1 + @index2, @index53 + @index3 + @index0 + @index1, @index54 + @index2 + @index3 + @index0, @index55 + @index1 + @index2], @index56 + @index3) +Unparsed: cel.@block([[1], [1, 2], [1, 2, 3], [1, 2, 3, 4], @index0 + @index1 + @index2 + @index3, @index4 + @index0 + @index1 + @index2, @index5 + @index3 + @index0 + @index1, @index6 + @index2 + @index3 + @index0, @index7 + @index1 + @index2 + @index3, @index8 + @index0 + @index1 + @index2, @index9 + @index3 + @index0 + @index1, @index10 + @index2 + @index3 + @index0, @index11 + @index1 + @index2 + @index3, @index12 + @index0 + @index1 + @index2, @index13 + @index3 + @index0 + @index1, @index14 + @index2 + @index3 + @index0, @index15 + @index1 + @index2 + @index3, @index16 + @index0 + @index1 + @index2, @index17 + @index3 + @index0 + @index1, @index18 + @index2 + @index3 + @index0, @index19 + @index1 + @index2 + @index3, @index20 + @index0 + @index1 + @index2, @index21 + @index3 + @index0 + @index1, @index22 + @index2 + @index3 + @index0, @index23 + @index1 + @index2 + @index3, @index24 + @index0 + @index1 + @index2, @index25 + @index3 + @index0 + @index1, @index26 + @index2 + @index3 + @index0, @index27 + @index1 + @index2 + @index3, @index28 + @index0 + @index1 + @index2, @index29 + @index3 + @index0 + @index1, @index30 + @index2 + @index3 + @index0, @index31 + @index1 + @index2 + @index3, @index32 + @index0 + @index1 + @index2, @index33 + @index3 + @index0 + @index1, @index34 + @index2 + @index3 + @index0, @index35 + @index1 + @index2 + @index3, @index36 + @index0 + @index1 + @index2, @index37 + @index3 + @index0 + @index1, @index38 + @index2 + @index3 + @index0, @index39 + @index1 + @index2 + @index3, @index40 + @index0 + @index1 + @index2, @index41 + @index3 + @index0 + @index1, @index42 + @index2 + @index3 + @index0, @index43 + @index1 + @index2 + @index3, @index44 + @index0 + @index1 + @index2, @index45 + @index3 + @index0 + @index1, @index46 + @index2 + @index3 + @index0, @index47 + @index1 + @index2 + @index3, @index48 + @index0 + @index1 + @index2, @index49 + @index3 + @index0 + @index1, @index50 + @index2 + @index3 + @index0, @index51 + @index1 + @index2 + @index3, @index52 + @index0 + @index1 + @index2, @index53 + @index3 + @index0 + @index1, @index54 + @index2 + @index3 + @index0], @index55 + @index1 + @index2 + @index3) Test case: CALC_ALL_COMMON_SUBEXPR Source: [0, 1] + [0, 1] + [1, 2] + [1, 2] + [2, 3] + [2, 3] + [3, 4] + [3, 4] + [4, 5] + [4, 5] + [5, 6] + [5, 6] + [6, 7] + [6, 7] + [7, 8] + [7, 8] + [8, 9] + [8, 9] + [9, 10] + [9, 10] + [10, 11] + [10, 11] + [11, 12] + [11, 12] + [12, 13] + [12, 13] + [13, 14] + [13, 14] + [14, 15] + [14, 15] + [15, 16] + [15, 16] + [16, 17] + [16, 17] + [17, 18] + [17, 18] + [18, 19] + [18, 19] + [19, 20] + [19, 20] + [20, 21] + [20, 21] + [21, 22] + [21, 22] + [22, 23] + [22, 23] + [23, 24] + [23, 24] + [24, 25] + [24, 25] + [25, 26] + [25, 26] + [26, 27] + [26, 27] + [27, 28] + [27, 28] + [28, 29] + [28, 29] + [29, 30] + [29, 30] + [30, 31] + [30, 31] + [31, 32] + [31, 32] + [32, 33] + [32, 33] + [33, 34] + [33, 34] + [34, 35] + [34, 35] + [35, 36] + [35, 36] + [36, 37] + [36, 37] + [37, 38] + [37, 38] + [38, 39] + [38, 39] + [39, 40] + [39, 40] + [40, 41] + [40, 41] + [41, 42] + [41, 42] + [42, 43] + [42, 43] + [43, 44] + [43, 44] + [44, 45] + [44, 45] + [45, 46] + [45, 46] + [46, 47] + [46, 47] + [47, 48] + [47, 48] + [48, 49] + [48, 49] + [49, 50] + [49, 50] =====> Result: [0, 1, 0, 1, 1, 2, 1, 2, 2, 3, 2, 3, 3, 4, 3, 4, 4, 5, 4, 5, 5, 6, 5, 6, 6, 7, 6, 7, 7, 8, 7, 8, 8, 9, 8, 9, 9, 10, 9, 10, 10, 11, 10, 11, 11, 12, 11, 12, 12, 13, 12, 13, 13, 14, 13, 14, 14, 15, 14, 15, 15, 16, 15, 16, 16, 17, 16, 17, 17, 18, 17, 18, 18, 19, 18, 19, 19, 20, 19, 20, 20, 21, 20, 21, 21, 22, 21, 22, 22, 23, 22, 23, 23, 24, 23, 24, 24, 25, 24, 25, 25, 26, 25, 26, 26, 27, 26, 27, 27, 28, 27, 28, 28, 29, 28, 29, 29, 30, 29, 30, 30, 31, 30, 31, 31, 32, 31, 32, 32, 33, 32, 33, 33, 34, 33, 34, 34, 35, 34, 35, 35, 36, 35, 36, 36, 37, 36, 37, 37, 38, 37, 38, 38, 39, 38, 39, 39, 40, 39, 40, 40, 41, 40, 41, 41, 42, 41, 42, 42, 43, 42, 43, 43, 44, 43, 44, 44, 45, 44, 45, 45, 46, 45, 46, 46, 47, 46, 47, 47, 48, 47, 48, 48, 49, 48, 49, 49, 50, 49, 50] -Unparsed: cel.@block([[0, 1], [1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 11], [11, 12], [12, 13], [13, 14], [14, 15], [15, 16], [16, 17], [17, 18], [18, 19], [19, 20], [20, 21], [21, 22], [22, 23], [23, 24], [24, 25], [25, 26], [26, 27], [27, 28], [28, 29], [29, 30], [30, 31], [31, 32], [32, 33], [33, 34], [34, 35], [35, 36], [36, 37], [37, 38], [38, 39], [39, 40], [40, 41], [41, 42], [42, 43], [43, 44], [44, 45], [45, 46], [46, 47], [47, 48], [48, 49], [49, 50], @index0 + @index0 + @index1 + @index1, @index50 + @index2 + @index2 + @index3, @index51 + @index3 + @index4 + @index4, @index52 + @index5 + @index5 + @index6, @index53 + @index6 + @index7 + @index7, @index54 + @index8 + @index8 + @index9, @index55 + @index9 + @index10 + @index10, @index56 + @index11 + @index11 + @index12, @index57 + @index12 + @index13 + @index13, @index58 + @index14 + @index14 + @index15, @index59 + @index15 + @index16 + @index16, @index60 + @index17 + @index17 + @index18, @index61 + @index18 + @index19 + @index19, @index62 + @index20 + @index20 + @index21, @index63 + @index21 + @index22 + @index22, @index64 + @index23 + @index23 + @index24, @index65 + @index24 + @index25 + @index25, @index66 + @index26 + @index26 + @index27, @index67 + @index27 + @index28 + @index28, @index68 + @index29 + @index29 + @index30, @index69 + @index30 + @index31 + @index31, @index70 + @index32 + @index32 + @index33, @index71 + @index33 + @index34 + @index34, @index72 + @index35 + @index35 + @index36, @index73 + @index36 + @index37 + @index37, @index74 + @index38 + @index38 + @index39, @index75 + @index39 + @index40 + @index40, @index76 + @index41 + @index41 + @index42, @index77 + @index42 + @index43 + @index43, @index78 + @index44 + @index44 + @index45, @index79 + @index45 + @index46 + @index46, @index80 + @index47 + @index47 + @index48, @index81 + @index48 + @index49], @index82 + @index49) +Unparsed: cel.@block([[0, 1], [1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 11], [11, 12], [12, 13], [13, 14], [14, 15], [15, 16], [16, 17], [17, 18], [18, 19], [19, 20], [20, 21], [21, 22], [22, 23], [23, 24], [24, 25], [25, 26], [26, 27], [27, 28], [28, 29], [29, 30], [30, 31], [31, 32], [32, 33], [33, 34], [34, 35], [35, 36], [36, 37], [37, 38], [38, 39], [39, 40], [40, 41], [41, 42], [42, 43], [43, 44], [44, 45], [45, 46], [46, 47], [47, 48], [48, 49], [49, 50], @index0 + @index0 + @index1 + @index1, @index50 + @index2 + @index2 + @index3, @index51 + @index3 + @index4 + @index4, @index52 + @index5 + @index5 + @index6, @index53 + @index6 + @index7 + @index7, @index54 + @index8 + @index8 + @index9, @index55 + @index9 + @index10 + @index10, @index56 + @index11 + @index11 + @index12, @index57 + @index12 + @index13 + @index13, @index58 + @index14 + @index14 + @index15, @index59 + @index15 + @index16 + @index16, @index60 + @index17 + @index17 + @index18, @index61 + @index18 + @index19 + @index19, @index62 + @index20 + @index20 + @index21, @index63 + @index21 + @index22 + @index22, @index64 + @index23 + @index23 + @index24, @index65 + @index24 + @index25 + @index25, @index66 + @index26 + @index26 + @index27, @index67 + @index27 + @index28 + @index28, @index68 + @index29 + @index29 + @index30, @index69 + @index30 + @index31 + @index31, @index70 + @index32 + @index32 + @index33, @index71 + @index33 + @index34 + @index34, @index72 + @index35 + @index35 + @index36, @index73 + @index36 + @index37 + @index37, @index74 + @index38 + @index38 + @index39, @index75 + @index39 + @index40 + @index40, @index76 + @index41 + @index41 + @index42, @index77 + @index42 + @index43 + @index43, @index78 + @index44 + @index44 + @index45, @index79 + @index45 + @index46 + @index46, @index80 + @index47 + @index47 + @index48], @index81 + @index48 + @index49 + @index49) Test case: NESTED_MACROS Source: [1,2,3].map(i, [1, 2, 3].map(i, [1, 2, 3].map(i, [1, 2, 3].map(i, [1, 2, 3].map(i, [1, 2, 3].map(i, [1, 2, 3].map(i, [1, 2, 3].map(i, [1, 2, 3])))))))) =====> Result: [[[[[[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]]], [[[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]]], [[[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]]]], [[[[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]]], [[[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]]], [[[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]]]], [[[[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]]], [[[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]]], [[[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]]]]], [[[[[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]]], [[[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]]], [[[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]]]], [[[[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]]], [[[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]]], [[[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]]]], [[[[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]]], [[[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]]], [[[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]]]]], [[[[[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]]], [[[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]]], [[[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]]]], [[[[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]]], [[[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]]], [[[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]]]], [[[[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]]], [[[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]]], [[[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]], [[[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]], [[[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]], [[[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 2, 3], [1, 2, 3]]]]]]]]] -Unparsed: cel.@block([[1, 2, 3], @index0.map(@c7:0, @index0), @index0.map(@c6:0, @index1), @index0.map(@c5:0, @index2), @index0.map(@c4:0, @index3), @index0.map(@c3:0, @index4), @index0.map(@c2:0, @index5), @index0.map(@c1:0, @index6), @x0:0 + [@index7]], @index0.map(@c0:0, @index7)) +Unparsed: cel.@block([[1, 2, 3], @index0.map(@c7:0, @index0), @index0.map(@c6:0, @index1), @index0.map(@c5:0, @index2), @index0.map(@c4:0, @index3), @index0.map(@c3:0, @index4), @index0.map(@c2:0, @index5), @index0.map(@c1:0, @index6)], @index0.map(@c0:0, @index7)) diff --git a/optimizer/src/test/resources/subexpression_ast_block_recursion_depth_1.baseline b/optimizer/src/test/resources/subexpression_ast_block_recursion_depth_1.baseline index a8b6c243c..3b4233150 100644 --- a/optimizer/src/test/resources/subexpression_ast_block_recursion_depth_1.baseline +++ b/optimizer/src/test/resources/subexpression_ast_block_recursion_depth_1.baseline @@ -442,7 +442,7 @@ CALL [1] { } } CALL [31] { - function: getMinutes + function: getFullYear target: { IDENT [32] { name: @index13 @@ -452,109 +452,109 @@ CALL [1] { } } CALL [33] { - function: getSeconds - target: { + function: _+_ + args: { IDENT [34] { - name: @index6 + name: @index3 } - } - args: { - } - } - CALL [35] { - function: getFullYear - target: { - IDENT [36] { - name: @index6 + IDENT [35] { + name: @index14 } } - args: { - } } - CALL [37] { + CALL [36] { function: getFullYear target: { - IDENT [38] { - name: @index13 + IDENT [37] { + name: @index6 } } args: { } } - CALL [39] { + CALL [38] { function: _+_ args: { - IDENT [40] { - name: @index3 + IDENT [39] { + name: @index15 } - IDENT [41] { - name: @index17 + IDENT [40] { + name: @index16 } } } - CALL [42] { + CALL [41] { function: _+_ args: { + IDENT [42] { + name: @index17 + } IDENT [43] { - name: @index18 + name: @index3 } - IDENT [44] { - name: @index16 + } + } + CALL [44] { + function: getSeconds + target: { + IDENT [45] { + name: @index6 } } + args: { + } } - CALL [45] { + CALL [46] { function: _+_ args: { - IDENT [46] { - name: @index19 - } IDENT [47] { - name: @index3 + name: @index18 + } + IDENT [48] { + name: @index19 } } } - CALL [48] { + CALL [49] { function: _+_ args: { - IDENT [49] { + IDENT [50] { name: @index20 } - IDENT [50] { - name: @index15 + IDENT [51] { + name: @index10 } } } - CALL [51] { + CALL [52] { function: _+_ args: { - IDENT [52] { + IDENT [53] { name: @index21 } - IDENT [53] { + IDENT [54] { name: @index10 } } } - CALL [54] { - function: _+_ - args: { - IDENT [55] { - name: @index22 - } + CALL [55] { + function: getMinutes + target: { IDENT [56] { - name: @index10 + name: @index13 } } + args: { + } } CALL [57] { function: _+_ args: { IDENT [58] { - name: @index23 + name: @index22 } IDENT [59] { - name: @index14 + name: @index23 } } } @@ -842,69 +842,69 @@ CALL [1] { SELECT [9] { IDENT [10] { name: @index1 - }.oneof_type - } - SELECT [11] { - IDENT [12] { - name: @index3 - }.payload - } - SELECT [13] { - IDENT [14] { - name: @index4 - }.single_int64 - } - SELECT [15] { - IDENT [16] { - name: msg - }.single_int64 - } - SELECT [17] { - IDENT [18] { - name: @index1 }.single_int32 } - CALL [19] { + CALL [11] { function: _+_ args: { - IDENT [20] { + IDENT [12] { name: @index2 } - IDENT [21] { - name: @index7 + IDENT [13] { + name: @index3 } } } - CALL [22] { + CALL [14] { function: _+_ args: { - IDENT [23] { - name: @index8 + IDENT [15] { + name: @index4 } - IDENT [24] { + IDENT [16] { name: @index2 } } } - CALL [25] { + SELECT [17] { + IDENT [18] { + name: msg + }.single_int64 + } + CALL [19] { function: _+_ args: { - IDENT [26] { - name: @index9 + IDENT [20] { + name: @index5 } - IDENT [27] { + IDENT [21] { name: @index6 } } } + SELECT [22] { + IDENT [23] { + name: @index1 + }.oneof_type + } + SELECT [24] { + IDENT [25] { + name: @index8 + }.payload + } + SELECT [26] { + IDENT [27] { + name: @index9 + }.single_int64 + } CALL [28] { function: _+_ args: { IDENT [29] { - name: @index10 + name: @index7 } IDENT [30] { - name: @index5 + name: @index10 } } } @@ -957,12 +957,12 @@ CALL [1] { SELECT [13] { IDENT [14] { name: @index4 - }.child + }.payload } SELECT [15] { IDENT [16] { name: @index5 - }.child + }.oneof_type } SELECT [17] { IDENT [18] { @@ -974,34 +974,34 @@ CALL [1] { name: @index7 }.single_bool } - SELECT [21] { - IDENT [22] { - name: @index4 - }.payload + CALL [21] { + function: _||_ + args: { + CONSTANT [22] { value: true } + IDENT [23] { + name: @index8 + } + } } - SELECT [23] { - IDENT [24] { - name: @index9 - }.oneof_type + SELECT [24] { + IDENT [25] { + name: @index4 + }.child } - SELECT [25] { - IDENT [26] { + SELECT [26] { + IDENT [27] { name: @index10 - }.payload + }.child } - SELECT [27] { - IDENT [28] { + SELECT [28] { + IDENT [29] { name: @index11 - }.single_bool + }.payload } - CALL [29] { - function: _||_ - args: { - CONSTANT [30] { value: true } - IDENT [31] { - name: @index12 - } - } + SELECT [30] { + IDENT [31] { + name: @index12 + }.single_bool } } } @@ -1009,10 +1009,10 @@ CALL [1] { function: _||_ args: { IDENT [33] { - name: @index13 + name: @index9 } IDENT [34] { - name: @index8 + name: @index13 } } } @@ -1114,7 +1114,7 @@ CALL [1] { IDENT [10] { name: @index2 } - CONSTANT [11] { value: 2 } + CONSTANT [11] { value: 0 } } } CALL [12] { @@ -1127,33 +1127,33 @@ CALL [1] { } } CALL [15] { - function: _[_] + function: _+_ args: { IDENT [16] { - name: @index2 + name: @index3 + } + IDENT [17] { + name: @index4 } - CONSTANT [17] { value: 0 } } } CALL [18] { - function: _+_ + function: _[_] args: { IDENT [19] { - name: @index5 - } - IDENT [20] { - name: @index4 + name: @index2 } + CONSTANT [20] { value: 2 } } } CALL [21] { function: _+_ args: { IDENT [22] { - name: @index6 + name: @index5 } IDENT [23] { - name: @index3 + name: @index6 } } } @@ -1358,14 +1358,12 @@ CALL [1] { }.single_int32 } CALL [7] { - function: _+_ + function: _>_ args: { IDENT [8] { name: @index0 } - IDENT [9] { - name: @index1 - } + CONSTANT [9] { value: 0 } } } CALL [10] { @@ -1378,22 +1376,24 @@ CALL [1] { } } CALL [13] { - function: _?_:_ + function: _+_ args: { IDENT [14] { - name: @index3 + name: @index0 } IDENT [15] { - name: @index2 + name: @index1 } - CONSTANT [16] { value: 0 } } } - CALL [17] { - function: _>_ + CALL [16] { + function: _?_:_ args: { + IDENT [17] { + name: @index3 + } IDENT [18] { - name: @index0 + name: @index4 } CONSTANT [19] { value: 0 } } @@ -1402,10 +1402,10 @@ CALL [1] { function: _?_:_ args: { IDENT [21] { - name: @index5 + name: @index2 } IDENT [22] { - name: @index4 + name: @index5 } CONSTANT [23] { value: 0 } } @@ -1969,43 +1969,43 @@ CALL [1] { CONSTANT [10] { value: 4 } } } - CREATE_LIST [11] { - elements: { - IDENT [12] { - name: @index1 - } - IDENT [13] { - name: @index1 - } - IDENT [14] { - name: @index1 - } - } - } - CALL [15] { + CALL [11] { function: _+_ args: { - IDENT [16] { + IDENT [12] { name: @c1:0 } - CONSTANT [17] { value: 1 } + CONSTANT [13] { value: 1 } } } - CREATE_LIST [18] { + CREATE_LIST [14] { elements: { - IDENT [19] { - name: @index3 + IDENT [15] { + name: @index2 } } } - CALL [20] { + CALL [16] { function: _+_ args: { - IDENT [21] { + IDENT [17] { name: @x1:0 } + IDENT [18] { + name: @index3 + } + } + } + CREATE_LIST [19] { + elements: { + IDENT [20] { + name: @index1 + } + IDENT [21] { + name: @index1 + } IDENT [22] { - name: @index4 + name: @index1 } } } @@ -2059,7 +2059,7 @@ CALL [1] { } loop_step: { IDENT [35] { - name: @index5 + name: @index4 } } result: { @@ -2080,7 +2080,7 @@ CALL [1] { } } IDENT [38] { - name: @index2 + name: @index5 } } } @@ -2096,50 +2096,43 @@ CALL [1] { elements: { CREATE_LIST [3] { elements: { - CONSTANT [4] { value: 2 } + CONSTANT [4] { value: 1 } + CONSTANT [5] { value: 2 } } } - CREATE_LIST [5] { - elements: { - CONSTANT [6] { value: 1 } - } - } - CREATE_LIST [7] { + CREATE_LIST [6] { elements: { - IDENT [8] { - name: @index1 - } - IDENT [9] { - name: @index0 - } + CONSTANT [7] { value: 1 } + CONSTANT [8] { value: 2 } + CONSTANT [9] { value: 3 } } } - CREATE_LIST [10] { - elements: { + CALL [10] { + function: _==_ + args: { IDENT [11] { name: @c1:0 } + IDENT [12] { + name: @c0:0 + } } } - CALL [12] { - function: _+_ - args: { - IDENT [13] { - name: @x1:0 - } + CREATE_LIST [13] { + elements: { IDENT [14] { - name: @index3 + name: @c1:0 } } } CALL [15] { - function: _==_ + function: _+_ args: { IDENT [16] { - name: @c1:0 + name: @x1:0 } IDENT [17] { - name: @c0:0 + name: @index3 } } } @@ -2147,7 +2140,7 @@ CALL [1] { function: _?_:_ args: { IDENT [19] { - name: @index5 + name: @index2 } IDENT [20] { name: @index4 @@ -2160,14 +2153,21 @@ CALL [1] { CREATE_LIST [22] { elements: { CONSTANT [23] { value: 1 } - CONSTANT [24] { value: 2 } - CONSTANT [25] { value: 3 } + } + } + CREATE_LIST [24] { + elements: { + CONSTANT [25] { value: 2 } } } CREATE_LIST [26] { elements: { - CONSTANT [27] { value: 1 } - CONSTANT [28] { value: 2 } + IDENT [27] { + name: @index6 + } + IDENT [28] { + name: @index7 + } } } } @@ -2179,7 +2179,7 @@ CALL [1] { iter_var: @c0:0 iter_range: { IDENT [31] { - name: @index8 + name: @index0 } } accu_var: @x0:0 @@ -2205,7 +2205,7 @@ CALL [1] { iter_var: @c1:0 iter_range: { IDENT [38] { - name: @index7 + name: @index1 } } accu_var: @x1:0 @@ -2220,7 +2220,7 @@ CALL [1] { } loop_step: { IDENT [41] { - name: @index6 + name: @index5 } } result: { @@ -2241,7 +2241,7 @@ CALL [1] { } } IDENT [44] { - name: @index2 + name: @index8 } } } @@ -2271,40 +2271,40 @@ CALL [1] { } } } - CREATE_LIST [10] { - elements: { - CONSTANT [11] { value: 3 } + CALL [10] { + function: @in + args: { + CONSTANT [11] { value: 2 } IDENT [12] { name: @index0 } } } CALL [13] { - function: @in + function: _&&_ args: { - CONSTANT [14] { value: 3 } + IDENT [14] { + name: @index1 + } IDENT [15] { name: @index2 } } } - CALL [16] { - function: _&&_ - args: { - IDENT [17] { - name: @index3 - } + CREATE_LIST [16] { + elements: { + CONSTANT [17] { value: 3 } IDENT [18] { - name: @index1 + name: @index0 } } } CALL [19] { function: @in args: { - CONSTANT [20] { value: 2 } + CONSTANT [20] { value: 3 } IDENT [21] { - name: @index0 + name: @index4 } } } @@ -2312,10 +2312,10 @@ CALL [1] { function: _&&_ args: { IDENT [23] { - name: @index1 + name: @index5 } IDENT [24] { - name: @index5 + name: @index1 } } } @@ -2325,10 +2325,10 @@ CALL [1] { function: _&&_ args: { IDENT [26] { - name: @index6 + name: @index3 } IDENT [27] { - name: @index4 + name: @index6 } } } @@ -2428,28 +2428,28 @@ CALL [1] { CREATE_LIST [12] { elements: { IDENT [13] { - name: @index2 - } - IDENT [14] { - name: @index2 + name: @index1 } } } - CREATE_LIST [15] { - elements: { + CALL [14] { + function: _+_ + args: { + IDENT [15] { + name: @x1:0 + } IDENT [16] { - name: @index1 + name: @index3 } } } - CALL [17] { - function: _+_ - args: { + CREATE_LIST [17] { + elements: { IDENT [18] { - name: @x1:0 + name: @index2 } IDENT [19] { - name: @index4 + name: @index2 } } } @@ -2503,7 +2503,7 @@ CALL [1] { } loop_step: { IDENT [32] { - name: @index5 + name: @index4 } } result: { @@ -2524,7 +2524,7 @@ CALL [1] { } } IDENT [35] { - name: @index3 + name: @index5 } } } @@ -2557,48 +2557,48 @@ CALL [1] { } } CALL [9] { - function: _-_ + function: _?_:_ args: { IDENT [10] { - name: @c0:0 + name: @index1 } - CONSTANT [11] { value: 1 } + IDENT [11] { + name: @index0 + } + CONSTANT [12] { value: 5 } } } - CALL [12] { - function: _>_ - args: { - IDENT [13] { + CREATE_LIST [13] { + elements: { + IDENT [14] { name: @index2 } - CONSTANT [14] { value: 3 } } } CALL [15] { - function: _||_ + function: _-_ args: { IDENT [16] { - name: @x0:0 - } - IDENT [17] { - name: @index3 + name: @c0:0 } + CONSTANT [17] { value: 1 } } } CALL [18] { - function: _?_:_ + function: _>_ args: { IDENT [19] { - name: @index1 - } - IDENT [20] { - name: @index0 + name: @index4 } - CONSTANT [21] { value: 5 } + CONSTANT [20] { value: 3 } } } - CREATE_LIST [22] { - elements: { + CALL [21] { + function: _||_ + args: { + IDENT [22] { + name: @x0:0 + } IDENT [23] { name: @index5 } @@ -2613,7 +2613,7 @@ CALL [1] { iter_var: @c0:0 iter_range: { IDENT [26] { - name: @index6 + name: @index3 } } accu_var: @x0:0 @@ -2637,7 +2637,7 @@ CALL [1] { } loop_step: { IDENT [31] { - name: @index4 + name: @index6 } } result: { @@ -2685,64 +2685,64 @@ CALL [1] { } CREATE_LIST [9] { elements: { - IDENT [10] { - name: @index1 - } - IDENT [11] { - name: @index1 - } + CONSTANT [10] { value: "foo" } + CONSTANT [11] { value: "bar" } } } CREATE_LIST [12] { elements: { IDENT [13] { - name: @index2 + name: @index0 + } + IDENT [14] { + name: @index0 } } } - CALL [14] { - function: _+_ - args: { - IDENT [15] { - name: @x0:0 - } + CREATE_LIST [15] { + elements: { IDENT [16] { name: @index3 } } } - CREATE_LIST [17] { - elements: { + CALL [17] { + function: _+_ + args: { IDENT [18] { - name: @index0 + name: @x1:0 } IDENT [19] { - name: @index0 + name: @index4 } } } CREATE_LIST [20] { elements: { IDENT [21] { - name: @index5 + name: @index1 + } + IDENT [22] { + name: @index1 } } } - CALL [22] { - function: _+_ - args: { - IDENT [23] { - name: @x1:0 - } + CREATE_LIST [23] { + elements: { IDENT [24] { name: @index6 } } } - CREATE_LIST [25] { - elements: { - CONSTANT [26] { value: "foo" } - CONSTANT [27] { value: "bar" } + CALL [25] { + function: _+_ + args: { + IDENT [26] { + name: @x0:0 + } + IDENT [27] { + name: @index7 + } } } } @@ -2754,7 +2754,7 @@ CALL [1] { iter_var: @c1:0 iter_range: { IDENT [30] { - name: @index8 + name: @index2 } } accu_var: @x1:0 @@ -2769,7 +2769,7 @@ CALL [1] { } loop_step: { IDENT [33] { - name: @index7 + name: @index5 } } result: { @@ -2791,7 +2791,7 @@ CALL [1] { } loop_step: { IDENT [37] { - name: @index4 + name: @index8 } } result: { @@ -3138,27 +3138,27 @@ CALL [1] { elements: { CONSTANT [10] { value: 10 } IDENT [11] { - name: @index2 + name: @index0 } IDENT [12] { - name: @index2 + name: @index1 + } + IDENT [13] { + name: @index1 } } + optional_indices: [0] } - CREATE_LIST [13] { + CREATE_LIST [14] { elements: { - CONSTANT [14] { value: 10 } - IDENT [15] { - name: @index0 - } + CONSTANT [15] { value: 10 } IDENT [16] { - name: @index1 + name: @index2 } IDENT [17] { - name: @index1 + name: @index2 } } - optional_indices: [0] } } } @@ -3166,10 +3166,10 @@ CALL [1] { function: _==_ args: { IDENT [19] { - name: @index4 + name: @index3 } IDENT [20] { - name: @index3 + name: @index4 } } } @@ -3254,74 +3254,74 @@ CALL [1] { } } CALL [7] { - function: _[_] - args: { - IDENT [8] { - name: @index0 - } - CONSTANT [9] { value: "key" } - } - } - CALL [10] { - function: _[?_] - args: { - IDENT [11] { - name: @index0 - } - CONSTANT [12] { value: "bogus" } - } - } - CALL [13] { function: optional.of args: { - CONSTANT [14] { value: "test" } + CONSTANT [8] { value: "test" } } } - CREATE_MAP [15] { - MAP_ENTRY [16] { + CREATE_MAP [9] { + MAP_ENTRY [10] { key: { - CONSTANT [17] { value: "key" } + CONSTANT [11] { value: "key" } } optional_entry: true value: { - IDENT [18] { - name: @index3 + IDENT [12] { + name: @index1 } } } } - CALL [19] { + CALL [13] { function: _[?_] args: { - IDENT [20] { - name: @index4 + IDENT [14] { + name: @index2 } - CONSTANT [21] { value: "bogus" } + CONSTANT [15] { value: "bogus" } } } - CALL [22] { + CALL [16] { + function: _[?_] + args: { + IDENT [17] { + name: @index0 + } + CONSTANT [18] { value: "bogus" } + } + } + CALL [19] { function: or target: { - IDENT [23] { - name: @index5 + IDENT [20] { + name: @index3 } } args: { - IDENT [24] { - name: @index2 + IDENT [21] { + name: @index4 + } + } + } + CALL [22] { + function: _[_] + args: { + IDENT [23] { + name: @index0 } + CONSTANT [24] { value: "key" } } } CALL [25] { function: orValue target: { IDENT [26] { - name: @index6 + name: @index5 } } args: { IDENT [27] { - name: @index1 + name: @index6 } } } @@ -3384,21 +3384,21 @@ CALL [1] { SELECT [12] { IDENT [13] { name: @index2 - }.single_int64 + }.single_int32 } SELECT [14] { IDENT [15] { name: @index2 - }.single_int32 + }.single_int64 } CALL [16] { function: _+_ args: { IDENT [17] { - name: @index4 + name: @index3 } IDENT [18] { - name: @index3 + name: @index4 } } } @@ -3617,8 +3617,8 @@ CALL [1] { CALL [3] { function: _+_ args: { - CONSTANT [4] { value: "w" } - CONSTANT [5] { value: "o" } + CONSTANT [4] { value: "h" } + CONSTANT [5] { value: "e" } } } CALL [6] { @@ -3627,7 +3627,7 @@ CALL [1] { IDENT [7] { name: @index0 } - CONSTANT [8] { value: "r" } + CONSTANT [8] { value: "l" } } } CALL [9] { @@ -3645,23 +3645,23 @@ CALL [1] { IDENT [13] { name: @index2 } - CONSTANT [14] { value: "d" } + CONSTANT [14] { value: "o" } } } CALL [15] { function: _+_ args: { - CONSTANT [16] { value: "h" } - CONSTANT [17] { value: "e" } + IDENT [16] { + name: @index3 + } + CONSTANT [17] { value: " world" } } } CALL [18] { function: _+_ args: { - IDENT [19] { - name: @index4 - } - CONSTANT [20] { value: "l" } + CONSTANT [19] { value: "w" } + CONSTANT [20] { value: "o" } } } CALL [21] { @@ -3670,7 +3670,7 @@ CALL [1] { IDENT [22] { name: @index5 } - CONSTANT [23] { value: "l" } + CONSTANT [23] { value: "r" } } } CALL [24] { @@ -3679,7 +3679,7 @@ CALL [1] { IDENT [25] { name: @index6 } - CONSTANT [26] { value: "o" } + CONSTANT [26] { value: "l" } } } CALL [27] { @@ -3688,7 +3688,7 @@ CALL [1] { IDENT [28] { name: @index7 } - CONSTANT [29] { value: " world" } + CONSTANT [29] { value: "d" } } } } @@ -3697,12 +3697,12 @@ CALL [1] { function: matches target: { IDENT [31] { - name: @index8 + name: @index4 } } args: { IDENT [32] { - name: @index3 + name: @index8 } } } @@ -3731,60 +3731,54 @@ CALL [1] { name: @index1 }.single_int64 } - SELECT [9] { - IDENT [10] { - name: msg - }.single_int64 - } - SELECT [11] { - IDENT [12] { - name: @index1 - }.single_int32 - } } } - CALL [13] { + CALL [9] { function: _+_ args: { - CALL [14] { + CALL [10] { function: _+_ args: { - CALL [15] { + CALL [11] { function: _+_ args: { - CALL [16] { + CALL [12] { function: non_pure_custom_func args: { - IDENT [17] { + IDENT [13] { name: @index2 } } } - CALL [18] { + CALL [14] { function: non_pure_custom_func args: { - IDENT [19] { - name: @index4 + SELECT [15] { + IDENT [16] { + name: @index1 + }.single_int32 } } } } } - CALL [20] { + CALL [17] { function: non_pure_custom_func args: { - IDENT [21] { + IDENT [18] { name: @index2 } } } } } - CALL [22] { + CALL [19] { function: non_pure_custom_func args: { - IDENT [23] { - name: @index3 + SELECT [20] { + IDENT [21] { + name: msg + }.single_int64 } } } @@ -3825,8 +3819,8 @@ CALL [1] { } SELECT [11] { IDENT [12] { - name: msg - }.single_int64 + name: @index1 + }.single_int32 } CALL [13] { function: pure_custom_func @@ -3836,38 +3830,38 @@ CALL [1] { } } } - SELECT [15] { - IDENT [16] { - name: @index1 - }.single_int32 - } - CALL [17] { - function: pure_custom_func + CALL [15] { + function: _+_ args: { - IDENT [18] { - name: @index6 + IDENT [16] { + name: @index3 + } + IDENT [17] { + name: @index5 } } } - CALL [19] { + CALL [18] { function: _+_ args: { + IDENT [19] { + name: @index6 + } IDENT [20] { name: @index3 } - IDENT [21] { - name: @index7 - } } } - CALL [22] { - function: _+_ + SELECT [21] { + IDENT [22] { + name: msg + }.single_int64 + } + CALL [23] { + function: pure_custom_func args: { - IDENT [23] { - name: @index8 - } IDENT [24] { - name: @index3 + name: @index8 } } } @@ -3877,10 +3871,10 @@ CALL [1] { function: _+_ args: { IDENT [26] { - name: @index9 + name: @index7 } IDENT [27] { - name: @index5 + name: @index9 } } } diff --git a/optimizer/src/test/resources/subexpression_ast_block_recursion_depth_2.baseline b/optimizer/src/test/resources/subexpression_ast_block_recursion_depth_2.baseline index ff087237a..e294e828b 100644 --- a/optimizer/src/test/resources/subexpression_ast_block_recursion_depth_2.baseline +++ b/optimizer/src/test/resources/subexpression_ast_block_recursion_depth_2.baseline @@ -6,46 +6,43 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 1 } - CONSTANT [5] { value: 2 } - } - } - CALL [6] { + CALL [3] { function: size args: { - IDENT [7] { - name: @index0 + CREATE_LIST [4] { + elements: { + CONSTANT [5] { value: 1 } + CONSTANT [6] { value: 2 } + } } } } - CALL [8] { + CALL [7] { function: _+_ args: { - CALL [9] { + CALL [8] { function: _+_ args: { - IDENT [10] { - name: @index1 + IDENT [9] { + name: @index0 } - IDENT [11] { - name: @index1 + IDENT [10] { + name: @index0 } } } - CONSTANT [12] { value: 1 } + CONSTANT [11] { value: 1 } } } } } - CALL [13] { + CALL [12] { function: _==_ args: { - IDENT [14] { - name: @index2 + IDENT [13] { + name: @index1 } - CONSTANT [15] { value: 5 } + CONSTANT [14] { value: 5 } } } } @@ -58,55 +55,49 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 1 } - CONSTANT [5] { value: 2 } - } - } - CALL [6] { + CALL [3] { function: size args: { - IDENT [7] { - name: @index0 + CREATE_LIST [4] { + elements: { + CONSTANT [5] { value: 1 } + CONSTANT [6] { value: 2 } + } } } } - CALL [8] { + CALL [7] { function: _+_ args: { - CALL [9] { + CALL [8] { function: _+_ args: { - CONSTANT [10] { value: 2 } - IDENT [11] { - name: @index1 + CONSTANT [9] { value: 2 } + IDENT [10] { + name: @index0 } } } - IDENT [12] { - name: @index1 + IDENT [11] { + name: @index0 } } } + } + } + CALL [12] { + function: _==_ + args: { CALL [13] { function: _+_ args: { IDENT [14] { - name: @index2 + name: @index1 } CONSTANT [15] { value: 1 } } } - } - } - CALL [16] { - function: _==_ - args: { - IDENT [17] { - name: @index3 - } - CONSTANT [18] { value: 7 } + CONSTANT [16] { value: 7 } } } } @@ -119,72 +110,63 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 0 } - } - } - CALL [5] { + CALL [3] { function: size args: { - IDENT [6] { - name: @index0 + CREATE_LIST [4] { + elements: { + CONSTANT [5] { value: 0 } + } } } } - CREATE_LIST [7] { - elements: { - CONSTANT [8] { value: 1 } - CONSTANT [9] { value: 2 } - } - } - CALL [10] { + CALL [6] { function: size args: { - IDENT [11] { - name: @index2 + CREATE_LIST [7] { + elements: { + CONSTANT [8] { value: 1 } + CONSTANT [9] { value: 2 } + } } } } - CALL [12] { + CALL [10] { function: _+_ args: { - CALL [13] { + CALL [11] { function: _+_ args: { - IDENT [14] { - name: @index1 + IDENT [12] { + name: @index0 } - IDENT [15] { - name: @index1 + IDENT [13] { + name: @index0 } } } - IDENT [16] { - name: @index3 + IDENT [14] { + name: @index1 } } } - CALL [17] { + } + } + CALL [15] { + function: _==_ + args: { + CALL [16] { function: _+_ args: { - IDENT [18] { - name: @index4 + IDENT [17] { + name: @index2 } - IDENT [19] { - name: @index3 + IDENT [18] { + name: @index1 } } } - } - } - CALL [20] { - function: _==_ - args: { - IDENT [21] { - name: @index5 - } - CONSTANT [22] { value: 6 } + CONSTANT [19] { value: 6 } } } } @@ -197,112 +179,103 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 0 } - } - } - CALL [5] { + CALL [3] { function: size args: { - IDENT [6] { - name: @index0 + CREATE_LIST [4] { + elements: { + CONSTANT [5] { value: 0 } + } } } } - CREATE_LIST [7] { - elements: { - CONSTANT [8] { value: 1 } - CONSTANT [9] { value: 2 } - } - } - CALL [10] { + CALL [6] { function: size args: { - IDENT [11] { - name: @index2 + CREATE_LIST [7] { + elements: { + CONSTANT [8] { value: 1 } + CONSTANT [9] { value: 2 } + } } } } - CREATE_LIST [12] { - elements: { - CONSTANT [13] { value: 1 } - CONSTANT [14] { value: 2 } - CONSTANT [15] { value: 3 } - } - } - CALL [16] { + CALL [10] { function: size args: { - IDENT [17] { - name: @index4 + CREATE_LIST [11] { + elements: { + CONSTANT [12] { value: 1 } + CONSTANT [13] { value: 2 } + CONSTANT [14] { value: 3 } + } } } } - CALL [18] { + CALL [15] { function: _+_ args: { - CALL [19] { + CALL [16] { function: _+_ args: { - CONSTANT [20] { value: 5 } - IDENT [21] { - name: @index1 + CONSTANT [17] { value: 5 } + IDENT [18] { + name: @index0 } } } - IDENT [22] { - name: @index1 + IDENT [19] { + name: @index0 } } } - CALL [23] { + CALL [20] { function: _+_ args: { - CALL [24] { + CALL [21] { function: _+_ args: { - IDENT [25] { - name: @index6 - } - IDENT [26] { + IDENT [22] { name: @index3 } + IDENT [23] { + name: @index1 + } } } - IDENT [27] { - name: @index3 + IDENT [24] { + name: @index1 } } } - CALL [28] { + CALL [25] { function: _+_ args: { - CALL [29] { + CALL [26] { function: _+_ args: { - IDENT [30] { - name: @index7 + IDENT [27] { + name: @index4 } - IDENT [31] { - name: @index5 + IDENT [28] { + name: @index2 } } } - IDENT [32] { - name: @index5 + IDENT [29] { + name: @index2 } } } } } - CALL [33] { + CALL [30] { function: _==_ args: { - IDENT [34] { - name: @index8 + IDENT [31] { + name: @index5 } - CONSTANT [35] { value: 17 } + CONSTANT [32] { value: 17 } } } } @@ -316,154 +289,106 @@ CALL [1] { CREATE_LIST [2] { elements: { CALL [3] { - function: timestamp - args: { - CONSTANT [4] { value: 1000000000 } - } - } - CALL [5] { function: int args: { - IDENT [6] { - name: @index0 - } - } - } - CALL [7] { - function: timestamp - args: { - IDENT [8] { - name: @index1 + CALL [4] { + function: timestamp + args: { + CONSTANT [5] { value: 1000000000 } + } } } } - CALL [9] { + CALL [6] { function: getFullYear target: { - IDENT [10] { - name: @index2 + CALL [7] { + function: timestamp + args: { + IDENT [8] { + name: @index0 + } + } } } args: { } } - CALL [11] { - function: timestamp - args: { - CONSTANT [12] { value: 50 } - } - } - CALL [13] { + CALL [9] { function: int args: { - IDENT [14] { - name: @index4 - } - } - } - CALL [15] { - function: timestamp - args: { - IDENT [16] { - name: @index5 + CALL [10] { + function: timestamp + args: { + CONSTANT [11] { value: 50 } + } } } } - CALL [17] { - function: timestamp - args: { - CONSTANT [18] { value: 200 } - } - } - CALL [19] { + CALL [12] { function: int args: { - IDENT [20] { - name: @index7 - } - } - } - CALL [21] { - function: timestamp - args: { - IDENT [22] { - name: @index8 + CALL [13] { + function: timestamp + args: { + CONSTANT [14] { value: 200 } + } } } } - CALL [23] { + CALL [15] { function: getFullYear target: { - IDENT [24] { - name: @index9 - } - } - args: { - } - } - CALL [25] { - function: timestamp - args: { - CONSTANT [26] { value: 75 } - } - } - CALL [27] { - function: int - args: { - IDENT [28] { - name: @index11 - } - } - } - CALL [29] { - function: timestamp - args: { - IDENT [30] { - name: @index12 - } - } - } - CALL [31] { - function: getMinutes - target: { - IDENT [32] { - name: @index13 + CALL [16] { + function: timestamp + args: { + IDENT [17] { + name: @index3 + } + } } } args: { } } - CALL [33] { - function: getSeconds - target: { - IDENT [34] { - name: @index6 - } - } + CALL [18] { + function: int args: { + CALL [19] { + function: timestamp + args: { + CONSTANT [20] { value: 75 } + } + } } } - CALL [35] { - function: getFullYear - target: { - IDENT [36] { - name: @index6 + CALL [21] { + function: timestamp + args: { + IDENT [22] { + name: @index2 } } + } + CALL [23] { + function: timestamp args: { + IDENT [24] { + name: @index5 + } } } - CALL [37] { + CALL [25] { function: _+_ args: { - IDENT [38] { - name: @index3 + IDENT [26] { + name: @index1 } - CALL [39] { + CALL [27] { function: getFullYear target: { - IDENT [40] { - name: @index13 + IDENT [28] { + name: @index7 } } args: { @@ -471,83 +396,104 @@ CALL [1] { } } } - CALL [41] { + CALL [29] { function: _+_ args: { - CALL [42] { - function: _+_ - args: { - IDENT [43] { - name: @index17 - } - IDENT [44] { - name: @index16 + IDENT [30] { + name: @index8 + } + CALL [31] { + function: getFullYear + target: { + IDENT [32] { + name: @index6 } } - } - IDENT [45] { - name: @index3 + args: { + } } } } - CALL [46] { + CALL [33] { function: _+_ args: { - CALL [47] { + CALL [34] { function: _+_ args: { - IDENT [48] { - name: @index18 + IDENT [35] { + name: @index9 } - IDENT [49] { - name: @index15 + IDENT [36] { + name: @index1 } } } - IDENT [50] { - name: @index10 + CALL [37] { + function: getSeconds + target: { + IDENT [38] { + name: @index6 + } + } + args: { + } } } } - CALL [51] { + CALL [39] { function: _+_ args: { - CALL [52] { + CALL [40] { function: _+_ args: { - IDENT [53] { - name: @index19 - } - IDENT [54] { + IDENT [41] { name: @index10 } + IDENT [42] { + name: @index4 + } } } - IDENT [55] { - name: @index14 + IDENT [43] { + name: @index4 } } } - CALL [56] { + CALL [44] { function: _+_ args: { - IDENT [57] { - name: @index20 + IDENT [45] { + name: @index11 } - IDENT [58] { - name: @index3 + CALL [46] { + function: getMinutes + target: { + IDENT [47] { + name: @index7 + } + } + args: { + } } } } } } - CALL [59] { + CALL [48] { function: _==_ args: { - IDENT [60] { - name: @index21 + CALL [49] { + function: _+_ + args: { + IDENT [50] { + name: @index12 + } + IDENT [51] { + name: @index1 + } + } } - CONSTANT [61] { value: 13934 } + CONSTANT [52] { value: 13934 } } } } @@ -560,39 +506,36 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_MAP [3] { - MAP_ENTRY [4] { - key: { - CONSTANT [5] { value: "a" } - } - value: { - CONSTANT [6] { value: 2 } - } - } - } - CALL [7] { + CALL [3] { function: _[_] args: { - IDENT [8] { - name: @index0 + CREATE_MAP [4] { + MAP_ENTRY [5] { + key: { + CONSTANT [6] { value: "a" } + } + value: { + CONSTANT [7] { value: 2 } + } + } } - CONSTANT [9] { value: "a" } + CONSTANT [8] { value: "a" } } } - CALL [10] { + CALL [9] { function: _+_ args: { - IDENT [11] { - name: @index1 + IDENT [10] { + name: @index0 } - CALL [12] { + CALL [11] { function: _*_ args: { - IDENT [13] { - name: @index1 + IDENT [12] { + name: @index0 } - IDENT [14] { - name: @index1 + IDENT [13] { + name: @index0 } } } @@ -600,13 +543,13 @@ CALL [1] { } } } - CALL [15] { + CALL [14] { function: _==_ args: { - IDENT [16] { - name: @index2 + IDENT [15] { + name: @index1 } - CONSTANT [17] { value: 6 } + CONSTANT [16] { value: 6 } } } } @@ -622,51 +565,48 @@ CALL [1] { CREATE_MAP [3] { MAP_ENTRY [4] { key: { - CONSTANT [5] { value: "b" } + CONSTANT [5] { value: "e" } } value: { - CONSTANT [6] { value: 1 } + CREATE_MAP [6] { + MAP_ENTRY [7] { + key: { + CONSTANT [8] { value: "b" } + } + value: { + CONSTANT [9] { value: 1 } + } + } + } } } } - CREATE_MAP [7] { - MAP_ENTRY [8] { + CREATE_MAP [10] { + MAP_ENTRY [11] { key: { - CONSTANT [9] { value: "e" } + CONSTANT [12] { value: "b" } } value: { - IDENT [10] { - name: @index0 - } + CONSTANT [13] { value: 1 } } } } } } - CREATE_MAP [11] { - MAP_ENTRY [12] { - key: { - CONSTANT [13] { value: "a" } - } - value: { - IDENT [14] { - name: @index0 - } - } - } + CREATE_MAP [14] { MAP_ENTRY [15] { key: { - CONSTANT [16] { value: "c" } + CONSTANT [16] { value: "a" } } value: { IDENT [17] { - name: @index0 + name: @index1 } } } MAP_ENTRY [18] { key: { - CONSTANT [19] { value: "d" } + CONSTANT [19] { value: "c" } } value: { IDENT [20] { @@ -676,11 +616,21 @@ CALL [1] { } MAP_ENTRY [21] { key: { - CONSTANT [22] { value: "e" } + CONSTANT [22] { value: "d" } } value: { IDENT [23] { - name: @index1 + name: @index0 + } + } + } + MAP_ENTRY [24] { + key: { + CONSTANT [25] { value: "e" } + } + value: { + IDENT [26] { + name: @index0 } } } @@ -709,37 +659,34 @@ CALL [1] { CONSTANT [10] { value: 2 } } } - CREATE_LIST [11] { - elements: { - IDENT [12] { - name: @index1 - } - IDENT [13] { - name: @index0 - } - } - } } } - CREATE_LIST [14] { + CREATE_LIST [11] { elements: { - CONSTANT [15] { value: 1 } - IDENT [16] { + CONSTANT [12] { value: 1 } + IDENT [13] { name: @index0 } - CONSTANT [17] { value: 2 } - IDENT [18] { + CONSTANT [14] { value: 2 } + IDENT [15] { name: @index0 } - CONSTANT [19] { value: 5 } - IDENT [20] { + CONSTANT [16] { value: 5 } + IDENT [17] { name: @index0 } - CONSTANT [21] { value: 7 } - IDENT [22] { - name: @index2 + CONSTANT [18] { value: 7 } + CREATE_LIST [19] { + elements: { + IDENT [20] { + name: @index1 + } + IDENT [21] { + name: @index0 + } + } } - IDENT [23] { + IDENT [22] { name: @index1 } } @@ -759,26 +706,23 @@ CALL [1] { name: msg }.single_int64 } - CALL [5] { + } + } + CALL [5] { + function: _==_ + args: { + CALL [6] { function: _+_ args: { - IDENT [6] { + IDENT [7] { name: @index0 } - IDENT [7] { + IDENT [8] { name: @index0 } } } - } - } - CALL [8] { - function: _==_ - args: { - IDENT [9] { - name: @index1 - } - CONSTANT [10] { value: 6 } + CONSTANT [9] { value: 6 } } } } @@ -792,89 +736,80 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 - }.single_int64 - } - SELECT [9] { - SELECT [10] { - IDENT [11] { - name: @index1 + SELECT [4] { + IDENT [5] { + name: msg }.oneof_type }.payload } - SELECT [12] { - IDENT [13] { - name: @index3 - }.single_int64 - } - SELECT [14] { - IDENT [15] { - name: msg + SELECT [6] { + IDENT [7] { + name: @index0 }.single_int64 } - CALL [16] { + CALL [8] { function: _+_ args: { - IDENT [17] { - name: @index2 + IDENT [9] { + name: @index1 } - SELECT [18] { - IDENT [19] { - name: @index1 + SELECT [10] { + IDENT [11] { + name: @index0 }.single_int32 } } } - CALL [20] { + CALL [12] { function: _+_ args: { - CALL [21] { + CALL [13] { function: _+_ args: { - IDENT [22] { - name: @index6 - } - IDENT [23] { + IDENT [14] { name: @index2 } + IDENT [15] { + name: @index1 + } } } - IDENT [24] { - name: @index5 + SELECT [16] { + IDENT [17] { + name: msg + }.single_int64 } } } - CALL [25] { + SELECT [18] { + SELECT [19] { + IDENT [20] { + name: @index0 + }.oneof_type + }.payload + } + CALL [21] { function: _+_ args: { - IDENT [26] { - name: @index7 + IDENT [22] { + name: @index3 } - IDENT [27] { - name: @index4 + SELECT [23] { + IDENT [24] { + name: @index4 + }.single_int64 } } } } } - CALL [28] { + CALL [25] { function: _==_ args: { - IDENT [29] { - name: @index8 + IDENT [26] { + name: @index5 } - CONSTANT [30] { value: 31 } + CONSTANT [27] { value: 31 } } } } @@ -888,76 +823,67 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 + SELECT [4] { + IDENT [5] { + name: msg + }.oneof_type }.payload } - SELECT [7] { - IDENT [8] { - name: @index1 - }.oneof_type + SELECT [6] { + SELECT [7] { + IDENT [8] { + name: @index0 + }.oneof_type + }.payload } SELECT [9] { IDENT [10] { - name: @index2 - }.payload + name: @index1 + }.oneof_type } SELECT [11] { - IDENT [12] { - name: @index3 + SELECT [12] { + IDENT [13] { + name: @index2 + }.payload }.oneof_type } - SELECT [13] { - SELECT [14] { - IDENT [15] { - name: @index4 - }.child - }.child - } - SELECT [16] { - SELECT [17] { - IDENT [18] { - name: @index5 + SELECT [14] { + SELECT [15] { + IDENT [16] { + name: @index3 }.payload }.single_bool } - SELECT [19] { - SELECT [20] { - IDENT [21] { - name: @index4 - }.payload - }.oneof_type + SELECT [17] { + SELECT [18] { + IDENT [19] { + name: @index2 + }.child + }.child } - SELECT [22] { - SELECT [23] { - IDENT [24] { - name: @index7 + SELECT [20] { + SELECT [21] { + IDENT [22] { + name: @index5 }.payload }.single_bool } - CALL [25] { - function: _||_ - args: { - CONSTANT [26] { value: true } - IDENT [27] { - name: @index8 - } - } - } } } - CALL [28] { + CALL [23] { function: _||_ args: { - IDENT [29] { - name: @index9 + CALL [24] { + function: _||_ + args: { + CONSTANT [25] { value: true } + IDENT [26] { + name: @index4 + } + } } - IDENT [30] { + IDENT [27] { name: @index6 } } @@ -973,57 +899,51 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 + SELECT [4] { + IDENT [5] { + name: msg + }.oneof_type }.payload } - SELECT [7] { - IDENT [8] { - name: @index1 - }.map_int32_int64 - } - CALL [9] { + CALL [6] { function: _[_] args: { - IDENT [10] { - name: @index2 + SELECT [7] { + IDENT [8] { + name: @index0 + }.map_int32_int64 } - CONSTANT [11] { value: 1 } + CONSTANT [9] { value: 1 } } } - CALL [12] { + CALL [10] { function: _+_ args: { - CALL [13] { + CALL [11] { function: _+_ args: { - IDENT [14] { - name: @index3 + IDENT [12] { + name: @index1 } - IDENT [15] { - name: @index3 + IDENT [13] { + name: @index1 } } } - IDENT [16] { - name: @index3 + IDENT [14] { + name: @index1 } } } } } - CALL [17] { + CALL [15] { function: _==_ args: { - IDENT [18] { - name: @index4 + IDENT [16] { + name: @index2 } - CONSTANT [19] { value: 15 } + CONSTANT [17] { value: 15 } } } } @@ -1037,72 +957,66 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 + SELECT [4] { + IDENT [5] { + name: msg + }.oneof_type }.payload } - SELECT [7] { - IDENT [8] { - name: @index1 + SELECT [6] { + IDENT [7] { + name: @index0 }.map_int32_int64 } - CALL [9] { - function: _[_] - args: { - IDENT [10] { - name: @index2 - } - CONSTANT [11] { value: 2 } - } - } - CALL [12] { + CALL [8] { function: _+_ args: { - CALL [13] { + CALL [9] { function: _[_] args: { - IDENT [14] { - name: @index2 + IDENT [10] { + name: @index1 } - CONSTANT [15] { value: 0 } + CONSTANT [11] { value: 0 } } } - CALL [16] { + CALL [12] { function: _[_] args: { - IDENT [17] { - name: @index2 + IDENT [13] { + name: @index1 } - CONSTANT [18] { value: 1 } + CONSTANT [14] { value: 1 } } } } } - CALL [19] { + CALL [15] { function: _+_ args: { - IDENT [20] { - name: @index4 + IDENT [16] { + name: @index2 } - IDENT [21] { - name: @index3 + CALL [17] { + function: _[_] + args: { + IDENT [18] { + name: @index1 + } + CONSTANT [19] { value: 2 } + } } } } } } - CALL [22] { + CALL [20] { function: _==_ args: { - IDENT [23] { - name: @index5 + IDENT [21] { + name: @index3 } - CONSTANT [24] { value: 8 } + CONSTANT [22] { value: 8 } } } } @@ -1338,18 +1252,21 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 1 } - } - } - CALL [5] { - function: _>_ + CALL [3] { + function: _||_ args: { - IDENT [6] { - name: @c0:0 + IDENT [4] { + name: @x0:0 + } + CALL [5] { + function: _>_ + args: { + IDENT [6] { + name: @c0:0 + } + CONSTANT [7] { value: 0 } + } } - CONSTANT [7] { value: 0 } } } CALL [8] { @@ -1358,74 +1275,65 @@ CALL [1] { IDENT [9] { name: @x0:0 } - IDENT [10] { - name: @index1 + CALL [10] { + function: _>_ + args: { + IDENT [11] { + name: @c0:0 + } + CONSTANT [12] { value: 1 } + } } } } - CREATE_LIST [11] { + CREATE_LIST [13] { elements: { - CONSTANT [12] { value: 2 } - } - } - CALL [13] { - function: _>_ - args: { - IDENT [14] { - name: @c0:0 - } - CONSTANT [15] { value: 1 } + CONSTANT [14] { value: 1 } } } - CALL [16] { - function: _||_ - args: { - IDENT [17] { - name: @x0:0 - } - IDENT [18] { - name: @index4 - } + CREATE_LIST [15] { + elements: { + CONSTANT [16] { value: 2 } } } } } - CALL [19] { + CALL [17] { function: _==_ args: { - CALL [20] { + CALL [18] { function: _+_ args: { - CALL [21] { + CALL [19] { function: _+_ args: { - CALL [22] { + CALL [20] { function: _+_ args: { - CALL [23] { + CALL [21] { function: size args: { - CREATE_LIST [24] { + CREATE_LIST [22] { elements: { - COMPREHENSION [25] { + COMPREHENSION [23] { iter_var: @c0:0 iter_range: { - IDENT [26] { - name: @index0 + IDENT [24] { + name: @index2 } } accu_var: @x0:0 accu_init: { - CONSTANT [27] { value: false } + CONSTANT [25] { value: false } } loop_condition: { - CALL [28] { + CALL [26] { function: @not_strictly_false args: { - CALL [29] { + CALL [27] { function: !_ args: { - IDENT [30] { + IDENT [28] { name: @x0:0 } } @@ -1434,12 +1342,12 @@ CALL [1] { } } loop_step: { - IDENT [31] { - name: @index2 + IDENT [29] { + name: @index0 } } result: { - IDENT [32] { + IDENT [30] { name: @x0:0 } } @@ -1448,30 +1356,30 @@ CALL [1] { } } } - CALL [33] { + CALL [31] { function: size args: { - CREATE_LIST [34] { + CREATE_LIST [32] { elements: { - COMPREHENSION [35] { + COMPREHENSION [33] { iter_var: @c0:0 iter_range: { - IDENT [36] { - name: @index0 + IDENT [34] { + name: @index2 } } accu_var: @x0:0 accu_init: { - CONSTANT [37] { value: false } + CONSTANT [35] { value: false } } loop_condition: { - CALL [38] { + CALL [36] { function: @not_strictly_false args: { - CALL [39] { + CALL [37] { function: !_ args: { - IDENT [40] { + IDENT [38] { name: @x0:0 } } @@ -1480,12 +1388,12 @@ CALL [1] { } } loop_step: { - IDENT [41] { - name: @index2 + IDENT [39] { + name: @index0 } } result: { - IDENT [42] { + IDENT [40] { name: @x0:0 } } @@ -1496,30 +1404,30 @@ CALL [1] { } } } - CALL [43] { + CALL [41] { function: size args: { - CREATE_LIST [44] { + CREATE_LIST [42] { elements: { - COMPREHENSION [45] { + COMPREHENSION [43] { iter_var: @c0:0 iter_range: { - IDENT [46] { + IDENT [44] { name: @index3 } } accu_var: @x0:0 accu_init: { - CONSTANT [47] { value: false } + CONSTANT [45] { value: false } } loop_condition: { - CALL [48] { + CALL [46] { function: @not_strictly_false args: { - CALL [49] { + CALL [47] { function: !_ args: { - IDENT [50] { + IDENT [48] { name: @x0:0 } } @@ -1528,12 +1436,12 @@ CALL [1] { } } loop_step: { - IDENT [51] { - name: @index5 + IDENT [49] { + name: @index1 } } result: { - IDENT [52] { + IDENT [50] { name: @x0:0 } } @@ -1544,30 +1452,30 @@ CALL [1] { } } } - CALL [53] { + CALL [51] { function: size args: { - CREATE_LIST [54] { + CREATE_LIST [52] { elements: { - COMPREHENSION [55] { + COMPREHENSION [53] { iter_var: @c0:0 iter_range: { - IDENT [56] { + IDENT [54] { name: @index3 } } accu_var: @x0:0 accu_init: { - CONSTANT [57] { value: false } + CONSTANT [55] { value: false } } loop_condition: { - CALL [58] { + CALL [56] { function: @not_strictly_false args: { - CALL [59] { + CALL [57] { function: !_ args: { - IDENT [60] { + IDENT [58] { name: @x0:0 } } @@ -1576,12 +1484,12 @@ CALL [1] { } } loop_step: { - IDENT [61] { - name: @index5 + IDENT [59] { + name: @index1 } } result: { - IDENT [62] { + IDENT [60] { name: @x0:0 } } @@ -1592,112 +1500,106 @@ CALL [1] { } } } - CONSTANT [63] { value: 4 } + CONSTANT [61] { value: 4 } } } } } Test case: MULTIPLE_MACROS_2 Source: [[1].exists(i, i > 0)] + [[1].exists(j, j > 0)] + [['a'].exists(k, k == 'a')] + [['a'].exists(l, l == 'a')] == [true, true, true, true] -=====> -CALL [1] { - function: cel.@block - args: { - CREATE_LIST [2] { - elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 1 } - } - } - CALL [5] { - function: _>_ +=====> +CALL [1] { + function: cel.@block + args: { + CREATE_LIST [2] { + elements: { + CALL [3] { + function: _||_ args: { - IDENT [6] { - name: @c0:0 + IDENT [4] { + name: @x0:0 + } + CALL [5] { + function: _>_ + args: { + IDENT [6] { + name: @c0:0 + } + CONSTANT [7] { value: 0 } + } } - CONSTANT [7] { value: 0 } } } CALL [8] { function: _||_ args: { IDENT [9] { - name: @x0:0 + name: @x0:1 } - IDENT [10] { - name: @index1 + CALL [10] { + function: _==_ + args: { + IDENT [11] { + name: @c0:1 + } + CONSTANT [12] { value: "a" } + } } } } - CREATE_LIST [11] { + CREATE_LIST [13] { elements: { - CONSTANT [12] { value: "a" } - } - } - CALL [13] { - function: _==_ - args: { - IDENT [14] { - name: @c0:1 - } - CONSTANT [15] { value: "a" } + CONSTANT [14] { value: 1 } } } - CALL [16] { - function: _||_ - args: { - IDENT [17] { - name: @x0:1 - } - IDENT [18] { - name: @index4 - } + CREATE_LIST [15] { + elements: { + CONSTANT [16] { value: "a" } } } - CREATE_LIST [19] { + CREATE_LIST [17] { elements: { + CONSTANT [18] { value: true } + CONSTANT [19] { value: true } CONSTANT [20] { value: true } CONSTANT [21] { value: true } - CONSTANT [22] { value: true } - CONSTANT [23] { value: true } } } } } - CALL [24] { + CALL [22] { function: _==_ args: { - CALL [25] { + CALL [23] { function: _+_ args: { - CALL [26] { + CALL [24] { function: _+_ args: { - CALL [27] { + CALL [25] { function: _+_ args: { - CREATE_LIST [28] { + CREATE_LIST [26] { elements: { - COMPREHENSION [29] { + COMPREHENSION [27] { iter_var: @c0:0 iter_range: { - IDENT [30] { - name: @index0 + IDENT [28] { + name: @index2 } } accu_var: @x0:0 accu_init: { - CONSTANT [31] { value: false } + CONSTANT [29] { value: false } } loop_condition: { - CALL [32] { + CALL [30] { function: @not_strictly_false args: { - CALL [33] { + CALL [31] { function: !_ args: { - IDENT [34] { + IDENT [32] { name: @x0:0 } } @@ -1706,39 +1608,39 @@ CALL [1] { } } loop_step: { - IDENT [35] { - name: @index2 + IDENT [33] { + name: @index0 } } result: { - IDENT [36] { + IDENT [34] { name: @x0:0 } } } } } - CREATE_LIST [37] { + CREATE_LIST [35] { elements: { - COMPREHENSION [38] { + COMPREHENSION [36] { iter_var: @c0:0 iter_range: { - IDENT [39] { - name: @index0 + IDENT [37] { + name: @index2 } } accu_var: @x0:0 accu_init: { - CONSTANT [40] { value: false } + CONSTANT [38] { value: false } } loop_condition: { - CALL [41] { + CALL [39] { function: @not_strictly_false args: { - CALL [42] { + CALL [40] { function: !_ args: { - IDENT [43] { + IDENT [41] { name: @x0:0 } } @@ -1747,12 +1649,12 @@ CALL [1] { } } loop_step: { - IDENT [44] { - name: @index2 + IDENT [42] { + name: @index0 } } result: { - IDENT [45] { + IDENT [43] { name: @x0:0 } } @@ -1761,27 +1663,27 @@ CALL [1] { } } } - CREATE_LIST [46] { + CREATE_LIST [44] { elements: { - COMPREHENSION [47] { + COMPREHENSION [45] { iter_var: @c0:1 iter_range: { - IDENT [48] { + IDENT [46] { name: @index3 } } accu_var: @x0:1 accu_init: { - CONSTANT [49] { value: false } + CONSTANT [47] { value: false } } loop_condition: { - CALL [50] { + CALL [48] { function: @not_strictly_false args: { - CALL [51] { + CALL [49] { function: !_ args: { - IDENT [52] { + IDENT [50] { name: @x0:1 } } @@ -1790,12 +1692,12 @@ CALL [1] { } } loop_step: { - IDENT [53] { - name: @index5 + IDENT [51] { + name: @index1 } } result: { - IDENT [54] { + IDENT [52] { name: @x0:1 } } @@ -1804,27 +1706,27 @@ CALL [1] { } } } - CREATE_LIST [55] { + CREATE_LIST [53] { elements: { - COMPREHENSION [56] { + COMPREHENSION [54] { iter_var: @c0:1 iter_range: { - IDENT [57] { + IDENT [55] { name: @index3 } } accu_var: @x0:1 accu_init: { - CONSTANT [58] { value: false } + CONSTANT [56] { value: false } } loop_condition: { - CALL [59] { + CALL [57] { function: @not_strictly_false args: { - CALL [60] { + CALL [58] { function: !_ args: { - IDENT [61] { + IDENT [59] { name: @x0:1 } } @@ -1833,12 +1735,12 @@ CALL [1] { } } loop_step: { - IDENT [62] { - name: @index5 + IDENT [60] { + name: @index1 } } result: { - IDENT [63] { + IDENT [61] { name: @x0:1 } } @@ -1847,8 +1749,8 @@ CALL [1] { } } } - IDENT [64] { - name: @index6 + IDENT [62] { + name: @index4 } } } @@ -1878,119 +1780,116 @@ CALL [1] { } CREATE_LIST [11] { elements: { - IDENT [12] { - name: @index1 - } - IDENT [13] { - name: @index1 - } - IDENT [14] { - name: @index1 - } - } - } - CREATE_LIST [15] { - elements: { - CALL [16] { + CALL [12] { function: _+_ args: { - IDENT [17] { + IDENT [13] { name: @c1:0 } - CONSTANT [18] { value: 1 } + CONSTANT [14] { value: 1 } } } } } - COMPREHENSION [19] { + COMPREHENSION [15] { iter_var: @c1:0 iter_range: { - IDENT [20] { + IDENT [16] { name: @index0 } } accu_var: @x1:0 accu_init: { - CREATE_LIST [21] { + CREATE_LIST [17] { elements: { } } } loop_condition: { - CONSTANT [22] { value: true } + CONSTANT [18] { value: true } } loop_step: { - CALL [23] { + CALL [19] { function: _+_ args: { - IDENT [24] { + IDENT [20] { name: @x1:0 } - IDENT [25] { - name: @index3 + IDENT [21] { + name: @index2 } } } } result: { - IDENT [26] { + IDENT [22] { name: @x1:0 } } } - CALL [27] { + CALL [23] { function: _+_ args: { - IDENT [28] { + IDENT [24] { name: @x0:0 } - CREATE_LIST [29] { + CREATE_LIST [25] { elements: { - IDENT [30] { - name: @index4 + IDENT [26] { + name: @index3 } } } } } - COMPREHENSION [31] { + COMPREHENSION [27] { iter_var: @c0:0 iter_range: { - IDENT [32] { + IDENT [28] { name: @index0 } } accu_var: @x0:0 accu_init: { - CREATE_LIST [33] { + CREATE_LIST [29] { elements: { } } } loop_condition: { - CONSTANT [34] { value: true } + CONSTANT [30] { value: true } } loop_step: { - IDENT [35] { - name: @index5 + IDENT [31] { + name: @index4 } } result: { - IDENT [36] { + IDENT [32] { name: @x0:0 } } } } } - CALL [37] { + CALL [33] { function: _==_ args: { - IDENT [38] { - name: @index6 + IDENT [34] { + name: @index5 } - IDENT [39] { - name: @index2 + CREATE_LIST [35] { + elements: { + IDENT [36] { + name: @index1 + } + IDENT [37] { + name: @index1 + } + IDENT [38] { + name: @index1 + } + } } } } @@ -2004,145 +1903,145 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CREATE_LIST [4] { - elements: { - CONSTANT [5] { value: 1 } - } - } - CREATE_LIST [6] { - elements: { - CONSTANT [7] { value: 2 } - } - } - } - } - CALL [8] { + CALL [3] { function: _+_ args: { - IDENT [9] { + IDENT [4] { name: @x1:0 } - CREATE_LIST [10] { + CREATE_LIST [5] { elements: { - IDENT [11] { + IDENT [6] { name: @c1:0 } } } } } - CALL [12] { + CALL [7] { function: _?_:_ args: { - CALL [13] { + CALL [8] { function: _==_ args: { - IDENT [14] { + IDENT [9] { name: @c1:0 } - IDENT [15] { + IDENT [10] { name: @c0:0 } } } - IDENT [16] { - name: @index1 + IDENT [11] { + name: @index0 } - IDENT [17] { + IDENT [12] { name: @x1:0 } } } - COMPREHENSION [18] { + COMPREHENSION [13] { iter_var: @c1:0 iter_range: { - CREATE_LIST [19] { + CREATE_LIST [14] { elements: { - CONSTANT [20] { value: 1 } - CONSTANT [21] { value: 2 } - CONSTANT [22] { value: 3 } + CONSTANT [15] { value: 1 } + CONSTANT [16] { value: 2 } + CONSTANT [17] { value: 3 } } } } accu_var: @x1:0 accu_init: { - CREATE_LIST [23] { + CREATE_LIST [18] { elements: { } } } loop_condition: { - CONSTANT [24] { value: true } + CONSTANT [19] { value: true } } loop_step: { - IDENT [25] { - name: @index2 + IDENT [20] { + name: @index1 } } result: { - IDENT [26] { + IDENT [21] { name: @x1:0 } } } - CALL [27] { + CALL [22] { function: _+_ args: { - IDENT [28] { + IDENT [23] { name: @x0:0 } - CREATE_LIST [29] { + CREATE_LIST [24] { elements: { - IDENT [30] { - name: @index3 + IDENT [25] { + name: @index2 } } } } } - COMPREHENSION [31] { + COMPREHENSION [26] { iter_var: @c0:0 iter_range: { - CREATE_LIST [32] { + CREATE_LIST [27] { elements: { - CONSTANT [33] { value: 1 } - CONSTANT [34] { value: 2 } + CONSTANT [28] { value: 1 } + CONSTANT [29] { value: 2 } } } } accu_var: @x0:0 accu_init: { - CREATE_LIST [35] { + CREATE_LIST [30] { elements: { } } } loop_condition: { - CONSTANT [36] { value: true } + CONSTANT [31] { value: true } } loop_step: { - IDENT [37] { - name: @index4 + IDENT [32] { + name: @index3 } } result: { - IDENT [38] { + IDENT [33] { name: @x0:0 } } } + CREATE_LIST [34] { + elements: { + CREATE_LIST [35] { + elements: { + CONSTANT [36] { value: 1 } + } + } + CREATE_LIST [37] { + elements: { + CONSTANT [38] { value: 2 } + } + } + } + } } } CALL [39] { function: _==_ args: { IDENT [40] { - name: @index5 + name: @index4 } IDENT [41] { - name: @index0 + name: @index5 } } } @@ -2156,59 +2055,52 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 1 } - CONSTANT [5] { value: 2 } - CONSTANT [6] { value: 3 } - } - } - CALL [7] { - function: @in - args: { - CONSTANT [8] { value: 1 } - IDENT [9] { - name: @index0 - } - } - } - CALL [10] { + CALL [3] { function: @in args: { - CONSTANT [11] { value: 3 } - CREATE_LIST [12] { + CONSTANT [4] { value: 1 } + CREATE_LIST [5] { elements: { - CONSTANT [13] { value: 3 } - IDENT [14] { - name: @index0 - } + CONSTANT [6] { value: 1 } + CONSTANT [7] { value: 2 } + CONSTANT [8] { value: 3 } } } } } - CALL [15] { + CREATE_LIST [9] { + elements: { + CONSTANT [10] { value: 1 } + CONSTANT [11] { value: 2 } + CONSTANT [12] { value: 3 } + } + } + CALL [13] { function: _&&_ args: { - IDENT [16] { - name: @index2 + IDENT [14] { + name: @index0 } - IDENT [17] { - name: @index1 + CALL [15] { + function: @in + args: { + CONSTANT [16] { value: 2 } + IDENT [17] { + name: @index1 + } + } } } } CALL [18] { - function: _&&_ + function: @in args: { - IDENT [19] { - name: @index1 - } - CALL [20] { - function: @in - args: { - CONSTANT [21] { value: 2 } + CONSTANT [19] { value: 3 } + CREATE_LIST [20] { + elements: { + CONSTANT [21] { value: 3 } IDENT [22] { - name: @index0 + name: @index1 } } } @@ -2220,10 +2112,18 @@ CALL [1] { function: _&&_ args: { IDENT [24] { - name: @index4 + name: @index2 } - IDENT [25] { - name: @index3 + CALL [25] { + function: _&&_ + args: { + IDENT [26] { + name: @index3 + } + IDENT [27] { + name: @index0 + } + } } } } @@ -2247,31 +2147,37 @@ CALL [1] { } } } - CREATE_MAP [7] { - MAP_ENTRY [8] { + } + } + CALL [7] { + function: @in + args: { + CONSTANT [8] { value: 2 } + CREATE_MAP [9] { + MAP_ENTRY [10] { key: { - CONSTANT [9] { value: "a" } + CONSTANT [11] { value: "a" } } value: { - CONSTANT [10] { value: 1 } + CONSTANT [12] { value: 1 } } } - MAP_ENTRY [11] { + MAP_ENTRY [13] { key: { - CONSTANT [12] { value: 2 } + CONSTANT [14] { value: 2 } } value: { - IDENT [13] { + IDENT [15] { name: @index0 } } } - MAP_ENTRY [14] { + MAP_ENTRY [16] { key: { - CONSTANT [15] { value: 3 } + CONSTANT [17] { value: 3 } } value: { - IDENT [16] { + IDENT [18] { name: @index0 } } @@ -2279,15 +2185,6 @@ CALL [1] { } } } - CALL [17] { - function: @in - args: { - CONSTANT [18] { value: 2 } - IDENT [19] { - name: @index1 - } - } - } } } Test case: MACRO_ITER_VAR_NOT_REFERENCED @@ -2300,71 +2197,64 @@ CALL [1] { elements: { CREATE_LIST [3] { elements: { - CONSTANT [4] { value: 1 } - CONSTANT [5] { value: 2 } - } - } - CREATE_LIST [6] { - elements: { - CONSTANT [7] { value: 3 } - CONSTANT [8] { value: 4 } - } - } - CREATE_LIST [9] { - elements: { - IDENT [10] { - name: @index1 + CREATE_LIST [4] { + elements: { + CONSTANT [5] { value: 3 } + CONSTANT [6] { value: 4 } + } } - IDENT [11] { - name: @index1 + CREATE_LIST [7] { + elements: { + CONSTANT [8] { value: 3 } + CONSTANT [9] { value: 4 } + } } } } - CREATE_LIST [12] { + CREATE_LIST [10] { elements: { - IDENT [13] { - name: @index2 - } - IDENT [14] { - name: @index2 - } + CONSTANT [11] { value: 1 } + CONSTANT [12] { value: 2 } } } - CALL [15] { - function: _+_ - args: { - IDENT [16] { - name: @x1:0 - } - CREATE_LIST [17] { + CREATE_LIST [13] { + elements: { + CREATE_LIST [14] { elements: { - IDENT [18] { - name: @index1 - } + CONSTANT [15] { value: 3 } + CONSTANT [16] { value: 4 } } } } } - COMPREHENSION [19] { + COMPREHENSION [17] { iter_var: @c1:0 iter_range: { - IDENT [20] { - name: @index0 + IDENT [18] { + name: @index1 } } accu_var: @x1:0 accu_init: { - CREATE_LIST [21] { + CREATE_LIST [19] { elements: { } } } loop_condition: { - CONSTANT [22] { value: true } + CONSTANT [20] { value: true } } loop_step: { - IDENT [23] { - name: @index4 + CALL [21] { + function: _+_ + args: { + IDENT [22] { + name: @x1:0 + } + IDENT [23] { + name: @index2 + } + } } } result: { @@ -2382,7 +2272,7 @@ CALL [1] { CREATE_LIST [27] { elements: { IDENT [28] { - name: @index5 + name: @index3 } } } @@ -2392,7 +2282,7 @@ CALL [1] { iter_var: @c0:0 iter_range: { IDENT [30] { - name: @index0 + name: @index1 } } accu_var: @x0:0 @@ -2407,7 +2297,7 @@ CALL [1] { } loop_step: { IDENT [33] { - name: @index6 + name: @index4 } } result: { @@ -2422,10 +2312,17 @@ CALL [1] { function: _==_ args: { IDENT [36] { - name: @index7 + name: @index5 } - IDENT [37] { - name: @index3 + CREATE_LIST [37] { + elements: { + IDENT [38] { + name: @index0 + } + IDENT [39] { + name: @index0 + } + } } } } @@ -2440,89 +2337,95 @@ CALL [1] { CREATE_LIST [2] { elements: { CALL [3] { - function: _-_ + function: _>_ args: { - IDENT [4] { - name: x + CALL [4] { + function: _-_ + args: { + IDENT [5] { + name: x + } + CONSTANT [6] { value: 1 } + } } - CONSTANT [5] { value: 1 } + CONSTANT [7] { value: 3 } } } - CALL [6] { - function: _>_ + CALL [8] { + function: _?_:_ args: { - IDENT [7] { + IDENT [9] { name: @index0 } - CONSTANT [8] { value: 3 } + CALL [10] { + function: _-_ + args: { + IDENT [11] { + name: x + } + CONSTANT [12] { value: 1 } + } + } + CONSTANT [13] { value: 5 } } } - CALL [9] { + CALL [14] { function: _>_ args: { - CALL [10] { + CALL [15] { function: _-_ args: { - IDENT [11] { + IDENT [16] { name: @c0:0 } - CONSTANT [12] { value: 1 } + CONSTANT [17] { value: 1 } } } - CONSTANT [13] { value: 3 } + CONSTANT [18] { value: 3 } } } - CALL [14] { + CREATE_LIST [19] { + elements: { + IDENT [20] { + name: @index1 + } + } + } + CALL [21] { function: _||_ args: { - IDENT [15] { + IDENT [22] { name: @x0:0 } - IDENT [16] { + IDENT [23] { name: @index2 } } } - CREATE_LIST [17] { - elements: { - CALL [18] { - function: _?_:_ - args: { - IDENT [19] { - name: @index1 - } - IDENT [20] { - name: @index0 - } - CONSTANT [21] { value: 5 } - } - } - } - } } } - CALL [22] { + CALL [24] { function: _||_ args: { - COMPREHENSION [23] { + COMPREHENSION [25] { iter_var: @c0:0 iter_range: { - IDENT [24] { - name: @index4 + IDENT [26] { + name: @index3 } } accu_var: @x0:0 accu_init: { - CONSTANT [25] { value: false } + CONSTANT [27] { value: false } } loop_condition: { - CALL [26] { + CALL [28] { function: @not_strictly_false args: { - CALL [27] { + CALL [29] { function: !_ args: { - IDENT [28] { + IDENT [30] { name: @x0:0 } } @@ -2531,18 +2434,18 @@ CALL [1] { } } loop_step: { - IDENT [29] { - name: @index3 + IDENT [31] { + name: @index4 } } result: { - IDENT [30] { + IDENT [32] { name: @x0:0 } } } - IDENT [31] { - name: @index1 + IDENT [33] { + name: @index0 } } } @@ -2583,105 +2486,102 @@ CALL [1] { CREATE_LIST [10] { elements: { IDENT [11] { - name: @index1 - } - IDENT [12] { - name: @index1 - } - } - } - } - } - CALL [13] { - function: _+_ - args: { - IDENT [14] { - name: @x0:0 - } - IDENT [15] { - name: @index2 - } - } - } - CREATE_LIST [16] { - elements: { - CREATE_LIST [17] { - elements: { - IDENT [18] { name: @index0 } - IDENT [19] { + IDENT [12] { name: @index0 } } } } } - COMPREHENSION [20] { + COMPREHENSION [13] { iter_var: @c1:0 iter_range: { - CREATE_LIST [21] { + CREATE_LIST [14] { elements: { - CONSTANT [22] { value: "foo" } - CONSTANT [23] { value: "bar" } + CONSTANT [15] { value: "foo" } + CONSTANT [16] { value: "bar" } } } } accu_var: @x1:0 accu_init: { - CREATE_LIST [24] { + CREATE_LIST [17] { elements: { } } } loop_condition: { - CONSTANT [25] { value: true } + CONSTANT [18] { value: true } } loop_step: { - CALL [26] { + CALL [19] { function: _+_ args: { - IDENT [27] { + IDENT [20] { name: @x1:0 } - IDENT [28] { - name: @index4 + IDENT [21] { + name: @index2 } } } } result: { - IDENT [29] { + IDENT [22] { name: @x1:0 } } } + CREATE_LIST [23] { + elements: { + CREATE_LIST [24] { + elements: { + IDENT [25] { + name: @index1 + } + IDENT [26] { + name: @index1 + } + } + } + } + } } } - COMPREHENSION [30] { + COMPREHENSION [27] { iter_var: @c0:0 iter_range: { - IDENT [31] { - name: @index5 + IDENT [28] { + name: @index3 } } accu_var: @x0:0 accu_init: { - CREATE_LIST [32] { + CREATE_LIST [29] { elements: { } } } loop_condition: { - CONSTANT [33] { value: true } + CONSTANT [30] { value: true } } loop_step: { - IDENT [34] { - name: @index3 + CALL [31] { + function: _+_ + args: { + IDENT [32] { + name: @x0:0 + } + IDENT [33] { + name: @index4 + } + } } } result: { - IDENT [35] { + IDENT [34] { name: @x0:0 } } @@ -2706,27 +2606,24 @@ CALL [1] { } } } - CALL [7] { - function: _[_] - args: { - IDENT [8] { - name: @index0 - } - CONSTANT [9] { value: "a" } - } - } } } - CALL [10] { + CALL [7] { function: _&&_ args: { - SELECT [11] { - IDENT [12] { + SELECT [8] { + IDENT [9] { name: @index0 }.a~presence_test } - IDENT [13] { - name: @index1 + CALL [10] { + function: _[_] + args: { + IDENT [11] { + name: @index0 + } + CONSTANT [12] { value: "a" } + } } } } @@ -2788,51 +2685,53 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 + SELECT [4] { + IDENT [5] { + name: msg + }.oneof_type }.payload } - SELECT [7] { - IDENT [8] { - name: @index1 + SELECT [6] { + IDENT [7] { + name: @index0 }.single_int64 } - CALL [9] { + SELECT [8] { + IDENT [9] { + name: msg + }.oneof_type + } + CALL [10] { function: _?_:_ args: { - SELECT [10] { - IDENT [11] { - name: @index0 + SELECT [11] { + IDENT [12] { + name: @index2 }.payload~presence_test } - IDENT [12] { - name: @index2 + IDENT [13] { + name: @index1 } - CALL [13] { + CALL [14] { function: _*_ args: { - IDENT [14] { - name: @index2 + IDENT [15] { + name: @index1 } - CONSTANT [15] { value: 0 } + CONSTANT [16] { value: 0 } } } } } } } - CALL [16] { + CALL [17] { function: _==_ args: { - IDENT [17] { + IDENT [18] { name: @index3 } - CONSTANT [18] { value: 10 } + CONSTANT [19] { value: 10 } } } } @@ -2846,51 +2745,48 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 + SELECT [4] { + IDENT [5] { + name: msg + }.oneof_type }.payload } - SELECT [7] { - IDENT [8] { - name: @index1 + SELECT [6] { + IDENT [7] { + name: @index0 }.single_int64 } - CALL [9] { + CALL [8] { function: _?_:_ args: { - SELECT [10] { - IDENT [11] { - name: @index1 + SELECT [9] { + IDENT [10] { + name: @index0 }.single_int64~presence_test } - IDENT [12] { - name: @index2 + IDENT [11] { + name: @index1 } - CALL [13] { + CALL [12] { function: _*_ args: { - IDENT [14] { - name: @index2 + IDENT [13] { + name: @index1 } - CONSTANT [15] { value: 0 } + CONSTANT [14] { value: 0 } } } } } } } - CALL [16] { + CALL [15] { function: _==_ args: { - IDENT [17] { - name: @index3 + IDENT [16] { + name: @index2 } - CONSTANT [18] { value: 10 } + CONSTANT [17] { value: 10 } } } } @@ -2904,96 +2800,95 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 + SELECT [4] { + IDENT [5] { + name: msg + }.oneof_type }.payload } - SELECT [7] { - IDENT [8] { - name: @index1 + SELECT [6] { + IDENT [7] { + name: @index0 }.map_string_string } - CALL [9] { - function: _==_ + CALL [8] { + function: _&&_ args: { - SELECT [10] { - IDENT [11] { - name: @index2 - }.key + SELECT [9] { + IDENT [10] { + name: @index0 + }.map_string_string~presence_test + } + SELECT [11] { + IDENT [12] { + name: @index1 + }.key~presence_test } - CONSTANT [12] { value: "A" } } } CALL [13] { - function: _&&_ + function: _==_ args: { SELECT [14] { IDENT [15] { name: @index1 - }.map_string_string~presence_test - } - SELECT [16] { - IDENT [17] { - name: @index2 - }.key~presence_test + }.key } + CONSTANT [16] { value: "A" } } } - CALL [18] { - function: _?_:_ - args: { - IDENT [19] { - name: @index4 - } - IDENT [20] { - name: @index3 - } - CONSTANT [21] { value: false } - } + SELECT [17] { + IDENT [18] { + name: msg + }.oneof_type } - CALL [22] { + CALL [19] { function: _&&_ args: { - SELECT [23] { - IDENT [24] { + SELECT [20] { + IDENT [21] { name: msg }.oneof_type~presence_test } - SELECT [25] { - IDENT [26] { - name: @index0 + SELECT [22] { + IDENT [23] { + name: @index4 }.payload~presence_test } } } - CALL [27] { + CALL [24] { function: _&&_ args: { - IDENT [28] { - name: @index6 + IDENT [25] { + name: @index5 } - SELECT [29] { - IDENT [30] { - name: @index1 + SELECT [26] { + IDENT [27] { + name: @index0 }.single_int64~presence_test } } } } } - CALL [31] { + CALL [28] { function: _?_:_ args: { - IDENT [32] { - name: @index7 + IDENT [29] { + name: @index6 } - IDENT [33] { - name: @index5 + CALL [30] { + function: _?_:_ + args: { + IDENT [31] { + name: @index2 + } + IDENT [32] { + name: @index3 + } + CONSTANT [33] { value: false } + } } CONSTANT [34] { value: false } } @@ -3008,63 +2903,59 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CALL [3] { - function: optional.none - args: { - } - } - CREATE_LIST [4] { + CREATE_LIST [3] { elements: { - IDENT [5] { - name: @index0 + CALL [4] { + function: optional.none + args: { + } } - IDENT [6] { + IDENT [5] { name: opt_x } } optional_indices: [0, 1] } - CREATE_LIST [7] { + CREATE_LIST [6] { elements: { - CONSTANT [8] { value: 5 } + CONSTANT [7] { value: 5 } } } - CREATE_LIST [9] { + CREATE_LIST [8] { elements: { - CONSTANT [10] { value: 10 } + CONSTANT [9] { value: 10 } + CALL [10] { + function: optional.none + args: { + } + } IDENT [11] { - name: @index2 + name: @index0 } IDENT [12] { - name: @index2 - } - } - } - CREATE_LIST [13] { - elements: { - CONSTANT [14] { value: 10 } - IDENT [15] { name: @index0 } - IDENT [16] { - name: @index1 - } - IDENT [17] { - name: @index1 - } } optional_indices: [0] } } } - CALL [18] { + CALL [13] { function: _==_ args: { - IDENT [19] { - name: @index4 + IDENT [14] { + name: @index2 } - IDENT [20] { - name: @index3 + CREATE_LIST [15] { + elements: { + CONSTANT [16] { value: 10 } + IDENT [17] { + name: @index1 + } + IDENT [18] { + name: @index1 + } + } } } } @@ -3078,54 +2969,48 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CALL [3] { - function: optional.of - args: { - CONSTANT [4] { value: "hello" } - } - } - CREATE_MAP [5] { - MAP_ENTRY [6] { + CREATE_MAP [3] { + MAP_ENTRY [4] { key: { - CONSTANT [7] { value: "hello" } + CONSTANT [5] { value: "hello" } } optional_entry: true value: { - IDENT [8] { - name: @index0 + CALL [6] { + function: optional.of + args: { + CONSTANT [7] { value: "hello" } + } } } } } - CALL [9] { + CALL [8] { function: _[_] args: { - IDENT [10] { - name: @index1 + IDENT [9] { + name: @index0 } - CONSTANT [11] { value: "hello" } + CONSTANT [10] { value: "hello" } } } + } + } + CALL [11] { + function: _==_ + args: { CALL [12] { function: _+_ args: { IDENT [13] { - name: @index2 + name: @index1 } IDENT [14] { - name: @index2 + name: @index1 } } } - } - } - CALL [15] { - function: _==_ - args: { - IDENT [16] { - name: @index3 - } - CONSTANT [17] { value: "hellohello" } + CONSTANT [15] { value: "hellohello" } } } } @@ -3148,81 +3033,75 @@ CALL [1] { } } } - CALL [7] { - function: _[_] - args: { - IDENT [8] { - name: @index0 - } - CONSTANT [9] { value: "key" } - } - } - CALL [10] { - function: _[?_] - args: { - IDENT [11] { - name: @index0 - } - CONSTANT [12] { value: "bogus" } - } - } - CREATE_MAP [13] { - MAP_ENTRY [14] { + CREATE_MAP [7] { + MAP_ENTRY [8] { key: { - CONSTANT [15] { value: "key" } + CONSTANT [9] { value: "key" } } optional_entry: true value: { - CALL [16] { + CALL [10] { function: optional.of args: { - CONSTANT [17] { value: "test" } + CONSTANT [11] { value: "test" } } } } } } - CALL [18] { + CALL [12] { function: or target: { - CALL [19] { + CALL [13] { function: _[?_] args: { - IDENT [20] { - name: @index3 + IDENT [14] { + name: @index1 + } + CONSTANT [15] { value: "bogus" } + } + } + } + args: { + CALL [16] { + function: _[?_] + args: { + IDENT [17] { + name: @index0 } - CONSTANT [21] { value: "bogus" } + CONSTANT [18] { value: "bogus" } } } } - args: { - IDENT [22] { - name: @index2 - } - } } - CALL [23] { + CALL [19] { function: orValue target: { - IDENT [24] { - name: @index4 + IDENT [20] { + name: @index2 } } args: { - IDENT [25] { - name: @index1 + CALL [21] { + function: _[_] + args: { + IDENT [22] { + name: @index0 + } + CONSTANT [23] { value: "key" } + } } } } } } - CALL [26] { + CALL [24] { function: _==_ args: { - IDENT [27] { - name: @index5 + IDENT [25] { + name: @index3 } - CONSTANT [28] { value: "test" } + CONSTANT [26] { value: "test" } } } } @@ -3235,65 +3114,59 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CALL [3] { - function: optional.ofNonZeroValue - args: { - CONSTANT [4] { value: 1 } - } - } - CALL [5] { - function: optional.of - args: { - CONSTANT [6] { value: 4 } - } - } - CREATE_STRUCT [7] { + CREATE_STRUCT [3] { name: TestAllTypes entries: { - ENTRY [8] { + ENTRY [4] { field_key: single_int64 optional_entry: true value: { - IDENT [9] { - name: @index0 + CALL [5] { + function: optional.ofNonZeroValue + args: { + CONSTANT [6] { value: 1 } + } } } } - ENTRY [10] { + ENTRY [7] { field_key: single_int32 optional_entry: true value: { - IDENT [11] { - name: @index1 + CALL [8] { + function: optional.of + args: { + CONSTANT [9] { value: 4 } + } } } } } } - CALL [12] { + CALL [10] { function: _+_ args: { - SELECT [13] { - IDENT [14] { - name: @index2 + SELECT [11] { + IDENT [12] { + name: @index0 }.single_int32 } - SELECT [15] { - IDENT [16] { - name: @index2 + SELECT [13] { + IDENT [14] { + name: @index0 }.single_int64 } } } } } - CALL [17] { + CALL [15] { function: _==_ args: { - IDENT [18] { - name: @index3 + IDENT [16] { + name: @index1 } - CONSTANT [19] { value: 5 } + CONSTANT [17] { value: 5 } } } } @@ -3309,58 +3182,49 @@ CALL [1] { CALL [3] { function: _+_ args: { - CONSTANT [4] { value: "h" } - CONSTANT [5] { value: "e" } - } - } - CALL [6] { - function: _+_ - args: { - IDENT [7] { - name: @index0 - } - CONSTANT [8] { value: "l" } - } - } - CALL [9] { - function: _+_ - args: { - IDENT [10] { - name: @index1 - } - CONSTANT [11] { value: "l" } - } - } - CALL [12] { - function: _+_ - args: { - IDENT [13] { - name: @index2 + CALL [4] { + function: _+_ + args: { + CONSTANT [5] { value: "h" } + CONSTANT [6] { value: "e" } + } } - CONSTANT [14] { value: "o" } + CONSTANT [7] { value: "l" } } } - CALL [15] { + CALL [8] { function: _+_ args: { - IDENT [16] { - name: @index3 + CALL [9] { + function: _+_ + args: { + IDENT [10] { + name: @index0 + } + CONSTANT [11] { value: "l" } + } } - CONSTANT [17] { value: " world" } + CONSTANT [12] { value: "o" } } } } } - CALL [18] { + CALL [13] { function: matches target: { - IDENT [19] { - name: @index4 + CALL [14] { + function: _+_ + args: { + IDENT [15] { + name: @index1 + } + CONSTANT [16] { value: " world" } + } } } args: { - IDENT [20] { - name: @index3 + IDENT [17] { + name: @index1 } } } @@ -3453,26 +3317,23 @@ CALL [1] { CONSTANT [12] { value: "o" } } } - CALL [13] { + } + } + CALL [13] { + function: matches + target: { + CALL [14] { function: _+_ args: { - IDENT [14] { + IDENT [15] { name: @index1 } - CONSTANT [15] { value: " world" } + CONSTANT [16] { value: " world" } } } } - } - CALL [16] { - function: matches - target: { - IDENT [17] { - name: @index2 - } - } args: { - CONSTANT [18] { value: "hello" } + CONSTANT [17] { value: "hello" } } } } @@ -3491,11 +3352,11 @@ CALL [1] { CALL [4] { function: _+_ args: { - CONSTANT [5] { value: "w" } - CONSTANT [6] { value: "o" } + CONSTANT [5] { value: "h" } + CONSTANT [6] { value: "e" } } } - CONSTANT [7] { value: "r" } + CONSTANT [7] { value: "l" } } } CALL [8] { @@ -3510,7 +3371,7 @@ CALL [1] { CONSTANT [11] { value: "l" } } } - CONSTANT [12] { value: "d" } + CONSTANT [12] { value: "o" } } } CALL [13] { @@ -3519,11 +3380,11 @@ CALL [1] { CALL [14] { function: _+_ args: { - CONSTANT [15] { value: "h" } - CONSTANT [16] { value: "e" } + CONSTANT [15] { value: "w" } + CONSTANT [16] { value: "o" } } } - CONSTANT [17] { value: "l" } + CONSTANT [17] { value: "r" } } } CALL [18] { @@ -3538,30 +3399,27 @@ CALL [1] { CONSTANT [21] { value: "l" } } } - CONSTANT [22] { value: "o" } - } - } - CALL [23] { - function: _+_ - args: { - IDENT [24] { - name: @index3 - } - CONSTANT [25] { value: " world" } + CONSTANT [22] { value: "d" } } } } } - CALL [26] { + CALL [23] { function: matches target: { - IDENT [27] { - name: @index4 + CALL [24] { + function: _+_ + args: { + IDENT [25] { + name: @index1 + } + CONSTANT [26] { value: " world" } + } } } args: { - IDENT [28] { - name: @index1 + IDENT [27] { + name: @index3 } } } @@ -3576,74 +3434,65 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 + SELECT [4] { + IDENT [5] { + name: msg + }.oneof_type }.payload } - SELECT [7] { - IDENT [8] { - name: @index1 - }.single_int64 - } - SELECT [9] { - IDENT [10] { - name: msg + SELECT [6] { + IDENT [7] { + name: @index0 }.single_int64 } - SELECT [11] { - IDENT [12] { - name: @index1 - }.single_int32 - } } } - CALL [13] { + CALL [8] { function: _+_ args: { - CALL [14] { + CALL [9] { function: _+_ args: { - CALL [15] { + CALL [10] { function: _+_ args: { - CALL [16] { + CALL [11] { function: non_pure_custom_func args: { - IDENT [17] { - name: @index2 + IDENT [12] { + name: @index1 } } } - CALL [18] { + CALL [13] { function: non_pure_custom_func args: { - IDENT [19] { - name: @index4 + SELECT [14] { + IDENT [15] { + name: @index0 + }.single_int32 } } } } } - CALL [20] { + CALL [16] { function: non_pure_custom_func args: { - IDENT [21] { - name: @index2 + IDENT [17] { + name: @index1 } } } } } - CALL [22] { + CALL [18] { function: non_pure_custom_func args: { - IDENT [23] { - name: @index3 + SELECT [19] { + IDENT [20] { + name: msg + }.single_int64 } } } @@ -3660,76 +3509,70 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 + SELECT [4] { + IDENT [5] { + name: msg + }.oneof_type }.payload } - SELECT [7] { - IDENT [8] { - name: @index1 - }.single_int64 - } - CALL [9] { - function: pure_custom_func - args: { - IDENT [10] { - name: @index2 - } - } - } - CALL [11] { + CALL [6] { function: pure_custom_func args: { - SELECT [12] { - IDENT [13] { - name: msg + SELECT [7] { + IDENT [8] { + name: @index0 }.single_int64 } } } - CALL [14] { + CALL [9] { function: pure_custom_func args: { - SELECT [15] { - IDENT [16] { - name: @index1 + SELECT [10] { + IDENT [11] { + name: @index0 }.single_int32 } } } - CALL [17] { + CALL [12] { function: _+_ args: { - CALL [18] { + CALL [13] { function: _+_ args: { - IDENT [19] { - name: @index3 + IDENT [14] { + name: @index1 } - IDENT [20] { - name: @index5 + IDENT [15] { + name: @index2 } } } - IDENT [21] { - name: @index3 + IDENT [16] { + name: @index1 + } + } + } + CALL [17] { + function: pure_custom_func + args: { + SELECT [18] { + IDENT [19] { + name: msg + }.single_int64 } } } } } - CALL [22] { + CALL [20] { function: _+_ args: { - IDENT [23] { - name: @index6 + IDENT [21] { + name: @index3 } - IDENT [24] { + IDENT [22] { name: @index4 } } diff --git a/optimizer/src/test/resources/subexpression_ast_block_recursion_depth_3.baseline b/optimizer/src/test/resources/subexpression_ast_block_recursion_depth_3.baseline index a0ff868b1..6e9a08799 100644 --- a/optimizer/src/test/resources/subexpression_ast_block_recursion_depth_3.baseline +++ b/optimizer/src/test/resources/subexpression_ast_block_recursion_depth_3.baseline @@ -6,20 +6,22 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 1 } - CONSTANT [5] { value: 2 } - } - } - CALL [6] { + CALL [3] { function: size args: { - IDENT [7] { - name: @index0 + CREATE_LIST [4] { + elements: { + CONSTANT [5] { value: 1 } + CONSTANT [6] { value: 2 } + } } } } + } + } + CALL [7] { + function: _==_ + args: { CALL [8] { function: _+_ args: { @@ -27,25 +29,17 @@ CALL [1] { function: _+_ args: { IDENT [10] { - name: @index1 + name: @index0 } IDENT [11] { - name: @index1 + name: @index0 } } } CONSTANT [12] { value: 1 } } } - } - } - CALL [13] { - function: _==_ - args: { - IDENT [14] { - name: @index2 - } - CONSTANT [15] { value: 5 } + CONSTANT [13] { value: 5 } } } } @@ -58,52 +52,49 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 1 } - CONSTANT [5] { value: 2 } - } - } - CALL [6] { + CALL [3] { function: size args: { - IDENT [7] { - name: @index0 + CREATE_LIST [4] { + elements: { + CONSTANT [5] { value: 1 } + CONSTANT [6] { value: 2 } + } } } } - CALL [8] { + CALL [7] { function: _+_ args: { - CALL [9] { + CALL [8] { function: _+_ args: { - CALL [10] { + CALL [9] { function: _+_ args: { - CONSTANT [11] { value: 2 } - IDENT [12] { - name: @index1 + CONSTANT [10] { value: 2 } + IDENT [11] { + name: @index0 } } } - IDENT [13] { - name: @index1 + IDENT [12] { + name: @index0 } } } - CONSTANT [14] { value: 1 } + CONSTANT [13] { value: 1 } } } } } - CALL [15] { + CALL [14] { function: _==_ args: { - IDENT [16] { - name: @index2 + IDENT [15] { + name: @index1 } - CONSTANT [17] { value: 7 } + CONSTANT [16] { value: 7 } } } } @@ -116,69 +107,63 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 0 } - } - } - CALL [5] { + CALL [3] { function: size args: { - IDENT [6] { - name: @index0 + CREATE_LIST [4] { + elements: { + CONSTANT [5] { value: 0 } + } } } } - CREATE_LIST [7] { - elements: { - CONSTANT [8] { value: 1 } - CONSTANT [9] { value: 2 } - } - } - CALL [10] { + CALL [6] { function: size args: { - IDENT [11] { - name: @index2 + CREATE_LIST [7] { + elements: { + CONSTANT [8] { value: 1 } + CONSTANT [9] { value: 2 } + } } } } - CALL [12] { + CALL [10] { function: _+_ args: { - CALL [13] { + CALL [11] { function: _+_ args: { - CALL [14] { + CALL [12] { function: _+_ args: { - IDENT [15] { - name: @index1 + IDENT [13] { + name: @index0 } - IDENT [16] { - name: @index1 + IDENT [14] { + name: @index0 } } } - IDENT [17] { - name: @index3 + IDENT [15] { + name: @index1 } } } - IDENT [18] { - name: @index3 + IDENT [16] { + name: @index1 } } } } } - CALL [19] { + CALL [17] { function: _==_ args: { - IDENT [20] { - name: @index4 + IDENT [18] { + name: @index2 } - CONSTANT [21] { value: 6 } + CONSTANT [19] { value: 6 } } } } @@ -191,109 +176,100 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 0 } - } - } - CALL [5] { + CALL [3] { function: size args: { - IDENT [6] { - name: @index0 + CREATE_LIST [4] { + elements: { + CONSTANT [5] { value: 0 } + } } } } - CREATE_LIST [7] { - elements: { - CONSTANT [8] { value: 1 } - CONSTANT [9] { value: 2 } - } - } - CALL [10] { + CALL [6] { function: size args: { - IDENT [11] { - name: @index2 + CREATE_LIST [7] { + elements: { + CONSTANT [8] { value: 1 } + CONSTANT [9] { value: 2 } + } } } } - CREATE_LIST [12] { - elements: { - CONSTANT [13] { value: 1 } - CONSTANT [14] { value: 2 } - CONSTANT [15] { value: 3 } - } - } - CALL [16] { + CALL [10] { function: size args: { - IDENT [17] { - name: @index4 + CREATE_LIST [11] { + elements: { + CONSTANT [12] { value: 1 } + CONSTANT [13] { value: 2 } + CONSTANT [14] { value: 3 } + } } } } - CALL [18] { + CALL [15] { function: _+_ args: { - CALL [19] { + CALL [16] { function: _+_ args: { - CALL [20] { + CALL [17] { function: _+_ args: { - CONSTANT [21] { value: 5 } - IDENT [22] { - name: @index1 + CONSTANT [18] { value: 5 } + IDENT [19] { + name: @index0 } } } - IDENT [23] { - name: @index1 + IDENT [20] { + name: @index0 } } } - IDENT [24] { - name: @index3 + IDENT [21] { + name: @index1 } } } - CALL [25] { + CALL [22] { function: _+_ args: { - CALL [26] { + CALL [23] { function: _+_ args: { - CALL [27] { + CALL [24] { function: _+_ args: { - IDENT [28] { - name: @index6 - } - IDENT [29] { + IDENT [25] { name: @index3 } + IDENT [26] { + name: @index1 + } } } - IDENT [30] { - name: @index5 + IDENT [27] { + name: @index2 } } } - IDENT [31] { - name: @index5 + IDENT [28] { + name: @index2 } } } } } - CALL [32] { + CALL [29] { function: _==_ args: { - IDENT [33] { - name: @index7 + IDENT [30] { + name: @index4 } - CONSTANT [34] { value: 17 } + CONSTANT [31] { value: 17 } } } } @@ -309,145 +285,101 @@ CALL [1] { CALL [3] { function: timestamp args: { - CONSTANT [4] { value: 1000000000 } - } - } - CALL [5] { - function: int - args: { - IDENT [6] { - name: @index0 + CALL [4] { + function: int + args: { + CALL [5] { + function: timestamp + args: { + CONSTANT [6] { value: 1000000000 } + } + } + } } } } CALL [7] { function: timestamp args: { - IDENT [8] { - name: @index1 - } - } - } - CALL [9] { - function: getFullYear - target: { - IDENT [10] { - name: @index2 + CALL [8] { + function: int + args: { + CALL [9] { + function: timestamp + args: { + CONSTANT [10] { value: 50 } + } + } + } } } - args: { - } } CALL [11] { function: timestamp args: { - CONSTANT [12] { value: 50 } - } - } - CALL [13] { - function: int - args: { - IDENT [14] { - name: @index4 + CALL [12] { + function: int + args: { + CALL [13] { + function: timestamp + args: { + CONSTANT [14] { value: 200 } + } + } + } } } } CALL [15] { function: timestamp args: { - IDENT [16] { - name: @index5 + CALL [16] { + function: int + args: { + CALL [17] { + function: timestamp + args: { + CONSTANT [18] { value: 75 } + } + } + } } } } - CALL [17] { - function: timestamp - args: { - CONSTANT [18] { value: 200 } - } - } CALL [19] { - function: int - args: { + function: getFullYear + target: { IDENT [20] { - name: @index7 + name: @index0 } } - } - CALL [21] { - function: timestamp args: { - IDENT [22] { - name: @index8 - } } } - CALL [23] { + CALL [21] { function: getFullYear target: { - IDENT [24] { - name: @index9 + IDENT [22] { + name: @index2 } } args: { } } - CALL [25] { - function: timestamp - args: { - CONSTANT [26] { value: 75 } - } - } - CALL [27] { - function: int - args: { - IDENT [28] { - name: @index11 - } - } - } - CALL [29] { - function: timestamp + CALL [23] { + function: _+_ args: { - IDENT [30] { - name: @index12 - } - } - } - CALL [31] { - function: getMinutes - target: { - IDENT [32] { - name: @index13 - } - } - args: { - } - } - CALL [33] { - function: getSeconds - target: { - IDENT [34] { - name: @index6 - } - } - args: { - } - } - CALL [35] { - function: _+_ - args: { - CALL [36] { + CALL [24] { function: _+_ args: { - IDENT [37] { - name: @index3 + IDENT [25] { + name: @index4 } - CALL [38] { + CALL [26] { function: getFullYear target: { - IDENT [39] { - name: @index13 + IDENT [27] { + name: @index3 } } args: { @@ -455,11 +387,11 @@ CALL [1] { } } } - CALL [40] { + CALL [28] { function: getFullYear target: { - IDENT [41] { - name: @index6 + IDENT [29] { + name: @index1 } } args: { @@ -467,69 +399,83 @@ CALL [1] { } } } - CALL [42] { + CALL [30] { function: _+_ args: { - CALL [43] { + CALL [31] { function: _+_ args: { - CALL [44] { + CALL [32] { function: _+_ args: { - IDENT [45] { - name: @index16 + IDENT [33] { + name: @index6 } - IDENT [46] { - name: @index3 + IDENT [34] { + name: @index4 } } } - IDENT [47] { - name: @index15 + CALL [35] { + function: getSeconds + target: { + IDENT [36] { + name: @index1 + } + } + args: { + } } } } - IDENT [48] { - name: @index10 + IDENT [37] { + name: @index5 } } } - CALL [49] { + CALL [38] { function: _+_ args: { - CALL [50] { + CALL [39] { function: _+_ args: { - CALL [51] { + CALL [40] { function: _+_ args: { - IDENT [52] { - name: @index17 + IDENT [41] { + name: @index7 } - IDENT [53] { - name: @index10 + IDENT [42] { + name: @index5 } } } - IDENT [54] { - name: @index14 + CALL [43] { + function: getMinutes + target: { + IDENT [44] { + name: @index3 + } + } + args: { + } } } } - IDENT [55] { - name: @index3 + IDENT [45] { + name: @index4 } } } } } - CALL [56] { + CALL [46] { function: _==_ args: { - IDENT [57] { - name: @index18 + IDENT [47] { + name: @index8 } - CONSTANT [58] { value: 13934 } + CONSTANT [48] { value: 13934 } } } } @@ -542,53 +488,47 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_MAP [3] { - MAP_ENTRY [4] { - key: { - CONSTANT [5] { value: "a" } - } - value: { - CONSTANT [6] { value: 2 } - } - } - } - CALL [7] { + CALL [3] { function: _[_] args: { - IDENT [8] { - name: @index0 + CREATE_MAP [4] { + MAP_ENTRY [5] { + key: { + CONSTANT [6] { value: "a" } + } + value: { + CONSTANT [7] { value: 2 } + } + } } - CONSTANT [9] { value: "a" } + CONSTANT [8] { value: "a" } } } + } + } + CALL [9] { + function: _==_ + args: { CALL [10] { function: _+_ args: { IDENT [11] { - name: @index1 + name: @index0 } CALL [12] { function: _*_ args: { IDENT [13] { - name: @index1 + name: @index0 } IDENT [14] { - name: @index1 + name: @index0 } } } } } - } - } - CALL [15] { - function: _==_ - args: { - IDENT [16] { - name: @index2 - } - CONSTANT [17] { value: 6 } + CONSTANT [15] { value: 6 } } } } @@ -604,51 +544,48 @@ CALL [1] { CREATE_MAP [3] { MAP_ENTRY [4] { key: { - CONSTANT [5] { value: "b" } + CONSTANT [5] { value: "e" } } value: { - CONSTANT [6] { value: 1 } + CREATE_MAP [6] { + MAP_ENTRY [7] { + key: { + CONSTANT [8] { value: "b" } + } + value: { + CONSTANT [9] { value: 1 } + } + } + } } } } - CREATE_MAP [7] { - MAP_ENTRY [8] { + CREATE_MAP [10] { + MAP_ENTRY [11] { key: { - CONSTANT [9] { value: "e" } + CONSTANT [12] { value: "b" } } value: { - IDENT [10] { - name: @index0 - } + CONSTANT [13] { value: 1 } } } } } } - CREATE_MAP [11] { - MAP_ENTRY [12] { - key: { - CONSTANT [13] { value: "a" } - } - value: { - IDENT [14] { - name: @index0 - } - } - } + CREATE_MAP [14] { MAP_ENTRY [15] { key: { - CONSTANT [16] { value: "c" } + CONSTANT [16] { value: "a" } } value: { IDENT [17] { - name: @index0 + name: @index1 } } } MAP_ENTRY [18] { key: { - CONSTANT [19] { value: "d" } + CONSTANT [19] { value: "c" } } value: { IDENT [20] { @@ -658,11 +595,21 @@ CALL [1] { } MAP_ENTRY [21] { key: { - CONSTANT [22] { value: "e" } + CONSTANT [22] { value: "d" } } value: { IDENT [23] { - name: @index1 + name: @index0 + } + } + } + MAP_ENTRY [24] { + key: { + CONSTANT [25] { value: "e" } + } + value: { + IDENT [26] { + name: @index0 } } } @@ -691,37 +638,34 @@ CALL [1] { CONSTANT [10] { value: 2 } } } - CREATE_LIST [11] { - elements: { - IDENT [12] { - name: @index1 - } - IDENT [13] { - name: @index0 - } - } - } } } - CREATE_LIST [14] { + CREATE_LIST [11] { elements: { - CONSTANT [15] { value: 1 } - IDENT [16] { + CONSTANT [12] { value: 1 } + IDENT [13] { name: @index0 } - CONSTANT [17] { value: 2 } - IDENT [18] { + CONSTANT [14] { value: 2 } + IDENT [15] { name: @index0 } - CONSTANT [19] { value: 5 } - IDENT [20] { + CONSTANT [16] { value: 5 } + IDENT [17] { name: @index0 } - CONSTANT [21] { value: 7 } - IDENT [22] { - name: @index2 + CONSTANT [18] { value: 7 } + CREATE_LIST [19] { + elements: { + IDENT [20] { + name: @index1 + } + IDENT [21] { + name: @index0 + } + } } - IDENT [23] { + IDENT [22] { name: @index1 } } @@ -741,26 +685,23 @@ CALL [1] { name: msg }.single_int64 } - CALL [5] { + } + } + CALL [5] { + function: _==_ + args: { + CALL [6] { function: _+_ args: { - IDENT [6] { + IDENT [7] { name: @index0 } - IDENT [7] { + IDENT [8] { name: @index0 } } } - } - } - CALL [8] { - function: _==_ - args: { - IDENT [9] { - name: @index1 - } - CONSTANT [10] { value: 6 } + CONSTANT [9] { value: 6 } } } } @@ -774,66 +715,64 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 - }.single_int64 - } - SELECT [9] { - SELECT [10] { - SELECT [11] { - IDENT [12] { - name: @index1 + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg }.oneof_type }.payload }.single_int64 } - SELECT [13] { - IDENT [14] { - name: msg - }.single_int64 + SELECT [7] { + SELECT [8] { + IDENT [9] { + name: msg + }.oneof_type + }.payload } - CALL [15] { + CALL [10] { function: _+_ args: { - CALL [16] { + CALL [11] { function: _+_ args: { - IDENT [17] { - name: @index2 + IDENT [12] { + name: @index0 } - SELECT [18] { - IDENT [19] { + SELECT [13] { + IDENT [14] { name: @index1 }.single_int32 } } } - IDENT [20] { - name: @index2 + IDENT [15] { + name: @index0 } } } - CALL [21] { + SELECT [16] { + SELECT [17] { + SELECT [18] { + IDENT [19] { + name: @index1 + }.oneof_type + }.payload + }.single_int64 + } + CALL [20] { function: _+_ args: { - CALL [22] { + CALL [21] { function: _+_ args: { - IDENT [23] { - name: @index5 + IDENT [22] { + name: @index2 } - IDENT [24] { - name: @index4 + SELECT [23] { + IDENT [24] { + name: msg + }.single_int64 } } } @@ -848,7 +787,7 @@ CALL [1] { function: _==_ args: { IDENT [27] { - name: @index6 + name: @index4 } CONSTANT [28] { value: 31 } } @@ -864,74 +803,59 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg + }.oneof_type + }.payload }.oneof_type } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } SELECT [7] { - IDENT [8] { - name: @index1 + SELECT [8] { + IDENT [9] { + name: @index0 + }.payload }.oneof_type } - SELECT [9] { - IDENT [10] { - name: @index2 + SELECT [10] { + SELECT [11] { + SELECT [12] { + IDENT [13] { + name: @index1 + }.payload + }.oneof_type }.payload } - SELECT [11] { - IDENT [12] { - name: @index3 - }.oneof_type - } - SELECT [13] { - SELECT [14] { - SELECT [15] { - IDENT [16] { - name: @index4 + SELECT [14] { + SELECT [15] { + SELECT [16] { + IDENT [17] { + name: @index1 }.child }.child }.payload } - SELECT [17] { - IDENT [18] { - name: @index5 - }.single_bool - } - SELECT [19] { - SELECT [20] { - SELECT [21] { - IDENT [22] { - name: @index4 - }.payload - }.oneof_type - }.payload - } - CALL [23] { + } + } + CALL [18] { + function: _||_ + args: { + CALL [19] { function: _||_ args: { - CONSTANT [24] { value: true } - SELECT [25] { - IDENT [26] { - name: @index7 + CONSTANT [20] { value: true } + SELECT [21] { + IDENT [22] { + name: @index2 }.single_bool } } } - } - } - CALL [27] { - function: _||_ - args: { - IDENT [28] { - name: @index8 - } - IDENT [29] { - name: @index6 + SELECT [23] { + IDENT [24] { + name: @index3 + }.single_bool } } } @@ -946,57 +870,48 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg + }.oneof_type + }.payload }.map_int32_int64 } - CALL [9] { + CALL [7] { function: _[_] args: { - IDENT [10] { - name: @index2 + IDENT [8] { + name: @index0 } - CONSTANT [11] { value: 1 } + CONSTANT [9] { value: 1 } } } - CALL [12] { + } + } + CALL [10] { + function: _==_ + args: { + CALL [11] { function: _+_ args: { - CALL [13] { + CALL [12] { function: _+_ args: { - IDENT [14] { - name: @index3 + IDENT [13] { + name: @index1 } - IDENT [15] { - name: @index3 + IDENT [14] { + name: @index1 } } } - IDENT [16] { - name: @index3 + IDENT [15] { + name: @index1 } } } - } - } - CALL [17] { - function: _==_ - args: { - IDENT [18] { - name: @index4 - } - CONSTANT [19] { value: 15 } + CONSTANT [16] { value: 15 } } } } @@ -1010,66 +925,60 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg + }.oneof_type + }.payload }.map_int32_int64 } - CALL [9] { + CALL [7] { function: _+_ args: { - CALL [10] { + CALL [8] { function: _+_ args: { - CALL [11] { + CALL [9] { function: _[_] args: { - IDENT [12] { - name: @index2 + IDENT [10] { + name: @index0 } - CONSTANT [13] { value: 0 } + CONSTANT [11] { value: 0 } } } - CALL [14] { + CALL [12] { function: _[_] args: { - IDENT [15] { - name: @index2 + IDENT [13] { + name: @index0 } - CONSTANT [16] { value: 1 } + CONSTANT [14] { value: 1 } } } } } - CALL [17] { + CALL [15] { function: _[_] args: { - IDENT [18] { - name: @index2 + IDENT [16] { + name: @index0 } - CONSTANT [19] { value: 2 } + CONSTANT [17] { value: 2 } } } } } } } - CALL [20] { + CALL [18] { function: _==_ args: { - IDENT [21] { - name: @index3 + IDENT [19] { + name: @index1 } - CONSTANT [22] { value: 8 } + CONSTANT [20] { value: 8 } } } } @@ -1100,18 +1009,15 @@ CALL [1] { }.oneof_type }.payload } - SELECT [11] { - SELECT [12] { - IDENT [13] { - name: @index1 - }.oneof_type - }.payload - } } } - SELECT [14] { - IDENT [15] { - name: @index2 + SELECT [11] { + SELECT [12] { + SELECT [13] { + IDENT [14] { + name: @index1 + }.oneof_type + }.payload }.single_int64 } } @@ -1129,33 +1035,30 @@ CALL [1] { name: msg }.single_int64 } - CALL [5] { + } + } + CALL [5] { + function: _==_ + args: { + CALL [6] { function: _?_:_ args: { - CALL [6] { + CALL [7] { function: _>_ args: { - IDENT [7] { + IDENT [8] { name: @index0 } - CONSTANT [8] { value: 0 } + CONSTANT [9] { value: 0 } } } - IDENT [9] { + IDENT [10] { name: @index0 } - CONSTANT [10] { value: 0 } + CONSTANT [11] { value: 0 } } } - } - } - CALL [11] { - function: _==_ - args: { - IDENT [12] { - name: @index1 - } - CONSTANT [13] { value: 3 } + CONSTANT [12] { value: 3 } } } } @@ -1196,27 +1099,24 @@ CALL [1] { } } } - CALL [12] { + } + } + CALL [12] { + function: _?_:_ + args: { + CONSTANT [13] { value: false } + CONSTANT [14] { value: false } + CALL [15] { function: _==_ args: { - IDENT [13] { + IDENT [16] { name: @index1 } - CONSTANT [14] { value: 11 } + CONSTANT [17] { value: 11 } } } } } - CALL [15] { - function: _?_:_ - args: { - CONSTANT [16] { value: false } - CONSTANT [17] { value: false } - IDENT [18] { - name: @index2 - } - } - } } } Test case: NESTED_TERNARY @@ -1299,50 +1199,80 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 1 } + COMPREHENSION [3] { + iter_var: @c0:0 + iter_range: { + CREATE_LIST [4] { + elements: { + CONSTANT [5] { value: 1 } + } + } } - } - CALL [5] { - function: _>_ - args: { - IDENT [6] { - name: @c0:0 + accu_var: @x0:0 + accu_init: { + CONSTANT [6] { value: false } + } + loop_condition: { + CALL [7] { + function: @not_strictly_false + args: { + CALL [8] { + function: !_ + args: { + IDENT [9] { + name: @x0:0 + } + } + } + } } - CONSTANT [7] { value: 0 } } - } - CALL [8] { - function: _||_ - args: { - IDENT [9] { - name: @x0:0 + loop_step: { + CALL [10] { + function: _||_ + args: { + IDENT [11] { + name: @x0:0 + } + CALL [12] { + function: _>_ + args: { + IDENT [13] { + name: @c0:0 + } + CONSTANT [14] { value: 0 } + } + } + } } - IDENT [10] { - name: @index1 + } + result: { + IDENT [15] { + name: @x0:0 } } } - COMPREHENSION [11] { + COMPREHENSION [16] { iter_var: @c0:0 iter_range: { - IDENT [12] { - name: @index0 + CREATE_LIST [17] { + elements: { + CONSTANT [18] { value: 2 } + } } } accu_var: @x0:0 accu_init: { - CONSTANT [13] { value: false } + CONSTANT [19] { value: false } } loop_condition: { - CALL [14] { + CALL [20] { function: @not_strictly_false args: { - CALL [15] { + CALL [21] { function: !_ args: { - IDENT [16] { + IDENT [22] { name: @x0:0 } } @@ -1351,144 +1281,90 @@ CALL [1] { } } loop_step: { - IDENT [17] { - name: @index2 + CALL [23] { + function: _||_ + args: { + IDENT [24] { + name: @x0:0 + } + CALL [25] { + function: _>_ + args: { + IDENT [26] { + name: @c0:0 + } + CONSTANT [27] { value: 1 } + } + } + } } } result: { - IDENT [18] { + IDENT [28] { name: @x0:0 } } } - CREATE_LIST [19] { - elements: { - IDENT [20] { - name: @index3 - } - } - } - CALL [21] { + CALL [29] { function: size args: { - IDENT [22] { - name: @index4 - } - } - } - CREATE_LIST [23] { - elements: { - CONSTANT [24] { value: 2 } - } - } - CALL [25] { - function: _>_ - args: { - IDENT [26] { - name: @c0:0 - } - CONSTANT [27] { value: 1 } - } - } - CALL [28] { - function: _||_ - args: { - IDENT [29] { - name: @x0:0 - } - IDENT [30] { - name: @index7 - } - } - } - COMPREHENSION [31] { - iter_var: @c0:0 - iter_range: { - IDENT [32] { - name: @index6 - } - } - accu_var: @x0:0 - accu_init: { - CONSTANT [33] { value: false } - } - loop_condition: { - CALL [34] { - function: @not_strictly_false - args: { - CALL [35] { - function: !_ - args: { - IDENT [36] { - name: @x0:0 - } - } + CREATE_LIST [30] { + elements: { + IDENT [31] { + name: @index0 } } } } - loop_step: { - IDENT [37] { - name: @index8 - } - } - result: { - IDENT [38] { - name: @x0:0 - } - } - } - CREATE_LIST [39] { - elements: { - IDENT [40] { - name: @index9 - } - } } - CALL [41] { + CALL [32] { function: size args: { - IDENT [42] { - name: @index10 + CREATE_LIST [33] { + elements: { + IDENT [34] { + name: @index1 + } + } } } } - CALL [43] { + CALL [35] { function: _+_ args: { - CALL [44] { + CALL [36] { function: _+_ args: { - CALL [45] { + CALL [37] { function: _+_ args: { - IDENT [46] { - name: @index5 + IDENT [38] { + name: @index2 } - IDENT [47] { - name: @index5 + IDENT [39] { + name: @index2 } } } - IDENT [48] { - name: @index11 + IDENT [40] { + name: @index3 } } } - IDENT [49] { - name: @index11 + IDENT [41] { + name: @index3 } } } } } - CALL [50] { + CALL [42] { function: _==_ args: { - IDENT [51] { - name: @index12 + IDENT [43] { + name: @index4 } - CONSTANT [52] { value: 4 } + CONSTANT [44] { value: 4 } } } } @@ -1501,50 +1377,27 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 1 } - } - } - CALL [5] { - function: _>_ - args: { - IDENT [6] { - name: @c0:0 - } - CONSTANT [7] { value: 0 } - } - } - CALL [8] { - function: _||_ - args: { - IDENT [9] { - name: @x0:0 - } - IDENT [10] { - name: @index1 - } - } - } - COMPREHENSION [11] { + COMPREHENSION [3] { iter_var: @c0:0 iter_range: { - IDENT [12] { - name: @index0 + CREATE_LIST [4] { + elements: { + CONSTANT [5] { value: 1 } + } } } accu_var: @x0:0 accu_init: { - CONSTANT [13] { value: false } + CONSTANT [6] { value: false } } loop_condition: { - CALL [14] { + CALL [7] { function: @not_strictly_false args: { - CALL [15] { + CALL [8] { function: !_ args: { - IDENT [16] { + IDENT [9] { name: @x0:0 } } @@ -1553,67 +1406,51 @@ CALL [1] { } } loop_step: { - IDENT [17] { - name: @index2 + CALL [10] { + function: _||_ + args: { + IDENT [11] { + name: @x0:0 + } + CALL [12] { + function: _>_ + args: { + IDENT [13] { + name: @c0:0 + } + CONSTANT [14] { value: 0 } + } + } + } } } result: { - IDENT [18] { + IDENT [15] { name: @x0:0 } } } - CREATE_LIST [19] { - elements: { - IDENT [20] { - name: @index3 - } - } - } - CREATE_LIST [21] { - elements: { - CONSTANT [22] { value: "a" } - } - } - CALL [23] { - function: _==_ - args: { - IDENT [24] { - name: @c0:1 - } - CONSTANT [25] { value: "a" } - } - } - CALL [26] { - function: _||_ - args: { - IDENT [27] { - name: @x0:1 - } - IDENT [28] { - name: @index6 - } - } - } - COMPREHENSION [29] { + COMPREHENSION [16] { iter_var: @c0:1 iter_range: { - IDENT [30] { - name: @index5 + CREATE_LIST [17] { + elements: { + CONSTANT [18] { value: "a" } + } } } accu_var: @x0:1 accu_init: { - CONSTANT [31] { value: false } + CONSTANT [19] { value: false } } loop_condition: { - CALL [32] { + CALL [20] { function: @not_strictly_false args: { - CALL [33] { + CALL [21] { function: !_ args: { - IDENT [34] { + IDENT [22] { name: @x0:1 } } @@ -1622,68 +1459,86 @@ CALL [1] { } } loop_step: { - IDENT [35] { - name: @index7 + CALL [23] { + function: _||_ + args: { + IDENT [24] { + name: @x0:1 + } + CALL [25] { + function: _==_ + args: { + IDENT [26] { + name: @c0:1 + } + CONSTANT [27] { value: "a" } + } + } + } } } result: { - IDENT [36] { + IDENT [28] { name: @x0:1 } } } - CREATE_LIST [37] { + CREATE_LIST [29] { elements: { - IDENT [38] { - name: @index8 + IDENT [30] { + name: @index0 } } } - CREATE_LIST [39] { + CREATE_LIST [31] { elements: { - CONSTANT [40] { value: true } - CONSTANT [41] { value: true } - CONSTANT [42] { value: true } - CONSTANT [43] { value: true } + IDENT [32] { + name: @index1 + } } } - CALL [44] { + CALL [33] { function: _+_ args: { - CALL [45] { + CALL [34] { function: _+_ args: { - CALL [46] { + CALL [35] { function: _+_ args: { - IDENT [47] { - name: @index4 + IDENT [36] { + name: @index2 } - IDENT [48] { - name: @index4 + IDENT [37] { + name: @index2 } } } - IDENT [49] { - name: @index9 + IDENT [38] { + name: @index3 } } } - IDENT [50] { - name: @index9 + IDENT [39] { + name: @index3 } } } } } - CALL [51] { + CALL [40] { function: _==_ args: { - IDENT [52] { - name: @index11 + IDENT [41] { + name: @index4 } - IDENT [53] { - name: @index10 + CREATE_LIST [42] { + elements: { + CONSTANT [43] { value: true } + CONSTANT [44] { value: true } + CONSTANT [45] { value: true } + CONSTANT [46] { value: true } + } } } } @@ -1711,121 +1566,115 @@ CALL [1] { CONSTANT [10] { value: 4 } } } - CREATE_LIST [11] { - elements: { - IDENT [12] { - name: @index1 - } - IDENT [13] { - name: @index1 - } - IDENT [14] { - name: @index1 - } - } - } - CALL [15] { + CALL [11] { function: _+_ args: { - IDENT [16] { + IDENT [12] { name: @x1:0 } - CREATE_LIST [17] { + CREATE_LIST [13] { elements: { - CALL [18] { + CALL [14] { function: _+_ args: { - IDENT [19] { + IDENT [15] { name: @c1:0 } - CONSTANT [20] { value: 1 } + CONSTANT [16] { value: 1 } } } } } } } - CREATE_LIST [21] { + CREATE_LIST [17] { elements: { - COMPREHENSION [22] { + COMPREHENSION [18] { iter_var: @c1:0 iter_range: { - IDENT [23] { + IDENT [19] { name: @index0 } } accu_var: @x1:0 accu_init: { - CREATE_LIST [24] { + CREATE_LIST [20] { elements: { } } } loop_condition: { - CONSTANT [25] { value: true } + CONSTANT [21] { value: true } } loop_step: { - IDENT [26] { - name: @index3 + IDENT [22] { + name: @index2 } } result: { - IDENT [27] { + IDENT [23] { name: @x1:0 } } } } } - COMPREHENSION [28] { + } + } + CALL [24] { + function: _==_ + args: { + COMPREHENSION [25] { iter_var: @c0:0 iter_range: { - IDENT [29] { + IDENT [26] { name: @index0 } } accu_var: @x0:0 accu_init: { - CREATE_LIST [30] { + CREATE_LIST [27] { elements: { } } } loop_condition: { - CONSTANT [31] { value: true } + CONSTANT [28] { value: true } } loop_step: { - CALL [32] { + CALL [29] { function: _+_ args: { - IDENT [33] { + IDENT [30] { name: @x0:0 } - IDENT [34] { - name: @index4 + IDENT [31] { + name: @index3 } } } } result: { - IDENT [35] { + IDENT [32] { name: @x0:0 } } } - } - } - CALL [36] { - function: _==_ - args: { - IDENT [37] { - name: @index5 - } - IDENT [38] { - name: @index2 - } - } - } + CREATE_LIST [33] { + elements: { + IDENT [34] { + name: @index1 + } + IDENT [35] { + name: @index1 + } + IDENT [36] { + name: @index1 + } + } + } + } + } } } Test case: NESTED_MACROS_2 @@ -1836,139 +1685,133 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CREATE_LIST [4] { - elements: { - CONSTANT [5] { value: 1 } - } - } - CREATE_LIST [6] { - elements: { - CONSTANT [7] { value: 2 } - } - } - } - } - CALL [8] { + CALL [3] { function: _?_:_ args: { - CALL [9] { + CALL [4] { function: _==_ args: { - IDENT [10] { + IDENT [5] { name: @c1:0 } - IDENT [11] { + IDENT [6] { name: @c0:0 } } } - CALL [12] { + CALL [7] { function: _+_ args: { - IDENT [13] { + IDENT [8] { name: @x1:0 } - CREATE_LIST [14] { + CREATE_LIST [9] { elements: { - IDENT [15] { + IDENT [10] { name: @c1:0 } } } } } - IDENT [16] { + IDENT [11] { name: @x1:0 } } } - CREATE_LIST [17] { + CREATE_LIST [12] { elements: { - COMPREHENSION [18] { + COMPREHENSION [13] { iter_var: @c1:0 iter_range: { - CREATE_LIST [19] { + CREATE_LIST [14] { elements: { - CONSTANT [20] { value: 1 } - CONSTANT [21] { value: 2 } - CONSTANT [22] { value: 3 } + CONSTANT [15] { value: 1 } + CONSTANT [16] { value: 2 } + CONSTANT [17] { value: 3 } } } } accu_var: @x1:0 accu_init: { - CREATE_LIST [23] { + CREATE_LIST [18] { elements: { } } } loop_condition: { - CONSTANT [24] { value: true } + CONSTANT [19] { value: true } } loop_step: { - IDENT [25] { - name: @index1 + IDENT [20] { + name: @index0 } } result: { - IDENT [26] { + IDENT [21] { name: @x1:0 } } } } } - COMPREHENSION [27] { + } + } + CALL [22] { + function: _==_ + args: { + COMPREHENSION [23] { iter_var: @c0:0 iter_range: { - CREATE_LIST [28] { + CREATE_LIST [24] { elements: { - CONSTANT [29] { value: 1 } - CONSTANT [30] { value: 2 } + CONSTANT [25] { value: 1 } + CONSTANT [26] { value: 2 } } } } accu_var: @x0:0 accu_init: { - CREATE_LIST [31] { + CREATE_LIST [27] { elements: { } } } loop_condition: { - CONSTANT [32] { value: true } + CONSTANT [28] { value: true } } loop_step: { - CALL [33] { + CALL [29] { function: _+_ args: { - IDENT [34] { + IDENT [30] { name: @x0:0 } - IDENT [35] { - name: @index2 + IDENT [31] { + name: @index1 } } } } result: { - IDENT [36] { + IDENT [32] { name: @x0:0 } } } - } - } - CALL [37] { - function: _==_ - args: { - IDENT [38] { - name: @index3 - } - IDENT [39] { - name: @index0 + CREATE_LIST [33] { + elements: { + CREATE_LIST [34] { + elements: { + CONSTANT [35] { value: 1 } + } + } + CREATE_LIST [36] { + elements: { + CONSTANT [37] { value: 2 } + } + } + } } } } @@ -1982,70 +1825,71 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 1 } - CONSTANT [5] { value: 2 } - CONSTANT [6] { value: 3 } - } - } - CALL [7] { + CALL [3] { function: @in args: { - CONSTANT [8] { value: 1 } - IDENT [9] { - name: @index0 + CONSTANT [4] { value: 1 } + CREATE_LIST [5] { + elements: { + CONSTANT [6] { value: 1 } + CONSTANT [7] { value: 2 } + CONSTANT [8] { value: 3 } + } } } } - CALL [10] { + CREATE_LIST [9] { + elements: { + CONSTANT [10] { value: 1 } + CONSTANT [11] { value: 2 } + CONSTANT [12] { value: 3 } + } + } + CALL [13] { function: _&&_ args: { - CALL [11] { + CALL [14] { function: @in args: { - CONSTANT [12] { value: 3 } - CREATE_LIST [13] { + CONSTANT [15] { value: 3 } + CREATE_LIST [16] { elements: { - CONSTANT [14] { value: 3 } - IDENT [15] { - name: @index0 + CONSTANT [17] { value: 3 } + IDENT [18] { + name: @index1 } } } } } - IDENT [16] { - name: @index1 + IDENT [19] { + name: @index0 } } } - CALL [17] { + } + } + CALL [20] { + function: _&&_ + args: { + CALL [21] { function: _&&_ args: { - IDENT [18] { - name: @index1 + IDENT [22] { + name: @index0 } - CALL [19] { + CALL [23] { function: @in args: { - CONSTANT [20] { value: 2 } - IDENT [21] { - name: @index0 + CONSTANT [24] { value: 2 } + IDENT [25] { + name: @index1 } } } } } - } - } - CALL [22] { - function: _&&_ - args: { - IDENT [23] { - name: @index3 - } - IDENT [24] { + IDENT [26] { name: @index2 } } @@ -2070,31 +1914,37 @@ CALL [1] { } } } - CREATE_MAP [7] { - MAP_ENTRY [8] { + } + } + CALL [7] { + function: @in + args: { + CONSTANT [8] { value: 2 } + CREATE_MAP [9] { + MAP_ENTRY [10] { key: { - CONSTANT [9] { value: "a" } + CONSTANT [11] { value: "a" } } value: { - CONSTANT [10] { value: 1 } + CONSTANT [12] { value: 1 } } } - MAP_ENTRY [11] { + MAP_ENTRY [13] { key: { - CONSTANT [12] { value: 2 } + CONSTANT [14] { value: 2 } } value: { - IDENT [13] { + IDENT [15] { name: @index0 } } } - MAP_ENTRY [14] { + MAP_ENTRY [16] { key: { - CONSTANT [15] { value: 3 } + CONSTANT [17] { value: 3 } } value: { - IDENT [16] { + IDENT [18] { name: @index0 } } @@ -2102,15 +1952,6 @@ CALL [1] { } } } - CALL [17] { - function: @in - args: { - CONSTANT [18] { value: 2 } - IDENT [19] { - name: @index1 - } - } - } } } Test case: MACRO_ITER_VAR_NOT_REFERENCED @@ -2123,126 +1964,126 @@ CALL [1] { elements: { CREATE_LIST [3] { elements: { - CONSTANT [4] { value: 1 } - CONSTANT [5] { value: 2 } - } - } - CREATE_LIST [6] { - elements: { - CONSTANT [7] { value: 3 } - CONSTANT [8] { value: 4 } - } - } - CREATE_LIST [9] { - elements: { - IDENT [10] { - name: @index1 + CREATE_LIST [4] { + elements: { + CONSTANT [5] { value: 3 } + CONSTANT [6] { value: 4 } + } } - IDENT [11] { - name: @index1 + CREATE_LIST [7] { + elements: { + CONSTANT [8] { value: 3 } + CONSTANT [9] { value: 4 } + } } } } - CREATE_LIST [12] { + CREATE_LIST [10] { elements: { - IDENT [13] { - name: @index2 - } - IDENT [14] { - name: @index2 - } + CONSTANT [11] { value: 1 } + CONSTANT [12] { value: 2 } } } - COMPREHENSION [15] { - iter_var: @c1:0 - iter_range: { - IDENT [16] { - name: @index0 + CALL [13] { + function: _+_ + args: { + IDENT [14] { + name: @x1:0 } - } - accu_var: @x1:0 - accu_init: { - CREATE_LIST [17] { + CREATE_LIST [15] { elements: { + CREATE_LIST [16] { + elements: { + CONSTANT [17] { value: 3 } + CONSTANT [18] { value: 4 } + } + } } } } - loop_condition: { - CONSTANT [18] { value: true } - } - loop_step: { - CALL [19] { - function: _+_ - args: { - IDENT [20] { - name: @x1:0 + } + CREATE_LIST [19] { + elements: { + COMPREHENSION [20] { + iter_var: @c1:0 + iter_range: { + IDENT [21] { + name: @index1 } - CREATE_LIST [21] { + } + accu_var: @x1:0 + accu_init: { + CREATE_LIST [22] { elements: { - IDENT [22] { - name: @index1 - } } } } - } - } - result: { - IDENT [23] { - name: @x1:0 + loop_condition: { + CONSTANT [23] { value: true } + } + loop_step: { + IDENT [24] { + name: @index2 + } + } + result: { + IDENT [25] { + name: @x1:0 + } + } } } } - COMPREHENSION [24] { + } + } + CALL [26] { + function: _==_ + args: { + COMPREHENSION [27] { iter_var: @c0:0 iter_range: { - IDENT [25] { - name: @index0 + IDENT [28] { + name: @index1 } } accu_var: @x0:0 accu_init: { - CREATE_LIST [26] { + CREATE_LIST [29] { elements: { } } } loop_condition: { - CONSTANT [27] { value: true } + CONSTANT [30] { value: true } } loop_step: { - CALL [28] { + CALL [31] { function: _+_ args: { - IDENT [29] { + IDENT [32] { name: @x0:0 } - CREATE_LIST [30] { - elements: { - IDENT [31] { - name: @index4 - } - } + IDENT [33] { + name: @index3 } } } } result: { - IDENT [32] { + IDENT [34] { name: @x0:0 } } } - } - } - CALL [33] { - function: _==_ - args: { - IDENT [34] { - name: @index5 - } - IDENT [35] { - name: @index3 + CREATE_LIST [35] { + elements: { + IDENT [36] { + name: @index0 + } + IDENT [37] { + name: @index0 + } + } } } } @@ -2257,78 +2098,84 @@ CALL [1] { CREATE_LIST [2] { elements: { CALL [3] { - function: _-_ + function: _>_ args: { - IDENT [4] { - name: x + CALL [4] { + function: _-_ + args: { + IDENT [5] { + name: x + } + CONSTANT [6] { value: 1 } + } } - CONSTANT [5] { value: 1 } + CONSTANT [7] { value: 3 } } } - CALL [6] { - function: _>_ - args: { - IDENT [7] { - name: @index0 + CREATE_LIST [8] { + elements: { + CALL [9] { + function: _?_:_ + args: { + IDENT [10] { + name: @index0 + } + CALL [11] { + function: _-_ + args: { + IDENT [12] { + name: x + } + CONSTANT [13] { value: 1 } + } + } + CONSTANT [14] { value: 5 } + } } - CONSTANT [8] { value: 3 } } } - CALL [9] { + CALL [15] { function: _||_ args: { - IDENT [10] { + IDENT [16] { name: @x0:0 } - CALL [11] { + CALL [17] { function: _>_ args: { - CALL [12] { + CALL [18] { function: _-_ args: { - IDENT [13] { + IDENT [19] { name: @c0:0 } - CONSTANT [14] { value: 1 } + CONSTANT [20] { value: 1 } } } - CONSTANT [15] { value: 3 } + CONSTANT [21] { value: 3 } } } } } - COMPREHENSION [16] { + COMPREHENSION [22] { iter_var: @c0:0 iter_range: { - CREATE_LIST [17] { - elements: { - CALL [18] { - function: _?_:_ - args: { - IDENT [19] { - name: @index1 - } - IDENT [20] { - name: @index0 - } - CONSTANT [21] { value: 5 } - } - } - } + IDENT [23] { + name: @index1 } } accu_var: @x0:0 accu_init: { - CONSTANT [22] { value: false } + CONSTANT [24] { value: false } } loop_condition: { - CALL [23] { + CALL [25] { function: @not_strictly_false args: { - CALL [24] { + CALL [26] { function: !_ args: { - IDENT [25] { + IDENT [27] { name: @x0:0 } } @@ -2337,26 +2184,26 @@ CALL [1] { } } loop_step: { - IDENT [26] { + IDENT [28] { name: @index2 } } result: { - IDENT [27] { + IDENT [29] { name: @x0:0 } } } } } - CALL [28] { + CALL [30] { function: _||_ args: { - IDENT [29] { + IDENT [31] { name: @index3 } - IDENT [30] { - name: @index1 + IDENT [32] { + name: @index0 } } } @@ -2396,17 +2243,17 @@ CALL [1] { function: _+_ args: { IDENT [10] { - name: @x0:0 + name: @x1:0 } CREATE_LIST [11] { elements: { CREATE_LIST [12] { elements: { IDENT [13] { - name: @index1 + name: @index0 } IDENT [14] { - name: @index1 + name: @index0 } } } @@ -2418,17 +2265,17 @@ CALL [1] { function: _+_ args: { IDENT [16] { - name: @x1:0 + name: @x0:0 } CREATE_LIST [17] { elements: { CREATE_LIST [18] { elements: { IDENT [19] { - name: @index0 + name: @index1 } IDENT [20] { - name: @index0 + name: @index1 } } } @@ -2436,63 +2283,60 @@ CALL [1] { } } } - COMPREHENSION [21] { + } + } + COMPREHENSION [21] { + iter_var: @c0:0 + iter_range: { + COMPREHENSION [22] { iter_var: @c1:0 iter_range: { - CREATE_LIST [22] { + CREATE_LIST [23] { elements: { - CONSTANT [23] { value: "foo" } - CONSTANT [24] { value: "bar" } + CONSTANT [24] { value: "foo" } + CONSTANT [25] { value: "bar" } } } } accu_var: @x1:0 accu_init: { - CREATE_LIST [25] { + CREATE_LIST [26] { elements: { } } } loop_condition: { - CONSTANT [26] { value: true } + CONSTANT [27] { value: true } } loop_step: { - IDENT [27] { - name: @index3 + IDENT [28] { + name: @index2 } } result: { - IDENT [28] { + IDENT [29] { name: @x1:0 } } } } - } - COMPREHENSION [29] { - iter_var: @c0:0 - iter_range: { - IDENT [30] { - name: @index4 - } - } accu_var: @x0:0 accu_init: { - CREATE_LIST [31] { + CREATE_LIST [30] { elements: { } } } loop_condition: { - CONSTANT [32] { value: true } + CONSTANT [31] { value: true } } loop_step: { - IDENT [33] { - name: @index2 + IDENT [32] { + name: @index3 } } result: { - IDENT [34] { + IDENT [33] { name: @x0:0 } } @@ -2517,27 +2361,24 @@ CALL [1] { } } } - CALL [7] { - function: _[_] - args: { - IDENT [8] { - name: @index0 - } - CONSTANT [9] { value: "a" } - } - } } } - CALL [10] { + CALL [7] { function: _&&_ args: { - SELECT [11] { - IDENT [12] { + SELECT [8] { + IDENT [9] { name: @index0 }.a~presence_test } - IDENT [13] { - name: @index1 + CALL [10] { + function: _[_] + args: { + IDENT [11] { + name: @index0 + } + CONSTANT [12] { value: "a" } + } } } } @@ -2596,51 +2437,47 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg + }.oneof_type + }.payload }.single_int64 } - CALL [9] { + CALL [7] { function: _?_:_ args: { - SELECT [10] { - IDENT [11] { - name: @index0 + SELECT [8] { + SELECT [9] { + IDENT [10] { + name: msg + }.oneof_type }.payload~presence_test } - IDENT [12] { - name: @index2 + IDENT [11] { + name: @index0 } - CALL [13] { + CALL [12] { function: _*_ args: { - IDENT [14] { - name: @index2 + IDENT [13] { + name: @index0 } - CONSTANT [15] { value: 0 } + CONSTANT [14] { value: 0 } } } } } } } - CALL [16] { + CALL [15] { function: _==_ args: { - IDENT [17] { - name: @index3 + IDENT [16] { + name: @index1 } - CONSTANT [18] { value: 10 } + CONSTANT [17] { value: 10 } } } } @@ -2654,50 +2491,48 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg + }.oneof_type + }.payload + }.single_int64 } SELECT [7] { - IDENT [8] { - name: @index1 - }.single_int64 + SELECT [8] { + IDENT [9] { + name: msg + }.oneof_type + }.payload } - CALL [9] { + } + } + CALL [10] { + function: _==_ + args: { + CALL [11] { function: _?_:_ args: { - SELECT [10] { - IDENT [11] { + SELECT [12] { + IDENT [13] { name: @index1 }.single_int64~presence_test } - IDENT [12] { - name: @index2 + IDENT [14] { + name: @index0 } - CALL [13] { + CALL [15] { function: _*_ args: { - IDENT [14] { - name: @index2 + IDENT [16] { + name: @index0 } - CONSTANT [15] { value: 0 } + CONSTANT [17] { value: 0 } } } } } - } - } - CALL [16] { - function: _==_ - args: { - IDENT [17] { - name: @index3 - } CONSTANT [18] { value: 10 } } } @@ -2712,89 +2547,92 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg + }.oneof_type + }.payload + }.map_string_string } - SELECT [5] { - IDENT [6] { - name: @index0 + SELECT [7] { + SELECT [8] { + IDENT [9] { + name: msg + }.oneof_type }.payload } - SELECT [7] { - IDENT [8] { - name: @index1 - }.map_string_string + CALL [10] { + function: _&&_ + args: { + SELECT [11] { + IDENT [12] { + name: msg + }.oneof_type~presence_test + } + SELECT [13] { + SELECT [14] { + IDENT [15] { + name: msg + }.oneof_type + }.payload~presence_test + } + } } - CALL [9] { + CALL [16] { function: _?_:_ args: { - CALL [10] { + CALL [17] { function: _&&_ args: { - SELECT [11] { - IDENT [12] { + SELECT [18] { + IDENT [19] { name: @index1 }.map_string_string~presence_test } - SELECT [13] { - IDENT [14] { - name: @index2 + SELECT [20] { + IDENT [21] { + name: @index0 }.key~presence_test } } } - CALL [15] { + CALL [22] { function: _==_ args: { - SELECT [16] { - IDENT [17] { - name: @index2 + SELECT [23] { + IDENT [24] { + name: @index0 }.key } - CONSTANT [18] { value: "A" } + CONSTANT [25] { value: "A" } } } - CONSTANT [19] { value: false } + CONSTANT [26] { value: false } } } - CALL [20] { + } + } + CALL [27] { + function: _?_:_ + args: { + CALL [28] { function: _&&_ args: { - CALL [21] { - function: _&&_ - args: { - SELECT [22] { - IDENT [23] { - name: msg - }.oneof_type~presence_test - } - SELECT [24] { - IDENT [25] { - name: @index0 - }.payload~presence_test - } - } + IDENT [29] { + name: @index2 } - SELECT [26] { - IDENT [27] { + SELECT [30] { + IDENT [31] { name: @index1 }.single_int64~presence_test } } } - } - } - CALL [28] { - function: _?_:_ - args: { - IDENT [29] { - name: @index4 - } - IDENT [30] { + IDENT [32] { name: @index3 } - CONSTANT [31] { value: false } + CONSTANT [33] { value: false } } } } @@ -2807,44 +2645,49 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CALL [3] { - function: optional.none - args: { - } - } - CREATE_LIST [4] { + CREATE_LIST [3] { elements: { - IDENT [5] { - name: @index0 + CALL [4] { + function: optional.none + args: { + } } - IDENT [6] { + IDENT [5] { name: opt_x } } optional_indices: [0, 1] } - CREATE_LIST [7] { + CREATE_LIST [6] { elements: { - CONSTANT [8] { value: 5 } + CONSTANT [7] { value: 5 } } } + } + } + CALL [8] { + function: _==_ + args: { CREATE_LIST [9] { elements: { CONSTANT [10] { value: 10 } - IDENT [11] { - name: @index2 + CALL [11] { + function: optional.none + args: { + } } IDENT [12] { - name: @index2 + name: @index0 + } + IDENT [13] { + name: @index0 } } + optional_indices: [0] } - CREATE_LIST [13] { + CREATE_LIST [14] { elements: { - CONSTANT [14] { value: 10 } - IDENT [15] { - name: @index0 - } + CONSTANT [15] { value: 10 } IDENT [16] { name: @index1 } @@ -2852,18 +2695,6 @@ CALL [1] { name: @index1 } } - optional_indices: [0] - } - } - } - CALL [18] { - function: _==_ - args: { - IDENT [19] { - name: @index4 - } - IDENT [20] { - name: @index3 } } } @@ -2878,53 +2709,44 @@ CALL [1] { CREATE_LIST [2] { elements: { CALL [3] { - function: optional.of - args: { - CONSTANT [4] { value: "hello" } - } - } - CREATE_MAP [5] { - MAP_ENTRY [6] { - key: { - CONSTANT [7] { value: "hello" } - } - optional_entry: true - value: { - IDENT [8] { - name: @index0 - } - } - } - } - CALL [9] { function: _[_] args: { - IDENT [10] { - name: @index1 + CREATE_MAP [4] { + MAP_ENTRY [5] { + key: { + CONSTANT [6] { value: "hello" } + } + optional_entry: true + value: { + CALL [7] { + function: optional.of + args: { + CONSTANT [8] { value: "hello" } + } + } + } + } } - CONSTANT [11] { value: "hello" } + CONSTANT [9] { value: "hello" } } } - CALL [12] { + } + } + CALL [10] { + function: _==_ + args: { + CALL [11] { function: _+_ args: { - IDENT [13] { - name: @index2 + IDENT [12] { + name: @index0 } - IDENT [14] { - name: @index2 + IDENT [13] { + name: @index0 } } } - } - } - CALL [15] { - function: _==_ - args: { - IDENT [16] { - name: @index3 - } - CONSTANT [17] { value: "hellohello" } + CONSTANT [14] { value: "hellohello" } } } } @@ -2948,77 +2770,71 @@ CALL [1] { } } CALL [7] { - function: _[_] - args: { - IDENT [8] { - name: @index0 - } - CONSTANT [9] { value: "key" } - } - } - CALL [10] { function: _[?_] args: { - IDENT [11] { - name: @index0 - } - CONSTANT [12] { value: "bogus" } - } - } - CALL [13] { - function: _[?_] - args: { - CREATE_MAP [14] { - MAP_ENTRY [15] { + CREATE_MAP [8] { + MAP_ENTRY [9] { key: { - CONSTANT [16] { value: "key" } + CONSTANT [10] { value: "key" } } optional_entry: true value: { - CALL [17] { + CALL [11] { function: optional.of args: { - CONSTANT [18] { value: "test" } + CONSTANT [12] { value: "test" } } } } } } - CONSTANT [19] { value: "bogus" } + CONSTANT [13] { value: "bogus" } } } - CALL [20] { + CALL [14] { function: orValue target: { - CALL [21] { + CALL [15] { function: or target: { - IDENT [22] { - name: @index3 + IDENT [16] { + name: @index1 } } args: { - IDENT [23] { - name: @index2 + CALL [17] { + function: _[?_] + args: { + IDENT [18] { + name: @index0 + } + CONSTANT [19] { value: "bogus" } + } } } } } args: { - IDENT [24] { - name: @index1 + CALL [20] { + function: _[_] + args: { + IDENT [21] { + name: @index0 + } + CONSTANT [22] { value: "key" } + } } } } } } - CALL [25] { + CALL [23] { function: _==_ args: { - IDENT [26] { - name: @index4 + IDENT [24] { + name: @index2 } - CONSTANT [27] { value: "test" } + CONSTANT [25] { value: "test" } } } } @@ -3031,65 +2847,56 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CALL [3] { - function: optional.ofNonZeroValue - args: { - CONSTANT [4] { value: 1 } - } - } - CALL [5] { - function: optional.of - args: { - CONSTANT [6] { value: 4 } - } - } - CREATE_STRUCT [7] { + CREATE_STRUCT [3] { name: TestAllTypes entries: { - ENTRY [8] { + ENTRY [4] { field_key: single_int64 optional_entry: true value: { - IDENT [9] { - name: @index0 + CALL [5] { + function: optional.ofNonZeroValue + args: { + CONSTANT [6] { value: 1 } + } } } } - ENTRY [10] { + ENTRY [7] { field_key: single_int32 optional_entry: true value: { - IDENT [11] { - name: @index1 + CALL [8] { + function: optional.of + args: { + CONSTANT [9] { value: 4 } + } } } } } } - CALL [12] { + } + } + CALL [10] { + function: _==_ + args: { + CALL [11] { function: _+_ args: { - SELECT [13] { - IDENT [14] { - name: @index2 + SELECT [12] { + IDENT [13] { + name: @index0 }.single_int32 } - SELECT [15] { - IDENT [16] { - name: @index2 + SELECT [14] { + IDENT [15] { + name: @index0 }.single_int64 } } } - } - } - CALL [17] { - function: _==_ - args: { - IDENT [18] { - name: @index3 - } - CONSTANT [19] { value: 5 } + CONSTANT [16] { value: 5 } } } } @@ -3101,62 +2908,53 @@ CALL [1] { function: cel.@block args: { CREATE_LIST [2] { - elements: { - CALL [3] { - function: _+_ - args: { - CONSTANT [4] { value: "h" } - CONSTANT [5] { value: "e" } - } - } - CALL [6] { - function: _+_ - args: { - IDENT [7] { - name: @index0 - } - CONSTANT [8] { value: "l" } - } - } - CALL [9] { - function: _+_ - args: { - IDENT [10] { - name: @index1 - } - CONSTANT [11] { value: "l" } - } - } - CALL [12] { + elements: { + CALL [3] { function: _+_ args: { - IDENT [13] { - name: @index2 + CALL [4] { + function: _+_ + args: { + CALL [5] { + function: _+_ + args: { + CONSTANT [6] { value: "h" } + CONSTANT [7] { value: "e" } + } + } + CONSTANT [8] { value: "l" } + } } - CONSTANT [14] { value: "o" } + CONSTANT [9] { value: "l" } } } - CALL [15] { + CALL [10] { function: _+_ args: { - IDENT [16] { - name: @index3 + IDENT [11] { + name: @index0 } - CONSTANT [17] { value: " world" } + CONSTANT [12] { value: "o" } } } } } - CALL [18] { + CALL [13] { function: matches target: { - IDENT [19] { - name: @index4 + CALL [14] { + function: _+_ + args: { + IDENT [15] { + name: @index1 + } + CONSTANT [16] { value: " world" } + } } } args: { - IDENT [20] { - name: @index3 + IDENT [17] { + name: @index1 } } } @@ -3189,25 +2987,22 @@ CALL [1] { CONSTANT [9] { value: "l" } } } - CALL [10] { - function: _+_ - args: { - IDENT [11] { - name: @index0 - } - CONSTANT [12] { value: "o" } - } - } } } - CALL [13] { + CALL [10] { function: matches target: { - CONSTANT [14] { value: "hello world" } + CONSTANT [11] { value: "hello world" } } args: { - IDENT [15] { - name: @index1 + CALL [12] { + function: _+_ + args: { + IDENT [13] { + name: @index0 + } + CONSTANT [14] { value: "o" } + } } } } @@ -3240,32 +3035,29 @@ CALL [1] { CONSTANT [9] { value: "l" } } } - CALL [10] { + } + } + CALL [10] { + function: matches + target: { + CALL [11] { function: _+_ args: { - CALL [11] { + CALL [12] { function: _+_ args: { - IDENT [12] { + IDENT [13] { name: @index0 } - CONSTANT [13] { value: "o" } + CONSTANT [14] { value: "o" } } } - CONSTANT [14] { value: " world" } + CONSTANT [15] { value: " world" } } } } - } - CALL [15] { - function: matches - target: { - IDENT [16] { - name: @index1 - } - } args: { - CONSTANT [17] { value: "hello" } + CONSTANT [16] { value: "hello" } } } } @@ -3287,11 +3079,11 @@ CALL [1] { CALL [5] { function: _+_ args: { - CONSTANT [6] { value: "w" } - CONSTANT [7] { value: "o" } + CONSTANT [6] { value: "h" } + CONSTANT [7] { value: "e" } } } - CONSTANT [8] { value: "r" } + CONSTANT [8] { value: "l" } } } CONSTANT [9] { value: "l" } @@ -3300,58 +3092,52 @@ CALL [1] { CALL [10] { function: _+_ args: { - IDENT [11] { - name: @index0 - } - CONSTANT [12] { value: "d" } - } - } - CALL [13] { - function: _+_ - args: { - CALL [14] { + CALL [11] { function: _+_ args: { - CALL [15] { + CALL [12] { function: _+_ args: { - CONSTANT [16] { value: "h" } - CONSTANT [17] { value: "e" } + CONSTANT [13] { value: "w" } + CONSTANT [14] { value: "o" } } } - CONSTANT [18] { value: "l" } + CONSTANT [15] { value: "r" } } } - CONSTANT [19] { value: "l" } + CONSTANT [16] { value: "l" } } } - CALL [20] { + } + } + CALL [17] { + function: matches + target: { + CALL [18] { function: _+_ args: { - CALL [21] { + CALL [19] { function: _+_ args: { - IDENT [22] { - name: @index2 + IDENT [20] { + name: @index0 } - CONSTANT [23] { value: "o" } + CONSTANT [21] { value: "o" } } } - CONSTANT [24] { value: " world" } + CONSTANT [22] { value: " world" } } } } - } - CALL [25] { - function: matches - target: { - IDENT [26] { - name: @index3 - } - } args: { - IDENT [27] { - name: @index1 + CALL [23] { + function: _+_ + args: { + IDENT [24] { + name: @index1 + } + CONSTANT [25] { value: "d" } + } } } } @@ -3366,74 +3152,66 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 - }.single_int64 - } - SELECT [9] { - IDENT [10] { - name: msg + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg + }.oneof_type + }.payload }.single_int64 } - SELECT [11] { - IDENT [12] { - name: @index1 - }.single_int32 - } } } - CALL [13] { + CALL [7] { function: _+_ args: { - CALL [14] { + CALL [8] { function: _+_ args: { - CALL [15] { + CALL [9] { function: _+_ args: { - CALL [16] { + CALL [10] { function: non_pure_custom_func args: { - IDENT [17] { - name: @index2 + IDENT [11] { + name: @index0 } } } - CALL [18] { + CALL [12] { function: non_pure_custom_func args: { - IDENT [19] { - name: @index4 + SELECT [13] { + SELECT [14] { + SELECT [15] { + IDENT [16] { + name: msg + }.oneof_type + }.payload + }.single_int32 } } } } } - CALL [20] { + CALL [17] { function: non_pure_custom_func args: { - IDENT [21] { - name: @index2 + IDENT [18] { + name: @index0 } } } } } - CALL [22] { + CALL [19] { function: non_pure_custom_func args: { - IDENT [23] { - name: @index3 + SELECT [20] { + IDENT [21] { + name: msg + }.single_int64 } } } @@ -3450,77 +3228,72 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg + }.oneof_type + }.payload }.single_int64 } - CALL [9] { + CALL [7] { function: pure_custom_func args: { - IDENT [10] { - name: @index2 + IDENT [8] { + name: @index0 } } } - CALL [11] { - function: pure_custom_func - args: { - SELECT [12] { - IDENT [13] { + SELECT [9] { + SELECT [10] { + SELECT [11] { + IDENT [12] { name: msg - }.single_int64 - } - } + }.oneof_type + }.payload + }.single_int32 } - CALL [14] { + CALL [13] { function: _+_ args: { - IDENT [15] { - name: @index3 - } - CALL [16] { - function: pure_custom_func + CALL [14] { + function: _+_ args: { - SELECT [17] { - IDENT [18] { - name: @index1 - }.single_int32 + IDENT [15] { + name: @index1 + } + CALL [16] { + function: pure_custom_func + args: { + IDENT [17] { + name: @index2 + } + } } } } - } - } - CALL [19] { - function: _+_ - args: { - IDENT [20] { - name: @index5 - } - IDENT [21] { - name: @index3 + IDENT [18] { + name: @index1 } } } } } - CALL [22] { + CALL [19] { function: _+_ args: { - IDENT [23] { - name: @index6 + IDENT [20] { + name: @index3 } - IDENT [24] { - name: @index4 + CALL [21] { + function: pure_custom_func + args: { + SELECT [22] { + IDENT [23] { + name: msg + }.single_int64 + } + } } } } diff --git a/optimizer/src/test/resources/subexpression_ast_block_recursion_depth_4.baseline b/optimizer/src/test/resources/subexpression_ast_block_recursion_depth_4.baseline index 71a440692..9b7787c5a 100644 --- a/optimizer/src/test/resources/subexpression_ast_block_recursion_depth_4.baseline +++ b/optimizer/src/test/resources/subexpression_ast_block_recursion_depth_4.baseline @@ -6,20 +6,22 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 1 } - CONSTANT [5] { value: 2 } - } - } - CALL [6] { + CALL [3] { function: size args: { - IDENT [7] { - name: @index0 + CREATE_LIST [4] { + elements: { + CONSTANT [5] { value: 1 } + CONSTANT [6] { value: 2 } + } } } } + } + } + CALL [7] { + function: _==_ + args: { CALL [8] { function: _+_ args: { @@ -27,25 +29,17 @@ CALL [1] { function: _+_ args: { IDENT [10] { - name: @index1 + name: @index0 } IDENT [11] { - name: @index1 + name: @index0 } } } CONSTANT [12] { value: 1 } } } - } - } - CALL [13] { - function: _==_ - args: { - IDENT [14] { - name: @index2 - } - CONSTANT [15] { value: 5 } + CONSTANT [13] { value: 5 } } } } @@ -58,20 +52,22 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 1 } - CONSTANT [5] { value: 2 } - } - } - CALL [6] { + CALL [3] { function: size args: { - IDENT [7] { - name: @index0 + CREATE_LIST [4] { + elements: { + CONSTANT [5] { value: 1 } + CONSTANT [6] { value: 2 } + } } } } + } + } + CALL [7] { + function: _==_ + args: { CALL [8] { function: _+_ args: { @@ -83,27 +79,19 @@ CALL [1] { args: { CONSTANT [11] { value: 2 } IDENT [12] { - name: @index1 + name: @index0 } } } IDENT [13] { - name: @index1 + name: @index0 } } } CONSTANT [14] { value: 1 } } } - } - } - CALL [15] { - function: _==_ - args: { - IDENT [16] { - name: @index2 - } - CONSTANT [17] { value: 7 } + CONSTANT [15] { value: 7 } } } } @@ -116,69 +104,60 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 0 } - } - } - CALL [5] { + CALL [3] { function: size args: { - IDENT [6] { - name: @index0 + CREATE_LIST [4] { + elements: { + CONSTANT [5] { value: 0 } + } } } } - CREATE_LIST [7] { - elements: { - CONSTANT [8] { value: 1 } - CONSTANT [9] { value: 2 } - } - } - CALL [10] { + CALL [6] { function: size args: { - IDENT [11] { - name: @index2 + CREATE_LIST [7] { + elements: { + CONSTANT [8] { value: 1 } + CONSTANT [9] { value: 2 } + } } } } - CALL [12] { + } + } + CALL [10] { + function: _==_ + args: { + CALL [11] { function: _+_ args: { - CALL [13] { + CALL [12] { function: _+_ args: { - CALL [14] { + CALL [13] { function: _+_ args: { - IDENT [15] { - name: @index1 + IDENT [14] { + name: @index0 } - IDENT [16] { - name: @index1 + IDENT [15] { + name: @index0 } } } - IDENT [17] { - name: @index3 + IDENT [16] { + name: @index1 } } } - IDENT [18] { - name: @index3 + IDENT [17] { + name: @index1 } } } - } - } - CALL [19] { - function: _==_ - args: { - IDENT [20] { - name: @index4 - } - CONSTANT [21] { value: 6 } + CONSTANT [18] { value: 6 } } } } @@ -191,109 +170,97 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 0 } - } - } - CALL [5] { + CALL [3] { function: size args: { - IDENT [6] { - name: @index0 + CREATE_LIST [4] { + elements: { + CONSTANT [5] { value: 0 } + } } } } - CREATE_LIST [7] { - elements: { - CONSTANT [8] { value: 1 } - CONSTANT [9] { value: 2 } - } - } - CALL [10] { + CALL [6] { function: size args: { - IDENT [11] { - name: @index2 + CREATE_LIST [7] { + elements: { + CONSTANT [8] { value: 1 } + CONSTANT [9] { value: 2 } + } } } } - CREATE_LIST [12] { - elements: { - CONSTANT [13] { value: 1 } - CONSTANT [14] { value: 2 } - CONSTANT [15] { value: 3 } - } - } - CALL [16] { + CALL [10] { function: size args: { - IDENT [17] { - name: @index4 + CREATE_LIST [11] { + elements: { + CONSTANT [12] { value: 1 } + CONSTANT [13] { value: 2 } + CONSTANT [14] { value: 3 } + } } } } - CALL [18] { + CALL [15] { function: _+_ args: { - CALL [19] { + CALL [16] { function: _+_ args: { - CALL [20] { + CALL [17] { function: _+_ args: { - CALL [21] { + CALL [18] { function: _+_ args: { - CONSTANT [22] { value: 5 } - IDENT [23] { - name: @index1 + CONSTANT [19] { value: 5 } + IDENT [20] { + name: @index0 } } } - IDENT [24] { - name: @index1 + IDENT [21] { + name: @index0 } } } - IDENT [25] { - name: @index3 + IDENT [22] { + name: @index1 } } } - IDENT [26] { - name: @index3 + IDENT [23] { + name: @index1 } } } - CALL [27] { + } + } + CALL [24] { + function: _==_ + args: { + CALL [25] { function: _+_ args: { - CALL [28] { + CALL [26] { function: _+_ args: { - IDENT [29] { - name: @index6 + IDENT [27] { + name: @index3 } - IDENT [30] { - name: @index5 + IDENT [28] { + name: @index2 } } } - IDENT [31] { - name: @index5 + IDENT [29] { + name: @index2 } } } - } - } - CALL [32] { - function: _==_ - args: { - IDENT [33] { - name: @index7 - } - CONSTANT [34] { value: 17 } + CONSTANT [30] { value: 17 } } } } @@ -307,150 +274,100 @@ CALL [1] { CREATE_LIST [2] { elements: { CALL [3] { - function: timestamp - args: { - CONSTANT [4] { value: 1000000000 } - } - } - CALL [5] { - function: int - args: { - IDENT [6] { - name: @index0 + function: getFullYear + target: { + CALL [4] { + function: timestamp + args: { + CALL [5] { + function: int + args: { + CALL [6] { + function: timestamp + args: { + CONSTANT [7] { value: 1000000000 } + } + } + } + } + } } } - } - CALL [7] { - function: timestamp args: { - IDENT [8] { - name: @index1 - } } } - CALL [9] { + CALL [8] { function: getFullYear target: { - IDENT [10] { - name: @index2 + CALL [9] { + function: timestamp + args: { + CALL [10] { + function: int + args: { + CALL [11] { + function: timestamp + args: { + CONSTANT [12] { value: 200 } + } + } + } + } + } } } args: { } } - CALL [11] { - function: timestamp - args: { - CONSTANT [12] { value: 50 } - } - } CALL [13] { - function: int - args: { - IDENT [14] { - name: @index4 - } - } - } - CALL [15] { function: timestamp args: { - IDENT [16] { - name: @index5 + CALL [14] { + function: int + args: { + CALL [15] { + function: timestamp + args: { + CONSTANT [16] { value: 50 } + } + } + } } } } CALL [17] { function: timestamp args: { - CONSTANT [18] { value: 200 } - } - } - CALL [19] { - function: int - args: { - IDENT [20] { - name: @index7 + CALL [18] { + function: int + args: { + CALL [19] { + function: timestamp + args: { + CONSTANT [20] { value: 75 } + } + } + } } } } CALL [21] { - function: timestamp - args: { - IDENT [22] { - name: @index8 - } - } - } - CALL [23] { - function: getFullYear - target: { - IDENT [24] { - name: @index9 - } - } + function: _+_ args: { - } - } - CALL [25] { - function: timestamp - args: { - CONSTANT [26] { value: 75 } - } - } - CALL [27] { - function: int - args: { - IDENT [28] { - name: @index11 - } - } - } - CALL [29] { - function: timestamp - args: { - IDENT [30] { - name: @index12 - } - } - } - CALL [31] { - function: getMinutes - target: { - IDENT [32] { - name: @index13 - } - } - args: { - } - } - CALL [33] { - function: getSeconds - target: { - IDENT [34] { - name: @index6 - } - } - args: { - } - } - CALL [35] { - function: _+_ - args: { - CALL [36] { + CALL [22] { function: _+_ args: { - CALL [37] { + CALL [23] { function: _+_ args: { - IDENT [38] { - name: @index3 + IDENT [24] { + name: @index0 } - CALL [39] { + CALL [25] { function: getFullYear target: { - IDENT [40] { - name: @index13 + IDENT [26] { + name: @index3 } } args: { @@ -458,11 +375,11 @@ CALL [1] { } } } - CALL [41] { + CALL [27] { function: getFullYear target: { - IDENT [42] { - name: @index6 + IDENT [28] { + name: @index2 } } args: { @@ -470,66 +387,77 @@ CALL [1] { } } } - IDENT [43] { - name: @index3 + IDENT [29] { + name: @index0 } } } - CALL [44] { + CALL [30] { function: _+_ args: { - CALL [45] { + CALL [31] { function: _+_ args: { - CALL [46] { + CALL [32] { function: _+_ args: { - CALL [47] { - function: _+_ - args: { - IDENT [48] { - name: @index16 - } - IDENT [49] { - name: @index15 + IDENT [33] { + name: @index4 + } + CALL [34] { + function: getSeconds + target: { + IDENT [35] { + name: @index2 } } - } - IDENT [50] { - name: @index10 + args: { + } } } } - IDENT [51] { - name: @index10 + IDENT [36] { + name: @index1 } } } - IDENT [52] { - name: @index14 + IDENT [37] { + name: @index1 } } } - CALL [53] { + } + } + CALL [38] { + function: _==_ + args: { + CALL [39] { function: _+_ args: { - IDENT [54] { - name: @index17 + CALL [40] { + function: _+_ + args: { + IDENT [41] { + name: @index5 + } + CALL [42] { + function: getMinutes + target: { + IDENT [43] { + name: @index3 + } + } + args: { + } + } + } } - IDENT [55] { - name: @index3 + IDENT [44] { + name: @index0 } } } - } - } - CALL [56] { - function: _==_ - args: { - IDENT [57] { - name: @index18 - } - CONSTANT [58] { value: 13934 } + CONSTANT [45] { value: 13934 } } } } @@ -542,53 +470,47 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_MAP [3] { - MAP_ENTRY [4] { - key: { - CONSTANT [5] { value: "a" } - } - value: { - CONSTANT [6] { value: 2 } - } - } - } - CALL [7] { + CALL [3] { function: _[_] args: { - IDENT [8] { - name: @index0 + CREATE_MAP [4] { + MAP_ENTRY [5] { + key: { + CONSTANT [6] { value: "a" } + } + value: { + CONSTANT [7] { value: 2 } + } + } } - CONSTANT [9] { value: "a" } + CONSTANT [8] { value: "a" } } } + } + } + CALL [9] { + function: _==_ + args: { CALL [10] { function: _+_ args: { IDENT [11] { - name: @index1 + name: @index0 } CALL [12] { function: _*_ args: { IDENT [13] { - name: @index1 + name: @index0 } IDENT [14] { - name: @index1 + name: @index0 } } } } } - } - } - CALL [15] { - function: _==_ - args: { - IDENT [16] { - name: @index2 - } - CONSTANT [17] { value: 6 } + CONSTANT [15] { value: 6 } } } } @@ -604,51 +526,48 @@ CALL [1] { CREATE_MAP [3] { MAP_ENTRY [4] { key: { - CONSTANT [5] { value: "b" } + CONSTANT [5] { value: "e" } } value: { - CONSTANT [6] { value: 1 } + CREATE_MAP [6] { + MAP_ENTRY [7] { + key: { + CONSTANT [8] { value: "b" } + } + value: { + CONSTANT [9] { value: 1 } + } + } + } } } } - CREATE_MAP [7] { - MAP_ENTRY [8] { + CREATE_MAP [10] { + MAP_ENTRY [11] { key: { - CONSTANT [9] { value: "e" } + CONSTANT [12] { value: "b" } } value: { - IDENT [10] { - name: @index0 - } + CONSTANT [13] { value: 1 } } } } } } - CREATE_MAP [11] { - MAP_ENTRY [12] { - key: { - CONSTANT [13] { value: "a" } - } - value: { - IDENT [14] { - name: @index0 - } - } - } + CREATE_MAP [14] { MAP_ENTRY [15] { key: { - CONSTANT [16] { value: "c" } + CONSTANT [16] { value: "a" } } value: { IDENT [17] { - name: @index0 + name: @index1 } } } MAP_ENTRY [18] { key: { - CONSTANT [19] { value: "d" } + CONSTANT [19] { value: "c" } } value: { IDENT [20] { @@ -658,11 +577,21 @@ CALL [1] { } MAP_ENTRY [21] { key: { - CONSTANT [22] { value: "e" } + CONSTANT [22] { value: "d" } } value: { IDENT [23] { - name: @index1 + name: @index0 + } + } + } + MAP_ENTRY [24] { + key: { + CONSTANT [25] { value: "e" } + } + value: { + IDENT [26] { + name: @index0 } } } @@ -691,37 +620,34 @@ CALL [1] { CONSTANT [10] { value: 2 } } } - CREATE_LIST [11] { - elements: { - IDENT [12] { - name: @index1 - } - IDENT [13] { - name: @index0 - } - } - } } } - CREATE_LIST [14] { + CREATE_LIST [11] { elements: { - CONSTANT [15] { value: 1 } - IDENT [16] { + CONSTANT [12] { value: 1 } + IDENT [13] { name: @index0 } - CONSTANT [17] { value: 2 } - IDENT [18] { + CONSTANT [14] { value: 2 } + IDENT [15] { name: @index0 } - CONSTANT [19] { value: 5 } - IDENT [20] { + CONSTANT [16] { value: 5 } + IDENT [17] { name: @index0 } - CONSTANT [21] { value: 7 } - IDENT [22] { - name: @index2 + CONSTANT [18] { value: 7 } + CREATE_LIST [19] { + elements: { + IDENT [20] { + name: @index1 + } + IDENT [21] { + name: @index0 + } + } } - IDENT [23] { + IDENT [22] { name: @index1 } } @@ -741,26 +667,23 @@ CALL [1] { name: msg }.single_int64 } - CALL [5] { + } + } + CALL [5] { + function: _==_ + args: { + CALL [6] { function: _+_ args: { - IDENT [6] { + IDENT [7] { name: @index0 } - IDENT [7] { + IDENT [8] { name: @index0 } } } - } - } - CALL [8] { - function: _==_ - args: { - IDENT [9] { - name: @index1 - } - CONSTANT [10] { value: 6 } + CONSTANT [9] { value: 6 } } } } @@ -774,68 +697,66 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 - }.single_int64 - } - SELECT [9] { - SELECT [10] { - SELECT [11] { - IDENT [12] { - name: @index1 + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg }.oneof_type }.payload }.single_int64 } - CALL [13] { + SELECT [7] { + SELECT [8] { + IDENT [9] { + name: msg + }.oneof_type + }.payload + } + CALL [10] { function: _+_ args: { - CALL [14] { + CALL [11] { function: _+_ args: { - CALL [15] { + CALL [12] { function: _+_ args: { - IDENT [16] { - name: @index2 + IDENT [13] { + name: @index0 } - SELECT [17] { - IDENT [18] { + SELECT [14] { + IDENT [15] { name: @index1 }.single_int32 } } } - IDENT [19] { - name: @index2 + IDENT [16] { + name: @index0 } } } - SELECT [20] { - IDENT [21] { + SELECT [17] { + IDENT [18] { name: msg }.single_int64 } } } - CALL [22] { + CALL [19] { function: _+_ args: { - IDENT [23] { - name: @index4 + IDENT [20] { + name: @index2 } - IDENT [24] { - name: @index3 + SELECT [21] { + SELECT [22] { + SELECT [23] { + IDENT [24] { + name: @index1 + }.oneof_type + }.payload + }.single_int64 } } } @@ -845,7 +766,7 @@ CALL [1] { function: _==_ args: { IDENT [26] { - name: @index5 + name: @index3 } CONSTANT [27] { value: 31 } } @@ -861,71 +782,59 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 + SELECT [4] { + SELECT [5] { + SELECT [6] { + IDENT [7] { + name: msg + }.oneof_type + }.payload + }.oneof_type }.payload } - SELECT [7] { - IDENT [8] { - name: @index1 + SELECT [8] { + IDENT [9] { + name: @index0 }.oneof_type } - SELECT [9] { - IDENT [10] { - name: @index2 - }.payload - } - SELECT [11] { - IDENT [12] { - name: @index3 - }.oneof_type + SELECT [10] { + SELECT [11] { + SELECT [12] { + SELECT [13] { + IDENT [14] { + name: @index1 + }.payload + }.oneof_type + }.payload + }.single_bool } - SELECT [13] { - SELECT [14] { - SELECT [15] { - SELECT [16] { - IDENT [17] { - name: @index4 + SELECT [15] { + SELECT [16] { + SELECT [17] { + SELECT [18] { + IDENT [19] { + name: @index1 }.child }.child }.payload }.single_bool } - SELECT [18] { - SELECT [19] { - SELECT [20] { - SELECT [21] { - IDENT [22] { - name: @index4 - }.payload - }.oneof_type - }.payload - }.single_bool - } - CALL [23] { - function: _||_ - args: { - CONSTANT [24] { value: true } - IDENT [25] { - name: @index6 - } - } - } } } - CALL [26] { + CALL [20] { function: _||_ args: { - IDENT [27] { - name: @index7 + CALL [21] { + function: _||_ + args: { + CONSTANT [22] { value: true } + IDENT [23] { + name: @index2 + } + } } - IDENT [28] { - name: @index5 + IDENT [24] { + name: @index3 } } } @@ -939,58 +848,46 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 - }.map_int32_int64 - } - CALL [9] { + CALL [3] { function: _[_] args: { - IDENT [10] { - name: @index2 + SELECT [4] { + SELECT [5] { + SELECT [6] { + IDENT [7] { + name: msg + }.oneof_type + }.payload + }.map_int32_int64 } - CONSTANT [11] { value: 1 } + CONSTANT [8] { value: 1 } } } - CALL [12] { + } + } + CALL [9] { + function: _==_ + args: { + CALL [10] { function: _+_ args: { - CALL [13] { + CALL [11] { function: _+_ args: { - IDENT [14] { - name: @index3 + IDENT [12] { + name: @index0 } - IDENT [15] { - name: @index3 + IDENT [13] { + name: @index0 } } } - IDENT [16] { - name: @index3 + IDENT [14] { + name: @index0 } } } - } - } - CALL [17] { - function: _==_ - args: { - IDENT [18] { - name: @index4 - } - CONSTANT [19] { value: 15 } + CONSTANT [15] { value: 15 } } } } @@ -1004,66 +901,57 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg + }.oneof_type + }.payload }.map_int32_int64 } - CALL [9] { + } + } + CALL [7] { + function: _==_ + args: { + CALL [8] { function: _+_ args: { - CALL [10] { + CALL [9] { function: _+_ args: { - CALL [11] { + CALL [10] { function: _[_] args: { - IDENT [12] { - name: @index2 + IDENT [11] { + name: @index0 } - CONSTANT [13] { value: 0 } + CONSTANT [12] { value: 0 } } } - CALL [14] { + CALL [13] { function: _[_] args: { - IDENT [15] { - name: @index2 + IDENT [14] { + name: @index0 } - CONSTANT [16] { value: 1 } + CONSTANT [15] { value: 1 } } } } } - CALL [17] { + CALL [16] { function: _[_] args: { - IDENT [18] { - name: @index2 + IDENT [17] { + name: @index0 } - CONSTANT [19] { value: 2 } + CONSTANT [18] { value: 2 } } } } } - } - } - CALL [20] { - function: _==_ - args: { - IDENT [21] { - name: @index3 - } - CONSTANT [22] { value: 8 } + CONSTANT [19] { value: 8 } } } } @@ -1120,33 +1008,30 @@ CALL [1] { name: msg }.single_int64 } - CALL [5] { + } + } + CALL [5] { + function: _==_ + args: { + CALL [6] { function: _?_:_ args: { - CALL [6] { + CALL [7] { function: _>_ args: { - IDENT [7] { + IDENT [8] { name: @index0 } - CONSTANT [8] { value: 0 } + CONSTANT [9] { value: 0 } } } - IDENT [9] { + IDENT [10] { name: @index0 } - CONSTANT [10] { value: 0 } + CONSTANT [11] { value: 0 } } } - } - } - CALL [11] { - function: _==_ - args: { - IDENT [12] { - name: @index1 - } - CONSTANT [13] { value: 3 } + CONSTANT [12] { value: 3 } } } } @@ -1225,56 +1110,53 @@ CALL [1] { name: msg }.single_int32 } - CALL [7] { + } + } + CALL [7] { + function: _==_ + args: { + CALL [8] { function: _?_:_ args: { - CALL [8] { + CALL [9] { function: _>_ args: { - IDENT [9] { + IDENT [10] { name: @index0 } - CONSTANT [10] { value: 0 } + CONSTANT [11] { value: 0 } } } - CALL [11] { + CALL [12] { function: _?_:_ args: { - CALL [12] { + CALL [13] { function: _>_ args: { - IDENT [13] { + IDENT [14] { name: @index1 } - CONSTANT [14] { value: 0 } + CONSTANT [15] { value: 0 } } } - CALL [15] { + CALL [16] { function: _+_ args: { - IDENT [16] { + IDENT [17] { name: @index0 } - IDENT [17] { + IDENT [18] { name: @index1 } } } - CONSTANT [18] { value: 0 } + CONSTANT [19] { value: 0 } } } - CONSTANT [19] { value: 0 } + CONSTANT [20] { value: 0 } } } - } - } - CALL [20] { - function: _==_ - args: { - IDENT [21] { - name: @index2 - } - CONSTANT [22] { value: 8 } + CONSTANT [21] { value: 8 } } } } @@ -1289,194 +1171,167 @@ CALL [1] { elements: { CREATE_LIST [3] { elements: { - CONSTANT [4] { value: 1 } - } - } - CALL [5] { - function: _>_ - args: { - IDENT [6] { - name: @c0:0 - } - CONSTANT [7] { value: 0 } - } - } - CALL [8] { - function: _||_ - args: { - IDENT [9] { - name: @x0:0 - } - IDENT [10] { - name: @index1 - } - } - } - COMPREHENSION [11] { - iter_var: @c0:0 - iter_range: { - IDENT [12] { - name: @index0 - } - } - accu_var: @x0:0 - accu_init: { - CONSTANT [13] { value: false } - } - loop_condition: { - CALL [14] { - function: @not_strictly_false - args: { - CALL [15] { - function: !_ + COMPREHENSION [4] { + iter_var: @c0:0 + iter_range: { + CREATE_LIST [5] { + elements: { + CONSTANT [6] { value: 1 } + } + } + } + accu_var: @x0:0 + accu_init: { + CONSTANT [7] { value: false } + } + loop_condition: { + CALL [8] { + function: @not_strictly_false args: { - IDENT [16] { + CALL [9] { + function: !_ + args: { + IDENT [10] { + name: @x0:0 + } + } + } + } + } + } + loop_step: { + CALL [11] { + function: _||_ + args: { + IDENT [12] { name: @x0:0 } + CALL [13] { + function: _>_ + args: { + IDENT [14] { + name: @c0:0 + } + CONSTANT [15] { value: 0 } + } + } } } } - } - } - loop_step: { - IDENT [17] { - name: @index2 - } - } - result: { - IDENT [18] { - name: @x0:0 - } - } - } - CREATE_LIST [19] { - elements: { - IDENT [20] { - name: @index3 - } - } - } - CALL [21] { - function: size - args: { - IDENT [22] { - name: @index4 + result: { + IDENT [16] { + name: @x0:0 + } + } } } } - CREATE_LIST [23] { + CREATE_LIST [17] { elements: { - CONSTANT [24] { value: 2 } - } - } - CALL [25] { - function: _>_ - args: { - IDENT [26] { - name: @c0:0 - } - CONSTANT [27] { value: 1 } - } - } - CALL [28] { - function: _||_ - args: { - IDENT [29] { - name: @x0:0 - } - IDENT [30] { - name: @index7 - } - } - } - COMPREHENSION [31] { - iter_var: @c0:0 - iter_range: { - IDENT [32] { - name: @index6 - } - } - accu_var: @x0:0 - accu_init: { - CONSTANT [33] { value: false } - } - loop_condition: { - CALL [34] { - function: @not_strictly_false - args: { - CALL [35] { - function: !_ + COMPREHENSION [18] { + iter_var: @c0:0 + iter_range: { + CREATE_LIST [19] { + elements: { + CONSTANT [20] { value: 2 } + } + } + } + accu_var: @x0:0 + accu_init: { + CONSTANT [21] { value: false } + } + loop_condition: { + CALL [22] { + function: @not_strictly_false args: { - IDENT [36] { + CALL [23] { + function: !_ + args: { + IDENT [24] { + name: @x0:0 + } + } + } + } + } + } + loop_step: { + CALL [25] { + function: _||_ + args: { + IDENT [26] { name: @x0:0 } + CALL [27] { + function: _>_ + args: { + IDENT [28] { + name: @c0:0 + } + CONSTANT [29] { value: 1 } + } + } } } } - } - } - loop_step: { - IDENT [37] { - name: @index8 - } - } - result: { - IDENT [38] { - name: @x0:0 + result: { + IDENT [30] { + name: @x0:0 + } + } } } } - CREATE_LIST [39] { - elements: { - IDENT [40] { - name: @index9 + CALL [31] { + function: size + args: { + IDENT [32] { + name: @index0 } } } - CALL [41] { + CALL [33] { function: size args: { - IDENT [42] { - name: @index10 + IDENT [34] { + name: @index1 } } } - CALL [43] { + } + } + CALL [35] { + function: _==_ + args: { + CALL [36] { function: _+_ args: { - CALL [44] { + CALL [37] { function: _+_ args: { - CALL [45] { + CALL [38] { function: _+_ args: { - IDENT [46] { - name: @index5 + IDENT [39] { + name: @index2 } - IDENT [47] { - name: @index5 + IDENT [40] { + name: @index2 } } } - IDENT [48] { - name: @index11 + IDENT [41] { + name: @index3 } } } - IDENT [49] { - name: @index11 + IDENT [42] { + name: @index3 } } } - } - } - CALL [50] { - function: _==_ - args: { - IDENT [51] { - name: @index12 - } - CONSTANT [52] { value: 4 } + CONSTANT [43] { value: 4 } } } } @@ -1491,187 +1346,157 @@ CALL [1] { elements: { CREATE_LIST [3] { elements: { - CONSTANT [4] { value: 1 } - } - } - CALL [5] { - function: _>_ - args: { - IDENT [6] { - name: @c0:0 - } - CONSTANT [7] { value: 0 } - } - } - CALL [8] { - function: _||_ - args: { - IDENT [9] { - name: @x0:0 - } - IDENT [10] { - name: @index1 - } - } - } - COMPREHENSION [11] { - iter_var: @c0:0 - iter_range: { - IDENT [12] { - name: @index0 - } - } - accu_var: @x0:0 - accu_init: { - CONSTANT [13] { value: false } - } - loop_condition: { - CALL [14] { - function: @not_strictly_false - args: { - CALL [15] { - function: !_ + COMPREHENSION [4] { + iter_var: @c0:0 + iter_range: { + CREATE_LIST [5] { + elements: { + CONSTANT [6] { value: 1 } + } + } + } + accu_var: @x0:0 + accu_init: { + CONSTANT [7] { value: false } + } + loop_condition: { + CALL [8] { + function: @not_strictly_false args: { - IDENT [16] { + CALL [9] { + function: !_ + args: { + IDENT [10] { + name: @x0:0 + } + } + } + } + } + } + loop_step: { + CALL [11] { + function: _||_ + args: { + IDENT [12] { name: @x0:0 } + CALL [13] { + function: _>_ + args: { + IDENT [14] { + name: @c0:0 + } + CONSTANT [15] { value: 0 } + } + } } } } - } - } - loop_step: { - IDENT [17] { - name: @index2 - } - } - result: { - IDENT [18] { - name: @x0:0 - } - } - } - CREATE_LIST [19] { - elements: { - IDENT [20] { - name: @index3 + result: { + IDENT [16] { + name: @x0:0 + } + } } } } - CREATE_LIST [21] { + CREATE_LIST [17] { elements: { - CONSTANT [22] { value: "a" } - } - } - CALL [23] { - function: _==_ - args: { - IDENT [24] { - name: @c0:1 - } - CONSTANT [25] { value: "a" } - } - } - CALL [26] { - function: _||_ - args: { - IDENT [27] { - name: @x0:1 - } - IDENT [28] { - name: @index6 - } - } - } - COMPREHENSION [29] { - iter_var: @c0:1 - iter_range: { - IDENT [30] { - name: @index5 - } - } - accu_var: @x0:1 - accu_init: { - CONSTANT [31] { value: false } - } - loop_condition: { - CALL [32] { - function: @not_strictly_false - args: { - CALL [33] { - function: !_ + COMPREHENSION [18] { + iter_var: @c0:1 + iter_range: { + CREATE_LIST [19] { + elements: { + CONSTANT [20] { value: "a" } + } + } + } + accu_var: @x0:1 + accu_init: { + CONSTANT [21] { value: false } + } + loop_condition: { + CALL [22] { + function: @not_strictly_false + args: { + CALL [23] { + function: !_ + args: { + IDENT [24] { + name: @x0:1 + } + } + } + } + } + } + loop_step: { + CALL [25] { + function: _||_ args: { - IDENT [34] { + IDENT [26] { name: @x0:1 } + CALL [27] { + function: _==_ + args: { + IDENT [28] { + name: @c0:1 + } + CONSTANT [29] { value: "a" } + } + } } } } + result: { + IDENT [30] { + name: @x0:1 + } + } } } - loop_step: { - IDENT [35] { - name: @index7 - } - } - result: { - IDENT [36] { - name: @x0:1 - } - } - } - CREATE_LIST [37] { - elements: { - IDENT [38] { - name: @index8 - } - } - } - CREATE_LIST [39] { - elements: { - CONSTANT [40] { value: true } - CONSTANT [41] { value: true } - CONSTANT [42] { value: true } - CONSTANT [43] { value: true } - } } - CALL [44] { + } + } + CALL [31] { + function: _==_ + args: { + CALL [32] { function: _+_ args: { - CALL [45] { + CALL [33] { function: _+_ args: { - CALL [46] { + CALL [34] { function: _+_ args: { - IDENT [47] { - name: @index4 + IDENT [35] { + name: @index0 } - IDENT [48] { - name: @index4 + IDENT [36] { + name: @index0 } } } - IDENT [49] { - name: @index9 + IDENT [37] { + name: @index1 } } } - IDENT [50] { - name: @index9 + IDENT [38] { + name: @index1 } } } - } - } - CALL [51] { - function: _==_ - args: { - IDENT [52] { - name: @index11 - } - IDENT [53] { - name: @index10 + CREATE_LIST [39] { + elements: { + CONSTANT [40] { value: true } + CONSTANT [41] { value: true } + CONSTANT [42] { value: true } + CONSTANT [43] { value: true } + } } } } @@ -1699,52 +1524,39 @@ CALL [1] { CONSTANT [10] { value: 4 } } } - CREATE_LIST [11] { - elements: { - IDENT [12] { - name: @index1 - } - IDENT [13] { - name: @index1 - } - IDENT [14] { - name: @index1 - } - } - } - COMPREHENSION [15] { + COMPREHENSION [11] { iter_var: @c1:0 iter_range: { - IDENT [16] { + IDENT [12] { name: @index0 } } accu_var: @x1:0 accu_init: { - CREATE_LIST [17] { + CREATE_LIST [13] { elements: { } } } loop_condition: { - CONSTANT [18] { value: true } + CONSTANT [14] { value: true } } loop_step: { - CALL [19] { + CALL [15] { function: _+_ args: { - IDENT [20] { + IDENT [16] { name: @x1:0 } - CREATE_LIST [21] { + CREATE_LIST [17] { elements: { - CALL [22] { + CALL [18] { function: _+_ args: { - IDENT [23] { + IDENT [19] { name: @c1:0 } - CONSTANT [24] { value: 1 } + CONSTANT [20] { value: 1 } } } } @@ -1753,39 +1565,44 @@ CALL [1] { } } result: { - IDENT [25] { + IDENT [21] { name: @x1:0 } } } - COMPREHENSION [26] { + } + } + CALL [22] { + function: _==_ + args: { + COMPREHENSION [23] { iter_var: @c0:0 iter_range: { - IDENT [27] { + IDENT [24] { name: @index0 } } accu_var: @x0:0 accu_init: { - CREATE_LIST [28] { + CREATE_LIST [25] { elements: { } } } loop_condition: { - CONSTANT [29] { value: true } + CONSTANT [26] { value: true } } loop_step: { - CALL [30] { + CALL [27] { function: _+_ args: { - IDENT [31] { + IDENT [28] { name: @x0:0 } - CREATE_LIST [32] { + CREATE_LIST [29] { elements: { - IDENT [33] { - name: @index3 + IDENT [30] { + name: @index2 } } } @@ -1793,21 +1610,23 @@ CALL [1] { } } result: { - IDENT [34] { + IDENT [31] { name: @x0:0 } } } - } - } - CALL [35] { - function: _==_ - args: { - IDENT [36] { - name: @index4 - } - IDENT [37] { - name: @index2 + CREATE_LIST [32] { + elements: { + IDENT [33] { + name: @index1 + } + IDENT [34] { + name: @index1 + } + IDENT [35] { + name: @index1 + } + } } } } @@ -1821,114 +1640,105 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CREATE_LIST [4] { - elements: { - CONSTANT [5] { value: 1 } - } - } - CREATE_LIST [6] { - elements: { - CONSTANT [7] { value: 2 } - } - } - } - } - COMPREHENSION [8] { + COMPREHENSION [3] { iter_var: @c1:0 iter_range: { - CREATE_LIST [9] { + CREATE_LIST [4] { elements: { - CONSTANT [10] { value: 1 } - CONSTANT [11] { value: 2 } - CONSTANT [12] { value: 3 } + CONSTANT [5] { value: 1 } + CONSTANT [6] { value: 2 } + CONSTANT [7] { value: 3 } } } } accu_var: @x1:0 accu_init: { - CREATE_LIST [13] { + CREATE_LIST [8] { elements: { } } } loop_condition: { - CONSTANT [14] { value: true } + CONSTANT [9] { value: true } } loop_step: { - CALL [15] { + CALL [10] { function: _?_:_ args: { - CALL [16] { + CALL [11] { function: _==_ args: { - IDENT [17] { + IDENT [12] { name: @c1:0 } - IDENT [18] { + IDENT [13] { name: @c0:0 } } } - CALL [19] { + CALL [14] { function: _+_ args: { - IDENT [20] { + IDENT [15] { name: @x1:0 } - CREATE_LIST [21] { + CREATE_LIST [16] { elements: { - IDENT [22] { + IDENT [17] { name: @c1:0 } } } } } - IDENT [23] { + IDENT [18] { name: @x1:0 } } } } result: { - IDENT [24] { + IDENT [19] { name: @x1:0 } } } - COMPREHENSION [25] { + } + } + CALL [20] { + function: _==_ + args: { + COMPREHENSION [21] { iter_var: @c0:0 iter_range: { - CREATE_LIST [26] { + CREATE_LIST [22] { elements: { - CONSTANT [27] { value: 1 } - CONSTANT [28] { value: 2 } + CONSTANT [23] { value: 1 } + CONSTANT [24] { value: 2 } } } } accu_var: @x0:0 accu_init: { - CREATE_LIST [29] { + CREATE_LIST [25] { elements: { } } } loop_condition: { - CONSTANT [30] { value: true } + CONSTANT [26] { value: true } } loop_step: { - CALL [31] { + CALL [27] { function: _+_ args: { - IDENT [32] { + IDENT [28] { name: @x0:0 } - CREATE_LIST [33] { + CREATE_LIST [29] { elements: { - IDENT [34] { - name: @index1 + IDENT [30] { + name: @index0 } } } @@ -1936,21 +1746,24 @@ CALL [1] { } } result: { - IDENT [35] { + IDENT [31] { name: @x0:0 } } } - } - } - CALL [36] { - function: _==_ - args: { - IDENT [37] { - name: @index2 - } - IDENT [38] { - name: @index0 + CREATE_LIST [32] { + elements: { + CREATE_LIST [33] { + elements: { + CONSTANT [34] { value: 1 } + } + } + CREATE_LIST [35] { + elements: { + CONSTANT [36] { value: 2 } + } + } + } } } } @@ -1964,74 +1777,72 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 1 } - CONSTANT [5] { value: 2 } - CONSTANT [6] { value: 3 } - } - } - CALL [7] { + CALL [3] { function: @in args: { - CONSTANT [8] { value: 1 } - IDENT [9] { - name: @index0 + CONSTANT [4] { value: 1 } + CREATE_LIST [5] { + elements: { + CONSTANT [6] { value: 1 } + CONSTANT [7] { value: 2 } + CONSTANT [8] { value: 3 } + } } } } - CALL [10] { + CREATE_LIST [9] { + elements: { + CONSTANT [10] { value: 1 } + CONSTANT [11] { value: 2 } + CONSTANT [12] { value: 3 } + } + } + } + } + CALL [13] { + function: _&&_ + args: { + CALL [14] { function: _&&_ args: { - CALL [11] { + IDENT [15] { + name: @index0 + } + CALL [16] { function: @in args: { - CONSTANT [12] { value: 3 } - CREATE_LIST [13] { - elements: { - CONSTANT [14] { value: 3 } - IDENT [15] { - name: @index0 - } - } + CONSTANT [17] { value: 2 } + IDENT [18] { + name: @index1 } } } - IDENT [16] { - name: @index1 - } } } - CALL [17] { + CALL [19] { function: _&&_ args: { - IDENT [18] { - name: @index1 - } - CALL [19] { + CALL [20] { function: @in args: { - CONSTANT [20] { value: 2 } - IDENT [21] { - name: @index0 + CONSTANT [21] { value: 3 } + CREATE_LIST [22] { + elements: { + CONSTANT [23] { value: 3 } + IDENT [24] { + name: @index1 + } + } } } } + IDENT [25] { + name: @index0 + } } } } } - CALL [22] { - function: _&&_ - args: { - IDENT [23] { - name: @index3 - } - IDENT [24] { - name: @index2 - } - } - } } } Test case: INCLUSION_MAP @@ -2052,31 +1863,37 @@ CALL [1] { } } } - CREATE_MAP [7] { - MAP_ENTRY [8] { + } + } + CALL [7] { + function: @in + args: { + CONSTANT [8] { value: 2 } + CREATE_MAP [9] { + MAP_ENTRY [10] { key: { - CONSTANT [9] { value: "a" } + CONSTANT [11] { value: "a" } } value: { - CONSTANT [10] { value: 1 } + CONSTANT [12] { value: 1 } } } - MAP_ENTRY [11] { + MAP_ENTRY [13] { key: { - CONSTANT [12] { value: 2 } + CONSTANT [14] { value: 2 } } value: { - IDENT [13] { + IDENT [15] { name: @index0 } } } - MAP_ENTRY [14] { + MAP_ENTRY [16] { key: { - CONSTANT [15] { value: 3 } + CONSTANT [17] { value: 3 } } value: { - IDENT [16] { + IDENT [18] { name: @index0 } } @@ -2084,15 +1901,6 @@ CALL [1] { } } } - CALL [17] { - function: @in - args: { - CONSTANT [18] { value: 2 } - IDENT [19] { - name: @index1 - } - } - } } } Test case: MACRO_ITER_VAR_NOT_REFERENCED @@ -2105,85 +1913,79 @@ CALL [1] { elements: { CREATE_LIST [3] { elements: { - CONSTANT [4] { value: 1 } - CONSTANT [5] { value: 2 } + CREATE_LIST [4] { + elements: { + CONSTANT [5] { value: 3 } + CONSTANT [6] { value: 4 } + } + } + CREATE_LIST [7] { + elements: { + CONSTANT [8] { value: 3 } + CONSTANT [9] { value: 4 } + } + } } } - CREATE_LIST [6] { + CREATE_LIST [10] { elements: { - CONSTANT [7] { value: 3 } - CONSTANT [8] { value: 4 } + CONSTANT [11] { value: 1 } + CONSTANT [12] { value: 2 } } } - CREATE_LIST [9] { - elements: { - IDENT [10] { - name: @index1 - } - IDENT [11] { + COMPREHENSION [13] { + iter_var: @c1:0 + iter_range: { + IDENT [14] { name: @index1 } } - } - CREATE_LIST [12] { - elements: { - IDENT [13] { - name: @index2 - } - IDENT [14] { - name: @index2 + accu_var: @x1:0 + accu_init: { + CREATE_LIST [15] { + elements: { + } } } - } - CREATE_LIST [15] { - elements: { - COMPREHENSION [16] { - iter_var: @c1:0 - iter_range: { - IDENT [17] { - name: @index0 + loop_condition: { + CONSTANT [16] { value: true } + } + loop_step: { + CALL [17] { + function: _+_ + args: { + IDENT [18] { + name: @x1:0 } - } - accu_var: @x1:0 - accu_init: { - CREATE_LIST [18] { + CREATE_LIST [19] { elements: { - } - } - } - loop_condition: { - CONSTANT [19] { value: true } - } - loop_step: { - CALL [20] { - function: _+_ - args: { - IDENT [21] { - name: @x1:0 - } - CREATE_LIST [22] { + CREATE_LIST [20] { elements: { - IDENT [23] { - name: @index1 - } + CONSTANT [21] { value: 3 } + CONSTANT [22] { value: 4 } } } } } } - result: { - IDENT [24] { - name: @x1:0 - } - } + } + } + result: { + IDENT [23] { + name: @x1:0 } } } + } + } + CALL [24] { + function: _==_ + args: { COMPREHENSION [25] { iter_var: @c0:0 iter_range: { IDENT [26] { - name: @index0 + name: @index1 } } accu_var: @x0:0 @@ -2203,28 +2005,31 @@ CALL [1] { IDENT [30] { name: @x0:0 } - IDENT [31] { - name: @index4 + CREATE_LIST [31] { + elements: { + IDENT [32] { + name: @index2 + } + } } } } } result: { - IDENT [32] { + IDENT [33] { name: @x0:0 } } } - } - } - CALL [33] { - function: _==_ - args: { - IDENT [34] { - name: @index5 - } - IDENT [35] { - name: @index3 + CREATE_LIST [34] { + elements: { + IDENT [35] { + name: @index0 + } + IDENT [36] { + name: @index0 + } + } } } } @@ -2239,38 +2044,41 @@ CALL [1] { CREATE_LIST [2] { elements: { CALL [3] { - function: _-_ - args: { - IDENT [4] { - name: x - } - CONSTANT [5] { value: 1 } - } - } - CALL [6] { function: _>_ args: { - IDENT [7] { - name: @index0 + CALL [4] { + function: _-_ + args: { + IDENT [5] { + name: x + } + CONSTANT [6] { value: 1 } + } } - CONSTANT [8] { value: 3 } + CONSTANT [7] { value: 3 } } } - COMPREHENSION [9] { + COMPREHENSION [8] { iter_var: @c0:0 iter_range: { - CREATE_LIST [10] { + CREATE_LIST [9] { elements: { - CALL [11] { + CALL [10] { function: _?_:_ args: { - IDENT [12] { - name: @index1 - } - IDENT [13] { + IDENT [11] { name: @index0 } - CONSTANT [14] { value: 5 } + CALL [12] { + function: _-_ + args: { + IDENT [13] { + name: x + } + CONSTANT [14] { value: 1 } + } + } + CONSTANT [15] { value: 5 } } } } @@ -2278,16 +2086,16 @@ CALL [1] { } accu_var: @x0:0 accu_init: { - CONSTANT [15] { value: false } + CONSTANT [16] { value: false } } loop_condition: { - CALL [16] { + CALL [17] { function: @not_strictly_false args: { - CALL [17] { + CALL [18] { function: !_ args: { - IDENT [18] { + IDENT [19] { name: @x0:0 } } @@ -2296,47 +2104,47 @@ CALL [1] { } } loop_step: { - CALL [19] { + CALL [20] { function: _||_ args: { - IDENT [20] { + IDENT [21] { name: @x0:0 } - CALL [21] { + CALL [22] { function: _>_ args: { - CALL [22] { + CALL [23] { function: _-_ args: { - IDENT [23] { + IDENT [24] { name: @c0:0 } - CONSTANT [24] { value: 1 } + CONSTANT [25] { value: 1 } } } - CONSTANT [25] { value: 3 } + CONSTANT [26] { value: 3 } } } } } } result: { - IDENT [26] { + IDENT [27] { name: @x0:0 } } } } } - CALL [27] { + CALL [28] { function: _||_ args: { - IDENT [28] { - name: @index2 - } IDENT [29] { name: @index1 } + IDENT [30] { + name: @index0 + } } } } @@ -2371,63 +2179,41 @@ CALL [1] { } } } - CALL [9] { - function: _+_ - args: { - IDENT [10] { - name: @x0:0 - } - CREATE_LIST [11] { - elements: { - CREATE_LIST [12] { - elements: { - IDENT [13] { - name: @index1 - } - IDENT [14] { - name: @index1 - } - } - } - } - } - } - } - COMPREHENSION [15] { + COMPREHENSION [9] { iter_var: @c1:0 iter_range: { - CREATE_LIST [16] { + CREATE_LIST [10] { elements: { - CONSTANT [17] { value: "foo" } - CONSTANT [18] { value: "bar" } + CONSTANT [11] { value: "foo" } + CONSTANT [12] { value: "bar" } } } } accu_var: @x1:0 accu_init: { - CREATE_LIST [19] { + CREATE_LIST [13] { elements: { } } } loop_condition: { - CONSTANT [20] { value: true } + CONSTANT [14] { value: true } } loop_step: { - CALL [21] { + CALL [15] { function: _+_ args: { - IDENT [22] { + IDENT [16] { name: @x1:0 } - CREATE_LIST [23] { + CREATE_LIST [17] { elements: { - CREATE_LIST [24] { + CREATE_LIST [18] { elements: { - IDENT [25] { + IDENT [19] { name: @index0 } - IDENT [26] { + IDENT [20] { name: @index0 } } @@ -2438,37 +2224,56 @@ CALL [1] { } } result: { - IDENT [27] { + IDENT [21] { name: @x1:0 } } } } } - COMPREHENSION [28] { + COMPREHENSION [22] { iter_var: @c0:0 iter_range: { - IDENT [29] { - name: @index3 + IDENT [23] { + name: @index2 } } accu_var: @x0:0 accu_init: { - CREATE_LIST [30] { + CREATE_LIST [24] { elements: { } } } loop_condition: { - CONSTANT [31] { value: true } + CONSTANT [25] { value: true } } loop_step: { - IDENT [32] { - name: @index2 + CALL [26] { + function: _+_ + args: { + IDENT [27] { + name: @x0:0 + } + CREATE_LIST [28] { + elements: { + CREATE_LIST [29] { + elements: { + IDENT [30] { + name: @index1 + } + IDENT [31] { + name: @index1 + } + } + } + } + } + } } } result: { - IDENT [33] { + IDENT [32] { name: @x0:0 } } @@ -2493,27 +2298,24 @@ CALL [1] { } } } - CALL [7] { - function: _[_] - args: { - IDENT [8] { - name: @index0 - } - CONSTANT [9] { value: "a" } - } - } } } - CALL [10] { + CALL [7] { function: _&&_ args: { - SELECT [11] { - IDENT [12] { + SELECT [8] { + IDENT [9] { name: @index0 }.a~presence_test } - IDENT [13] { - name: @index1 + CALL [10] { + function: _[_] + args: { + IDENT [11] { + name: @index0 + } + CONSTANT [12] { value: "a" } + } } } } @@ -2532,33 +2334,30 @@ CALL [1] { name: msg }.oneof_type } - CALL [5] { + } + } + CALL [5] { + function: _==_ + args: { + CALL [6] { function: _?_:_ args: { - SELECT [6] { - IDENT [7] { + SELECT [7] { + IDENT [8] { name: @index0 }.payload~presence_test } - SELECT [8] { - SELECT [9] { - IDENT [10] { + SELECT [9] { + SELECT [10] { + IDENT [11] { name: @index0 }.payload }.single_int64 } - CONSTANT [11] { value: 0 } + CONSTANT [12] { value: 0 } } } - } - } - CALL [12] { - function: _==_ - args: { - IDENT [13] { - name: @index1 - } - CONSTANT [14] { value: 10 } + CONSTANT [13] { value: 10 } } } } @@ -2572,51 +2371,44 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg + }.oneof_type + }.payload }.single_int64 } - CALL [9] { + } + } + CALL [7] { + function: _==_ + args: { + CALL [8] { function: _?_:_ args: { - SELECT [10] { - IDENT [11] { - name: @index0 + SELECT [9] { + SELECT [10] { + IDENT [11] { + name: msg + }.oneof_type }.payload~presence_test } IDENT [12] { - name: @index2 + name: @index0 } CALL [13] { function: _*_ args: { IDENT [14] { - name: @index2 + name: @index0 } CONSTANT [15] { value: 0 } } } } } - } - } - CALL [16] { - function: _==_ - args: { - IDENT [17] { - name: @index3 - } - CONSTANT [18] { value: 10 } + CONSTANT [16] { value: 10 } } } } @@ -2630,36 +2422,34 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg + }.oneof_type + }.payload }.single_int64 } - CALL [9] { + CALL [7] { function: _?_:_ args: { - SELECT [10] { - IDENT [11] { - name: @index1 + SELECT [8] { + SELECT [9] { + SELECT [10] { + IDENT [11] { + name: msg + }.oneof_type + }.payload }.single_int64~presence_test } IDENT [12] { - name: @index2 + name: @index0 } CALL [13] { function: _*_ args: { IDENT [14] { - name: @index2 + name: @index0 } CONSTANT [15] { value: 0 } } @@ -2672,7 +2462,7 @@ CALL [1] { function: _==_ args: { IDENT [17] { - name: @index3 + name: @index1 } CONSTANT [18] { value: 10 } } @@ -2688,72 +2478,43 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg + }.oneof_type + }.payload }.map_string_string } - CALL [9] { - function: _?_:_ - args: { - CALL [10] { - function: _&&_ - args: { - SELECT [11] { - IDENT [12] { - name: @index1 - }.map_string_string~presence_test - } - SELECT [13] { - IDENT [14] { - name: @index2 - }.key~presence_test - } - } - } - CALL [15] { - function: _==_ - args: { - SELECT [16] { - IDENT [17] { - name: @index2 - }.key - } - CONSTANT [18] { value: "A" } - } - } - CONSTANT [19] { value: false } - } + SELECT [7] { + SELECT [8] { + IDENT [9] { + name: msg + }.oneof_type + }.payload } - CALL [20] { + CALL [10] { function: _&&_ args: { - CALL [21] { + CALL [11] { function: _&&_ args: { - SELECT [22] { - IDENT [23] { + SELECT [12] { + IDENT [13] { name: msg }.oneof_type~presence_test } - SELECT [24] { - IDENT [25] { - name: @index0 + SELECT [14] { + SELECT [15] { + IDENT [16] { + name: msg + }.oneof_type }.payload~presence_test } } } - SELECT [26] { - IDENT [27] { + SELECT [17] { + IDENT [18] { name: @index1 }.single_int64~presence_test } @@ -2761,16 +2522,45 @@ CALL [1] { } } } - CALL [28] { + CALL [19] { function: _?_:_ args: { - IDENT [29] { - name: @index4 + IDENT [20] { + name: @index2 } - IDENT [30] { - name: @index3 + CALL [21] { + function: _?_:_ + args: { + CALL [22] { + function: _&&_ + args: { + SELECT [23] { + IDENT [24] { + name: @index1 + }.map_string_string~presence_test + } + SELECT [25] { + IDENT [26] { + name: @index0 + }.key~presence_test + } + } + } + CALL [27] { + function: _==_ + args: { + SELECT [28] { + IDENT [29] { + name: @index0 + }.key + } + CONSTANT [30] { value: "A" } + } + } + CONSTANT [31] { value: false } + } } - CONSTANT [31] { value: false } + CONSTANT [32] { value: false } } } } @@ -2783,44 +2573,49 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CALL [3] { - function: optional.none - args: { - } - } - CREATE_LIST [4] { + CREATE_LIST [3] { elements: { - IDENT [5] { - name: @index0 + CALL [4] { + function: optional.none + args: { + } } - IDENT [6] { + IDENT [5] { name: opt_x } } optional_indices: [0, 1] } - CREATE_LIST [7] { + CREATE_LIST [6] { elements: { - CONSTANT [8] { value: 5 } + CONSTANT [7] { value: 5 } } } + } + } + CALL [8] { + function: _==_ + args: { CREATE_LIST [9] { elements: { CONSTANT [10] { value: 10 } - IDENT [11] { - name: @index2 + CALL [11] { + function: optional.none + args: { + } } IDENT [12] { - name: @index2 + name: @index0 + } + IDENT [13] { + name: @index0 } } + optional_indices: [0] } - CREATE_LIST [13] { + CREATE_LIST [14] { elements: { - CONSTANT [14] { value: 10 } - IDENT [15] { - name: @index0 - } + CONSTANT [15] { value: 10 } IDENT [16] { name: @index1 } @@ -2828,18 +2623,6 @@ CALL [1] { name: @index1 } } - optional_indices: [0] - } - } - } - CALL [18] { - function: _==_ - args: { - IDENT [19] { - name: @index4 - } - IDENT [20] { - name: @index3 } } } @@ -2854,53 +2637,44 @@ CALL [1] { CREATE_LIST [2] { elements: { CALL [3] { - function: optional.of - args: { - CONSTANT [4] { value: "hello" } - } - } - CREATE_MAP [5] { - MAP_ENTRY [6] { - key: { - CONSTANT [7] { value: "hello" } - } - optional_entry: true - value: { - IDENT [8] { - name: @index0 - } - } - } - } - CALL [9] { function: _[_] args: { - IDENT [10] { - name: @index1 + CREATE_MAP [4] { + MAP_ENTRY [5] { + key: { + CONSTANT [6] { value: "hello" } + } + optional_entry: true + value: { + CALL [7] { + function: optional.of + args: { + CONSTANT [8] { value: "hello" } + } + } + } + } } - CONSTANT [11] { value: "hello" } + CONSTANT [9] { value: "hello" } } } - CALL [12] { + } + } + CALL [10] { + function: _==_ + args: { + CALL [11] { function: _+_ args: { - IDENT [13] { - name: @index2 + IDENT [12] { + name: @index0 } - IDENT [14] { - name: @index2 + IDENT [13] { + name: @index0 } } } - } - } - CALL [15] { - function: _==_ - args: { - IDENT [16] { - name: @index3 - } - CONSTANT [17] { value: "hellohello" } + CONSTANT [14] { value: "hellohello" } } } } @@ -2924,145 +2698,130 @@ CALL [1] { } } CALL [7] { - function: _[_] - args: { - IDENT [8] { - name: @index0 - } - CONSTANT [9] { value: "key" } - } - } - CALL [10] { function: or target: { - CALL [11] { + CALL [8] { function: _[?_] args: { - CREATE_MAP [12] { - MAP_ENTRY [13] { + CREATE_MAP [9] { + MAP_ENTRY [10] { key: { - CONSTANT [14] { value: "key" } + CONSTANT [11] { value: "key" } } optional_entry: true value: { - CALL [15] { + CALL [12] { function: optional.of args: { - CONSTANT [16] { value: "test" } + CONSTANT [13] { value: "test" } } } } } } - CONSTANT [17] { value: "bogus" } + CONSTANT [14] { value: "bogus" } } } } args: { - CALL [18] { + CALL [15] { function: _[?_] args: { - IDENT [19] { + IDENT [16] { name: @index0 } - CONSTANT [20] { value: "bogus" } + CONSTANT [17] { value: "bogus" } } } } } - CALL [21] { + } + } + CALL [18] { + function: _==_ + args: { + CALL [19] { function: orValue target: { - IDENT [22] { - name: @index2 + IDENT [20] { + name: @index1 } } args: { - IDENT [23] { - name: @index1 + CALL [21] { + function: _[_] + args: { + IDENT [22] { + name: @index0 + } + CONSTANT [23] { value: "key" } + } } } } - } - } - CALL [24] { - function: _==_ - args: { - IDENT [25] { - name: @index3 - } - CONSTANT [26] { value: "test" } + CONSTANT [24] { value: "test" } } } } } -Test case: OPTIONAL_MESSAGE -Source: TestAllTypes{?single_int64: optional.ofNonZeroValue(1), ?single_int32: optional.of(4)}.single_int32 + TestAllTypes{?single_int64: optional.ofNonZeroValue(1), ?single_int32: optional.of(4)}.single_int64 == 5 -=====> -CALL [1] { - function: cel.@block - args: { - CREATE_LIST [2] { - elements: { - CALL [3] { - function: optional.ofNonZeroValue - args: { - CONSTANT [4] { value: 1 } - } - } - CALL [5] { - function: optional.of - args: { - CONSTANT [6] { value: 4 } - } - } - CREATE_STRUCT [7] { +Test case: OPTIONAL_MESSAGE +Source: TestAllTypes{?single_int64: optional.ofNonZeroValue(1), ?single_int32: optional.of(4)}.single_int32 + TestAllTypes{?single_int64: optional.ofNonZeroValue(1), ?single_int32: optional.of(4)}.single_int64 == 5 +=====> +CALL [1] { + function: cel.@block + args: { + CREATE_LIST [2] { + elements: { + CREATE_STRUCT [3] { name: TestAllTypes entries: { - ENTRY [8] { + ENTRY [4] { field_key: single_int64 optional_entry: true value: { - IDENT [9] { - name: @index0 + CALL [5] { + function: optional.ofNonZeroValue + args: { + CONSTANT [6] { value: 1 } + } } } } - ENTRY [10] { + ENTRY [7] { field_key: single_int32 optional_entry: true value: { - IDENT [11] { - name: @index1 + CALL [8] { + function: optional.of + args: { + CONSTANT [9] { value: 4 } + } } } } } } - CALL [12] { + } + } + CALL [10] { + function: _==_ + args: { + CALL [11] { function: _+_ args: { - SELECT [13] { - IDENT [14] { - name: @index2 + SELECT [12] { + IDENT [13] { + name: @index0 }.single_int32 } - SELECT [15] { - IDENT [16] { - name: @index2 + SELECT [14] { + IDENT [15] { + name: @index0 }.single_int64 } } } - } - } - CALL [17] { - function: _==_ - args: { - IDENT [18] { - name: @index3 - } - CONSTANT [19] { value: 5 } + CONSTANT [16] { value: 5 } } } } @@ -3078,58 +2837,46 @@ CALL [1] { CALL [3] { function: _+_ args: { - CONSTANT [4] { value: "h" } - CONSTANT [5] { value: "e" } - } - } - CALL [6] { - function: _+_ - args: { - IDENT [7] { - name: @index0 - } - CONSTANT [8] { value: "l" } - } - } - CALL [9] { - function: _+_ - args: { - IDENT [10] { - name: @index1 - } - CONSTANT [11] { value: "l" } - } - } - CALL [12] { - function: _+_ - args: { - IDENT [13] { - name: @index2 - } - CONSTANT [14] { value: "o" } - } - } - CALL [15] { - function: _+_ - args: { - IDENT [16] { - name: @index3 + CALL [4] { + function: _+_ + args: { + CALL [5] { + function: _+_ + args: { + CALL [6] { + function: _+_ + args: { + CONSTANT [7] { value: "h" } + CONSTANT [8] { value: "e" } + } + } + CONSTANT [9] { value: "l" } + } + } + CONSTANT [10] { value: "l" } + } } - CONSTANT [17] { value: " world" } + CONSTANT [11] { value: "o" } } } } } - CALL [18] { + CALL [12] { function: matches target: { - IDENT [19] { - name: @index4 + CALL [13] { + function: _+_ + args: { + IDENT [14] { + name: @index0 + } + CONSTANT [15] { value: " world" } + } } } args: { - IDENT [20] { - name: @index3 + IDENT [16] { + name: @index0 } } } @@ -3216,26 +2963,23 @@ CALL [1] { CONSTANT [11] { value: "o" } } } - CALL [12] { + } + } + CALL [12] { + function: matches + target: { + CALL [13] { function: _+_ args: { - IDENT [13] { + IDENT [14] { name: @index0 } - CONSTANT [14] { value: " world" } + CONSTANT [15] { value: " world" } } } } - } - CALL [15] { - function: matches - target: { - IDENT [16] { - name: @index1 - } - } args: { - CONSTANT [17] { value: "hello" } + CONSTANT [16] { value: "hello" } } } } @@ -3260,17 +3004,17 @@ CALL [1] { CALL [6] { function: _+_ args: { - CONSTANT [7] { value: "w" } - CONSTANT [8] { value: "o" } + CONSTANT [7] { value: "h" } + CONSTANT [8] { value: "e" } } } - CONSTANT [9] { value: "r" } + CONSTANT [9] { value: "l" } } } CONSTANT [10] { value: "l" } } } - CONSTANT [11] { value: "d" } + CONSTANT [11] { value: "o" } } } CALL [12] { @@ -3285,40 +3029,37 @@ CALL [1] { CALL [15] { function: _+_ args: { - CONSTANT [16] { value: "h" } - CONSTANT [17] { value: "e" } + CONSTANT [16] { value: "w" } + CONSTANT [17] { value: "o" } } } - CONSTANT [18] { value: "l" } + CONSTANT [18] { value: "r" } } } CONSTANT [19] { value: "l" } } } - CONSTANT [20] { value: "o" } - } - } - CALL [21] { - function: _+_ - args: { - IDENT [22] { - name: @index1 - } - CONSTANT [23] { value: " world" } + CONSTANT [20] { value: "d" } } } } } - CALL [24] { + CALL [21] { function: matches target: { - IDENT [25] { - name: @index2 + CALL [22] { + function: _+_ + args: { + IDENT [23] { + name: @index0 + } + CONSTANT [24] { value: " world" } + } } } args: { - IDENT [26] { - name: @index0 + IDENT [25] { + name: @index1 } } } @@ -3333,74 +3074,66 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 - }.single_int64 - } - SELECT [9] { - IDENT [10] { - name: msg + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg + }.oneof_type + }.payload }.single_int64 } - SELECT [11] { - IDENT [12] { - name: @index1 - }.single_int32 - } } } - CALL [13] { + CALL [7] { function: _+_ args: { - CALL [14] { + CALL [8] { function: _+_ args: { - CALL [15] { + CALL [9] { function: _+_ args: { - CALL [16] { + CALL [10] { function: non_pure_custom_func args: { - IDENT [17] { - name: @index2 + IDENT [11] { + name: @index0 } } } - CALL [18] { + CALL [12] { function: non_pure_custom_func args: { - IDENT [19] { - name: @index4 + SELECT [13] { + SELECT [14] { + SELECT [15] { + IDENT [16] { + name: msg + }.oneof_type + }.payload + }.single_int32 } } } } } - CALL [20] { + CALL [17] { function: non_pure_custom_func args: { - IDENT [21] { - name: @index2 + IDENT [18] { + name: @index0 } } } } } - CALL [22] { + CALL [19] { function: non_pure_custom_func args: { - IDENT [23] { - name: @index3 + SELECT [20] { + IDENT [21] { + name: msg + }.single_int64 } } } @@ -3416,39 +3149,39 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 - }.single_int64 - } - CALL [9] { + CALL [3] { function: pure_custom_func args: { - IDENT [10] { - name: @index2 + SELECT [4] { + SELECT [5] { + SELECT [6] { + IDENT [7] { + name: msg + }.oneof_type + }.payload + }.single_int64 } } } - CALL [11] { + CALL [8] { function: pure_custom_func args: { - SELECT [12] { - IDENT [13] { - name: msg - }.single_int64 + SELECT [9] { + SELECT [10] { + SELECT [11] { + IDENT [12] { + name: msg + }.oneof_type + }.payload + }.single_int32 } } } + } + } + CALL [13] { + function: _+_ + args: { CALL [14] { function: _+_ args: { @@ -3456,35 +3189,27 @@ CALL [1] { function: _+_ args: { IDENT [16] { - name: @index3 + name: @index0 } - CALL [17] { - function: pure_custom_func - args: { - SELECT [18] { - IDENT [19] { - name: @index1 - }.single_int32 - } - } + IDENT [17] { + name: @index1 } } } - IDENT [20] { - name: @index3 + IDENT [18] { + name: @index0 } } } - } - } - CALL [21] { - function: _+_ - args: { - IDENT [22] { - name: @index5 - } - IDENT [23] { - name: @index4 + CALL [19] { + function: pure_custom_func + args: { + SELECT [20] { + IDENT [21] { + name: msg + }.single_int64 + } + } } } } diff --git a/optimizer/src/test/resources/subexpression_ast_block_recursion_depth_5.baseline b/optimizer/src/test/resources/subexpression_ast_block_recursion_depth_5.baseline index d5d799e1f..470c6a612 100644 --- a/optimizer/src/test/resources/subexpression_ast_block_recursion_depth_5.baseline +++ b/optimizer/src/test/resources/subexpression_ast_block_recursion_depth_5.baseline @@ -6,20 +6,22 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 1 } - CONSTANT [5] { value: 2 } - } - } - CALL [6] { + CALL [3] { function: size args: { - IDENT [7] { - name: @index0 + CREATE_LIST [4] { + elements: { + CONSTANT [5] { value: 1 } + CONSTANT [6] { value: 2 } + } } } } + } + } + CALL [7] { + function: _==_ + args: { CALL [8] { function: _+_ args: { @@ -27,25 +29,17 @@ CALL [1] { function: _+_ args: { IDENT [10] { - name: @index1 + name: @index0 } IDENT [11] { - name: @index1 + name: @index0 } } } CONSTANT [12] { value: 1 } } } - } - } - CALL [13] { - function: _==_ - args: { - IDENT [14] { - name: @index2 - } - CONSTANT [15] { value: 5 } + CONSTANT [13] { value: 5 } } } } @@ -58,20 +52,22 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 1 } - CONSTANT [5] { value: 2 } - } - } - CALL [6] { + CALL [3] { function: size args: { - IDENT [7] { - name: @index0 + CREATE_LIST [4] { + elements: { + CONSTANT [5] { value: 1 } + CONSTANT [6] { value: 2 } + } } } } + } + } + CALL [7] { + function: _==_ + args: { CALL [8] { function: _+_ args: { @@ -83,27 +79,19 @@ CALL [1] { args: { CONSTANT [11] { value: 2 } IDENT [12] { - name: @index1 + name: @index0 } } } IDENT [13] { - name: @index1 + name: @index0 } } } CONSTANT [14] { value: 1 } } } - } - } - CALL [15] { - function: _==_ - args: { - IDENT [16] { - name: @index2 - } - CONSTANT [17] { value: 7 } + CONSTANT [15] { value: 7 } } } } @@ -116,69 +104,60 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 0 } - } - } - CALL [5] { + CALL [3] { function: size args: { - IDENT [6] { - name: @index0 + CREATE_LIST [4] { + elements: { + CONSTANT [5] { value: 0 } + } } } } - CREATE_LIST [7] { - elements: { - CONSTANT [8] { value: 1 } - CONSTANT [9] { value: 2 } - } - } - CALL [10] { + CALL [6] { function: size args: { - IDENT [11] { - name: @index2 + CREATE_LIST [7] { + elements: { + CONSTANT [8] { value: 1 } + CONSTANT [9] { value: 2 } + } } } } - CALL [12] { + } + } + CALL [10] { + function: _==_ + args: { + CALL [11] { function: _+_ args: { - CALL [13] { + CALL [12] { function: _+_ args: { - CALL [14] { + CALL [13] { function: _+_ args: { - IDENT [15] { - name: @index1 + IDENT [14] { + name: @index0 } - IDENT [16] { - name: @index1 + IDENT [15] { + name: @index0 } } } - IDENT [17] { - name: @index3 + IDENT [16] { + name: @index1 } } } - IDENT [18] { - name: @index3 + IDENT [17] { + name: @index1 } } } - } - } - CALL [19] { - function: _==_ - args: { - IDENT [20] { - name: @index4 - } - CONSTANT [21] { value: 6 } + CONSTANT [18] { value: 6 } } } } @@ -191,109 +170,97 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 0 } - } - } - CALL [5] { + CALL [3] { function: size args: { - IDENT [6] { - name: @index0 + CREATE_LIST [4] { + elements: { + CONSTANT [5] { value: 0 } + } } } } - CREATE_LIST [7] { - elements: { - CONSTANT [8] { value: 1 } - CONSTANT [9] { value: 2 } - } - } - CALL [10] { + CALL [6] { function: size args: { - IDENT [11] { - name: @index2 + CREATE_LIST [7] { + elements: { + CONSTANT [8] { value: 1 } + CONSTANT [9] { value: 2 } + } } } } - CREATE_LIST [12] { - elements: { - CONSTANT [13] { value: 1 } - CONSTANT [14] { value: 2 } - CONSTANT [15] { value: 3 } - } - } - CALL [16] { + CALL [10] { function: size args: { - IDENT [17] { - name: @index4 + CREATE_LIST [11] { + elements: { + CONSTANT [12] { value: 1 } + CONSTANT [13] { value: 2 } + CONSTANT [14] { value: 3 } + } } } } - CALL [18] { + CALL [15] { function: _+_ args: { - CALL [19] { + CALL [16] { function: _+_ args: { - CALL [20] { + CALL [17] { function: _+_ args: { - CALL [21] { + CALL [18] { function: _+_ args: { - CALL [22] { + CALL [19] { function: _+_ args: { - CONSTANT [23] { value: 5 } - IDENT [24] { - name: @index1 + CONSTANT [20] { value: 5 } + IDENT [21] { + name: @index0 } } } - IDENT [25] { - name: @index1 + IDENT [22] { + name: @index0 } } } - IDENT [26] { - name: @index3 + IDENT [23] { + name: @index1 } } } - IDENT [27] { - name: @index3 + IDENT [24] { + name: @index1 } } } - IDENT [28] { - name: @index5 + IDENT [25] { + name: @index2 } } } - CALL [29] { + } + } + CALL [26] { + function: _==_ + args: { + CALL [27] { function: _+_ args: { - IDENT [30] { - name: @index6 + IDENT [28] { + name: @index3 } - IDENT [31] { - name: @index5 + IDENT [29] { + name: @index2 } } } - } - } - CALL [32] { - function: _==_ - args: { - IDENT [33] { - name: @index7 - } - CONSTANT [34] { value: 17 } + CONSTANT [30] { value: 17 } } } } @@ -307,143 +274,103 @@ CALL [1] { CREATE_LIST [2] { elements: { CALL [3] { - function: timestamp - args: { - CONSTANT [4] { value: 1000000000 } - } - } - CALL [5] { - function: int - args: { - IDENT [6] { - name: @index0 + function: getFullYear + target: { + CALL [4] { + function: timestamp + args: { + CALL [5] { + function: int + args: { + CALL [6] { + function: timestamp + args: { + CONSTANT [7] { value: 1000000000 } + } + } + } + } + } } } - } - CALL [7] { - function: timestamp args: { - IDENT [8] { - name: @index1 - } } } - CALL [9] { + CALL [8] { function: getFullYear target: { - IDENT [10] { - name: @index2 + CALL [9] { + function: timestamp + args: { + CALL [10] { + function: int + args: { + CALL [11] { + function: timestamp + args: { + CONSTANT [12] { value: 200 } + } + } + } + } + } } } args: { } } - CALL [11] { - function: timestamp - args: { - CONSTANT [12] { value: 50 } - } - } CALL [13] { - function: int - args: { - IDENT [14] { - name: @index4 - } - } - } - CALL [15] { function: timestamp args: { - IDENT [16] { - name: @index5 + CALL [14] { + function: int + args: { + CALL [15] { + function: timestamp + args: { + CONSTANT [16] { value: 50 } + } + } + } } } } CALL [17] { function: timestamp args: { - CONSTANT [18] { value: 200 } - } - } - CALL [19] { - function: int - args: { - IDENT [20] { - name: @index7 + CALL [18] { + function: int + args: { + CALL [19] { + function: timestamp + args: { + CONSTANT [20] { value: 75 } + } + } + } } } } CALL [21] { - function: timestamp - args: { - IDENT [22] { - name: @index8 - } - } - } - CALL [23] { - function: getFullYear - target: { - IDENT [24] { - name: @index9 - } - } - args: { - } - } - CALL [25] { - function: timestamp - args: { - CONSTANT [26] { value: 75 } - } - } - CALL [27] { - function: int + function: _+_ args: { - IDENT [28] { - name: @index11 - } - } - } - CALL [29] { - function: timestamp - args: { - IDENT [30] { - name: @index12 - } - } - } - CALL [31] { - function: getMinutes - target: { - IDENT [32] { - name: @index13 - } - } - args: { - } - } - CALL [33] { - function: _+_ - args: { - CALL [34] { + CALL [22] { function: _+_ args: { - CALL [35] { + CALL [23] { function: _+_ args: { - CALL [36] { + CALL [24] { function: _+_ args: { - IDENT [37] { - name: @index3 + IDENT [25] { + name: @index0 } - CALL [38] { + CALL [26] { function: getFullYear target: { - IDENT [39] { - name: @index13 + IDENT [27] { + name: @index3 } } args: { @@ -451,11 +378,11 @@ CALL [1] { } } } - CALL [40] { + CALL [28] { function: getFullYear target: { - IDENT [41] { - name: @index6 + IDENT [29] { + name: @index2 } } args: { @@ -463,16 +390,16 @@ CALL [1] { } } } - IDENT [42] { - name: @index3 + IDENT [30] { + name: @index0 } } } - CALL [43] { + CALL [31] { function: getSeconds target: { - IDENT [44] { - name: @index6 + IDENT [32] { + name: @index2 } } args: { @@ -480,50 +407,54 @@ CALL [1] { } } } - CALL [45] { + } + } + CALL [33] { + function: _==_ + args: { + CALL [34] { function: _+_ args: { - CALL [46] { + CALL [35] { function: _+_ args: { - CALL [47] { + CALL [36] { function: _+_ args: { - CALL [48] { + CALL [37] { function: _+_ args: { - IDENT [49] { - name: @index15 + IDENT [38] { + name: @index4 } - IDENT [50] { - name: @index10 + IDENT [39] { + name: @index1 } } } - IDENT [51] { - name: @index10 + IDENT [40] { + name: @index1 } } } - IDENT [52] { - name: @index14 + CALL [41] { + function: getMinutes + target: { + IDENT [42] { + name: @index3 + } + } + args: { + } } } } - IDENT [53] { - name: @index3 + IDENT [43] { + name: @index0 } } } - } - } - CALL [54] { - function: _==_ - args: { - IDENT [55] { - name: @index16 - } - CONSTANT [56] { value: 13934 } + CONSTANT [44] { value: 13934 } } } } @@ -536,53 +467,47 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_MAP [3] { - MAP_ENTRY [4] { - key: { - CONSTANT [5] { value: "a" } - } - value: { - CONSTANT [6] { value: 2 } - } - } - } - CALL [7] { + CALL [3] { function: _[_] args: { - IDENT [8] { - name: @index0 + CREATE_MAP [4] { + MAP_ENTRY [5] { + key: { + CONSTANT [6] { value: "a" } + } + value: { + CONSTANT [7] { value: 2 } + } + } } - CONSTANT [9] { value: "a" } + CONSTANT [8] { value: "a" } } } + } + } + CALL [9] { + function: _==_ + args: { CALL [10] { function: _+_ args: { IDENT [11] { - name: @index1 + name: @index0 } CALL [12] { function: _*_ args: { IDENT [13] { - name: @index1 + name: @index0 } IDENT [14] { - name: @index1 + name: @index0 } } } } } - } - } - CALL [15] { - function: _==_ - args: { - IDENT [16] { - name: @index2 - } - CONSTANT [17] { value: 6 } + CONSTANT [15] { value: 6 } } } } @@ -598,51 +523,48 @@ CALL [1] { CREATE_MAP [3] { MAP_ENTRY [4] { key: { - CONSTANT [5] { value: "b" } + CONSTANT [5] { value: "e" } } value: { - CONSTANT [6] { value: 1 } + CREATE_MAP [6] { + MAP_ENTRY [7] { + key: { + CONSTANT [8] { value: "b" } + } + value: { + CONSTANT [9] { value: 1 } + } + } + } } } } - CREATE_MAP [7] { - MAP_ENTRY [8] { + CREATE_MAP [10] { + MAP_ENTRY [11] { key: { - CONSTANT [9] { value: "e" } + CONSTANT [12] { value: "b" } } value: { - IDENT [10] { - name: @index0 - } + CONSTANT [13] { value: 1 } } } } } } - CREATE_MAP [11] { - MAP_ENTRY [12] { - key: { - CONSTANT [13] { value: "a" } - } - value: { - IDENT [14] { - name: @index0 - } - } - } + CREATE_MAP [14] { MAP_ENTRY [15] { key: { - CONSTANT [16] { value: "c" } + CONSTANT [16] { value: "a" } } value: { IDENT [17] { - name: @index0 + name: @index1 } } } MAP_ENTRY [18] { key: { - CONSTANT [19] { value: "d" } + CONSTANT [19] { value: "c" } } value: { IDENT [20] { @@ -652,11 +574,21 @@ CALL [1] { } MAP_ENTRY [21] { key: { - CONSTANT [22] { value: "e" } + CONSTANT [22] { value: "d" } } value: { IDENT [23] { - name: @index1 + name: @index0 + } + } + } + MAP_ENTRY [24] { + key: { + CONSTANT [25] { value: "e" } + } + value: { + IDENT [26] { + name: @index0 } } } @@ -685,37 +617,34 @@ CALL [1] { CONSTANT [10] { value: 2 } } } - CREATE_LIST [11] { - elements: { - IDENT [12] { - name: @index1 - } - IDENT [13] { - name: @index0 - } - } - } } } - CREATE_LIST [14] { + CREATE_LIST [11] { elements: { - CONSTANT [15] { value: 1 } - IDENT [16] { + CONSTANT [12] { value: 1 } + IDENT [13] { name: @index0 } - CONSTANT [17] { value: 2 } - IDENT [18] { + CONSTANT [14] { value: 2 } + IDENT [15] { name: @index0 } - CONSTANT [19] { value: 5 } - IDENT [20] { + CONSTANT [16] { value: 5 } + IDENT [17] { name: @index0 } - CONSTANT [21] { value: 7 } - IDENT [22] { - name: @index2 + CONSTANT [18] { value: 7 } + CREATE_LIST [19] { + elements: { + IDENT [20] { + name: @index1 + } + IDENT [21] { + name: @index0 + } + } } - IDENT [23] { + IDENT [22] { name: @index1 } } @@ -735,26 +664,23 @@ CALL [1] { name: msg }.single_int64 } - CALL [5] { + } + } + CALL [5] { + function: _==_ + args: { + CALL [6] { function: _+_ args: { - IDENT [6] { + IDENT [7] { name: @index0 } - IDENT [7] { + IDENT [8] { name: @index0 } } } - } - } - CALL [8] { - function: _==_ - args: { - IDENT [9] { - name: @index1 - } - CONSTANT [10] { value: 6 } + CONSTANT [9] { value: 6 } } } } @@ -768,58 +694,59 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg + }.oneof_type + }.payload + }.single_int64 } SELECT [7] { - IDENT [8] { - name: @index1 - }.single_int64 + SELECT [8] { + IDENT [9] { + name: msg + }.oneof_type + }.payload } - CALL [9] { + CALL [10] { function: _+_ args: { - CALL [10] { + CALL [11] { function: _+_ args: { - CALL [11] { + CALL [12] { function: _+_ args: { - CALL [12] { + CALL [13] { function: _+_ args: { - IDENT [13] { - name: @index2 + IDENT [14] { + name: @index0 } - SELECT [14] { - IDENT [15] { + SELECT [15] { + IDENT [16] { name: @index1 }.single_int32 } } } - IDENT [16] { - name: @index2 + IDENT [17] { + name: @index0 } } } - SELECT [17] { - IDENT [18] { + SELECT [18] { + IDENT [19] { name: msg }.single_int64 } } } - SELECT [19] { - SELECT [20] { - SELECT [21] { - IDENT [22] { + SELECT [20] { + SELECT [21] { + SELECT [22] { + IDENT [23] { name: @index1 }.oneof_type }.payload @@ -829,13 +756,13 @@ CALL [1] { } } } - CALL [23] { + CALL [24] { function: _==_ args: { - IDENT [24] { - name: @index3 + IDENT [25] { + name: @index2 } - CONSTANT [25] { value: 31 } + CONSTANT [26] { value: 31 } } } } @@ -849,51 +776,28 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 - }.oneof_type - } - SELECT [9] { - IDENT [10] { - name: @index2 - }.payload - } - SELECT [11] { - IDENT [12] { - name: @index3 - }.oneof_type - } - SELECT [13] { - SELECT [14] { - SELECT [15] { - SELECT [16] { - IDENT [17] { - name: @index4 - }.child - }.child + SELECT [4] { + SELECT [5] { + SELECT [6] { + SELECT [7] { + IDENT [8] { + name: msg + }.oneof_type + }.payload + }.oneof_type }.payload - }.single_bool + }.oneof_type } - CALL [18] { + CALL [9] { function: _||_ args: { - CONSTANT [19] { value: true } - SELECT [20] { - SELECT [21] { - SELECT [22] { - SELECT [23] { - IDENT [24] { - name: @index4 + CONSTANT [10] { value: true } + SELECT [11] { + SELECT [12] { + SELECT [13] { + SELECT [14] { + IDENT [15] { + name: @index0 }.payload }.oneof_type }.payload @@ -903,14 +807,22 @@ CALL [1] { } } } - CALL [25] { + CALL [16] { function: _||_ args: { - IDENT [26] { - name: @index6 + IDENT [17] { + name: @index1 } - IDENT [27] { - name: @index5 + SELECT [18] { + SELECT [19] { + SELECT [20] { + SELECT [21] { + IDENT [22] { + name: @index0 + }.child + }.child + }.payload + }.single_bool } } } @@ -924,58 +836,46 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 - }.map_int32_int64 - } - CALL [9] { + CALL [3] { function: _[_] args: { - IDENT [10] { - name: @index2 + SELECT [4] { + SELECT [5] { + SELECT [6] { + IDENT [7] { + name: msg + }.oneof_type + }.payload + }.map_int32_int64 } - CONSTANT [11] { value: 1 } + CONSTANT [8] { value: 1 } } } - CALL [12] { - function: _+_ - args: { - CALL [13] { + } + } + CALL [9] { + function: _==_ + args: { + CALL [10] { + function: _+_ + args: { + CALL [11] { function: _+_ args: { - IDENT [14] { - name: @index3 + IDENT [12] { + name: @index0 } - IDENT [15] { - name: @index3 + IDENT [13] { + name: @index0 } } } - IDENT [16] { - name: @index3 + IDENT [14] { + name: @index0 } } } - } - } - CALL [17] { - function: _==_ - args: { - IDENT [18] { - name: @index4 - } - CONSTANT [19] { value: 15 } + CONSTANT [15] { value: 15 } } } } @@ -989,66 +889,57 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg + }.oneof_type + }.payload }.map_int32_int64 } - CALL [9] { + } + } + CALL [7] { + function: _==_ + args: { + CALL [8] { function: _+_ args: { - CALL [10] { + CALL [9] { function: _+_ args: { - CALL [11] { + CALL [10] { function: _[_] args: { - IDENT [12] { - name: @index2 + IDENT [11] { + name: @index0 } - CONSTANT [13] { value: 0 } + CONSTANT [12] { value: 0 } } } - CALL [14] { + CALL [13] { function: _[_] args: { - IDENT [15] { - name: @index2 + IDENT [14] { + name: @index0 } - CONSTANT [16] { value: 1 } + CONSTANT [15] { value: 1 } } } } } - CALL [17] { + CALL [16] { function: _[_] args: { - IDENT [18] { - name: @index2 + IDENT [17] { + name: @index0 } - CONSTANT [19] { value: 2 } + CONSTANT [18] { value: 2 } } } } } - } - } - CALL [20] { - function: _==_ - args: { - IDENT [21] { - name: @index3 - } - CONSTANT [22] { value: 8 } + CONSTANT [19] { value: 8 } } } } @@ -1074,20 +965,17 @@ CALL [1] { }.payload }.oneof_type } - SELECT [9] { - SELECT [10] { - SELECT [11] { - IDENT [12] { - name: @index0 - }.payload - }.oneof_type - }.payload - } } } - SELECT [13] { - IDENT [14] { - name: @index1 + SELECT [9] { + SELECT [10] { + SELECT [11] { + SELECT [12] { + IDENT [13] { + name: @index0 + }.payload + }.oneof_type + }.payload }.single_int64 } } @@ -1105,33 +993,30 @@ CALL [1] { name: msg }.single_int64 } - CALL [5] { + } + } + CALL [5] { + function: _==_ + args: { + CALL [6] { function: _?_:_ args: { - CALL [6] { + CALL [7] { function: _>_ args: { - IDENT [7] { + IDENT [8] { name: @index0 } - CONSTANT [8] { value: 0 } + CONSTANT [9] { value: 0 } } } - IDENT [9] { + IDENT [10] { name: @index0 } - CONSTANT [10] { value: 0 } + CONSTANT [11] { value: 0 } } } - } - } - CALL [11] { - function: _==_ - args: { - IDENT [12] { - name: @index1 - } - CONSTANT [13] { value: 3 } + CONSTANT [12] { value: 3 } } } } @@ -1149,47 +1034,44 @@ CALL [1] { name: msg }.single_int64 } - CALL [5] { + } + } + CALL [5] { + function: _?_:_ + args: { + CONSTANT [6] { value: false } + CONSTANT [7] { value: false } + CALL [8] { function: _==_ args: { - CALL [6] { + CALL [9] { function: _+_ args: { - IDENT [7] { + IDENT [10] { name: @index0 } - CALL [8] { + CALL [11] { function: _*_ args: { - CALL [9] { + CALL [12] { function: _+_ args: { - IDENT [10] { + IDENT [13] { name: @index0 } - CONSTANT [11] { value: 1 } + CONSTANT [14] { value: 1 } } } - CONSTANT [12] { value: 2 } + CONSTANT [15] { value: 2 } } } } } - CONSTANT [13] { value: 11 } + CONSTANT [16] { value: 11 } } } } } - CALL [14] { - function: _?_:_ - args: { - CONSTANT [15] { value: false } - CONSTANT [16] { value: false } - IDENT [17] { - name: @index1 - } - } - } } } Test case: NESTED_TERNARY @@ -1210,56 +1092,53 @@ CALL [1] { name: msg }.single_int32 } - CALL [7] { + } + } + CALL [7] { + function: _==_ + args: { + CALL [8] { function: _?_:_ args: { - CALL [8] { + CALL [9] { function: _>_ args: { - IDENT [9] { + IDENT [10] { name: @index0 } - CONSTANT [10] { value: 0 } + CONSTANT [11] { value: 0 } } } - CALL [11] { + CALL [12] { function: _?_:_ args: { - CALL [12] { + CALL [13] { function: _>_ args: { - IDENT [13] { + IDENT [14] { name: @index1 } - CONSTANT [14] { value: 0 } + CONSTANT [15] { value: 0 } } } - CALL [15] { + CALL [16] { function: _+_ args: { - IDENT [16] { + IDENT [17] { name: @index0 } - IDENT [17] { + IDENT [18] { name: @index1 } } } - CONSTANT [18] { value: 0 } + CONSTANT [19] { value: 0 } } } - CONSTANT [19] { value: 0 } + CONSTANT [20] { value: 0 } } } - } - } - CALL [20] { - function: _==_ - args: { - IDENT [21] { - name: @index2 - } - CONSTANT [22] { value: 8 } + CONSTANT [21] { value: 8 } } } } @@ -1272,50 +1151,60 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 1 } - } - } - CALL [5] { - function: _>_ - args: { - IDENT [6] { - name: @c0:0 - } - CONSTANT [7] { value: 0 } - } - } - CALL [8] { - function: _||_ + CALL [3] { + function: size args: { - IDENT [9] { - name: @x0:0 - } - IDENT [10] { - name: @index1 - } - } - } - COMPREHENSION [11] { - iter_var: @c0:0 - iter_range: { - IDENT [12] { - name: @index0 - } - } - accu_var: @x0:0 - accu_init: { - CONSTANT [13] { value: false } - } - loop_condition: { - CALL [14] { - function: @not_strictly_false - args: { - CALL [15] { - function: !_ - args: { - IDENT [16] { + CREATE_LIST [4] { + elements: { + COMPREHENSION [5] { + iter_var: @c0:0 + iter_range: { + CREATE_LIST [6] { + elements: { + CONSTANT [7] { value: 1 } + } + } + } + accu_var: @x0:0 + accu_init: { + CONSTANT [8] { value: false } + } + loop_condition: { + CALL [9] { + function: @not_strictly_false + args: { + CALL [10] { + function: !_ + args: { + IDENT [11] { + name: @x0:0 + } + } + } + } + } + } + loop_step: { + CALL [12] { + function: _||_ + args: { + IDENT [13] { + name: @x0:0 + } + CALL [14] { + function: _>_ + args: { + IDENT [15] { + name: @c0:0 + } + CONSTANT [16] { value: 0 } + } + } + } + } + } + result: { + IDENT [17] { name: @x0:0 } } @@ -1323,76 +1212,61 @@ CALL [1] { } } } - loop_step: { - IDENT [17] { - name: @index2 - } - } - result: { - IDENT [18] { - name: @x0:0 - } - } } - CREATE_LIST [19] { - elements: { - IDENT [20] { - name: @index3 - } - } - } - CALL [21] { + CALL [18] { function: size args: { - IDENT [22] { - name: @index4 - } - } - } - CREATE_LIST [23] { - elements: { - CONSTANT [24] { value: 2 } - } - } - CALL [25] { - function: _>_ - args: { - IDENT [26] { - name: @c0:0 - } - CONSTANT [27] { value: 1 } - } - } - CALL [28] { - function: _||_ - args: { - IDENT [29] { - name: @x0:0 - } - IDENT [30] { - name: @index7 - } - } - } - COMPREHENSION [31] { - iter_var: @c0:0 - iter_range: { - IDENT [32] { - name: @index6 - } - } - accu_var: @x0:0 - accu_init: { - CONSTANT [33] { value: false } - } - loop_condition: { - CALL [34] { - function: @not_strictly_false - args: { - CALL [35] { - function: !_ - args: { - IDENT [36] { + CREATE_LIST [19] { + elements: { + COMPREHENSION [20] { + iter_var: @c0:0 + iter_range: { + CREATE_LIST [21] { + elements: { + CONSTANT [22] { value: 2 } + } + } + } + accu_var: @x0:0 + accu_init: { + CONSTANT [23] { value: false } + } + loop_condition: { + CALL [24] { + function: @not_strictly_false + args: { + CALL [25] { + function: !_ + args: { + IDENT [26] { + name: @x0:0 + } + } + } + } + } + } + loop_step: { + CALL [27] { + function: _||_ + args: { + IDENT [28] { + name: @x0:0 + } + CALL [29] { + function: _>_ + args: { + IDENT [30] { + name: @c0:0 + } + CONSTANT [31] { value: 1 } + } + } + } + } + } + result: { + IDENT [32] { name: @x0:0 } } @@ -1400,68 +1274,40 @@ CALL [1] { } } } - loop_step: { - IDENT [37] { - name: @index8 - } - } - result: { - IDENT [38] { - name: @x0:0 - } - } - } - CREATE_LIST [39] { - elements: { - IDENT [40] { - name: @index9 - } - } - } - CALL [41] { - function: size - args: { - IDENT [42] { - name: @index10 - } - } } - CALL [43] { + } + } + CALL [33] { + function: _==_ + args: { + CALL [34] { function: _+_ args: { - CALL [44] { + CALL [35] { function: _+_ args: { - CALL [45] { + CALL [36] { function: _+_ args: { - IDENT [46] { - name: @index5 + IDENT [37] { + name: @index0 } - IDENT [47] { - name: @index5 + IDENT [38] { + name: @index0 } } } - IDENT [48] { - name: @index11 + IDENT [39] { + name: @index1 } } } - IDENT [49] { - name: @index11 + IDENT [40] { + name: @index1 } } } - } - } - CALL [50] { - function: _==_ - args: { - IDENT [51] { - name: @index12 - } - CONSTANT [52] { value: 4 } + CONSTANT [41] { value: 4 } } } } @@ -1476,187 +1322,157 @@ CALL [1] { elements: { CREATE_LIST [3] { elements: { - CONSTANT [4] { value: 1 } - } - } - CALL [5] { - function: _>_ - args: { - IDENT [6] { - name: @c0:0 - } - CONSTANT [7] { value: 0 } - } - } - CALL [8] { - function: _||_ - args: { - IDENT [9] { - name: @x0:0 - } - IDENT [10] { - name: @index1 - } - } - } - COMPREHENSION [11] { - iter_var: @c0:0 - iter_range: { - IDENT [12] { - name: @index0 - } - } - accu_var: @x0:0 - accu_init: { - CONSTANT [13] { value: false } - } - loop_condition: { - CALL [14] { - function: @not_strictly_false - args: { - CALL [15] { - function: !_ + COMPREHENSION [4] { + iter_var: @c0:0 + iter_range: { + CREATE_LIST [5] { + elements: { + CONSTANT [6] { value: 1 } + } + } + } + accu_var: @x0:0 + accu_init: { + CONSTANT [7] { value: false } + } + loop_condition: { + CALL [8] { + function: @not_strictly_false args: { - IDENT [16] { + CALL [9] { + function: !_ + args: { + IDENT [10] { + name: @x0:0 + } + } + } + } + } + } + loop_step: { + CALL [11] { + function: _||_ + args: { + IDENT [12] { name: @x0:0 } + CALL [13] { + function: _>_ + args: { + IDENT [14] { + name: @c0:0 + } + CONSTANT [15] { value: 0 } + } + } } } } - } - } - loop_step: { - IDENT [17] { - name: @index2 - } - } - result: { - IDENT [18] { - name: @x0:0 - } - } - } - CREATE_LIST [19] { - elements: { - IDENT [20] { - name: @index3 + result: { + IDENT [16] { + name: @x0:0 + } + } } } } - CREATE_LIST [21] { + CREATE_LIST [17] { elements: { - CONSTANT [22] { value: "a" } - } - } - CALL [23] { - function: _==_ - args: { - IDENT [24] { - name: @c0:1 - } - CONSTANT [25] { value: "a" } - } - } - CALL [26] { - function: _||_ - args: { - IDENT [27] { - name: @x0:1 - } - IDENT [28] { - name: @index6 - } - } - } - COMPREHENSION [29] { - iter_var: @c0:1 - iter_range: { - IDENT [30] { - name: @index5 - } - } - accu_var: @x0:1 - accu_init: { - CONSTANT [31] { value: false } - } - loop_condition: { - CALL [32] { - function: @not_strictly_false - args: { - CALL [33] { - function: !_ + COMPREHENSION [18] { + iter_var: @c0:1 + iter_range: { + CREATE_LIST [19] { + elements: { + CONSTANT [20] { value: "a" } + } + } + } + accu_var: @x0:1 + accu_init: { + CONSTANT [21] { value: false } + } + loop_condition: { + CALL [22] { + function: @not_strictly_false args: { - IDENT [34] { - name: @x0:1 + CALL [23] { + function: !_ + args: { + IDENT [24] { + name: @x0:1 + } + } } } } } + loop_step: { + CALL [25] { + function: _||_ + args: { + IDENT [26] { + name: @x0:1 + } + CALL [27] { + function: _==_ + args: { + IDENT [28] { + name: @c0:1 + } + CONSTANT [29] { value: "a" } + } + } + } + } + } + result: { + IDENT [30] { + name: @x0:1 + } + } } } - loop_step: { - IDENT [35] { - name: @index7 - } - } - result: { - IDENT [36] { - name: @x0:1 - } - } - } - CREATE_LIST [37] { - elements: { - IDENT [38] { - name: @index8 - } - } - } - CREATE_LIST [39] { - elements: { - CONSTANT [40] { value: true } - CONSTANT [41] { value: true } - CONSTANT [42] { value: true } - CONSTANT [43] { value: true } - } } - CALL [44] { + } + } + CALL [31] { + function: _==_ + args: { + CALL [32] { function: _+_ args: { - CALL [45] { + CALL [33] { function: _+_ args: { - CALL [46] { + CALL [34] { function: _+_ args: { - IDENT [47] { - name: @index4 + IDENT [35] { + name: @index0 } - IDENT [48] { - name: @index4 + IDENT [36] { + name: @index0 } } } - IDENT [49] { - name: @index9 + IDENT [37] { + name: @index1 } } } - IDENT [50] { - name: @index9 + IDENT [38] { + name: @index1 } } } - } - } - CALL [51] { - function: _==_ - args: { - IDENT [52] { - name: @index11 - } - IDENT [53] { - name: @index10 + CREATE_LIST [39] { + elements: { + CONSTANT [40] { value: true } + CONSTANT [41] { value: true } + CONSTANT [42] { value: true } + CONSTANT [43] { value: true } + } } } } @@ -1686,52 +1502,39 @@ CALL [1] { } CREATE_LIST [11] { elements: { - IDENT [12] { - name: @index1 - } - IDENT [13] { - name: @index1 - } - IDENT [14] { - name: @index1 - } - } - } - CREATE_LIST [15] { - elements: { - COMPREHENSION [16] { + COMPREHENSION [12] { iter_var: @c1:0 iter_range: { - IDENT [17] { + IDENT [13] { name: @index0 } } accu_var: @x1:0 accu_init: { - CREATE_LIST [18] { + CREATE_LIST [14] { elements: { } } } loop_condition: { - CONSTANT [19] { value: true } + CONSTANT [15] { value: true } } loop_step: { - CALL [20] { + CALL [16] { function: _+_ args: { - IDENT [21] { + IDENT [17] { name: @x1:0 } - CREATE_LIST [22] { + CREATE_LIST [18] { elements: { - CALL [23] { + CALL [19] { function: _+_ args: { - IDENT [24] { + IDENT [20] { name: @c1:0 } - CONSTANT [25] { value: 1 } + CONSTANT [21] { value: 1 } } } } @@ -1740,59 +1543,66 @@ CALL [1] { } } result: { - IDENT [26] { + IDENT [22] { name: @x1:0 } } } } } - COMPREHENSION [27] { + } + } + CALL [23] { + function: _==_ + args: { + COMPREHENSION [24] { iter_var: @c0:0 iter_range: { - IDENT [28] { + IDENT [25] { name: @index0 } } accu_var: @x0:0 accu_init: { - CREATE_LIST [29] { + CREATE_LIST [26] { elements: { } } } loop_condition: { - CONSTANT [30] { value: true } + CONSTANT [27] { value: true } } loop_step: { - CALL [31] { + CALL [28] { function: _+_ args: { - IDENT [32] { + IDENT [29] { name: @x0:0 } - IDENT [33] { - name: @index3 + IDENT [30] { + name: @index2 } } } } result: { - IDENT [34] { + IDENT [31] { name: @x0:0 } } } - } - } - CALL [35] { - function: _==_ - args: { - IDENT [36] { - name: @index4 - } - IDENT [37] { - name: @index2 + CREATE_LIST [32] { + elements: { + IDENT [33] { + name: @index1 + } + IDENT [34] { + name: @index1 + } + IDENT [35] { + name: @index1 + } + } } } } @@ -1808,134 +1618,128 @@ CALL [1] { elements: { CREATE_LIST [3] { elements: { - CREATE_LIST [4] { - elements: { - CONSTANT [5] { value: 1 } - } - } - CREATE_LIST [6] { - elements: { - CONSTANT [7] { value: 2 } - } - } - } - } - CREATE_LIST [8] { - elements: { - COMPREHENSION [9] { + COMPREHENSION [4] { iter_var: @c1:0 iter_range: { - CREATE_LIST [10] { + CREATE_LIST [5] { elements: { - CONSTANT [11] { value: 1 } - CONSTANT [12] { value: 2 } - CONSTANT [13] { value: 3 } + CONSTANT [6] { value: 1 } + CONSTANT [7] { value: 2 } + CONSTANT [8] { value: 3 } } } } accu_var: @x1:0 accu_init: { - CREATE_LIST [14] { + CREATE_LIST [9] { elements: { } } } loop_condition: { - CONSTANT [15] { value: true } + CONSTANT [10] { value: true } } loop_step: { - CALL [16] { + CALL [11] { function: _?_:_ args: { - CALL [17] { + CALL [12] { function: _==_ args: { - IDENT [18] { + IDENT [13] { name: @c1:0 } - IDENT [19] { + IDENT [14] { name: @c0:0 } } } - CALL [20] { + CALL [15] { function: _+_ args: { - IDENT [21] { + IDENT [16] { name: @x1:0 } - CREATE_LIST [22] { + CREATE_LIST [17] { elements: { - IDENT [23] { + IDENT [18] { name: @c1:0 } } } } } - IDENT [24] { + IDENT [19] { name: @x1:0 } } } } result: { - IDENT [25] { + IDENT [20] { name: @x1:0 } } } } } - COMPREHENSION [26] { + } + } + CALL [21] { + function: _==_ + args: { + COMPREHENSION [22] { iter_var: @c0:0 iter_range: { - CREATE_LIST [27] { + CREATE_LIST [23] { elements: { - CONSTANT [28] { value: 1 } - CONSTANT [29] { value: 2 } + CONSTANT [24] { value: 1 } + CONSTANT [25] { value: 2 } } } } accu_var: @x0:0 accu_init: { - CREATE_LIST [30] { + CREATE_LIST [26] { elements: { } } } loop_condition: { - CONSTANT [31] { value: true } + CONSTANT [27] { value: true } } loop_step: { - CALL [32] { + CALL [28] { function: _+_ args: { - IDENT [33] { + IDENT [29] { name: @x0:0 } - IDENT [34] { - name: @index1 + IDENT [30] { + name: @index0 } } } } result: { - IDENT [35] { + IDENT [31] { name: @x0:0 } } } - } - } - CALL [36] { - function: _==_ - args: { - IDENT [37] { - name: @index2 - } - IDENT [38] { - name: @index0 + CREATE_LIST [32] { + elements: { + CREATE_LIST [33] { + elements: { + CONSTANT [34] { value: 1 } + } + } + CREATE_LIST [35] { + elements: { + CONSTANT [36] { value: 2 } + } + } + } } } } @@ -1949,74 +1753,72 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 1 } - CONSTANT [5] { value: 2 } - CONSTANT [6] { value: 3 } - } - } - CALL [7] { + CALL [3] { function: @in args: { - CONSTANT [8] { value: 1 } - IDENT [9] { - name: @index0 + CONSTANT [4] { value: 1 } + CREATE_LIST [5] { + elements: { + CONSTANT [6] { value: 1 } + CONSTANT [7] { value: 2 } + CONSTANT [8] { value: 3 } + } } } } - CALL [10] { + CREATE_LIST [9] { + elements: { + CONSTANT [10] { value: 1 } + CONSTANT [11] { value: 2 } + CONSTANT [12] { value: 3 } + } + } + } + } + CALL [13] { + function: _&&_ + args: { + CALL [14] { function: _&&_ args: { - CALL [11] { + IDENT [15] { + name: @index0 + } + CALL [16] { function: @in args: { - CONSTANT [12] { value: 3 } - CREATE_LIST [13] { - elements: { - CONSTANT [14] { value: 3 } - IDENT [15] { - name: @index0 - } - } + CONSTANT [17] { value: 2 } + IDENT [18] { + name: @index1 } } } - IDENT [16] { - name: @index1 - } } } - CALL [17] { + CALL [19] { function: _&&_ args: { - IDENT [18] { - name: @index1 - } - CALL [19] { + CALL [20] { function: @in args: { - CONSTANT [20] { value: 2 } - IDENT [21] { - name: @index0 + CONSTANT [21] { value: 3 } + CREATE_LIST [22] { + elements: { + CONSTANT [23] { value: 3 } + IDENT [24] { + name: @index1 + } + } } } } + IDENT [25] { + name: @index0 + } } } } } - CALL [22] { - function: _&&_ - args: { - IDENT [23] { - name: @index3 - } - IDENT [24] { - name: @index2 - } - } - } } } Test case: INCLUSION_MAP @@ -2037,31 +1839,37 @@ CALL [1] { } } } - CREATE_MAP [7] { - MAP_ENTRY [8] { + } + } + CALL [7] { + function: @in + args: { + CONSTANT [8] { value: 2 } + CREATE_MAP [9] { + MAP_ENTRY [10] { key: { - CONSTANT [9] { value: "a" } + CONSTANT [11] { value: "a" } } value: { - CONSTANT [10] { value: 1 } + CONSTANT [12] { value: 1 } } } - MAP_ENTRY [11] { + MAP_ENTRY [13] { key: { - CONSTANT [12] { value: 2 } + CONSTANT [14] { value: 2 } } value: { - IDENT [13] { + IDENT [15] { name: @index0 } } } - MAP_ENTRY [14] { + MAP_ENTRY [16] { key: { - CONSTANT [15] { value: 3 } + CONSTANT [17] { value: 3 } } value: { - IDENT [16] { + IDENT [18] { name: @index0 } } @@ -2069,15 +1877,6 @@ CALL [1] { } } } - CALL [17] { - function: @in - args: { - CONSTANT [18] { value: 2 } - IDENT [19] { - name: @index1 - } - } - } } } Test case: MACRO_ITER_VAR_NOT_REFERENCED @@ -2090,126 +1889,123 @@ CALL [1] { elements: { CREATE_LIST [3] { elements: { - CONSTANT [4] { value: 1 } - CONSTANT [5] { value: 2 } - } - } - CREATE_LIST [6] { - elements: { - CONSTANT [7] { value: 3 } - CONSTANT [8] { value: 4 } - } - } - CREATE_LIST [9] { - elements: { - IDENT [10] { - name: @index1 + CREATE_LIST [4] { + elements: { + CONSTANT [5] { value: 3 } + CONSTANT [6] { value: 4 } + } } - IDENT [11] { - name: @index1 + CREATE_LIST [7] { + elements: { + CONSTANT [8] { value: 3 } + CONSTANT [9] { value: 4 } + } } } } - CREATE_LIST [12] { + CREATE_LIST [10] { elements: { - IDENT [13] { - name: @index2 - } - IDENT [14] { - name: @index2 - } + CONSTANT [11] { value: 1 } + CONSTANT [12] { value: 2 } } } - CALL [15] { - function: _+_ - args: { - IDENT [16] { - name: @x0:0 - } - CREATE_LIST [17] { - elements: { - COMPREHENSION [18] { - iter_var: @c1:0 - iter_range: { + CREATE_LIST [13] { + elements: { + COMPREHENSION [14] { + iter_var: @c1:0 + iter_range: { + IDENT [15] { + name: @index1 + } + } + accu_var: @x1:0 + accu_init: { + CREATE_LIST [16] { + elements: { + } + } + } + loop_condition: { + CONSTANT [17] { value: true } + } + loop_step: { + CALL [18] { + function: _+_ + args: { IDENT [19] { - name: @index0 + name: @x1:0 } - } - accu_var: @x1:0 - accu_init: { CREATE_LIST [20] { elements: { - } - } - } - loop_condition: { - CONSTANT [21] { value: true } - } - loop_step: { - CALL [22] { - function: _+_ - args: { - IDENT [23] { - name: @x1:0 - } - CREATE_LIST [24] { + CREATE_LIST [21] { elements: { - IDENT [25] { - name: @index1 - } + CONSTANT [22] { value: 3 } + CONSTANT [23] { value: 4 } } } } } } - result: { - IDENT [26] { - name: @x1:0 - } - } + } + } + result: { + IDENT [24] { + name: @x1:0 } } } } } - COMPREHENSION [27] { + } + } + CALL [25] { + function: _==_ + args: { + COMPREHENSION [26] { iter_var: @c0:0 iter_range: { - IDENT [28] { - name: @index0 + IDENT [27] { + name: @index1 } } accu_var: @x0:0 accu_init: { - CREATE_LIST [29] { + CREATE_LIST [28] { elements: { } } } loop_condition: { - CONSTANT [30] { value: true } + CONSTANT [29] { value: true } } loop_step: { - IDENT [31] { - name: @index4 + CALL [30] { + function: _+_ + args: { + IDENT [31] { + name: @x0:0 + } + IDENT [32] { + name: @index2 + } + } } } result: { - IDENT [32] { + IDENT [33] { name: @x0:0 } } } - } - } - CALL [33] { - function: _==_ - args: { - IDENT [34] { - name: @index5 - } - IDENT [35] { - name: @index3 + CREATE_LIST [34] { + elements: { + IDENT [35] { + name: @index0 + } + IDENT [36] { + name: @index0 + } + } } } } @@ -2224,23 +2020,25 @@ CALL [1] { CREATE_LIST [2] { elements: { CALL [3] { - function: _-_ - args: { - IDENT [4] { - name: x - } - CONSTANT [5] { value: 1 } - } - } - CALL [6] { function: _>_ args: { - IDENT [7] { - name: @index0 + CALL [4] { + function: _-_ + args: { + IDENT [5] { + name: x + } + CONSTANT [6] { value: 1 } + } } - CONSTANT [8] { value: 3 } + CONSTANT [7] { value: 3 } } } + } + } + CALL [8] { + function: _||_ + args: { COMPREHENSION [9] { iter_var: @c0:0 iter_range: { @@ -2250,12 +2048,18 @@ CALL [1] { function: _?_:_ args: { IDENT [12] { - name: @index1 - } - IDENT [13] { name: @index0 } - CONSTANT [14] { value: 5 } + CALL [13] { + function: _-_ + args: { + IDENT [14] { + name: x + } + CONSTANT [15] { value: 1 } + } + } + CONSTANT [16] { value: 5 } } } } @@ -2263,16 +2067,16 @@ CALL [1] { } accu_var: @x0:0 accu_init: { - CONSTANT [15] { value: false } + CONSTANT [17] { value: false } } loop_condition: { - CALL [16] { + CALL [18] { function: @not_strictly_false args: { - CALL [17] { + CALL [19] { function: !_ args: { - IDENT [18] { + IDENT [20] { name: @x0:0 } } @@ -2281,46 +2085,38 @@ CALL [1] { } } loop_step: { - CALL [19] { + CALL [21] { function: _||_ args: { - IDENT [20] { + IDENT [22] { name: @x0:0 } - CALL [21] { + CALL [23] { function: _>_ args: { - CALL [22] { + CALL [24] { function: _-_ args: { - IDENT [23] { + IDENT [25] { name: @c0:0 } - CONSTANT [24] { value: 1 } + CONSTANT [26] { value: 1 } } } - CONSTANT [25] { value: 3 } + CONSTANT [27] { value: 3 } } } } } } result: { - IDENT [26] { + IDENT [28] { name: @x0:0 } } } - } - } - CALL [27] { - function: _||_ - args: { - IDENT [28] { - name: @index2 - } IDENT [29] { - name: @index1 + name: @index0 } } } @@ -2356,63 +2152,46 @@ CALL [1] { } } } - CALL [9] { - function: _+_ - args: { - IDENT [10] { - name: @x0:0 - } - CREATE_LIST [11] { - elements: { - CREATE_LIST [12] { - elements: { - IDENT [13] { - name: @index1 - } - IDENT [14] { - name: @index1 - } - } - } - } - } - } - } - COMPREHENSION [15] { + } + } + COMPREHENSION [9] { + iter_var: @c0:0 + iter_range: { + COMPREHENSION [10] { iter_var: @c1:0 iter_range: { - CREATE_LIST [16] { + CREATE_LIST [11] { elements: { - CONSTANT [17] { value: "foo" } - CONSTANT [18] { value: "bar" } + CONSTANT [12] { value: "foo" } + CONSTANT [13] { value: "bar" } } } } accu_var: @x1:0 accu_init: { - CREATE_LIST [19] { + CREATE_LIST [14] { elements: { } } } loop_condition: { - CONSTANT [20] { value: true } + CONSTANT [15] { value: true } } loop_step: { - CALL [21] { + CALL [16] { function: _+_ args: { - IDENT [22] { + IDENT [17] { name: @x1:0 } - CREATE_LIST [23] { + CREATE_LIST [18] { elements: { - CREATE_LIST [24] { + CREATE_LIST [19] { elements: { - IDENT [25] { + IDENT [20] { name: @index0 } - IDENT [26] { + IDENT [21] { name: @index0 } } @@ -2423,37 +2202,48 @@ CALL [1] { } } result: { - IDENT [27] { + IDENT [22] { name: @x1:0 } } } } - } - COMPREHENSION [28] { - iter_var: @c0:0 - iter_range: { - IDENT [29] { - name: @index3 - } - } accu_var: @x0:0 accu_init: { - CREATE_LIST [30] { + CREATE_LIST [23] { elements: { } } } loop_condition: { - CONSTANT [31] { value: true } + CONSTANT [24] { value: true } } loop_step: { - IDENT [32] { - name: @index2 + CALL [25] { + function: _+_ + args: { + IDENT [26] { + name: @x0:0 + } + CREATE_LIST [27] { + elements: { + CREATE_LIST [28] { + elements: { + IDENT [29] { + name: @index1 + } + IDENT [30] { + name: @index1 + } + } + } + } + } + } } } result: { - IDENT [33] { + IDENT [31] { name: @x0:0 } } @@ -2478,27 +2268,24 @@ CALL [1] { } } } - CALL [7] { - function: _[_] - args: { - IDENT [8] { - name: @index0 - } - CONSTANT [9] { value: "a" } - } - } } } - CALL [10] { + CALL [7] { function: _&&_ args: { - SELECT [11] { - IDENT [12] { + SELECT [8] { + IDENT [9] { name: @index0 }.a~presence_test } - IDENT [13] { - name: @index1 + CALL [10] { + function: _[_] + args: { + IDENT [11] { + name: @index0 + } + CONSTANT [12] { value: "a" } + } } } } @@ -2517,33 +2304,30 @@ CALL [1] { name: msg }.oneof_type } - CALL [5] { + } + } + CALL [5] { + function: _==_ + args: { + CALL [6] { function: _?_:_ args: { - SELECT [6] { - IDENT [7] { + SELECT [7] { + IDENT [8] { name: @index0 }.payload~presence_test } - SELECT [8] { - SELECT [9] { - IDENT [10] { + SELECT [9] { + SELECT [10] { + IDENT [11] { name: @index0 }.payload }.single_int64 } - CONSTANT [11] { value: 0 } + CONSTANT [12] { value: 0 } } } - } - } - CALL [12] { - function: _==_ - args: { - IDENT [13] { - name: @index1 - } - CONSTANT [14] { value: 10 } + CONSTANT [13] { value: 10 } } } } @@ -2557,51 +2341,44 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg + }.oneof_type + }.payload }.single_int64 } - CALL [9] { + } + } + CALL [7] { + function: _==_ + args: { + CALL [8] { function: _?_:_ args: { - SELECT [10] { - IDENT [11] { - name: @index0 + SELECT [9] { + SELECT [10] { + IDENT [11] { + name: msg + }.oneof_type }.payload~presence_test } IDENT [12] { - name: @index2 + name: @index0 } CALL [13] { function: _*_ args: { IDENT [14] { - name: @index2 + name: @index0 } CONSTANT [15] { value: 0 } } } } } - } - } - CALL [16] { - function: _==_ - args: { - IDENT [17] { - name: @index3 - } - CONSTANT [18] { value: 10 } + CONSTANT [16] { value: 10 } } } } @@ -2611,55 +2388,50 @@ Source: (has(msg.oneof_type.payload.single_int64) ? msg.oneof_type.payload.singl =====> CALL [1] { function: cel.@block - args: { - CREATE_LIST [2] { - elements: { - SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 + args: { + CREATE_LIST [2] { + elements: { + SELECT [3] { + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg + }.oneof_type + }.payload }.single_int64 } - CALL [9] { + } + } + CALL [7] { + function: _==_ + args: { + CALL [8] { function: _?_:_ args: { - SELECT [10] { - IDENT [11] { - name: @index1 + SELECT [9] { + SELECT [10] { + SELECT [11] { + IDENT [12] { + name: msg + }.oneof_type + }.payload }.single_int64~presence_test } - IDENT [12] { - name: @index2 + IDENT [13] { + name: @index0 } - CALL [13] { + CALL [14] { function: _*_ args: { - IDENT [14] { - name: @index2 + IDENT [15] { + name: @index0 } - CONSTANT [15] { value: 0 } + CONSTANT [16] { value: 0 } } } } } - } - } - CALL [16] { - function: _==_ - args: { - IDENT [17] { - name: @index3 - } - CONSTANT [18] { value: 10 } + CONSTANT [17] { value: 10 } } } } @@ -2673,88 +2445,85 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg + }.oneof_type + }.payload + }.map_string_string } SELECT [7] { - IDENT [8] { - name: @index1 - }.map_string_string + SELECT [8] { + IDENT [9] { + name: msg + }.oneof_type + }.payload } - CALL [9] { - function: _?_:_ + } + } + CALL [10] { + function: _?_:_ + args: { + CALL [11] { + function: _&&_ args: { - CALL [10] { + CALL [12] { function: _&&_ args: { - SELECT [11] { - IDENT [12] { - name: @index1 - }.map_string_string~presence_test - } SELECT [13] { IDENT [14] { - name: @index2 - }.key~presence_test + name: msg + }.oneof_type~presence_test } - } - } - CALL [15] { - function: _==_ - args: { - SELECT [16] { - IDENT [17] { - name: @index2 - }.key + SELECT [15] { + SELECT [16] { + IDENT [17] { + name: msg + }.oneof_type + }.payload~presence_test } - CONSTANT [18] { value: "A" } } } - CONSTANT [19] { value: false } + SELECT [18] { + IDENT [19] { + name: @index1 + }.single_int64~presence_test + } } } CALL [20] { - function: _&&_ + function: _?_:_ args: { CALL [21] { function: _&&_ args: { SELECT [22] { IDENT [23] { - name: msg - }.oneof_type~presence_test + name: @index1 + }.map_string_string~presence_test } SELECT [24] { IDENT [25] { name: @index0 - }.payload~presence_test + }.key~presence_test } } } - SELECT [26] { - IDENT [27] { - name: @index1 - }.single_int64~presence_test + CALL [26] { + function: _==_ + args: { + SELECT [27] { + IDENT [28] { + name: @index0 + }.key + } + CONSTANT [29] { value: "A" } + } } + CONSTANT [30] { value: false } } } - } - } - CALL [28] { - function: _?_:_ - args: { - IDENT [29] { - name: @index4 - } - IDENT [30] { - name: @index3 - } CONSTANT [31] { value: false } } } @@ -2768,44 +2537,49 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CALL [3] { - function: optional.none - args: { - } - } - CREATE_LIST [4] { + CREATE_LIST [3] { elements: { - IDENT [5] { - name: @index0 + CALL [4] { + function: optional.none + args: { + } } - IDENT [6] { + IDENT [5] { name: opt_x } } optional_indices: [0, 1] } - CREATE_LIST [7] { + CREATE_LIST [6] { elements: { - CONSTANT [8] { value: 5 } + CONSTANT [7] { value: 5 } } } + } + } + CALL [8] { + function: _==_ + args: { CREATE_LIST [9] { elements: { CONSTANT [10] { value: 10 } - IDENT [11] { - name: @index2 + CALL [11] { + function: optional.none + args: { + } } IDENT [12] { - name: @index2 + name: @index0 + } + IDENT [13] { + name: @index0 } } + optional_indices: [0] } - CREATE_LIST [13] { + CREATE_LIST [14] { elements: { - CONSTANT [14] { value: 10 } - IDENT [15] { - name: @index0 - } + CONSTANT [15] { value: 10 } IDENT [16] { name: @index1 } @@ -2813,18 +2587,6 @@ CALL [1] { name: @index1 } } - optional_indices: [0] - } - } - } - CALL [18] { - function: _==_ - args: { - IDENT [19] { - name: @index4 - } - IDENT [20] { - name: @index3 } } } @@ -2839,53 +2601,44 @@ CALL [1] { CREATE_LIST [2] { elements: { CALL [3] { - function: optional.of - args: { - CONSTANT [4] { value: "hello" } - } - } - CREATE_MAP [5] { - MAP_ENTRY [6] { - key: { - CONSTANT [7] { value: "hello" } - } - optional_entry: true - value: { - IDENT [8] { - name: @index0 - } - } - } - } - CALL [9] { function: _[_] args: { - IDENT [10] { - name: @index1 + CREATE_MAP [4] { + MAP_ENTRY [5] { + key: { + CONSTANT [6] { value: "hello" } + } + optional_entry: true + value: { + CALL [7] { + function: optional.of + args: { + CONSTANT [8] { value: "hello" } + } + } + } + } } - CONSTANT [11] { value: "hello" } + CONSTANT [9] { value: "hello" } } } - CALL [12] { + } + } + CALL [10] { + function: _==_ + args: { + CALL [11] { function: _+_ args: { - IDENT [13] { - name: @index2 + IDENT [12] { + name: @index0 } - IDENT [14] { - name: @index2 + IDENT [13] { + name: @index0 } } } - } - } - CALL [15] { - function: _==_ - args: { - IDENT [16] { - name: @index3 - } - CONSTANT [17] { value: "hellohello" } + CONSTANT [14] { value: "hellohello" } } } } @@ -2979,143 +2732,66 @@ Test case: OPTIONAL_MESSAGE Source: TestAllTypes{?single_int64: optional.ofNonZeroValue(1), ?single_int32: optional.of(4)}.single_int32 + TestAllTypes{?single_int64: optional.ofNonZeroValue(1), ?single_int32: optional.of(4)}.single_int64 == 5 =====> CALL [1] { - function: cel.@block - args: { - CREATE_LIST [2] { - elements: { - CALL [3] { - function: optional.ofNonZeroValue - args: { - CONSTANT [4] { value: 1 } - } - } - CALL [5] { - function: optional.of - args: { - CONSTANT [6] { value: 4 } - } - } - CREATE_STRUCT [7] { - name: TestAllTypes - entries: { - ENTRY [8] { - field_key: single_int64 - optional_entry: true - value: { - IDENT [9] { - name: @index0 - } - } - } - ENTRY [10] { - field_key: single_int32 - optional_entry: true - value: { - IDENT [11] { - name: @index1 - } - } - } - } - } - CALL [12] { - function: _+_ - args: { - SELECT [13] { - IDENT [14] { - name: @index2 - }.single_int32 - } - SELECT [15] { - IDENT [16] { - name: @index2 - }.single_int64 - } - } - } - } - } - CALL [17] { - function: _==_ - args: { - IDENT [18] { - name: @index3 - } - CONSTANT [19] { value: 5 } - } - } - } -} -Test case: CALL -Source: ('h' + 'e' + 'l' + 'l' + 'o' + ' world').matches('h' + 'e' + 'l' + 'l' + 'o') -=====> -CALL [1] { - function: cel.@block - args: { - CREATE_LIST [2] { - elements: { - CALL [3] { - function: _+_ - args: { - CONSTANT [4] { value: "h" } - CONSTANT [5] { value: "e" } - } - } - CALL [6] { - function: _+_ - args: { - IDENT [7] { - name: @index0 + function: cel.@block + args: { + CREATE_LIST [2] { + elements: { + CREATE_STRUCT [3] { + name: TestAllTypes + entries: { + ENTRY [4] { + field_key: single_int64 + optional_entry: true + value: { + CALL [5] { + function: optional.ofNonZeroValue + args: { + CONSTANT [6] { value: 1 } + } + } + } } - CONSTANT [8] { value: "l" } - } - } - CALL [9] { - function: _+_ - args: { - IDENT [10] { - name: @index1 + ENTRY [7] { + field_key: single_int32 + optional_entry: true + value: { + CALL [8] { + function: optional.of + args: { + CONSTANT [9] { value: 4 } + } + } + } } - CONSTANT [11] { value: "l" } } } - CALL [12] { + } + } + CALL [10] { + function: _==_ + args: { + CALL [11] { function: _+_ args: { - IDENT [13] { - name: @index2 + SELECT [12] { + IDENT [13] { + name: @index0 + }.single_int32 } - CONSTANT [14] { value: "o" } - } - } - CALL [15] { - function: _+_ - args: { - IDENT [16] { - name: @index3 + SELECT [14] { + IDENT [15] { + name: @index0 + }.single_int64 } - CONSTANT [17] { value: " world" } } } - } - } - CALL [18] { - function: matches - target: { - IDENT [19] { - name: @index4 - } - } - args: { - IDENT [20] { - name: @index3 - } + CONSTANT [16] { value: 5 } } } } } -Test case: CALL_ARGUMENT_NESTED_NO_COMMON_SUBEXPR -Source: 'hello world'.matches('h' + 'e' + 'l' + 'l' + 'o') +Test case: CALL +Source: ('h' + 'e' + 'l' + 'l' + 'o' + ' world').matches('h' + 'e' + 'l' + 'l' + 'o') =====> CALL [1] { function: cel.@block @@ -3152,16 +2828,60 @@ CALL [1] { CALL [12] { function: matches target: { - CONSTANT [13] { value: "hello world" } + CALL [13] { + function: _+_ + args: { + IDENT [14] { + name: @index0 + } + CONSTANT [15] { value: " world" } + } + } } args: { - IDENT [14] { + IDENT [16] { name: @index0 } } } } } +Test case: CALL_ARGUMENT_NESTED_NO_COMMON_SUBEXPR +Source: 'hello world'.matches('h' + 'e' + 'l' + 'l' + 'o') +=====> +CALL [2] { + function: matches + target: { + CONSTANT [1] { value: "hello world" } + } + args: { + CALL [10] { + function: _+_ + args: { + CALL [8] { + function: _+_ + args: { + CALL [6] { + function: _+_ + args: { + CALL [4] { + function: _+_ + args: { + CONSTANT [3] { value: "h" } + CONSTANT [5] { value: "e" } + } + } + CONSTANT [7] { value: "l" } + } + } + CONSTANT [9] { value: "l" } + } + } + CONSTANT [11] { value: "o" } + } + } + } +} Test case: CALL_TARGET_NESTED_NO_COMMON_SUBEXPR Source: ('h' + 'e' + 'l' + 'l' + 'o' + ' world').matches('hello') =====> @@ -3236,65 +2956,62 @@ CALL [1] { CALL [6] { function: _+_ args: { - CONSTANT [7] { value: "w" } - CONSTANT [8] { value: "o" } + CALL [7] { + function: _+_ + args: { + CONSTANT [8] { value: "h" } + CONSTANT [9] { value: "e" } + } + } + CONSTANT [10] { value: "l" } } } - CONSTANT [9] { value: "r" } + CONSTANT [11] { value: "l" } } } - CONSTANT [10] { value: "l" } + CONSTANT [12] { value: "o" } } } - CONSTANT [11] { value: "d" } + CONSTANT [13] { value: " world" } } } - CALL [12] { + } + } + CALL [14] { + function: matches + target: { + IDENT [15] { + name: @index0 + } + } + args: { + CALL [16] { function: _+_ args: { - CALL [13] { + CALL [17] { function: _+_ args: { - CALL [14] { + CALL [18] { function: _+_ args: { - CALL [15] { + CALL [19] { function: _+_ args: { - CALL [16] { - function: _+_ - args: { - CONSTANT [17] { value: "h" } - CONSTANT [18] { value: "e" } - } - } - CONSTANT [19] { value: "l" } + CONSTANT [20] { value: "w" } + CONSTANT [21] { value: "o" } } } - CONSTANT [20] { value: "l" } + CONSTANT [22] { value: "r" } } } - CONSTANT [21] { value: "o" } + CONSTANT [23] { value: "l" } } } - CONSTANT [22] { value: " world" } + CONSTANT [24] { value: "d" } } } } } - CALL [23] { - function: matches - target: { - IDENT [24] { - name: @index1 - } - } - args: { - IDENT [25] { - name: @index0 - } - } - } } } Test case: CUSTOM_FUNCTION_INELIMINABLE @@ -3306,74 +3023,66 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 - }.single_int64 - } - SELECT [9] { - IDENT [10] { - name: msg + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg + }.oneof_type + }.payload }.single_int64 } - SELECT [11] { - IDENT [12] { - name: @index1 - }.single_int32 - } } } - CALL [13] { + CALL [7] { function: _+_ args: { - CALL [14] { + CALL [8] { function: _+_ args: { - CALL [15] { + CALL [9] { function: _+_ args: { - CALL [16] { + CALL [10] { function: non_pure_custom_func args: { - IDENT [17] { - name: @index2 + IDENT [11] { + name: @index0 } } } - CALL [18] { + CALL [12] { function: non_pure_custom_func args: { - IDENT [19] { - name: @index4 + SELECT [13] { + SELECT [14] { + SELECT [15] { + IDENT [16] { + name: msg + }.oneof_type + }.payload + }.single_int32 } } } } } - CALL [20] { + CALL [17] { function: non_pure_custom_func args: { - IDENT [21] { - name: @index2 + IDENT [18] { + name: @index0 } } } } } - CALL [22] { + CALL [19] { function: non_pure_custom_func args: { - IDENT [23] { - name: @index3 + SELECT [20] { + IDENT [21] { + name: msg + }.single_int64 } } } @@ -3389,75 +3098,67 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 - }.single_int64 - } - CALL [9] { - function: pure_custom_func - args: { - IDENT [10] { - name: @index2 - } - } - } - CALL [11] { + CALL [3] { function: pure_custom_func args: { - SELECT [12] { - IDENT [13] { - name: msg + SELECT [4] { + SELECT [5] { + SELECT [6] { + IDENT [7] { + name: msg + }.oneof_type + }.payload }.single_int64 } } } - CALL [14] { + CALL [8] { function: _+_ args: { - CALL [15] { - function: _+_ + IDENT [9] { + name: @index0 + } + CALL [10] { + function: pure_custom_func args: { - IDENT [16] { - name: @index3 - } - CALL [17] { - function: pure_custom_func - args: { - SELECT [18] { - IDENT [19] { - name: @index1 - }.single_int32 - } - } + SELECT [11] { + SELECT [12] { + SELECT [13] { + IDENT [14] { + name: msg + }.oneof_type + }.payload + }.single_int32 } } } - IDENT [20] { - name: @index3 - } } } } } - CALL [21] { + CALL [15] { function: _+_ args: { - IDENT [22] { - name: @index5 + CALL [16] { + function: _+_ + args: { + IDENT [17] { + name: @index1 + } + IDENT [18] { + name: @index0 + } + } } - IDENT [23] { - name: @index4 + CALL [19] { + function: pure_custom_func + args: { + SELECT [20] { + IDENT [21] { + name: msg + }.single_int64 + } + } } } } diff --git a/optimizer/src/test/resources/subexpression_ast_block_recursion_depth_6.baseline b/optimizer/src/test/resources/subexpression_ast_block_recursion_depth_6.baseline index a2ecbc777..107cf04c7 100644 --- a/optimizer/src/test/resources/subexpression_ast_block_recursion_depth_6.baseline +++ b/optimizer/src/test/resources/subexpression_ast_block_recursion_depth_6.baseline @@ -6,20 +6,22 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 1 } - CONSTANT [5] { value: 2 } - } - } - CALL [6] { + CALL [3] { function: size args: { - IDENT [7] { - name: @index0 + CREATE_LIST [4] { + elements: { + CONSTANT [5] { value: 1 } + CONSTANT [6] { value: 2 } + } } } } + } + } + CALL [7] { + function: _==_ + args: { CALL [8] { function: _+_ args: { @@ -27,25 +29,17 @@ CALL [1] { function: _+_ args: { IDENT [10] { - name: @index1 + name: @index0 } IDENT [11] { - name: @index1 + name: @index0 } } } CONSTANT [12] { value: 1 } } } - } - } - CALL [13] { - function: _==_ - args: { - IDENT [14] { - name: @index2 - } - CONSTANT [15] { value: 5 } + CONSTANT [13] { value: 5 } } } } @@ -58,20 +52,22 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 1 } - CONSTANT [5] { value: 2 } - } - } - CALL [6] { + CALL [3] { function: size args: { - IDENT [7] { - name: @index0 + CREATE_LIST [4] { + elements: { + CONSTANT [5] { value: 1 } + CONSTANT [6] { value: 2 } + } } } } + } + } + CALL [7] { + function: _==_ + args: { CALL [8] { function: _+_ args: { @@ -83,27 +79,19 @@ CALL [1] { args: { CONSTANT [11] { value: 2 } IDENT [12] { - name: @index1 + name: @index0 } } } IDENT [13] { - name: @index1 + name: @index0 } } } CONSTANT [14] { value: 1 } } } - } - } - CALL [15] { - function: _==_ - args: { - IDENT [16] { - name: @index2 - } - CONSTANT [17] { value: 7 } + CONSTANT [15] { value: 7 } } } } @@ -116,69 +104,60 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 0 } - } - } - CALL [5] { + CALL [3] { function: size args: { - IDENT [6] { - name: @index0 + CREATE_LIST [4] { + elements: { + CONSTANT [5] { value: 0 } + } } } } - CREATE_LIST [7] { - elements: { - CONSTANT [8] { value: 1 } - CONSTANT [9] { value: 2 } - } - } - CALL [10] { + CALL [6] { function: size args: { - IDENT [11] { - name: @index2 + CREATE_LIST [7] { + elements: { + CONSTANT [8] { value: 1 } + CONSTANT [9] { value: 2 } + } } } } - CALL [12] { + } + } + CALL [10] { + function: _==_ + args: { + CALL [11] { function: _+_ args: { - CALL [13] { + CALL [12] { function: _+_ args: { - CALL [14] { + CALL [13] { function: _+_ args: { - IDENT [15] { - name: @index1 + IDENT [14] { + name: @index0 } - IDENT [16] { - name: @index1 + IDENT [15] { + name: @index0 } } } - IDENT [17] { - name: @index3 + IDENT [16] { + name: @index1 } } } - IDENT [18] { - name: @index3 + IDENT [17] { + name: @index1 } } } - } - } - CALL [19] { - function: _==_ - args: { - IDENT [20] { - name: @index4 - } - CONSTANT [21] { value: 6 } + CONSTANT [18] { value: 6 } } } } @@ -191,106 +170,97 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 0 } - } - } - CALL [5] { + CALL [3] { function: size args: { - IDENT [6] { - name: @index0 + CREATE_LIST [4] { + elements: { + CONSTANT [5] { value: 0 } + } } } } - CREATE_LIST [7] { - elements: { - CONSTANT [8] { value: 1 } - CONSTANT [9] { value: 2 } - } - } - CALL [10] { + CALL [6] { function: size args: { - IDENT [11] { - name: @index2 + CREATE_LIST [7] { + elements: { + CONSTANT [8] { value: 1 } + CONSTANT [9] { value: 2 } + } } } } - CREATE_LIST [12] { - elements: { - CONSTANT [13] { value: 1 } - CONSTANT [14] { value: 2 } - CONSTANT [15] { value: 3 } - } - } - CALL [16] { + CALL [10] { function: size args: { - IDENT [17] { - name: @index4 + CREATE_LIST [11] { + elements: { + CONSTANT [12] { value: 1 } + CONSTANT [13] { value: 2 } + CONSTANT [14] { value: 3 } + } } } } - CALL [18] { + CALL [15] { function: _+_ args: { - CALL [19] { + CALL [16] { function: _+_ args: { - CALL [20] { + CALL [17] { function: _+_ args: { - CALL [21] { + CALL [18] { function: _+_ args: { - CALL [22] { + CALL [19] { function: _+_ args: { - CALL [23] { + CALL [20] { function: _+_ args: { - CONSTANT [24] { value: 5 } - IDENT [25] { - name: @index1 + CONSTANT [21] { value: 5 } + IDENT [22] { + name: @index0 } } } - IDENT [26] { - name: @index1 + IDENT [23] { + name: @index0 } } } - IDENT [27] { - name: @index3 + IDENT [24] { + name: @index1 } } } - IDENT [28] { - name: @index3 + IDENT [25] { + name: @index1 } } } - IDENT [29] { - name: @index5 + IDENT [26] { + name: @index2 } } } - IDENT [30] { - name: @index5 + IDENT [27] { + name: @index2 } } } } } - CALL [31] { + CALL [28] { function: _==_ args: { - IDENT [32] { - name: @index6 + IDENT [29] { + name: @index3 } - CONSTANT [33] { value: 17 } + CONSTANT [30] { value: 17 } } } } @@ -304,146 +274,106 @@ CALL [1] { CREATE_LIST [2] { elements: { CALL [3] { - function: timestamp - args: { - CONSTANT [4] { value: 1000000000 } - } - } - CALL [5] { - function: int - args: { - IDENT [6] { - name: @index0 + function: getFullYear + target: { + CALL [4] { + function: timestamp + args: { + CALL [5] { + function: int + args: { + CALL [6] { + function: timestamp + args: { + CONSTANT [7] { value: 1000000000 } + } + } + } + } + } } } - } - CALL [7] { - function: timestamp args: { - IDENT [8] { - name: @index1 - } } } - CALL [9] { + CALL [8] { function: getFullYear target: { - IDENT [10] { - name: @index2 + CALL [9] { + function: timestamp + args: { + CALL [10] { + function: int + args: { + CALL [11] { + function: timestamp + args: { + CONSTANT [12] { value: 200 } + } + } + } + } + } } } args: { } } - CALL [11] { - function: timestamp - args: { - CONSTANT [12] { value: 50 } - } - } CALL [13] { - function: int - args: { - IDENT [14] { - name: @index4 - } - } - } - CALL [15] { function: timestamp args: { - IDENT [16] { - name: @index5 + CALL [14] { + function: int + args: { + CALL [15] { + function: timestamp + args: { + CONSTANT [16] { value: 50 } + } + } + } } } } CALL [17] { function: timestamp args: { - CONSTANT [18] { value: 200 } - } - } - CALL [19] { - function: int - args: { - IDENT [20] { - name: @index7 + CALL [18] { + function: int + args: { + CALL [19] { + function: timestamp + args: { + CONSTANT [20] { value: 75 } + } + } + } } } } CALL [21] { - function: timestamp - args: { - IDENT [22] { - name: @index8 - } - } - } - CALL [23] { - function: getFullYear - target: { - IDENT [24] { - name: @index9 - } - } - args: { - } - } - CALL [25] { - function: timestamp - args: { - CONSTANT [26] { value: 75 } - } - } - CALL [27] { - function: int - args: { - IDENT [28] { - name: @index11 - } - } - } - CALL [29] { - function: timestamp - args: { - IDENT [30] { - name: @index12 - } - } - } - CALL [31] { - function: getMinutes - target: { - IDENT [32] { - name: @index13 - } - } - args: { - } - } - CALL [33] { function: _+_ args: { - CALL [34] { + CALL [22] { function: _+_ args: { - CALL [35] { + CALL [23] { function: _+_ args: { - CALL [36] { + CALL [24] { function: _+_ args: { - CALL [37] { + CALL [25] { function: _+_ args: { - IDENT [38] { - name: @index3 + IDENT [26] { + name: @index0 } - CALL [39] { + CALL [27] { function: getFullYear target: { - IDENT [40] { - name: @index13 + IDENT [28] { + name: @index3 } } args: { @@ -451,11 +381,11 @@ CALL [1] { } } } - CALL [41] { + CALL [29] { function: getFullYear target: { - IDENT [42] { - name: @index6 + IDENT [30] { + name: @index2 } } args: { @@ -463,16 +393,16 @@ CALL [1] { } } } - IDENT [43] { - name: @index3 + IDENT [31] { + name: @index0 } } } - CALL [44] { + CALL [32] { function: getSeconds target: { - IDENT [45] { - name: @index6 + IDENT [33] { + name: @index2 } } args: { @@ -480,47 +410,51 @@ CALL [1] { } } } - IDENT [46] { - name: @index10 - } + IDENT [34] { + name: @index1 + } } } - CALL [47] { + } + } + CALL [35] { + function: _==_ + args: { + CALL [36] { function: _+_ args: { - CALL [48] { + CALL [37] { function: _+_ args: { - CALL [49] { + CALL [38] { function: _+_ args: { - IDENT [50] { - name: @index15 + IDENT [39] { + name: @index4 } - IDENT [51] { - name: @index10 + IDENT [40] { + name: @index1 } } } - IDENT [52] { - name: @index14 + CALL [41] { + function: getMinutes + target: { + IDENT [42] { + name: @index3 + } + } + args: { + } } } } - IDENT [53] { - name: @index3 + IDENT [43] { + name: @index0 } } } - } - } - CALL [54] { - function: _==_ - args: { - IDENT [55] { - name: @index16 - } - CONSTANT [56] { value: 13934 } + CONSTANT [44] { value: 13934 } } } } @@ -533,53 +467,47 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_MAP [3] { - MAP_ENTRY [4] { - key: { - CONSTANT [5] { value: "a" } - } - value: { - CONSTANT [6] { value: 2 } - } - } - } - CALL [7] { + CALL [3] { function: _[_] args: { - IDENT [8] { - name: @index0 + CREATE_MAP [4] { + MAP_ENTRY [5] { + key: { + CONSTANT [6] { value: "a" } + } + value: { + CONSTANT [7] { value: 2 } + } + } } - CONSTANT [9] { value: "a" } + CONSTANT [8] { value: "a" } } } + } + } + CALL [9] { + function: _==_ + args: { CALL [10] { function: _+_ args: { IDENT [11] { - name: @index1 + name: @index0 } CALL [12] { function: _*_ args: { IDENT [13] { - name: @index1 + name: @index0 } IDENT [14] { - name: @index1 + name: @index0 } } } } } - } - } - CALL [15] { - function: _==_ - args: { - IDENT [16] { - name: @index2 - } - CONSTANT [17] { value: 6 } + CONSTANT [15] { value: 6 } } } } @@ -595,51 +523,48 @@ CALL [1] { CREATE_MAP [3] { MAP_ENTRY [4] { key: { - CONSTANT [5] { value: "b" } + CONSTANT [5] { value: "e" } } value: { - CONSTANT [6] { value: 1 } + CREATE_MAP [6] { + MAP_ENTRY [7] { + key: { + CONSTANT [8] { value: "b" } + } + value: { + CONSTANT [9] { value: 1 } + } + } + } } } } - CREATE_MAP [7] { - MAP_ENTRY [8] { + CREATE_MAP [10] { + MAP_ENTRY [11] { key: { - CONSTANT [9] { value: "e" } + CONSTANT [12] { value: "b" } } value: { - IDENT [10] { - name: @index0 - } + CONSTANT [13] { value: 1 } } } } } } - CREATE_MAP [11] { - MAP_ENTRY [12] { - key: { - CONSTANT [13] { value: "a" } - } - value: { - IDENT [14] { - name: @index0 - } - } - } + CREATE_MAP [14] { MAP_ENTRY [15] { key: { - CONSTANT [16] { value: "c" } + CONSTANT [16] { value: "a" } } value: { IDENT [17] { - name: @index0 + name: @index1 } } } MAP_ENTRY [18] { key: { - CONSTANT [19] { value: "d" } + CONSTANT [19] { value: "c" } } value: { IDENT [20] { @@ -649,11 +574,21 @@ CALL [1] { } MAP_ENTRY [21] { key: { - CONSTANT [22] { value: "e" } + CONSTANT [22] { value: "d" } } value: { IDENT [23] { - name: @index1 + name: @index0 + } + } + } + MAP_ENTRY [24] { + key: { + CONSTANT [25] { value: "e" } + } + value: { + IDENT [26] { + name: @index0 } } } @@ -682,37 +617,34 @@ CALL [1] { CONSTANT [10] { value: 2 } } } - CREATE_LIST [11] { - elements: { - IDENT [12] { - name: @index1 - } - IDENT [13] { - name: @index0 - } - } - } } } - CREATE_LIST [14] { + CREATE_LIST [11] { elements: { - CONSTANT [15] { value: 1 } - IDENT [16] { + CONSTANT [12] { value: 1 } + IDENT [13] { name: @index0 } - CONSTANT [17] { value: 2 } - IDENT [18] { + CONSTANT [14] { value: 2 } + IDENT [15] { name: @index0 } - CONSTANT [19] { value: 5 } - IDENT [20] { + CONSTANT [16] { value: 5 } + IDENT [17] { name: @index0 } - CONSTANT [21] { value: 7 } - IDENT [22] { - name: @index2 + CONSTANT [18] { value: 7 } + CREATE_LIST [19] { + elements: { + IDENT [20] { + name: @index1 + } + IDENT [21] { + name: @index0 + } + } } - IDENT [23] { + IDENT [22] { name: @index1 } } @@ -732,26 +664,23 @@ CALL [1] { name: msg }.single_int64 } - CALL [5] { + } + } + CALL [5] { + function: _==_ + args: { + CALL [6] { function: _+_ args: { - IDENT [6] { + IDENT [7] { name: @index0 } - IDENT [7] { + IDENT [8] { name: @index0 } } } - } - } - CALL [8] { - function: _==_ - args: { - IDENT [9] { - name: @index1 - } - CONSTANT [10] { value: 6 } + CONSTANT [9] { value: 6 } } } } @@ -765,58 +694,64 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg + }.oneof_type + }.payload + }.single_int64 } SELECT [7] { - IDENT [8] { - name: @index1 - }.single_int64 + SELECT [8] { + IDENT [9] { + name: msg + }.oneof_type + }.payload } - CALL [9] { + } + } + CALL [10] { + function: _==_ + args: { + CALL [11] { function: _+_ args: { - CALL [10] { + CALL [12] { function: _+_ args: { - CALL [11] { + CALL [13] { function: _+_ args: { - CALL [12] { + CALL [14] { function: _+_ args: { - IDENT [13] { - name: @index2 + IDENT [15] { + name: @index0 } - SELECT [14] { - IDENT [15] { + SELECT [16] { + IDENT [17] { name: @index1 }.single_int32 } } } - IDENT [16] { - name: @index2 + IDENT [18] { + name: @index0 } } } - SELECT [17] { - IDENT [18] { + SELECT [19] { + IDENT [20] { name: msg }.single_int64 } } } - SELECT [19] { - SELECT [20] { - SELECT [21] { - IDENT [22] { + SELECT [21] { + SELECT [22] { + SELECT [23] { + IDENT [24] { name: @index1 }.oneof_type }.payload @@ -824,14 +759,6 @@ CALL [1] { } } } - } - } - CALL [23] { - function: _==_ - args: { - IDENT [24] { - name: @index3 - } CONSTANT [25] { value: 31 } } } @@ -846,51 +773,33 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 - }.oneof_type - } - SELECT [9] { - IDENT [10] { - name: @index2 - }.payload - } - SELECT [11] { - IDENT [12] { - name: @index3 - }.oneof_type - } - SELECT [13] { - SELECT [14] { - SELECT [15] { - SELECT [16] { - IDENT [17] { - name: @index4 - }.child - }.child + SELECT [4] { + SELECT [5] { + SELECT [6] { + SELECT [7] { + IDENT [8] { + name: msg + }.oneof_type + }.payload + }.oneof_type }.payload - }.single_bool + }.oneof_type } - CALL [18] { + } + } + CALL [9] { + function: _||_ + args: { + CALL [10] { function: _||_ args: { - CONSTANT [19] { value: true } - SELECT [20] { - SELECT [21] { - SELECT [22] { - SELECT [23] { - IDENT [24] { - name: @index4 + CONSTANT [11] { value: true } + SELECT [12] { + SELECT [13] { + SELECT [14] { + SELECT [15] { + IDENT [16] { + name: @index0 }.payload }.oneof_type }.payload @@ -898,16 +807,16 @@ CALL [1] { } } } - } - } - CALL [25] { - function: _||_ - args: { - IDENT [26] { - name: @index6 - } - IDENT [27] { - name: @index5 + SELECT [17] { + SELECT [18] { + SELECT [19] { + SELECT [20] { + IDENT [21] { + name: @index0 + }.child + }.child + }.payload + }.single_bool } } } @@ -921,58 +830,46 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 - }.map_int32_int64 - } - CALL [9] { + CALL [3] { function: _[_] args: { - IDENT [10] { - name: @index2 + SELECT [4] { + SELECT [5] { + SELECT [6] { + IDENT [7] { + name: msg + }.oneof_type + }.payload + }.map_int32_int64 } - CONSTANT [11] { value: 1 } + CONSTANT [8] { value: 1 } } } - CALL [12] { + } + } + CALL [9] { + function: _==_ + args: { + CALL [10] { function: _+_ args: { - CALL [13] { + CALL [11] { function: _+_ args: { - IDENT [14] { - name: @index3 + IDENT [12] { + name: @index0 } - IDENT [15] { - name: @index3 + IDENT [13] { + name: @index0 } } } - IDENT [16] { - name: @index3 + IDENT [14] { + name: @index0 } } } - } - } - CALL [17] { - function: _==_ - args: { - IDENT [18] { - name: @index4 - } - CONSTANT [19] { value: 15 } + CONSTANT [15] { value: 15 } } } } @@ -986,66 +883,57 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg + }.oneof_type + }.payload }.map_int32_int64 } - CALL [9] { + } + } + CALL [7] { + function: _==_ + args: { + CALL [8] { function: _+_ args: { - CALL [10] { + CALL [9] { function: _+_ args: { - CALL [11] { + CALL [10] { function: _[_] args: { - IDENT [12] { - name: @index2 + IDENT [11] { + name: @index0 } - CONSTANT [13] { value: 0 } + CONSTANT [12] { value: 0 } } } - CALL [14] { + CALL [13] { function: _[_] args: { - IDENT [15] { - name: @index2 + IDENT [14] { + name: @index0 } - CONSTANT [16] { value: 1 } + CONSTANT [15] { value: 1 } } } } } - CALL [17] { + CALL [16] { function: _[_] args: { - IDENT [18] { - name: @index2 + IDENT [17] { + name: @index0 } - CONSTANT [19] { value: 2 } + CONSTANT [18] { value: 2 } } } } } - } - } - CALL [20] { - function: _==_ - args: { - IDENT [21] { - name: @index3 - } - CONSTANT [22] { value: 8 } + CONSTANT [19] { value: 8 } } } } @@ -1073,18 +961,15 @@ CALL [1] { }.oneof_type }.payload } - SELECT [10] { - SELECT [11] { - IDENT [12] { - name: @index0 - }.oneof_type - }.payload - } } } - SELECT [13] { - IDENT [14] { - name: @index1 + SELECT [10] { + SELECT [11] { + SELECT [12] { + IDENT [13] { + name: @index0 + }.oneof_type + }.payload }.single_int64 } } @@ -1102,33 +987,30 @@ CALL [1] { name: msg }.single_int64 } - CALL [5] { + } + } + CALL [5] { + function: _==_ + args: { + CALL [6] { function: _?_:_ args: { - CALL [6] { + CALL [7] { function: _>_ args: { - IDENT [7] { + IDENT [8] { name: @index0 } - CONSTANT [8] { value: 0 } + CONSTANT [9] { value: 0 } } } - IDENT [9] { + IDENT [10] { name: @index0 } - CONSTANT [10] { value: 0 } + CONSTANT [11] { value: 0 } } } - } - } - CALL [11] { - function: _==_ - args: { - IDENT [12] { - name: @index1 - } - CONSTANT [13] { value: 3 } + CONSTANT [12] { value: 3 } } } } @@ -1146,47 +1028,44 @@ CALL [1] { name: msg }.single_int64 } - CALL [5] { + } + } + CALL [5] { + function: _?_:_ + args: { + CONSTANT [6] { value: false } + CONSTANT [7] { value: false } + CALL [8] { function: _==_ args: { - CALL [6] { + CALL [9] { function: _+_ args: { - IDENT [7] { + IDENT [10] { name: @index0 } - CALL [8] { + CALL [11] { function: _*_ args: { - CALL [9] { + CALL [12] { function: _+_ args: { - IDENT [10] { + IDENT [13] { name: @index0 } - CONSTANT [11] { value: 1 } + CONSTANT [14] { value: 1 } } } - CONSTANT [12] { value: 2 } + CONSTANT [15] { value: 2 } } } } } - CONSTANT [13] { value: 11 } + CONSTANT [16] { value: 11 } } } } } - CALL [14] { - function: _?_:_ - args: { - CONSTANT [15] { value: false } - CONSTANT [16] { value: false } - IDENT [17] { - name: @index1 - } - } - } } } Test case: NESTED_TERNARY @@ -1207,56 +1086,53 @@ CALL [1] { name: msg }.single_int32 } - CALL [7] { + } + } + CALL [7] { + function: _==_ + args: { + CALL [8] { function: _?_:_ args: { - CALL [8] { + CALL [9] { function: _>_ args: { - IDENT [9] { + IDENT [10] { name: @index0 } - CONSTANT [10] { value: 0 } + CONSTANT [11] { value: 0 } } } - CALL [11] { + CALL [12] { function: _?_:_ args: { - CALL [12] { + CALL [13] { function: _>_ args: { - IDENT [13] { + IDENT [14] { name: @index1 } - CONSTANT [14] { value: 0 } + CONSTANT [15] { value: 0 } } } - CALL [15] { + CALL [16] { function: _+_ args: { - IDENT [16] { + IDENT [17] { name: @index0 } - IDENT [17] { + IDENT [18] { name: @index1 } } } - CONSTANT [18] { value: 0 } + CONSTANT [19] { value: 0 } } } - CONSTANT [19] { value: 0 } + CONSTANT [20] { value: 0 } } } - } - } - CALL [20] { - function: _==_ - args: { - IDENT [21] { - name: @index2 - } - CONSTANT [22] { value: 8 } + CONSTANT [21] { value: 8 } } } } @@ -1269,196 +1145,163 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 1 } - } - } - CALL [5] { - function: _>_ + CALL [3] { + function: size args: { - IDENT [6] { - name: @c0:0 + CREATE_LIST [4] { + elements: { + COMPREHENSION [5] { + iter_var: @c0:0 + iter_range: { + CREATE_LIST [6] { + elements: { + CONSTANT [7] { value: 1 } + } + } + } + accu_var: @x0:0 + accu_init: { + CONSTANT [8] { value: false } + } + loop_condition: { + CALL [9] { + function: @not_strictly_false + args: { + CALL [10] { + function: !_ + args: { + IDENT [11] { + name: @x0:0 + } + } + } + } + } + } + loop_step: { + CALL [12] { + function: _||_ + args: { + IDENT [13] { + name: @x0:0 + } + CALL [14] { + function: _>_ + args: { + IDENT [15] { + name: @c0:0 + } + CONSTANT [16] { value: 0 } + } + } + } + } + } + result: { + IDENT [17] { + name: @x0:0 + } + } + } + } } - CONSTANT [7] { value: 0 } } } - CALL [8] { - function: _||_ + CALL [18] { + function: size args: { - IDENT [9] { - name: @x0:0 - } - IDENT [10] { - name: @index1 + CREATE_LIST [19] { + elements: { + COMPREHENSION [20] { + iter_var: @c0:0 + iter_range: { + CREATE_LIST [21] { + elements: { + CONSTANT [22] { value: 2 } + } + } + } + accu_var: @x0:0 + accu_init: { + CONSTANT [23] { value: false } + } + loop_condition: { + CALL [24] { + function: @not_strictly_false + args: { + CALL [25] { + function: !_ + args: { + IDENT [26] { + name: @x0:0 + } + } + } + } + } + } + loop_step: { + CALL [27] { + function: _||_ + args: { + IDENT [28] { + name: @x0:0 + } + CALL [29] { + function: _>_ + args: { + IDENT [30] { + name: @c0:0 + } + CONSTANT [31] { value: 1 } + } + } + } + } + } + result: { + IDENT [32] { + name: @x0:0 + } + } + } + } } } } - COMPREHENSION [11] { - iter_var: @c0:0 - iter_range: { - IDENT [12] { - name: @index0 - } - } - accu_var: @x0:0 - accu_init: { - CONSTANT [13] { value: false } - } - loop_condition: { - CALL [14] { - function: @not_strictly_false + } + } + CALL [33] { + function: _==_ + args: { + CALL [34] { + function: _+_ + args: { + CALL [35] { + function: _+_ args: { - CALL [15] { - function: !_ + CALL [36] { + function: _+_ args: { - IDENT [16] { - name: @x0:0 + IDENT [37] { + name: @index0 + } + IDENT [38] { + name: @index0 } } } + IDENT [39] { + name: @index1 + } } } - } - loop_step: { - IDENT [17] { - name: @index2 - } - } - result: { - IDENT [18] { - name: @x0:0 - } - } - } - CREATE_LIST [19] { - elements: { - IDENT [20] { - name: @index3 - } - } - } - CALL [21] { - function: size - args: { - IDENT [22] { - name: @index4 - } - } - } - CREATE_LIST [23] { - elements: { - CONSTANT [24] { value: 2 } - } - } - CALL [25] { - function: _>_ - args: { - IDENT [26] { - name: @c0:0 - } - CONSTANT [27] { value: 1 } - } - } - CALL [28] { - function: _||_ - args: { - IDENT [29] { - name: @x0:0 - } - IDENT [30] { - name: @index7 - } - } - } - COMPREHENSION [31] { - iter_var: @c0:0 - iter_range: { - IDENT [32] { - name: @index6 - } - } - accu_var: @x0:0 - accu_init: { - CONSTANT [33] { value: false } - } - loop_condition: { - CALL [34] { - function: @not_strictly_false - args: { - CALL [35] { - function: !_ - args: { - IDENT [36] { - name: @x0:0 - } - } - } - } - } - } - loop_step: { - IDENT [37] { - name: @index8 - } - } - result: { - IDENT [38] { - name: @x0:0 - } - } - } - CREATE_LIST [39] { - elements: { - IDENT [40] { - name: @index9 - } - } - } - CALL [41] { - function: size - args: { - IDENT [42] { - name: @index10 - } - } - } - CALL [43] { - function: _+_ - args: { - CALL [44] { - function: _+_ - args: { - CALL [45] { - function: _+_ - args: { - IDENT [46] { - name: @index5 - } - IDENT [47] { - name: @index5 - } - } - } - IDENT [48] { - name: @index11 - } - } - } - IDENT [49] { - name: @index11 + IDENT [40] { + name: @index1 } } } - } - } - CALL [50] { - function: _==_ - args: { - IDENT [51] { - name: @index12 - } - CONSTANT [52] { value: 4 } + CONSTANT [41] { value: 4 } } } } @@ -1473,187 +1316,157 @@ CALL [1] { elements: { CREATE_LIST [3] { elements: { - CONSTANT [4] { value: 1 } - } - } - CALL [5] { - function: _>_ - args: { - IDENT [6] { - name: @c0:0 - } - CONSTANT [7] { value: 0 } - } - } - CALL [8] { - function: _||_ - args: { - IDENT [9] { - name: @x0:0 - } - IDENT [10] { - name: @index1 - } - } - } - COMPREHENSION [11] { - iter_var: @c0:0 - iter_range: { - IDENT [12] { - name: @index0 - } - } - accu_var: @x0:0 - accu_init: { - CONSTANT [13] { value: false } - } - loop_condition: { - CALL [14] { - function: @not_strictly_false - args: { - CALL [15] { - function: !_ + COMPREHENSION [4] { + iter_var: @c0:0 + iter_range: { + CREATE_LIST [5] { + elements: { + CONSTANT [6] { value: 1 } + } + } + } + accu_var: @x0:0 + accu_init: { + CONSTANT [7] { value: false } + } + loop_condition: { + CALL [8] { + function: @not_strictly_false args: { - IDENT [16] { + CALL [9] { + function: !_ + args: { + IDENT [10] { + name: @x0:0 + } + } + } + } + } + } + loop_step: { + CALL [11] { + function: _||_ + args: { + IDENT [12] { name: @x0:0 } + CALL [13] { + function: _>_ + args: { + IDENT [14] { + name: @c0:0 + } + CONSTANT [15] { value: 0 } + } + } } } } - } - } - loop_step: { - IDENT [17] { - name: @index2 - } - } - result: { - IDENT [18] { - name: @x0:0 - } - } - } - CREATE_LIST [19] { - elements: { - IDENT [20] { - name: @index3 + result: { + IDENT [16] { + name: @x0:0 + } + } } } } - CREATE_LIST [21] { + CREATE_LIST [17] { elements: { - CONSTANT [22] { value: "a" } - } - } - CALL [23] { - function: _==_ - args: { - IDENT [24] { - name: @c0:1 - } - CONSTANT [25] { value: "a" } - } - } - CALL [26] { - function: _||_ - args: { - IDENT [27] { - name: @x0:1 - } - IDENT [28] { - name: @index6 - } - } - } - COMPREHENSION [29] { - iter_var: @c0:1 - iter_range: { - IDENT [30] { - name: @index5 - } - } - accu_var: @x0:1 - accu_init: { - CONSTANT [31] { value: false } - } - loop_condition: { - CALL [32] { - function: @not_strictly_false - args: { - CALL [33] { - function: !_ + COMPREHENSION [18] { + iter_var: @c0:1 + iter_range: { + CREATE_LIST [19] { + elements: { + CONSTANT [20] { value: "a" } + } + } + } + accu_var: @x0:1 + accu_init: { + CONSTANT [21] { value: false } + } + loop_condition: { + CALL [22] { + function: @not_strictly_false + args: { + CALL [23] { + function: !_ + args: { + IDENT [24] { + name: @x0:1 + } + } + } + } + } + } + loop_step: { + CALL [25] { + function: _||_ args: { - IDENT [34] { + IDENT [26] { name: @x0:1 } + CALL [27] { + function: _==_ + args: { + IDENT [28] { + name: @c0:1 + } + CONSTANT [29] { value: "a" } + } + } } } } + result: { + IDENT [30] { + name: @x0:1 + } + } } } - loop_step: { - IDENT [35] { - name: @index7 - } - } - result: { - IDENT [36] { - name: @x0:1 - } - } - } - CREATE_LIST [37] { - elements: { - IDENT [38] { - name: @index8 - } - } - } - CREATE_LIST [39] { - elements: { - CONSTANT [40] { value: true } - CONSTANT [41] { value: true } - CONSTANT [42] { value: true } - CONSTANT [43] { value: true } - } } - CALL [44] { + } + } + CALL [31] { + function: _==_ + args: { + CALL [32] { function: _+_ args: { - CALL [45] { + CALL [33] { function: _+_ args: { - CALL [46] { + CALL [34] { function: _+_ args: { - IDENT [47] { - name: @index4 + IDENT [35] { + name: @index0 } - IDENT [48] { - name: @index4 + IDENT [36] { + name: @index0 } } } - IDENT [49] { - name: @index9 + IDENT [37] { + name: @index1 } } } - IDENT [50] { - name: @index9 + IDENT [38] { + name: @index1 } } } - } - } - CALL [51] { - function: _==_ - args: { - IDENT [52] { - name: @index11 - } - IDENT [53] { - name: @index10 + CREATE_LIST [39] { + elements: { + CONSTANT [40] { value: true } + CONSTANT [41] { value: true } + CONSTANT [42] { value: true } + CONSTANT [43] { value: true } + } } } } @@ -1681,60 +1494,47 @@ CALL [1] { CONSTANT [10] { value: 4 } } } - CREATE_LIST [11] { - elements: { - IDENT [12] { - name: @index1 - } - IDENT [13] { - name: @index1 - } - IDENT [14] { - name: @index1 - } - } - } - CALL [15] { + CALL [11] { function: _+_ args: { - IDENT [16] { + IDENT [12] { name: @x0:0 } - CREATE_LIST [17] { + CREATE_LIST [13] { elements: { - COMPREHENSION [18] { + COMPREHENSION [14] { iter_var: @c1:0 iter_range: { - IDENT [19] { + IDENT [15] { name: @index0 } } accu_var: @x1:0 accu_init: { - CREATE_LIST [20] { + CREATE_LIST [16] { elements: { } } } loop_condition: { - CONSTANT [21] { value: true } + CONSTANT [17] { value: true } } loop_step: { - CALL [22] { + CALL [18] { function: _+_ args: { - IDENT [23] { + IDENT [19] { name: @x1:0 } - CREATE_LIST [24] { + CREATE_LIST [20] { elements: { - CALL [25] { + CALL [21] { function: _+_ args: { - IDENT [26] { + IDENT [22] { name: @c1:0 } - CONSTANT [27] { value: 1 } + CONSTANT [23] { value: 1 } } } } @@ -1743,7 +1543,7 @@ CALL [1] { } } result: { - IDENT [28] { + IDENT [24] { name: @x1:0 } } @@ -1752,44 +1552,51 @@ CALL [1] { } } } - COMPREHENSION [29] { + } + } + CALL [25] { + function: _==_ + args: { + COMPREHENSION [26] { iter_var: @c0:0 iter_range: { - IDENT [30] { + IDENT [27] { name: @index0 } } accu_var: @x0:0 accu_init: { - CREATE_LIST [31] { + CREATE_LIST [28] { elements: { } } } loop_condition: { - CONSTANT [32] { value: true } + CONSTANT [29] { value: true } } loop_step: { - IDENT [33] { - name: @index3 + IDENT [30] { + name: @index2 } } result: { - IDENT [34] { + IDENT [31] { name: @x0:0 } } } - } - } - CALL [35] { - function: _==_ - args: { - IDENT [36] { - name: @index4 - } - IDENT [37] { - name: @index2 + CREATE_LIST [32] { + elements: { + IDENT [33] { + name: @index1 + } + IDENT [34] { + name: @index1 + } + IDENT [35] { + name: @index1 + } + } } } } @@ -1803,87 +1610,73 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CREATE_LIST [4] { - elements: { - CONSTANT [5] { value: 1 } - } - } - CREATE_LIST [6] { - elements: { - CONSTANT [7] { value: 2 } - } - } - } - } - CALL [8] { + CALL [3] { function: _+_ args: { - IDENT [9] { + IDENT [4] { name: @x0:0 } - CREATE_LIST [10] { + CREATE_LIST [5] { elements: { - COMPREHENSION [11] { + COMPREHENSION [6] { iter_var: @c1:0 iter_range: { - CREATE_LIST [12] { + CREATE_LIST [7] { elements: { - CONSTANT [13] { value: 1 } - CONSTANT [14] { value: 2 } - CONSTANT [15] { value: 3 } + CONSTANT [8] { value: 1 } + CONSTANT [9] { value: 2 } + CONSTANT [10] { value: 3 } } } } accu_var: @x1:0 accu_init: { - CREATE_LIST [16] { + CREATE_LIST [11] { elements: { } } } loop_condition: { - CONSTANT [17] { value: true } + CONSTANT [12] { value: true } } loop_step: { - CALL [18] { + CALL [13] { function: _?_:_ args: { - CALL [19] { + CALL [14] { function: _==_ args: { - IDENT [20] { + IDENT [15] { name: @c1:0 } - IDENT [21] { + IDENT [16] { name: @c0:0 } } } - CALL [22] { + CALL [17] { function: _+_ args: { - IDENT [23] { + IDENT [18] { name: @x1:0 } - CREATE_LIST [24] { + CREATE_LIST [19] { elements: { - IDENT [25] { + IDENT [20] { name: @c1:0 } } } } } - IDENT [26] { + IDENT [21] { name: @x1:0 } } } } result: { - IDENT [27] { + IDENT [22] { name: @x1:0 } } @@ -1892,47 +1685,55 @@ CALL [1] { } } } - COMPREHENSION [28] { + } + } + CALL [23] { + function: _==_ + args: { + COMPREHENSION [24] { iter_var: @c0:0 iter_range: { - CREATE_LIST [29] { + CREATE_LIST [25] { elements: { - CONSTANT [30] { value: 1 } - CONSTANT [31] { value: 2 } + CONSTANT [26] { value: 1 } + CONSTANT [27] { value: 2 } } } } accu_var: @x0:0 accu_init: { - CREATE_LIST [32] { + CREATE_LIST [28] { elements: { } } } loop_condition: { - CONSTANT [33] { value: true } + CONSTANT [29] { value: true } } loop_step: { - IDENT [34] { - name: @index1 + IDENT [30] { + name: @index0 } } result: { - IDENT [35] { + IDENT [31] { name: @x0:0 } } } - } - } - CALL [36] { - function: _==_ - args: { - IDENT [37] { - name: @index2 - } - IDENT [38] { - name: @index0 + CREATE_LIST [32] { + elements: { + CREATE_LIST [33] { + elements: { + CONSTANT [34] { value: 1 } + } + } + CREATE_LIST [35] { + elements: { + CONSTANT [36] { value: 2 } + } + } + } } } } @@ -1946,74 +1747,72 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 1 } - CONSTANT [5] { value: 2 } - CONSTANT [6] { value: 3 } - } - } - CALL [7] { + CALL [3] { function: @in args: { - CONSTANT [8] { value: 1 } - IDENT [9] { - name: @index0 + CONSTANT [4] { value: 1 } + CREATE_LIST [5] { + elements: { + CONSTANT [6] { value: 1 } + CONSTANT [7] { value: 2 } + CONSTANT [8] { value: 3 } + } } } } - CALL [10] { + CREATE_LIST [9] { + elements: { + CONSTANT [10] { value: 1 } + CONSTANT [11] { value: 2 } + CONSTANT [12] { value: 3 } + } + } + } + } + CALL [13] { + function: _&&_ + args: { + CALL [14] { function: _&&_ args: { - CALL [11] { + IDENT [15] { + name: @index0 + } + CALL [16] { function: @in args: { - CONSTANT [12] { value: 3 } - CREATE_LIST [13] { - elements: { - CONSTANT [14] { value: 3 } - IDENT [15] { - name: @index0 - } - } + CONSTANT [17] { value: 2 } + IDENT [18] { + name: @index1 } } } - IDENT [16] { - name: @index1 - } } } - CALL [17] { + CALL [19] { function: _&&_ args: { - IDENT [18] { - name: @index1 - } - CALL [19] { + CALL [20] { function: @in args: { - CONSTANT [20] { value: 2 } - IDENT [21] { - name: @index0 + CONSTANT [21] { value: 3 } + CREATE_LIST [22] { + elements: { + CONSTANT [23] { value: 3 } + IDENT [24] { + name: @index1 + } + } } } } + IDENT [25] { + name: @index0 + } } } } } - CALL [22] { - function: _&&_ - args: { - IDENT [23] { - name: @index3 - } - IDENT [24] { - name: @index2 - } - } - } } } Test case: INCLUSION_MAP @@ -2034,31 +1833,37 @@ CALL [1] { } } } - CREATE_MAP [7] { - MAP_ENTRY [8] { + } + } + CALL [7] { + function: @in + args: { + CONSTANT [8] { value: 2 } + CREATE_MAP [9] { + MAP_ENTRY [10] { key: { - CONSTANT [9] { value: "a" } + CONSTANT [11] { value: "a" } } value: { - CONSTANT [10] { value: 1 } + CONSTANT [12] { value: 1 } } } - MAP_ENTRY [11] { + MAP_ENTRY [13] { key: { - CONSTANT [12] { value: 2 } + CONSTANT [14] { value: 2 } } value: { - IDENT [13] { + IDENT [15] { name: @index0 } } } - MAP_ENTRY [14] { + MAP_ENTRY [16] { key: { - CONSTANT [15] { value: 3 } + CONSTANT [17] { value: 3 } } value: { - IDENT [16] { + IDENT [18] { name: @index0 } } @@ -2066,15 +1871,6 @@ CALL [1] { } } } - CALL [17] { - function: @in - args: { - CONSTANT [18] { value: 2 } - IDENT [19] { - name: @index1 - } - } - } } } Test case: MACRO_ITER_VAR_NOT_REFERENCED @@ -2087,123 +1883,123 @@ CALL [1] { elements: { CREATE_LIST [3] { elements: { - CONSTANT [4] { value: 1 } - CONSTANT [5] { value: 2 } - } - } - CREATE_LIST [6] { - elements: { - CONSTANT [7] { value: 3 } - CONSTANT [8] { value: 4 } - } - } - CREATE_LIST [9] { - elements: { - IDENT [10] { - name: @index1 + CREATE_LIST [4] { + elements: { + CONSTANT [5] { value: 3 } + CONSTANT [6] { value: 4 } + } } - IDENT [11] { - name: @index1 + CREATE_LIST [7] { + elements: { + CONSTANT [8] { value: 3 } + CONSTANT [9] { value: 4 } + } } } } - CREATE_LIST [12] { + CREATE_LIST [10] { elements: { - IDENT [13] { - name: @index2 - } + CONSTANT [11] { value: 1 } + CONSTANT [12] { value: 2 } + } + } + CALL [13] { + function: _+_ + args: { IDENT [14] { - name: @index2 + name: @x0:0 + } + CREATE_LIST [15] { + elements: { + COMPREHENSION [16] { + iter_var: @c1:0 + iter_range: { + IDENT [17] { + name: @index1 + } + } + accu_var: @x1:0 + accu_init: { + CREATE_LIST [18] { + elements: { + } + } + } + loop_condition: { + CONSTANT [19] { value: true } + } + loop_step: { + CALL [20] { + function: _+_ + args: { + IDENT [21] { + name: @x1:0 + } + CREATE_LIST [22] { + elements: { + CREATE_LIST [23] { + elements: { + CONSTANT [24] { value: 3 } + CONSTANT [25] { value: 4 } + } + } + } + } + } + } + } + result: { + IDENT [26] { + name: @x1:0 + } + } + } + } } } } - COMPREHENSION [15] { + } + } + CALL [27] { + function: _==_ + args: { + COMPREHENSION [28] { iter_var: @c0:0 iter_range: { - IDENT [16] { - name: @index0 + IDENT [29] { + name: @index1 } } accu_var: @x0:0 accu_init: { - CREATE_LIST [17] { + CREATE_LIST [30] { elements: { } } } loop_condition: { - CONSTANT [18] { value: true } + CONSTANT [31] { value: true } } loop_step: { - CALL [19] { - function: _+_ - args: { - IDENT [20] { - name: @x0:0 - } - CREATE_LIST [21] { - elements: { - COMPREHENSION [22] { - iter_var: @c1:0 - iter_range: { - IDENT [23] { - name: @index0 - } - } - accu_var: @x1:0 - accu_init: { - CREATE_LIST [24] { - elements: { - } - } - } - loop_condition: { - CONSTANT [25] { value: true } - } - loop_step: { - CALL [26] { - function: _+_ - args: { - IDENT [27] { - name: @x1:0 - } - CREATE_LIST [28] { - elements: { - IDENT [29] { - name: @index1 - } - } - } - } - } - } - result: { - IDENT [30] { - name: @x1:0 - } - } - } - } - } - } + IDENT [32] { + name: @index2 } } result: { - IDENT [31] { + IDENT [33] { name: @x0:0 } } } - } - } - CALL [32] { - function: _==_ - args: { - IDENT [33] { - name: @index4 - } - IDENT [34] { - name: @index3 + CREATE_LIST [34] { + elements: { + IDENT [35] { + name: @index0 + } + IDENT [36] { + name: @index0 + } + } } } } @@ -2218,23 +2014,25 @@ CALL [1] { CREATE_LIST [2] { elements: { CALL [3] { - function: _-_ - args: { - IDENT [4] { - name: x - } - CONSTANT [5] { value: 1 } - } - } - CALL [6] { function: _>_ args: { - IDENT [7] { - name: @index0 + CALL [4] { + function: _-_ + args: { + IDENT [5] { + name: x + } + CONSTANT [6] { value: 1 } + } } - CONSTANT [8] { value: 3 } + CONSTANT [7] { value: 3 } } } + } + } + CALL [8] { + function: _||_ + args: { COMPREHENSION [9] { iter_var: @c0:0 iter_range: { @@ -2244,12 +2042,18 @@ CALL [1] { function: _?_:_ args: { IDENT [12] { - name: @index1 - } - IDENT [13] { name: @index0 } - CONSTANT [14] { value: 5 } + CALL [13] { + function: _-_ + args: { + IDENT [14] { + name: x + } + CONSTANT [15] { value: 1 } + } + } + CONSTANT [16] { value: 5 } } } } @@ -2257,16 +2061,16 @@ CALL [1] { } accu_var: @x0:0 accu_init: { - CONSTANT [15] { value: false } + CONSTANT [17] { value: false } } loop_condition: { - CALL [16] { + CALL [18] { function: @not_strictly_false args: { - CALL [17] { + CALL [19] { function: !_ args: { - IDENT [18] { + IDENT [20] { name: @x0:0 } } @@ -2275,46 +2079,38 @@ CALL [1] { } } loop_step: { - CALL [19] { + CALL [21] { function: _||_ args: { - IDENT [20] { + IDENT [22] { name: @x0:0 } - CALL [21] { + CALL [23] { function: _>_ args: { - CALL [22] { + CALL [24] { function: _-_ args: { - IDENT [23] { + IDENT [25] { name: @c0:0 } - CONSTANT [24] { value: 1 } + CONSTANT [26] { value: 1 } } } - CONSTANT [25] { value: 3 } + CONSTANT [27] { value: 3 } } } } } } result: { - IDENT [26] { + IDENT [28] { name: @x0:0 } } } - } - } - CALL [27] { - function: _||_ - args: { - IDENT [28] { - name: @index2 - } IDENT [29] { - name: @index1 + name: @index0 } } } @@ -2350,63 +2146,46 @@ CALL [1] { } } } - CALL [9] { - function: _+_ - args: { - IDENT [10] { - name: @x0:0 - } - CREATE_LIST [11] { - elements: { - CREATE_LIST [12] { - elements: { - IDENT [13] { - name: @index1 - } - IDENT [14] { - name: @index1 - } - } - } - } - } - } - } - COMPREHENSION [15] { + } + } + COMPREHENSION [9] { + iter_var: @c0:0 + iter_range: { + COMPREHENSION [10] { iter_var: @c1:0 iter_range: { - CREATE_LIST [16] { + CREATE_LIST [11] { elements: { - CONSTANT [17] { value: "foo" } - CONSTANT [18] { value: "bar" } + CONSTANT [12] { value: "foo" } + CONSTANT [13] { value: "bar" } } } } accu_var: @x1:0 accu_init: { - CREATE_LIST [19] { + CREATE_LIST [14] { elements: { } } } loop_condition: { - CONSTANT [20] { value: true } + CONSTANT [15] { value: true } } loop_step: { - CALL [21] { + CALL [16] { function: _+_ args: { - IDENT [22] { + IDENT [17] { name: @x1:0 } - CREATE_LIST [23] { + CREATE_LIST [18] { elements: { - CREATE_LIST [24] { + CREATE_LIST [19] { elements: { - IDENT [25] { + IDENT [20] { name: @index0 } - IDENT [26] { + IDENT [21] { name: @index0 } } @@ -2417,37 +2196,48 @@ CALL [1] { } } result: { - IDENT [27] { + IDENT [22] { name: @x1:0 } } } } - } - COMPREHENSION [28] { - iter_var: @c0:0 - iter_range: { - IDENT [29] { - name: @index3 - } - } accu_var: @x0:0 accu_init: { - CREATE_LIST [30] { + CREATE_LIST [23] { elements: { } } } loop_condition: { - CONSTANT [31] { value: true } + CONSTANT [24] { value: true } } loop_step: { - IDENT [32] { - name: @index2 + CALL [25] { + function: _+_ + args: { + IDENT [26] { + name: @x0:0 + } + CREATE_LIST [27] { + elements: { + CREATE_LIST [28] { + elements: { + IDENT [29] { + name: @index1 + } + IDENT [30] { + name: @index1 + } + } + } + } + } + } } } result: { - IDENT [33] { + IDENT [31] { name: @x0:0 } } @@ -2472,27 +2262,24 @@ CALL [1] { } } } - CALL [7] { - function: _[_] - args: { - IDENT [8] { - name: @index0 - } - CONSTANT [9] { value: "a" } - } - } } } - CALL [10] { + CALL [7] { function: _&&_ args: { - SELECT [11] { - IDENT [12] { + SELECT [8] { + IDENT [9] { name: @index0 }.a~presence_test } - IDENT [13] { - name: @index1 + CALL [10] { + function: _[_] + args: { + IDENT [11] { + name: @index0 + } + CONSTANT [12] { value: "a" } + } } } } @@ -2511,33 +2298,30 @@ CALL [1] { name: msg }.oneof_type } - CALL [5] { + } + } + CALL [5] { + function: _==_ + args: { + CALL [6] { function: _?_:_ args: { - SELECT [6] { - IDENT [7] { + SELECT [7] { + IDENT [8] { name: @index0 }.payload~presence_test } - SELECT [8] { - SELECT [9] { - IDENT [10] { + SELECT [9] { + SELECT [10] { + IDENT [11] { name: @index0 }.payload }.single_int64 } - CONSTANT [11] { value: 0 } + CONSTANT [12] { value: 0 } } } - } - } - CALL [12] { - function: _==_ - args: { - IDENT [13] { - name: @index1 - } - CONSTANT [14] { value: 10 } + CONSTANT [13] { value: 10 } } } } @@ -2551,51 +2335,44 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg + }.oneof_type + }.payload }.single_int64 } - CALL [9] { + } + } + CALL [7] { + function: _==_ + args: { + CALL [8] { function: _?_:_ args: { - SELECT [10] { - IDENT [11] { - name: @index0 + SELECT [9] { + SELECT [10] { + IDENT [11] { + name: msg + }.oneof_type }.payload~presence_test } IDENT [12] { - name: @index2 + name: @index0 } CALL [13] { function: _*_ args: { IDENT [14] { - name: @index2 + name: @index0 } CONSTANT [15] { value: 0 } } } } } - } - } - CALL [16] { - function: _==_ - args: { - IDENT [17] { - name: @index3 - } - CONSTANT [18] { value: 10 } + CONSTANT [16] { value: 10 } } } } @@ -2609,51 +2386,46 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg + }.oneof_type + }.payload }.single_int64 } - CALL [9] { + } + } + CALL [7] { + function: _==_ + args: { + CALL [8] { function: _?_:_ args: { - SELECT [10] { - IDENT [11] { - name: @index1 + SELECT [9] { + SELECT [10] { + SELECT [11] { + IDENT [12] { + name: msg + }.oneof_type + }.payload }.single_int64~presence_test } - IDENT [12] { - name: @index2 + IDENT [13] { + name: @index0 } - CALL [13] { + CALL [14] { function: _*_ args: { - IDENT [14] { - name: @index2 + IDENT [15] { + name: @index0 } - CONSTANT [15] { value: 0 } + CONSTANT [16] { value: 0 } } } } } - } - } - CALL [16] { - function: _==_ - args: { - IDENT [17] { - name: @index3 - } - CONSTANT [18] { value: 10 } + CONSTANT [17] { value: 10 } } } } @@ -2667,88 +2439,85 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg + }.oneof_type + }.payload + }.map_string_string } SELECT [7] { - IDENT [8] { - name: @index1 - }.map_string_string + SELECT [8] { + IDENT [9] { + name: msg + }.oneof_type + }.payload } - CALL [9] { - function: _?_:_ + } + } + CALL [10] { + function: _?_:_ + args: { + CALL [11] { + function: _&&_ args: { - CALL [10] { + CALL [12] { function: _&&_ args: { - SELECT [11] { - IDENT [12] { - name: @index1 - }.map_string_string~presence_test - } SELECT [13] { IDENT [14] { - name: @index2 - }.key~presence_test + name: msg + }.oneof_type~presence_test } - } - } - CALL [15] { - function: _==_ - args: { - SELECT [16] { - IDENT [17] { - name: @index2 - }.key + SELECT [15] { + SELECT [16] { + IDENT [17] { + name: msg + }.oneof_type + }.payload~presence_test } - CONSTANT [18] { value: "A" } } } - CONSTANT [19] { value: false } + SELECT [18] { + IDENT [19] { + name: @index1 + }.single_int64~presence_test + } } } CALL [20] { - function: _&&_ + function: _?_:_ args: { CALL [21] { function: _&&_ args: { SELECT [22] { IDENT [23] { - name: msg - }.oneof_type~presence_test + name: @index1 + }.map_string_string~presence_test } SELECT [24] { IDENT [25] { name: @index0 - }.payload~presence_test + }.key~presence_test } } } - SELECT [26] { - IDENT [27] { - name: @index1 - }.single_int64~presence_test + CALL [26] { + function: _==_ + args: { + SELECT [27] { + IDENT [28] { + name: @index0 + }.key + } + CONSTANT [29] { value: "A" } + } } + CONSTANT [30] { value: false } } } - } - } - CALL [28] { - function: _?_:_ - args: { - IDENT [29] { - name: @index4 - } - IDENT [30] { - name: @index3 - } CONSTANT [31] { value: false } } } @@ -2762,44 +2531,49 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CALL [3] { - function: optional.none - args: { - } - } - CREATE_LIST [4] { + CREATE_LIST [3] { elements: { - IDENT [5] { - name: @index0 + CALL [4] { + function: optional.none + args: { + } } - IDENT [6] { + IDENT [5] { name: opt_x } } optional_indices: [0, 1] } - CREATE_LIST [7] { + CREATE_LIST [6] { elements: { - CONSTANT [8] { value: 5 } + CONSTANT [7] { value: 5 } } } + } + } + CALL [8] { + function: _==_ + args: { CREATE_LIST [9] { elements: { CONSTANT [10] { value: 10 } - IDENT [11] { - name: @index2 + CALL [11] { + function: optional.none + args: { + } } IDENT [12] { - name: @index2 + name: @index0 + } + IDENT [13] { + name: @index0 } } + optional_indices: [0] } - CREATE_LIST [13] { + CREATE_LIST [14] { elements: { - CONSTANT [14] { value: 10 } - IDENT [15] { - name: @index0 - } + CONSTANT [15] { value: 10 } IDENT [16] { name: @index1 } @@ -2807,18 +2581,6 @@ CALL [1] { name: @index1 } } - optional_indices: [0] - } - } - } - CALL [18] { - function: _==_ - args: { - IDENT [19] { - name: @index4 - } - IDENT [20] { - name: @index3 } } } @@ -2833,53 +2595,44 @@ CALL [1] { CREATE_LIST [2] { elements: { CALL [3] { - function: optional.of - args: { - CONSTANT [4] { value: "hello" } - } - } - CREATE_MAP [5] { - MAP_ENTRY [6] { - key: { - CONSTANT [7] { value: "hello" } - } - optional_entry: true - value: { - IDENT [8] { - name: @index0 - } - } - } - } - CALL [9] { function: _[_] args: { - IDENT [10] { - name: @index1 + CREATE_MAP [4] { + MAP_ENTRY [5] { + key: { + CONSTANT [6] { value: "hello" } + } + optional_entry: true + value: { + CALL [7] { + function: optional.of + args: { + CONSTANT [8] { value: "hello" } + } + } + } + } } - CONSTANT [11] { value: "hello" } + CONSTANT [9] { value: "hello" } } } - CALL [12] { + } + } + CALL [10] { + function: _==_ + args: { + CALL [11] { function: _+_ args: { - IDENT [13] { - name: @index2 + IDENT [12] { + name: @index0 } - IDENT [14] { - name: @index2 + IDENT [13] { + name: @index0 } } } - } - } - CALL [15] { - function: _==_ - args: { - IDENT [16] { - name: @index3 - } - CONSTANT [17] { value: "hellohello" } + CONSTANT [14] { value: "hellohello" } } } } @@ -2902,69 +2655,66 @@ CALL [1] { } } } - CALL [7] { + } + } + CALL [7] { + function: _==_ + args: { + CALL [8] { function: orValue target: { - CALL [8] { + CALL [9] { function: or target: { - CALL [9] { + CALL [10] { function: _[?_] args: { - CREATE_MAP [10] { - MAP_ENTRY [11] { + CREATE_MAP [11] { + MAP_ENTRY [12] { key: { - CONSTANT [12] { value: "key" } + CONSTANT [13] { value: "key" } } optional_entry: true value: { - CALL [13] { + CALL [14] { function: optional.of args: { - CONSTANT [14] { value: "test" } + CONSTANT [15] { value: "test" } } } } } } - CONSTANT [15] { value: "bogus" } + CONSTANT [16] { value: "bogus" } } } } args: { - CALL [16] { + CALL [17] { function: _[?_] args: { - IDENT [17] { + IDENT [18] { name: @index0 } - CONSTANT [18] { value: "bogus" } + CONSTANT [19] { value: "bogus" } } } } } } args: { - CALL [19] { + CALL [20] { function: _[_] args: { - IDENT [20] { + IDENT [21] { name: @index0 } - CONSTANT [21] { value: "key" } + CONSTANT [22] { value: "key" } } } } } - } - } - CALL [22] { - function: _==_ - args: { - IDENT [23] { - name: @index1 - } - CONSTANT [24] { value: "test" } + CONSTANT [23] { value: "test" } } } } @@ -2977,139 +2727,62 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CALL [3] { - function: optional.ofNonZeroValue - args: { - CONSTANT [4] { value: 1 } - } - } - CALL [5] { - function: optional.of - args: { - CONSTANT [6] { value: 4 } - } - } - CREATE_STRUCT [7] { + CREATE_STRUCT [3] { name: TestAllTypes entries: { - ENTRY [8] { + ENTRY [4] { field_key: single_int64 optional_entry: true value: { - IDENT [9] { - name: @index0 - } - } - } - ENTRY [10] { - field_key: single_int32 - optional_entry: true - value: { - IDENT [11] { - name: @index1 - } - } - } - } - } - CALL [12] { - function: _+_ - args: { - SELECT [13] { - IDENT [14] { - name: @index2 - }.single_int32 - } - SELECT [15] { - IDENT [16] { - name: @index2 - }.single_int64 - } - } - } - } - } - CALL [17] { - function: _==_ - args: { - IDENT [18] { - name: @index3 - } - CONSTANT [19] { value: 5 } - } - } - } -} -Test case: CALL -Source: ('h' + 'e' + 'l' + 'l' + 'o' + ' world').matches('h' + 'e' + 'l' + 'l' + 'o') -=====> -CALL [1] { - function: cel.@block - args: { - CREATE_LIST [2] { - elements: { - CALL [3] { - function: _+_ - args: { - CONSTANT [4] { value: "h" } - CONSTANT [5] { value: "e" } - } - } - CALL [6] { - function: _+_ - args: { - IDENT [7] { - name: @index0 + CALL [5] { + function: optional.ofNonZeroValue + args: { + CONSTANT [6] { value: 1 } + } + } + } } - CONSTANT [8] { value: "l" } - } - } - CALL [9] { - function: _+_ - args: { - IDENT [10] { - name: @index1 + ENTRY [7] { + field_key: single_int32 + optional_entry: true + value: { + CALL [8] { + function: optional.of + args: { + CONSTANT [9] { value: 4 } + } + } + } } - CONSTANT [11] { value: "l" } } } - CALL [12] { + } + } + CALL [10] { + function: _==_ + args: { + CALL [11] { function: _+_ args: { - IDENT [13] { - name: @index2 + SELECT [12] { + IDENT [13] { + name: @index0 + }.single_int32 } - CONSTANT [14] { value: "o" } - } - } - CALL [15] { - function: _+_ - args: { - IDENT [16] { - name: @index3 + SELECT [14] { + IDENT [15] { + name: @index0 + }.single_int64 } - CONSTANT [17] { value: " world" } } } - } - } - CALL [18] { - function: matches - target: { - IDENT [19] { - name: @index4 - } - } - args: { - IDENT [20] { - name: @index3 - } + CONSTANT [16] { value: 5 } } } } } -Test case: CALL_ARGUMENT_NESTED_NO_COMMON_SUBEXPR -Source: 'hello world'.matches('h' + 'e' + 'l' + 'l' + 'o') +Test case: CALL +Source: ('h' + 'e' + 'l' + 'l' + 'o' + ' world').matches('h' + 'e' + 'l' + 'l' + 'o') =====> CALL [1] { function: cel.@block @@ -3146,147 +2819,164 @@ CALL [1] { CALL [12] { function: matches target: { - CONSTANT [13] { value: "hello world" } + CALL [13] { + function: _+_ + args: { + IDENT [14] { + name: @index0 + } + CONSTANT [15] { value: " world" } + } + } } args: { - IDENT [14] { + IDENT [16] { name: @index0 } } } } } -Test case: CALL_TARGET_NESTED_NO_COMMON_SUBEXPR -Source: ('h' + 'e' + 'l' + 'l' + 'o' + ' world').matches('hello') +Test case: CALL_ARGUMENT_NESTED_NO_COMMON_SUBEXPR +Source: 'hello world'.matches('h' + 'e' + 'l' + 'l' + 'o') =====> -CALL [1] { - function: cel.@block +CALL [2] { + function: matches + target: { + CONSTANT [1] { value: "hello world" } + } args: { - CREATE_LIST [2] { - elements: { - CALL [3] { + CALL [10] { + function: _+_ + args: { + CALL [8] { function: _+_ args: { - CALL [4] { + CALL [6] { function: _+_ args: { - CALL [5] { + CALL [4] { function: _+_ args: { - CALL [6] { - function: _+_ - args: { - CALL [7] { - function: _+_ - args: { - CONSTANT [8] { value: "h" } - CONSTANT [9] { value: "e" } - } - } - CONSTANT [10] { value: "l" } - } - } - CONSTANT [11] { value: "l" } + CONSTANT [3] { value: "h" } + CONSTANT [5] { value: "e" } } } - CONSTANT [12] { value: "o" } + CONSTANT [7] { value: "l" } } } - CONSTANT [13] { value: " world" } + CONSTANT [9] { value: "l" } } } - } - } - CALL [14] { - function: matches - target: { - IDENT [15] { - name: @index0 - } - } - args: { - CONSTANT [16] { value: "hello" } + CONSTANT [11] { value: "o" } } } } } -Test case: CALL_BOTH_ARGUMENT_TARGET_NESTED_NO_COMMON_SUBEXPR -Source: ('h' + 'e' + 'l' + 'l' + 'o' + ' world').matches('w' + 'o' + 'r' + 'l' + 'd') +Test case: CALL_TARGET_NESTED_NO_COMMON_SUBEXPR +Source: ('h' + 'e' + 'l' + 'l' + 'o' + ' world').matches('hello') =====> -CALL [1] { - function: cel.@block - args: { - CREATE_LIST [2] { - elements: { - CALL [3] { +CALL [12] { + function: matches + target: { + CALL [10] { + function: _+_ + args: { + CALL [8] { function: _+_ args: { - CALL [4] { + CALL [6] { function: _+_ args: { - CALL [5] { + CALL [4] { function: _+_ args: { - CALL [6] { + CALL [2] { function: _+_ args: { - CONSTANT [7] { value: "w" } - CONSTANT [8] { value: "o" } + CONSTANT [1] { value: "h" } + CONSTANT [3] { value: "e" } } } - CONSTANT [9] { value: "r" } + CONSTANT [5] { value: "l" } } } - CONSTANT [10] { value: "l" } + CONSTANT [7] { value: "l" } } } - CONSTANT [11] { value: "d" } + CONSTANT [9] { value: "o" } } } - CALL [12] { + CONSTANT [11] { value: " world" } + } + } + } + args: { + CONSTANT [13] { value: "hello" } + } +} +Test case: CALL_BOTH_ARGUMENT_TARGET_NESTED_NO_COMMON_SUBEXPR +Source: ('h' + 'e' + 'l' + 'l' + 'o' + ' world').matches('w' + 'o' + 'r' + 'l' + 'd') +=====> +CALL [12] { + function: matches + target: { + CALL [10] { + function: _+_ + args: { + CALL [8] { function: _+_ args: { - CALL [13] { + CALL [6] { function: _+_ args: { - CALL [14] { + CALL [4] { function: _+_ args: { - CALL [15] { + CALL [2] { function: _+_ args: { - CALL [16] { - function: _+_ - args: { - CONSTANT [17] { value: "h" } - CONSTANT [18] { value: "e" } - } - } - CONSTANT [19] { value: "l" } + CONSTANT [1] { value: "h" } + CONSTANT [3] { value: "e" } } } - CONSTANT [20] { value: "l" } + CONSTANT [5] { value: "l" } } } - CONSTANT [21] { value: "o" } + CONSTANT [7] { value: "l" } } } - CONSTANT [22] { value: " world" } + CONSTANT [9] { value: "o" } } } + CONSTANT [11] { value: " world" } } } - CALL [23] { - function: matches - target: { - IDENT [24] { - name: @index1 - } - } + } + args: { + CALL [20] { + function: _+_ args: { - IDENT [25] { - name: @index0 + CALL [18] { + function: _+_ + args: { + CALL [16] { + function: _+_ + args: { + CALL [14] { + function: _+_ + args: { + CONSTANT [13] { value: "w" } + CONSTANT [15] { value: "o" } + } + } + CONSTANT [17] { value: "r" } + } + } + CONSTANT [19] { value: "l" } + } } + CONSTANT [21] { value: "d" } } } } @@ -3300,74 +2990,66 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 - }.single_int64 - } - SELECT [9] { - IDENT [10] { - name: msg + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg + }.oneof_type + }.payload }.single_int64 } - SELECT [11] { - IDENT [12] { - name: @index1 - }.single_int32 - } } } - CALL [13] { + CALL [7] { function: _+_ args: { - CALL [14] { + CALL [8] { function: _+_ args: { - CALL [15] { + CALL [9] { function: _+_ args: { - CALL [16] { + CALL [10] { function: non_pure_custom_func args: { - IDENT [17] { - name: @index2 + IDENT [11] { + name: @index0 } } } - CALL [18] { + CALL [12] { function: non_pure_custom_func args: { - IDENT [19] { - name: @index4 + SELECT [13] { + SELECT [14] { + SELECT [15] { + IDENT [16] { + name: msg + }.oneof_type + }.payload + }.single_int32 } } } } } - CALL [20] { + CALL [17] { function: non_pure_custom_func args: { - IDENT [21] { - name: @index2 + IDENT [18] { + name: @index0 } } } } } - CALL [22] { + CALL [19] { function: non_pure_custom_func args: { - IDENT [23] { - name: @index3 + SELECT [20] { + IDENT [21] { + name: msg + }.single_int64 } } } @@ -3383,75 +3065,67 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 - }.single_int64 - } - CALL [9] { - function: pure_custom_func - args: { - IDENT [10] { - name: @index2 - } - } - } - CALL [11] { + CALL [3] { function: pure_custom_func args: { - SELECT [12] { - IDENT [13] { - name: msg + SELECT [4] { + SELECT [5] { + SELECT [6] { + IDENT [7] { + name: msg + }.oneof_type + }.payload }.single_int64 } } } - CALL [14] { + CALL [8] { function: _+_ args: { - CALL [15] { + CALL [9] { function: _+_ args: { - IDENT [16] { - name: @index3 + IDENT [10] { + name: @index0 } - CALL [17] { + CALL [11] { function: pure_custom_func args: { - SELECT [18] { - IDENT [19] { - name: @index1 + SELECT [12] { + SELECT [13] { + SELECT [14] { + IDENT [15] { + name: msg + }.oneof_type + }.payload }.single_int32 } } } } } - IDENT [20] { - name: @index3 + IDENT [16] { + name: @index0 } } } } } - CALL [21] { + CALL [17] { function: _+_ args: { - IDENT [22] { - name: @index5 + IDENT [18] { + name: @index1 } - IDENT [23] { - name: @index4 + CALL [19] { + function: pure_custom_func + args: { + SELECT [20] { + IDENT [21] { + name: msg + }.single_int64 + } + } } } } diff --git a/optimizer/src/test/resources/subexpression_ast_block_recursion_depth_7.baseline b/optimizer/src/test/resources/subexpression_ast_block_recursion_depth_7.baseline index 973b97c3a..866f2c073 100644 --- a/optimizer/src/test/resources/subexpression_ast_block_recursion_depth_7.baseline +++ b/optimizer/src/test/resources/subexpression_ast_block_recursion_depth_7.baseline @@ -6,20 +6,22 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 1 } - CONSTANT [5] { value: 2 } - } - } - CALL [6] { + CALL [3] { function: size args: { - IDENT [7] { - name: @index0 + CREATE_LIST [4] { + elements: { + CONSTANT [5] { value: 1 } + CONSTANT [6] { value: 2 } + } } } } + } + } + CALL [7] { + function: _==_ + args: { CALL [8] { function: _+_ args: { @@ -27,25 +29,17 @@ CALL [1] { function: _+_ args: { IDENT [10] { - name: @index1 + name: @index0 } IDENT [11] { - name: @index1 + name: @index0 } } } CONSTANT [12] { value: 1 } } } - } - } - CALL [13] { - function: _==_ - args: { - IDENT [14] { - name: @index2 - } - CONSTANT [15] { value: 5 } + CONSTANT [13] { value: 5 } } } } @@ -58,20 +52,22 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 1 } - CONSTANT [5] { value: 2 } - } - } - CALL [6] { + CALL [3] { function: size args: { - IDENT [7] { - name: @index0 + CREATE_LIST [4] { + elements: { + CONSTANT [5] { value: 1 } + CONSTANT [6] { value: 2 } + } } } } + } + } + CALL [7] { + function: _==_ + args: { CALL [8] { function: _+_ args: { @@ -83,27 +79,19 @@ CALL [1] { args: { CONSTANT [11] { value: 2 } IDENT [12] { - name: @index1 + name: @index0 } } } IDENT [13] { - name: @index1 + name: @index0 } } } CONSTANT [14] { value: 1 } } } - } - } - CALL [15] { - function: _==_ - args: { - IDENT [16] { - name: @index2 - } - CONSTANT [17] { value: 7 } + CONSTANT [15] { value: 7 } } } } @@ -116,69 +104,60 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 0 } - } - } - CALL [5] { + CALL [3] { function: size args: { - IDENT [6] { - name: @index0 + CREATE_LIST [4] { + elements: { + CONSTANT [5] { value: 0 } + } } } } - CREATE_LIST [7] { - elements: { - CONSTANT [8] { value: 1 } - CONSTANT [9] { value: 2 } - } - } - CALL [10] { + CALL [6] { function: size args: { - IDENT [11] { - name: @index2 + CREATE_LIST [7] { + elements: { + CONSTANT [8] { value: 1 } + CONSTANT [9] { value: 2 } + } } } } - CALL [12] { + } + } + CALL [10] { + function: _==_ + args: { + CALL [11] { function: _+_ args: { - CALL [13] { + CALL [12] { function: _+_ args: { - CALL [14] { + CALL [13] { function: _+_ args: { - IDENT [15] { - name: @index1 + IDENT [14] { + name: @index0 } - IDENT [16] { - name: @index1 + IDENT [15] { + name: @index0 } } } - IDENT [17] { - name: @index3 + IDENT [16] { + name: @index1 } } } - IDENT [18] { - name: @index3 + IDENT [17] { + name: @index1 } } } - } - } - CALL [19] { - function: _==_ - args: { - IDENT [20] { - name: @index4 - } - CONSTANT [21] { value: 6 } + CONSTANT [18] { value: 6 } } } } @@ -191,106 +170,94 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 0 } - } - } - CALL [5] { + CALL [3] { function: size args: { - IDENT [6] { - name: @index0 + CREATE_LIST [4] { + elements: { + CONSTANT [5] { value: 0 } + } } } } - CREATE_LIST [7] { - elements: { - CONSTANT [8] { value: 1 } - CONSTANT [9] { value: 2 } - } - } - CALL [10] { + CALL [6] { function: size args: { - IDENT [11] { - name: @index2 + CREATE_LIST [7] { + elements: { + CONSTANT [8] { value: 1 } + CONSTANT [9] { value: 2 } + } } } } - CREATE_LIST [12] { - elements: { - CONSTANT [13] { value: 1 } - CONSTANT [14] { value: 2 } - CONSTANT [15] { value: 3 } - } - } - CALL [16] { + CALL [10] { function: size args: { - IDENT [17] { - name: @index4 + CREATE_LIST [11] { + elements: { + CONSTANT [12] { value: 1 } + CONSTANT [13] { value: 2 } + CONSTANT [14] { value: 3 } + } } } } - CALL [18] { + } + } + CALL [15] { + function: _==_ + args: { + CALL [16] { function: _+_ args: { - CALL [19] { + CALL [17] { function: _+_ args: { - CALL [20] { + CALL [18] { function: _+_ args: { - CALL [21] { + CALL [19] { function: _+_ args: { - CALL [22] { + CALL [20] { function: _+_ args: { - CALL [23] { + CALL [21] { function: _+_ args: { - CONSTANT [24] { value: 5 } - IDENT [25] { - name: @index1 + CONSTANT [22] { value: 5 } + IDENT [23] { + name: @index0 } } } - IDENT [26] { - name: @index1 + IDENT [24] { + name: @index0 } } } - IDENT [27] { - name: @index3 + IDENT [25] { + name: @index1 } } } - IDENT [28] { - name: @index3 + IDENT [26] { + name: @index1 } } } - IDENT [29] { - name: @index5 + IDENT [27] { + name: @index2 } } } - IDENT [30] { - name: @index5 + IDENT [28] { + name: @index2 } } } - } - } - CALL [31] { - function: _==_ - args: { - IDENT [32] { - name: @index6 - } - CONSTANT [33] { value: 17 } + CONSTANT [29] { value: 17 } } } } @@ -304,149 +271,109 @@ CALL [1] { CREATE_LIST [2] { elements: { CALL [3] { - function: timestamp - args: { - CONSTANT [4] { value: 1000000000 } - } - } - CALL [5] { - function: int - args: { - IDENT [6] { - name: @index0 + function: getFullYear + target: { + CALL [4] { + function: timestamp + args: { + CALL [5] { + function: int + args: { + CALL [6] { + function: timestamp + args: { + CONSTANT [7] { value: 1000000000 } + } + } + } + } + } } } - } - CALL [7] { - function: timestamp args: { - IDENT [8] { - name: @index1 - } } } - CALL [9] { + CALL [8] { function: getFullYear target: { - IDENT [10] { - name: @index2 + CALL [9] { + function: timestamp + args: { + CALL [10] { + function: int + args: { + CALL [11] { + function: timestamp + args: { + CONSTANT [12] { value: 200 } + } + } + } + } + } } } args: { } } - CALL [11] { - function: timestamp - args: { - CONSTANT [12] { value: 50 } - } - } CALL [13] { - function: int - args: { - IDENT [14] { - name: @index4 - } - } - } - CALL [15] { function: timestamp args: { - IDENT [16] { - name: @index5 + CALL [14] { + function: int + args: { + CALL [15] { + function: timestamp + args: { + CONSTANT [16] { value: 50 } + } + } + } } } } CALL [17] { function: timestamp args: { - CONSTANT [18] { value: 200 } - } - } - CALL [19] { - function: int - args: { - IDENT [20] { - name: @index7 + CALL [18] { + function: int + args: { + CALL [19] { + function: timestamp + args: { + CONSTANT [20] { value: 75 } + } + } + } } } } CALL [21] { - function: timestamp - args: { - IDENT [22] { - name: @index8 - } - } - } - CALL [23] { - function: getFullYear - target: { - IDENT [24] { - name: @index9 - } - } - args: { - } - } - CALL [25] { - function: timestamp - args: { - CONSTANT [26] { value: 75 } - } - } - CALL [27] { - function: int - args: { - IDENT [28] { - name: @index11 - } - } - } - CALL [29] { - function: timestamp + function: _+_ args: { - IDENT [30] { - name: @index12 - } - } - } - CALL [31] { - function: getMinutes - target: { - IDENT [32] { - name: @index13 - } - } - args: { - } - } - CALL [33] { - function: _+_ - args: { - CALL [34] { + CALL [22] { function: _+_ args: { - CALL [35] { + CALL [23] { function: _+_ args: { - CALL [36] { + CALL [24] { function: _+_ args: { - CALL [37] { + CALL [25] { function: _+_ args: { - CALL [38] { + CALL [26] { function: _+_ args: { - IDENT [39] { - name: @index3 + IDENT [27] { + name: @index0 } - CALL [40] { + CALL [28] { function: getFullYear target: { - IDENT [41] { - name: @index13 + IDENT [29] { + name: @index3 } } args: { @@ -454,11 +381,11 @@ CALL [1] { } } } - CALL [42] { + CALL [30] { function: getFullYear target: { - IDENT [43] { - name: @index6 + IDENT [31] { + name: @index2 } } args: { @@ -466,16 +393,16 @@ CALL [1] { } } } - IDENT [44] { - name: @index3 + IDENT [32] { + name: @index0 } } } - CALL [45] { + CALL [33] { function: getSeconds target: { - IDENT [46] { - name: @index6 + IDENT [34] { + name: @index2 } } args: { @@ -483,44 +410,48 @@ CALL [1] { } } } - IDENT [47] { - name: @index10 + IDENT [35] { + name: @index1 } } } - IDENT [48] { - name: @index10 + IDENT [36] { + name: @index1 } } } - CALL [49] { + } + } + CALL [37] { + function: _==_ + args: { + CALL [38] { function: _+_ args: { - CALL [50] { + CALL [39] { function: _+_ args: { - IDENT [51] { - name: @index15 + IDENT [40] { + name: @index4 } - IDENT [52] { - name: @index14 + CALL [41] { + function: getMinutes + target: { + IDENT [42] { + name: @index3 + } + } + args: { + } } } } - IDENT [53] { - name: @index3 + IDENT [43] { + name: @index0 } } } - } - } - CALL [54] { - function: _==_ - args: { - IDENT [55] { - name: @index16 - } - CONSTANT [56] { value: 13934 } + CONSTANT [44] { value: 13934 } } } } @@ -533,53 +464,47 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_MAP [3] { - MAP_ENTRY [4] { - key: { - CONSTANT [5] { value: "a" } - } - value: { - CONSTANT [6] { value: 2 } - } - } - } - CALL [7] { + CALL [3] { function: _[_] args: { - IDENT [8] { - name: @index0 + CREATE_MAP [4] { + MAP_ENTRY [5] { + key: { + CONSTANT [6] { value: "a" } + } + value: { + CONSTANT [7] { value: 2 } + } + } } - CONSTANT [9] { value: "a" } + CONSTANT [8] { value: "a" } } } + } + } + CALL [9] { + function: _==_ + args: { CALL [10] { function: _+_ args: { IDENT [11] { - name: @index1 + name: @index0 } CALL [12] { function: _*_ args: { IDENT [13] { - name: @index1 + name: @index0 } IDENT [14] { - name: @index1 + name: @index0 } } } } } - } - } - CALL [15] { - function: _==_ - args: { - IDENT [16] { - name: @index2 - } - CONSTANT [17] { value: 6 } + CONSTANT [15] { value: 6 } } } } @@ -595,51 +520,48 @@ CALL [1] { CREATE_MAP [3] { MAP_ENTRY [4] { key: { - CONSTANT [5] { value: "b" } + CONSTANT [5] { value: "e" } } value: { - CONSTANT [6] { value: 1 } + CREATE_MAP [6] { + MAP_ENTRY [7] { + key: { + CONSTANT [8] { value: "b" } + } + value: { + CONSTANT [9] { value: 1 } + } + } + } } } } - CREATE_MAP [7] { - MAP_ENTRY [8] { + CREATE_MAP [10] { + MAP_ENTRY [11] { key: { - CONSTANT [9] { value: "e" } + CONSTANT [12] { value: "b" } } value: { - IDENT [10] { - name: @index0 - } + CONSTANT [13] { value: 1 } } } } } } - CREATE_MAP [11] { - MAP_ENTRY [12] { - key: { - CONSTANT [13] { value: "a" } - } - value: { - IDENT [14] { - name: @index0 - } - } - } + CREATE_MAP [14] { MAP_ENTRY [15] { key: { - CONSTANT [16] { value: "c" } + CONSTANT [16] { value: "a" } } value: { IDENT [17] { - name: @index0 + name: @index1 } } } MAP_ENTRY [18] { key: { - CONSTANT [19] { value: "d" } + CONSTANT [19] { value: "c" } } value: { IDENT [20] { @@ -649,11 +571,21 @@ CALL [1] { } MAP_ENTRY [21] { key: { - CONSTANT [22] { value: "e" } + CONSTANT [22] { value: "d" } } value: { IDENT [23] { - name: @index1 + name: @index0 + } + } + } + MAP_ENTRY [24] { + key: { + CONSTANT [25] { value: "e" } + } + value: { + IDENT [26] { + name: @index0 } } } @@ -682,37 +614,34 @@ CALL [1] { CONSTANT [10] { value: 2 } } } - CREATE_LIST [11] { - elements: { - IDENT [12] { - name: @index1 - } - IDENT [13] { - name: @index0 - } - } - } } } - CREATE_LIST [14] { + CREATE_LIST [11] { elements: { - CONSTANT [15] { value: 1 } - IDENT [16] { + CONSTANT [12] { value: 1 } + IDENT [13] { name: @index0 } - CONSTANT [17] { value: 2 } - IDENT [18] { + CONSTANT [14] { value: 2 } + IDENT [15] { name: @index0 } - CONSTANT [19] { value: 5 } - IDENT [20] { + CONSTANT [16] { value: 5 } + IDENT [17] { name: @index0 } - CONSTANT [21] { value: 7 } - IDENT [22] { - name: @index2 + CONSTANT [18] { value: 7 } + CREATE_LIST [19] { + elements: { + IDENT [20] { + name: @index1 + } + IDENT [21] { + name: @index0 + } + } } - IDENT [23] { + IDENT [22] { name: @index1 } } @@ -732,26 +661,23 @@ CALL [1] { name: msg }.single_int64 } - CALL [5] { + } + } + CALL [5] { + function: _==_ + args: { + CALL [6] { function: _+_ args: { - IDENT [6] { + IDENT [7] { name: @index0 } - IDENT [7] { + IDENT [8] { name: @index0 } } } - } - } - CALL [8] { - function: _==_ - args: { - IDENT [9] { - name: @index1 - } - CONSTANT [10] { value: 6 } + CONSTANT [9] { value: 6 } } } } @@ -765,58 +691,64 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg + }.oneof_type + }.payload + }.single_int64 } SELECT [7] { - IDENT [8] { - name: @index1 - }.single_int64 + SELECT [8] { + IDENT [9] { + name: msg + }.oneof_type + }.payload } - CALL [9] { + } + } + CALL [10] { + function: _==_ + args: { + CALL [11] { function: _+_ args: { - CALL [10] { + CALL [12] { function: _+_ args: { - CALL [11] { + CALL [13] { function: _+_ args: { - CALL [12] { + CALL [14] { function: _+_ args: { - IDENT [13] { - name: @index2 + IDENT [15] { + name: @index0 } - SELECT [14] { - IDENT [15] { + SELECT [16] { + IDENT [17] { name: @index1 }.single_int32 } } } - IDENT [16] { - name: @index2 + IDENT [18] { + name: @index0 } } } - SELECT [17] { - IDENT [18] { + SELECT [19] { + IDENT [20] { name: msg }.single_int64 } } } - SELECT [19] { - SELECT [20] { - SELECT [21] { - IDENT [22] { + SELECT [21] { + SELECT [22] { + SELECT [23] { + IDENT [24] { name: @index1 }.oneof_type }.payload @@ -824,14 +756,6 @@ CALL [1] { } } } - } - } - CALL [23] { - function: _==_ - args: { - IDENT [24] { - name: @index3 - } CONSTANT [25] { value: 31 } } } @@ -846,51 +770,33 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 - }.oneof_type - } - SELECT [9] { - IDENT [10] { - name: @index2 - }.payload - } - SELECT [11] { - IDENT [12] { - name: @index3 - }.oneof_type - } - SELECT [13] { - SELECT [14] { - SELECT [15] { - SELECT [16] { - IDENT [17] { - name: @index4 - }.child - }.child + SELECT [4] { + SELECT [5] { + SELECT [6] { + SELECT [7] { + IDENT [8] { + name: msg + }.oneof_type + }.payload + }.oneof_type }.payload - }.single_bool + }.oneof_type } - CALL [18] { + } + } + CALL [9] { + function: _||_ + args: { + CALL [10] { function: _||_ args: { - CONSTANT [19] { value: true } - SELECT [20] { - SELECT [21] { - SELECT [22] { - SELECT [23] { - IDENT [24] { - name: @index4 + CONSTANT [11] { value: true } + SELECT [12] { + SELECT [13] { + SELECT [14] { + SELECT [15] { + IDENT [16] { + name: @index0 }.payload }.oneof_type }.payload @@ -898,16 +804,16 @@ CALL [1] { } } } - } - } - CALL [25] { - function: _||_ - args: { - IDENT [26] { - name: @index6 - } - IDENT [27] { - name: @index5 + SELECT [17] { + SELECT [18] { + SELECT [19] { + SELECT [20] { + IDENT [21] { + name: @index0 + }.child + }.child + }.payload + }.single_bool } } } @@ -921,58 +827,46 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 - }.map_int32_int64 - } - CALL [9] { + CALL [3] { function: _[_] args: { - IDENT [10] { - name: @index2 + SELECT [4] { + SELECT [5] { + SELECT [6] { + IDENT [7] { + name: msg + }.oneof_type + }.payload + }.map_int32_int64 } - CONSTANT [11] { value: 1 } + CONSTANT [8] { value: 1 } } } - CALL [12] { + } + } + CALL [9] { + function: _==_ + args: { + CALL [10] { function: _+_ args: { - CALL [13] { + CALL [11] { function: _+_ args: { - IDENT [14] { - name: @index3 + IDENT [12] { + name: @index0 } - IDENT [15] { - name: @index3 + IDENT [13] { + name: @index0 } } } - IDENT [16] { - name: @index3 + IDENT [14] { + name: @index0 } } } - } - } - CALL [17] { - function: _==_ - args: { - IDENT [18] { - name: @index4 - } - CONSTANT [19] { value: 15 } + CONSTANT [15] { value: 15 } } } } @@ -986,66 +880,57 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg + }.oneof_type + }.payload }.map_int32_int64 } - CALL [9] { + } + } + CALL [7] { + function: _==_ + args: { + CALL [8] { function: _+_ args: { - CALL [10] { + CALL [9] { function: _+_ args: { - CALL [11] { + CALL [10] { function: _[_] args: { - IDENT [12] { - name: @index2 + IDENT [11] { + name: @index0 } - CONSTANT [13] { value: 0 } + CONSTANT [12] { value: 0 } } } - CALL [14] { + CALL [13] { function: _[_] args: { - IDENT [15] { - name: @index2 + IDENT [14] { + name: @index0 } - CONSTANT [16] { value: 1 } + CONSTANT [15] { value: 1 } } } } } - CALL [17] { + CALL [16] { function: _[_] args: { - IDENT [18] { - name: @index2 + IDENT [17] { + name: @index0 } - CONSTANT [19] { value: 2 } + CONSTANT [18] { value: 2 } } } } } - } - } - CALL [20] { - function: _==_ - args: { - IDENT [21] { - name: @index3 - } - CONSTANT [22] { value: 8 } + CONSTANT [19] { value: 8 } } } } @@ -1075,16 +960,13 @@ CALL [1] { }.payload }.oneof_type } - SELECT [11] { - IDENT [12] { - name: @index0 - }.payload - } } } - SELECT [13] { - IDENT [14] { - name: @index1 + SELECT [11] { + SELECT [12] { + IDENT [13] { + name: @index0 + }.payload }.single_int64 } } @@ -1102,33 +984,30 @@ CALL [1] { name: msg }.single_int64 } - CALL [5] { + } + } + CALL [5] { + function: _==_ + args: { + CALL [6] { function: _?_:_ args: { - CALL [6] { + CALL [7] { function: _>_ args: { - IDENT [7] { + IDENT [8] { name: @index0 } - CONSTANT [8] { value: 0 } + CONSTANT [9] { value: 0 } } } - IDENT [9] { + IDENT [10] { name: @index0 } - CONSTANT [10] { value: 0 } + CONSTANT [11] { value: 0 } } } - } - } - CALL [11] { - function: _==_ - args: { - IDENT [12] { - name: @index1 - } - CONSTANT [13] { value: 3 } + CONSTANT [12] { value: 3 } } } } @@ -1146,47 +1025,44 @@ CALL [1] { name: msg }.single_int64 } - CALL [5] { + } + } + CALL [5] { + function: _?_:_ + args: { + CONSTANT [6] { value: false } + CONSTANT [7] { value: false } + CALL [8] { function: _==_ args: { - CALL [6] { + CALL [9] { function: _+_ args: { - IDENT [7] { + IDENT [10] { name: @index0 } - CALL [8] { + CALL [11] { function: _*_ args: { - CALL [9] { + CALL [12] { function: _+_ args: { - IDENT [10] { + IDENT [13] { name: @index0 } - CONSTANT [11] { value: 1 } + CONSTANT [14] { value: 1 } } } - CONSTANT [12] { value: 2 } + CONSTANT [15] { value: 2 } } } } } - CONSTANT [13] { value: 11 } + CONSTANT [16] { value: 11 } } } } } - CALL [14] { - function: _?_:_ - args: { - CONSTANT [15] { value: false } - CONSTANT [16] { value: false } - IDENT [17] { - name: @index1 - } - } - } } } Test case: NESTED_TERNARY @@ -1207,56 +1083,53 @@ CALL [1] { name: msg }.single_int32 } - CALL [7] { + } + } + CALL [7] { + function: _==_ + args: { + CALL [8] { function: _?_:_ args: { - CALL [8] { + CALL [9] { function: _>_ args: { - IDENT [9] { + IDENT [10] { name: @index0 } - CONSTANT [10] { value: 0 } + CONSTANT [11] { value: 0 } } } - CALL [11] { + CALL [12] { function: _?_:_ args: { - CALL [12] { + CALL [13] { function: _>_ args: { - IDENT [13] { + IDENT [14] { name: @index1 } - CONSTANT [14] { value: 0 } + CONSTANT [15] { value: 0 } } } - CALL [15] { + CALL [16] { function: _+_ args: { - IDENT [16] { + IDENT [17] { name: @index0 } - IDENT [17] { + IDENT [18] { name: @index1 } } } - CONSTANT [18] { value: 0 } + CONSTANT [19] { value: 0 } } } - CONSTANT [19] { value: 0 } + CONSTANT [20] { value: 0 } } } - } - } - CALL [20] { - function: _==_ - args: { - IDENT [21] { - name: @index2 - } - CONSTANT [22] { value: 8 } + CONSTANT [21] { value: 8 } } } } @@ -1269,50 +1142,60 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 1 } - } - } - CALL [5] { - function: _>_ - args: { - IDENT [6] { - name: @c0:0 - } - CONSTANT [7] { value: 0 } - } - } - CALL [8] { - function: _||_ + CALL [3] { + function: size args: { - IDENT [9] { - name: @x0:0 - } - IDENT [10] { - name: @index1 - } - } - } - COMPREHENSION [11] { - iter_var: @c0:0 - iter_range: { - IDENT [12] { - name: @index0 - } - } - accu_var: @x0:0 - accu_init: { - CONSTANT [13] { value: false } - } - loop_condition: { - CALL [14] { - function: @not_strictly_false - args: { - CALL [15] { - function: !_ - args: { - IDENT [16] { + CREATE_LIST [4] { + elements: { + COMPREHENSION [5] { + iter_var: @c0:0 + iter_range: { + CREATE_LIST [6] { + elements: { + CONSTANT [7] { value: 1 } + } + } + } + accu_var: @x0:0 + accu_init: { + CONSTANT [8] { value: false } + } + loop_condition: { + CALL [9] { + function: @not_strictly_false + args: { + CALL [10] { + function: !_ + args: { + IDENT [11] { + name: @x0:0 + } + } + } + } + } + } + loop_step: { + CALL [12] { + function: _||_ + args: { + IDENT [13] { + name: @x0:0 + } + CALL [14] { + function: _>_ + args: { + IDENT [15] { + name: @c0:0 + } + CONSTANT [16] { value: 0 } + } + } + } + } + } + result: { + IDENT [17] { name: @x0:0 } } @@ -1320,76 +1203,61 @@ CALL [1] { } } } - loop_step: { - IDENT [17] { - name: @index2 - } - } - result: { - IDENT [18] { - name: @x0:0 - } - } } - CREATE_LIST [19] { - elements: { - IDENT [20] { - name: @index3 - } - } - } - CALL [21] { + CALL [18] { function: size args: { - IDENT [22] { - name: @index4 - } - } - } - CREATE_LIST [23] { - elements: { - CONSTANT [24] { value: 2 } - } - } - CALL [25] { - function: _>_ - args: { - IDENT [26] { - name: @c0:0 - } - CONSTANT [27] { value: 1 } - } - } - CALL [28] { - function: _||_ - args: { - IDENT [29] { - name: @x0:0 - } - IDENT [30] { - name: @index7 - } - } - } - COMPREHENSION [31] { - iter_var: @c0:0 - iter_range: { - IDENT [32] { - name: @index6 - } - } - accu_var: @x0:0 - accu_init: { - CONSTANT [33] { value: false } - } - loop_condition: { - CALL [34] { - function: @not_strictly_false - args: { - CALL [35] { - function: !_ - args: { - IDENT [36] { + CREATE_LIST [19] { + elements: { + COMPREHENSION [20] { + iter_var: @c0:0 + iter_range: { + CREATE_LIST [21] { + elements: { + CONSTANT [22] { value: 2 } + } + } + } + accu_var: @x0:0 + accu_init: { + CONSTANT [23] { value: false } + } + loop_condition: { + CALL [24] { + function: @not_strictly_false + args: { + CALL [25] { + function: !_ + args: { + IDENT [26] { + name: @x0:0 + } + } + } + } + } + } + loop_step: { + CALL [27] { + function: _||_ + args: { + IDENT [28] { + name: @x0:0 + } + CALL [29] { + function: _>_ + args: { + IDENT [30] { + name: @c0:0 + } + CONSTANT [31] { value: 1 } + } + } + } + } + } + result: { + IDENT [32] { name: @x0:0 } } @@ -1397,68 +1265,40 @@ CALL [1] { } } } - loop_step: { - IDENT [37] { - name: @index8 - } - } - result: { - IDENT [38] { - name: @x0:0 - } - } } - CREATE_LIST [39] { - elements: { - IDENT [40] { - name: @index9 - } - } - } - CALL [41] { - function: size - args: { - IDENT [42] { - name: @index10 - } - } - } - CALL [43] { + } + } + CALL [33] { + function: _==_ + args: { + CALL [34] { function: _+_ args: { - CALL [44] { + CALL [35] { function: _+_ args: { - CALL [45] { + CALL [36] { function: _+_ args: { - IDENT [46] { - name: @index5 + IDENT [37] { + name: @index0 } - IDENT [47] { - name: @index5 + IDENT [38] { + name: @index0 } } } - IDENT [48] { - name: @index11 + IDENT [39] { + name: @index1 } } } - IDENT [49] { - name: @index11 + IDENT [40] { + name: @index1 } } } - } - } - CALL [50] { - function: _==_ - args: { - IDENT [51] { - name: @index12 - } - CONSTANT [52] { value: 4 } + CONSTANT [41] { value: 4 } } } } @@ -1473,187 +1313,157 @@ CALL [1] { elements: { CREATE_LIST [3] { elements: { - CONSTANT [4] { value: 1 } - } - } - CALL [5] { - function: _>_ - args: { - IDENT [6] { - name: @c0:0 - } - CONSTANT [7] { value: 0 } - } - } - CALL [8] { - function: _||_ - args: { - IDENT [9] { - name: @x0:0 - } - IDENT [10] { - name: @index1 - } - } - } - COMPREHENSION [11] { - iter_var: @c0:0 - iter_range: { - IDENT [12] { - name: @index0 - } - } - accu_var: @x0:0 - accu_init: { - CONSTANT [13] { value: false } - } - loop_condition: { - CALL [14] { - function: @not_strictly_false - args: { - CALL [15] { - function: !_ + COMPREHENSION [4] { + iter_var: @c0:0 + iter_range: { + CREATE_LIST [5] { + elements: { + CONSTANT [6] { value: 1 } + } + } + } + accu_var: @x0:0 + accu_init: { + CONSTANT [7] { value: false } + } + loop_condition: { + CALL [8] { + function: @not_strictly_false + args: { + CALL [9] { + function: !_ + args: { + IDENT [10] { + name: @x0:0 + } + } + } + } + } + } + loop_step: { + CALL [11] { + function: _||_ args: { - IDENT [16] { + IDENT [12] { name: @x0:0 } + CALL [13] { + function: _>_ + args: { + IDENT [14] { + name: @c0:0 + } + CONSTANT [15] { value: 0 } + } + } } } } - } - } - loop_step: { - IDENT [17] { - name: @index2 - } - } - result: { - IDENT [18] { - name: @x0:0 - } - } - } - CREATE_LIST [19] { - elements: { - IDENT [20] { - name: @index3 + result: { + IDENT [16] { + name: @x0:0 + } + } } } } - CREATE_LIST [21] { + CREATE_LIST [17] { elements: { - CONSTANT [22] { value: "a" } - } - } - CALL [23] { - function: _==_ - args: { - IDENT [24] { - name: @c0:1 - } - CONSTANT [25] { value: "a" } - } - } - CALL [26] { - function: _||_ - args: { - IDENT [27] { - name: @x0:1 - } - IDENT [28] { - name: @index6 - } - } - } - COMPREHENSION [29] { - iter_var: @c0:1 - iter_range: { - IDENT [30] { - name: @index5 - } - } - accu_var: @x0:1 - accu_init: { - CONSTANT [31] { value: false } - } - loop_condition: { - CALL [32] { - function: @not_strictly_false - args: { - CALL [33] { - function: !_ + COMPREHENSION [18] { + iter_var: @c0:1 + iter_range: { + CREATE_LIST [19] { + elements: { + CONSTANT [20] { value: "a" } + } + } + } + accu_var: @x0:1 + accu_init: { + CONSTANT [21] { value: false } + } + loop_condition: { + CALL [22] { + function: @not_strictly_false + args: { + CALL [23] { + function: !_ + args: { + IDENT [24] { + name: @x0:1 + } + } + } + } + } + } + loop_step: { + CALL [25] { + function: _||_ args: { - IDENT [34] { + IDENT [26] { name: @x0:1 } + CALL [27] { + function: _==_ + args: { + IDENT [28] { + name: @c0:1 + } + CONSTANT [29] { value: "a" } + } + } } } } + result: { + IDENT [30] { + name: @x0:1 + } + } } } - loop_step: { - IDENT [35] { - name: @index7 - } - } - result: { - IDENT [36] { - name: @x0:1 - } - } - } - CREATE_LIST [37] { - elements: { - IDENT [38] { - name: @index8 - } - } - } - CREATE_LIST [39] { - elements: { - CONSTANT [40] { value: true } - CONSTANT [41] { value: true } - CONSTANT [42] { value: true } - CONSTANT [43] { value: true } - } } - CALL [44] { + } + } + CALL [31] { + function: _==_ + args: { + CALL [32] { function: _+_ args: { - CALL [45] { + CALL [33] { function: _+_ args: { - CALL [46] { + CALL [34] { function: _+_ args: { - IDENT [47] { - name: @index4 + IDENT [35] { + name: @index0 } - IDENT [48] { - name: @index4 + IDENT [36] { + name: @index0 } } } - IDENT [49] { - name: @index9 + IDENT [37] { + name: @index1 } } } - IDENT [50] { - name: @index9 + IDENT [38] { + name: @index1 } } } - } - } - CALL [51] { - function: _==_ - args: { - IDENT [52] { - name: @index11 - } - IDENT [53] { - name: @index10 + CREATE_LIST [39] { + elements: { + CONSTANT [40] { value: true } + CONSTANT [41] { value: true } + CONSTANT [42] { value: true } + CONSTANT [43] { value: true } + } } } } @@ -1681,78 +1491,65 @@ CALL [1] { CONSTANT [10] { value: 4 } } } - CREATE_LIST [11] { - elements: { - IDENT [12] { - name: @index1 - } - IDENT [13] { - name: @index1 - } - IDENT [14] { - name: @index1 - } - } - } - COMPREHENSION [15] { + COMPREHENSION [11] { iter_var: @c0:0 iter_range: { - IDENT [16] { + IDENT [12] { name: @index0 } } accu_var: @x0:0 accu_init: { - CREATE_LIST [17] { + CREATE_LIST [13] { elements: { } } } loop_condition: { - CONSTANT [18] { value: true } + CONSTANT [14] { value: true } } loop_step: { - CALL [19] { + CALL [15] { function: _+_ args: { - IDENT [20] { + IDENT [16] { name: @x0:0 } - CREATE_LIST [21] { + CREATE_LIST [17] { elements: { - COMPREHENSION [22] { + COMPREHENSION [18] { iter_var: @c1:0 iter_range: { - IDENT [23] { + IDENT [19] { name: @index0 } } accu_var: @x1:0 accu_init: { - CREATE_LIST [24] { + CREATE_LIST [20] { elements: { } } } loop_condition: { - CONSTANT [25] { value: true } + CONSTANT [21] { value: true } } loop_step: { - CALL [26] { + CALL [22] { function: _+_ args: { - IDENT [27] { + IDENT [23] { name: @x1:0 } - CREATE_LIST [28] { + CREATE_LIST [24] { elements: { - CALL [29] { + CALL [25] { function: _+_ args: { - IDENT [30] { + IDENT [26] { name: @c1:0 } - CONSTANT [31] { value: 1 } + CONSTANT [27] { value: 1 } } } } @@ -1761,7 +1558,7 @@ CALL [1] { } } result: { - IDENT [32] { + IDENT [28] { name: @x1:0 } } @@ -1772,22 +1569,32 @@ CALL [1] { } } result: { - IDENT [33] { + IDENT [29] { name: @x0:0 } } } } } - CALL [34] { + CALL [30] { function: _==_ args: { - IDENT [35] { - name: @index3 - } - IDENT [36] { + IDENT [31] { name: @index2 } + CREATE_LIST [32] { + elements: { + IDENT [33] { + name: @index1 + } + IDENT [34] { + name: @index1 + } + IDENT [35] { + name: @index1 + } + } + } } } } @@ -1800,108 +1607,94 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CREATE_LIST [4] { - elements: { - CONSTANT [5] { value: 1 } - } - } - CREATE_LIST [6] { - elements: { - CONSTANT [7] { value: 2 } - } - } - } - } - COMPREHENSION [8] { + COMPREHENSION [3] { iter_var: @c0:0 iter_range: { - CREATE_LIST [9] { + CREATE_LIST [4] { elements: { - CONSTANT [10] { value: 1 } - CONSTANT [11] { value: 2 } + CONSTANT [5] { value: 1 } + CONSTANT [6] { value: 2 } } } } accu_var: @x0:0 accu_init: { - CREATE_LIST [12] { + CREATE_LIST [7] { elements: { } } } loop_condition: { - CONSTANT [13] { value: true } + CONSTANT [8] { value: true } } loop_step: { - CALL [14] { + CALL [9] { function: _+_ args: { - IDENT [15] { + IDENT [10] { name: @x0:0 } - CREATE_LIST [16] { + CREATE_LIST [11] { elements: { - COMPREHENSION [17] { + COMPREHENSION [12] { iter_var: @c1:0 iter_range: { - CREATE_LIST [18] { + CREATE_LIST [13] { elements: { - CONSTANT [19] { value: 1 } - CONSTANT [20] { value: 2 } - CONSTANT [21] { value: 3 } + CONSTANT [14] { value: 1 } + CONSTANT [15] { value: 2 } + CONSTANT [16] { value: 3 } } } } accu_var: @x1:0 accu_init: { - CREATE_LIST [22] { + CREATE_LIST [17] { elements: { } } } loop_condition: { - CONSTANT [23] { value: true } + CONSTANT [18] { value: true } } loop_step: { - CALL [24] { + CALL [19] { function: _?_:_ args: { - CALL [25] { + CALL [20] { function: _==_ args: { - IDENT [26] { + IDENT [21] { name: @c1:0 } - IDENT [27] { + IDENT [22] { name: @c0:0 } } } - CALL [28] { + CALL [23] { function: _+_ args: { - IDENT [29] { + IDENT [24] { name: @x1:0 } - CREATE_LIST [30] { + CREATE_LIST [25] { elements: { - IDENT [31] { + IDENT [26] { name: @c1:0 } } } } } - IDENT [32] { + IDENT [27] { name: @x1:0 } } } } result: { - IDENT [33] { + IDENT [28] { name: @x1:0 } } @@ -1912,22 +1705,33 @@ CALL [1] { } } result: { - IDENT [34] { + IDENT [29] { name: @x0:0 } } } } } - CALL [35] { + CALL [30] { function: _==_ args: { - IDENT [36] { - name: @index1 - } - IDENT [37] { + IDENT [31] { name: @index0 } + CREATE_LIST [32] { + elements: { + CREATE_LIST [33] { + elements: { + CONSTANT [34] { value: 1 } + } + } + CREATE_LIST [35] { + elements: { + CONSTANT [36] { value: 2 } + } + } + } + } } } } @@ -1940,71 +1744,69 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 1 } - CONSTANT [5] { value: 2 } - CONSTANT [6] { value: 3 } - } - } - CALL [7] { + CALL [3] { function: @in args: { - CONSTANT [8] { value: 1 } - IDENT [9] { - name: @index0 + CONSTANT [4] { value: 1 } + CREATE_LIST [5] { + elements: { + CONSTANT [6] { value: 1 } + CONSTANT [7] { value: 2 } + CONSTANT [8] { value: 3 } + } } } } - CALL [10] { + CREATE_LIST [9] { + elements: { + CONSTANT [10] { value: 1 } + CONSTANT [11] { value: 2 } + CONSTANT [12] { value: 3 } + } + } + } + } + CALL [13] { + function: _&&_ + args: { + CALL [14] { function: _&&_ args: { - CALL [11] { + IDENT [15] { + name: @index0 + } + CALL [16] { function: @in args: { - CONSTANT [12] { value: 3 } - CREATE_LIST [13] { - elements: { - CONSTANT [14] { value: 3 } - IDENT [15] { - name: @index0 - } - } + CONSTANT [17] { value: 2 } + IDENT [18] { + name: @index1 } } } - IDENT [16] { - name: @index1 - } } } - CALL [17] { + CALL [19] { function: _&&_ args: { - IDENT [18] { - name: @index1 - } - CALL [19] { + CALL [20] { function: @in args: { - CONSTANT [20] { value: 2 } - IDENT [21] { - name: @index0 + CONSTANT [21] { value: 3 } + CREATE_LIST [22] { + elements: { + CONSTANT [23] { value: 3 } + IDENT [24] { + name: @index1 + } + } } } - } - } - } - } - } - CALL [22] { - function: _&&_ - args: { - IDENT [23] { - name: @index3 - } - IDENT [24] { - name: @index2 + } + IDENT [25] { + name: @index0 + } + } } } } @@ -2028,31 +1830,37 @@ CALL [1] { } } } - CREATE_MAP [7] { - MAP_ENTRY [8] { + } + } + CALL [7] { + function: @in + args: { + CONSTANT [8] { value: 2 } + CREATE_MAP [9] { + MAP_ENTRY [10] { key: { - CONSTANT [9] { value: "a" } + CONSTANT [11] { value: "a" } } value: { - CONSTANT [10] { value: 1 } + CONSTANT [12] { value: 1 } } } - MAP_ENTRY [11] { + MAP_ENTRY [13] { key: { - CONSTANT [12] { value: 2 } + CONSTANT [14] { value: 2 } } value: { - IDENT [13] { + IDENT [15] { name: @index0 } } } - MAP_ENTRY [14] { + MAP_ENTRY [16] { key: { - CONSTANT [15] { value: 3 } + CONSTANT [17] { value: 3 } } value: { - IDENT [16] { + IDENT [18] { name: @index0 } } @@ -2060,15 +1868,6 @@ CALL [1] { } } } - CALL [17] { - function: @in - args: { - CONSTANT [18] { value: 2 } - IDENT [19] { - name: @index1 - } - } - } } } Test case: MACRO_ITER_VAR_NOT_REFERENCED @@ -2081,90 +1880,83 @@ CALL [1] { elements: { CREATE_LIST [3] { elements: { - CONSTANT [4] { value: 1 } - CONSTANT [5] { value: 2 } - } - } - CREATE_LIST [6] { - elements: { - CONSTANT [7] { value: 3 } - CONSTANT [8] { value: 4 } - } - } - CREATE_LIST [9] { - elements: { - IDENT [10] { - name: @index1 + CREATE_LIST [4] { + elements: { + CONSTANT [5] { value: 3 } + CONSTANT [6] { value: 4 } + } } - IDENT [11] { - name: @index1 + CREATE_LIST [7] { + elements: { + CONSTANT [8] { value: 3 } + CONSTANT [9] { value: 4 } + } } } } - CREATE_LIST [12] { + CREATE_LIST [10] { elements: { - IDENT [13] { - name: @index2 - } - IDENT [14] { - name: @index2 - } + CONSTANT [11] { value: 1 } + CONSTANT [12] { value: 2 } } } - COMPREHENSION [15] { + COMPREHENSION [13] { iter_var: @c0:0 iter_range: { - IDENT [16] { - name: @index0 + IDENT [14] { + name: @index1 } } accu_var: @x0:0 accu_init: { - CREATE_LIST [17] { + CREATE_LIST [15] { elements: { } } } loop_condition: { - CONSTANT [18] { value: true } + CONSTANT [16] { value: true } } loop_step: { - CALL [19] { + CALL [17] { function: _+_ args: { - IDENT [20] { + IDENT [18] { name: @x0:0 } - CREATE_LIST [21] { + CREATE_LIST [19] { elements: { - COMPREHENSION [22] { + COMPREHENSION [20] { iter_var: @c1:0 iter_range: { - IDENT [23] { - name: @index0 + IDENT [21] { + name: @index1 } } accu_var: @x1:0 accu_init: { - CREATE_LIST [24] { + CREATE_LIST [22] { elements: { } } } loop_condition: { - CONSTANT [25] { value: true } + CONSTANT [23] { value: true } } loop_step: { - CALL [26] { + CALL [24] { function: _+_ args: { - IDENT [27] { + IDENT [25] { name: @x1:0 } - CREATE_LIST [28] { + CREATE_LIST [26] { elements: { - IDENT [29] { - name: @index1 + CREATE_LIST [27] { + elements: { + CONSTANT [28] { value: 3 } + CONSTANT [29] { value: 4 } + } } } } @@ -2194,10 +1986,17 @@ CALL [1] { function: _==_ args: { IDENT [33] { - name: @index4 + name: @index2 } - IDENT [34] { - name: @index3 + CREATE_LIST [34] { + elements: { + IDENT [35] { + name: @index0 + } + IDENT [36] { + name: @index0 + } + } } } } @@ -2212,23 +2011,25 @@ CALL [1] { CREATE_LIST [2] { elements: { CALL [3] { - function: _-_ - args: { - IDENT [4] { - name: x - } - CONSTANT [5] { value: 1 } - } - } - CALL [6] { function: _>_ args: { - IDENT [7] { - name: @index0 + CALL [4] { + function: _-_ + args: { + IDENT [5] { + name: x + } + CONSTANT [6] { value: 1 } + } } - CONSTANT [8] { value: 3 } + CONSTANT [7] { value: 3 } } } + } + } + CALL [8] { + function: _||_ + args: { COMPREHENSION [9] { iter_var: @c0:0 iter_range: { @@ -2238,12 +2039,18 @@ CALL [1] { function: _?_:_ args: { IDENT [12] { - name: @index1 - } - IDENT [13] { name: @index0 } - CONSTANT [14] { value: 5 } + CALL [13] { + function: _-_ + args: { + IDENT [14] { + name: x + } + CONSTANT [15] { value: 1 } + } + } + CONSTANT [16] { value: 5 } } } } @@ -2251,16 +2058,16 @@ CALL [1] { } accu_var: @x0:0 accu_init: { - CONSTANT [15] { value: false } + CONSTANT [17] { value: false } } loop_condition: { - CALL [16] { + CALL [18] { function: @not_strictly_false args: { - CALL [17] { + CALL [19] { function: !_ args: { - IDENT [18] { + IDENT [20] { name: @x0:0 } } @@ -2269,46 +2076,38 @@ CALL [1] { } } loop_step: { - CALL [19] { + CALL [21] { function: _||_ args: { - IDENT [20] { + IDENT [22] { name: @x0:0 } - CALL [21] { + CALL [23] { function: _>_ args: { - CALL [22] { + CALL [24] { function: _-_ args: { - IDENT [23] { + IDENT [25] { name: @c0:0 } - CONSTANT [24] { value: 1 } + CONSTANT [26] { value: 1 } } } - CONSTANT [25] { value: 3 } + CONSTANT [27] { value: 3 } } } } } } result: { - IDENT [26] { + IDENT [28] { name: @x0:0 } } } - } - } - CALL [27] { - function: _||_ - args: { - IDENT [28] { - name: @index2 - } IDENT [29] { - name: @index1 + name: @index0 } } } @@ -2344,63 +2143,46 @@ CALL [1] { } } } - CALL [9] { - function: _+_ - args: { - IDENT [10] { - name: @x0:0 - } - CREATE_LIST [11] { - elements: { - CREATE_LIST [12] { - elements: { - IDENT [13] { - name: @index1 - } - IDENT [14] { - name: @index1 - } - } - } - } - } - } - } - COMPREHENSION [15] { + } + } + COMPREHENSION [9] { + iter_var: @c0:0 + iter_range: { + COMPREHENSION [10] { iter_var: @c1:0 iter_range: { - CREATE_LIST [16] { + CREATE_LIST [11] { elements: { - CONSTANT [17] { value: "foo" } - CONSTANT [18] { value: "bar" } + CONSTANT [12] { value: "foo" } + CONSTANT [13] { value: "bar" } } } } accu_var: @x1:0 accu_init: { - CREATE_LIST [19] { + CREATE_LIST [14] { elements: { } } } loop_condition: { - CONSTANT [20] { value: true } + CONSTANT [15] { value: true } } loop_step: { - CALL [21] { + CALL [16] { function: _+_ args: { - IDENT [22] { + IDENT [17] { name: @x1:0 } - CREATE_LIST [23] { + CREATE_LIST [18] { elements: { - CREATE_LIST [24] { + CREATE_LIST [19] { elements: { - IDENT [25] { + IDENT [20] { name: @index0 } - IDENT [26] { + IDENT [21] { name: @index0 } } @@ -2411,37 +2193,48 @@ CALL [1] { } } result: { - IDENT [27] { + IDENT [22] { name: @x1:0 } } } } - } - COMPREHENSION [28] { - iter_var: @c0:0 - iter_range: { - IDENT [29] { - name: @index3 - } - } accu_var: @x0:0 accu_init: { - CREATE_LIST [30] { + CREATE_LIST [23] { elements: { } } } loop_condition: { - CONSTANT [31] { value: true } + CONSTANT [24] { value: true } } loop_step: { - IDENT [32] { - name: @index2 + CALL [25] { + function: _+_ + args: { + IDENT [26] { + name: @x0:0 + } + CREATE_LIST [27] { + elements: { + CREATE_LIST [28] { + elements: { + IDENT [29] { + name: @index1 + } + IDENT [30] { + name: @index1 + } + } + } + } + } + } } } result: { - IDENT [33] { + IDENT [31] { name: @x0:0 } } @@ -2466,27 +2259,24 @@ CALL [1] { } } } - CALL [7] { - function: _[_] - args: { - IDENT [8] { - name: @index0 - } - CONSTANT [9] { value: "a" } - } - } } } - CALL [10] { + CALL [7] { function: _&&_ args: { - SELECT [11] { - IDENT [12] { + SELECT [8] { + IDENT [9] { name: @index0 }.a~presence_test } - IDENT [13] { - name: @index1 + CALL [10] { + function: _[_] + args: { + IDENT [11] { + name: @index0 + } + CONSTANT [12] { value: "a" } + } } } } @@ -2505,33 +2295,30 @@ CALL [1] { name: msg }.oneof_type } - CALL [5] { + } + } + CALL [5] { + function: _==_ + args: { + CALL [6] { function: _?_:_ args: { - SELECT [6] { - IDENT [7] { + SELECT [7] { + IDENT [8] { name: @index0 }.payload~presence_test } - SELECT [8] { - SELECT [9] { - IDENT [10] { + SELECT [9] { + SELECT [10] { + IDENT [11] { name: @index0 }.payload }.single_int64 } - CONSTANT [11] { value: 0 } + CONSTANT [12] { value: 0 } } } - } - } - CALL [12] { - function: _==_ - args: { - IDENT [13] { - name: @index1 - } - CONSTANT [14] { value: 10 } + CONSTANT [13] { value: 10 } } } } @@ -2545,51 +2332,44 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg + }.oneof_type + }.payload }.single_int64 } - CALL [9] { + } + } + CALL [7] { + function: _==_ + args: { + CALL [8] { function: _?_:_ args: { - SELECT [10] { - IDENT [11] { - name: @index0 + SELECT [9] { + SELECT [10] { + IDENT [11] { + name: msg + }.oneof_type }.payload~presence_test } IDENT [12] { - name: @index2 + name: @index0 } CALL [13] { function: _*_ args: { IDENT [14] { - name: @index2 + name: @index0 } CONSTANT [15] { value: 0 } } } } } - } - } - CALL [16] { - function: _==_ - args: { - IDENT [17] { - name: @index3 - } - CONSTANT [18] { value: 10 } + CONSTANT [16] { value: 10 } } } } @@ -2603,51 +2383,46 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg + }.oneof_type + }.payload }.single_int64 } - CALL [9] { + } + } + CALL [7] { + function: _==_ + args: { + CALL [8] { function: _?_:_ args: { - SELECT [10] { - IDENT [11] { - name: @index1 + SELECT [9] { + SELECT [10] { + SELECT [11] { + IDENT [12] { + name: msg + }.oneof_type + }.payload }.single_int64~presence_test } - IDENT [12] { - name: @index2 + IDENT [13] { + name: @index0 } - CALL [13] { + CALL [14] { function: _*_ args: { - IDENT [14] { - name: @index2 + IDENT [15] { + name: @index0 } - CONSTANT [15] { value: 0 } + CONSTANT [16] { value: 0 } } } } } - } - } - CALL [16] { - function: _==_ - args: { - IDENT [17] { - name: @index3 - } - CONSTANT [18] { value: 10 } + CONSTANT [17] { value: 10 } } } } @@ -2661,88 +2436,85 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg + }.oneof_type + }.payload + }.map_string_string } SELECT [7] { - IDENT [8] { - name: @index1 - }.map_string_string + SELECT [8] { + IDENT [9] { + name: msg + }.oneof_type + }.payload } - CALL [9] { - function: _?_:_ + } + } + CALL [10] { + function: _?_:_ + args: { + CALL [11] { + function: _&&_ args: { - CALL [10] { + CALL [12] { function: _&&_ args: { - SELECT [11] { - IDENT [12] { - name: @index1 - }.map_string_string~presence_test - } SELECT [13] { IDENT [14] { - name: @index2 - }.key~presence_test + name: msg + }.oneof_type~presence_test } - } - } - CALL [15] { - function: _==_ - args: { - SELECT [16] { - IDENT [17] { - name: @index2 - }.key + SELECT [15] { + SELECT [16] { + IDENT [17] { + name: msg + }.oneof_type + }.payload~presence_test } - CONSTANT [18] { value: "A" } } } - CONSTANT [19] { value: false } + SELECT [18] { + IDENT [19] { + name: @index1 + }.single_int64~presence_test + } } } CALL [20] { - function: _&&_ + function: _?_:_ args: { CALL [21] { function: _&&_ args: { SELECT [22] { IDENT [23] { - name: msg - }.oneof_type~presence_test + name: @index1 + }.map_string_string~presence_test } SELECT [24] { IDENT [25] { name: @index0 - }.payload~presence_test + }.key~presence_test } } } - SELECT [26] { - IDENT [27] { - name: @index1 - }.single_int64~presence_test + CALL [26] { + function: _==_ + args: { + SELECT [27] { + IDENT [28] { + name: @index0 + }.key + } + CONSTANT [29] { value: "A" } + } } + CONSTANT [30] { value: false } } } - } - } - CALL [28] { - function: _?_:_ - args: { - IDENT [29] { - name: @index4 - } - IDENT [30] { - name: @index3 - } CONSTANT [31] { value: false } } } @@ -2756,44 +2528,49 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CALL [3] { - function: optional.none - args: { - } - } - CREATE_LIST [4] { + CREATE_LIST [3] { elements: { - IDENT [5] { - name: @index0 + CALL [4] { + function: optional.none + args: { + } } - IDENT [6] { + IDENT [5] { name: opt_x } } optional_indices: [0, 1] } - CREATE_LIST [7] { + CREATE_LIST [6] { elements: { - CONSTANT [8] { value: 5 } + CONSTANT [7] { value: 5 } } } + } + } + CALL [8] { + function: _==_ + args: { CREATE_LIST [9] { elements: { CONSTANT [10] { value: 10 } - IDENT [11] { - name: @index2 + CALL [11] { + function: optional.none + args: { + } } IDENT [12] { - name: @index2 + name: @index0 + } + IDENT [13] { + name: @index0 } } + optional_indices: [0] } - CREATE_LIST [13] { + CREATE_LIST [14] { elements: { - CONSTANT [14] { value: 10 } - IDENT [15] { - name: @index0 - } + CONSTANT [15] { value: 10 } IDENT [16] { name: @index1 } @@ -2801,18 +2578,6 @@ CALL [1] { name: @index1 } } - optional_indices: [0] - } - } - } - CALL [18] { - function: _==_ - args: { - IDENT [19] { - name: @index4 - } - IDENT [20] { - name: @index3 } } } @@ -2827,53 +2592,44 @@ CALL [1] { CREATE_LIST [2] { elements: { CALL [3] { - function: optional.of - args: { - CONSTANT [4] { value: "hello" } - } - } - CREATE_MAP [5] { - MAP_ENTRY [6] { - key: { - CONSTANT [7] { value: "hello" } - } - optional_entry: true - value: { - IDENT [8] { - name: @index0 - } - } - } - } - CALL [9] { function: _[_] args: { - IDENT [10] { - name: @index1 + CREATE_MAP [4] { + MAP_ENTRY [5] { + key: { + CONSTANT [6] { value: "hello" } + } + optional_entry: true + value: { + CALL [7] { + function: optional.of + args: { + CONSTANT [8] { value: "hello" } + } + } + } + } } - CONSTANT [11] { value: "hello" } + CONSTANT [9] { value: "hello" } } } - CALL [12] { + } + } + CALL [10] { + function: _==_ + args: { + CALL [11] { function: _+_ args: { - IDENT [13] { - name: @index2 + IDENT [12] { + name: @index0 } - IDENT [14] { - name: @index2 + IDENT [13] { + name: @index0 } } } - } - } - CALL [15] { - function: _==_ - args: { - IDENT [16] { - name: @index3 - } - CONSTANT [17] { value: "hellohello" } + CONSTANT [14] { value: "hellohello" } } } } @@ -2896,69 +2652,66 @@ CALL [1] { } } } - CALL [7] { + } + } + CALL [7] { + function: _==_ + args: { + CALL [8] { function: orValue target: { - CALL [8] { + CALL [9] { function: or target: { - CALL [9] { + CALL [10] { function: _[?_] args: { - CREATE_MAP [10] { - MAP_ENTRY [11] { + CREATE_MAP [11] { + MAP_ENTRY [12] { key: { - CONSTANT [12] { value: "key" } + CONSTANT [13] { value: "key" } } optional_entry: true value: { - CALL [13] { + CALL [14] { function: optional.of args: { - CONSTANT [14] { value: "test" } + CONSTANT [15] { value: "test" } } } } } } - CONSTANT [15] { value: "bogus" } + CONSTANT [16] { value: "bogus" } } } } args: { - CALL [16] { + CALL [17] { function: _[?_] args: { - IDENT [17] { + IDENT [18] { name: @index0 } - CONSTANT [18] { value: "bogus" } + CONSTANT [19] { value: "bogus" } } } } } } args: { - CALL [19] { + CALL [20] { function: _[_] args: { - IDENT [20] { + IDENT [21] { name: @index0 } - CONSTANT [21] { value: "key" } + CONSTANT [22] { value: "key" } } } } } - } - } - CALL [22] { - function: _==_ - args: { - IDENT [23] { - name: @index1 - } - CONSTANT [24] { value: "test" } + CONSTANT [23] { value: "test" } } } } @@ -2971,139 +2724,62 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CALL [3] { - function: optional.ofNonZeroValue - args: { - CONSTANT [4] { value: 1 } - } - } - CALL [5] { - function: optional.of - args: { - CONSTANT [6] { value: 4 } - } - } - CREATE_STRUCT [7] { + CREATE_STRUCT [3] { name: TestAllTypes entries: { - ENTRY [8] { + ENTRY [4] { field_key: single_int64 optional_entry: true value: { - IDENT [9] { - name: @index0 - } - } - } - ENTRY [10] { - field_key: single_int32 - optional_entry: true - value: { - IDENT [11] { - name: @index1 - } - } - } - } - } - CALL [12] { - function: _+_ - args: { - SELECT [13] { - IDENT [14] { - name: @index2 - }.single_int32 - } - SELECT [15] { - IDENT [16] { - name: @index2 - }.single_int64 - } - } - } - } - } - CALL [17] { - function: _==_ - args: { - IDENT [18] { - name: @index3 - } - CONSTANT [19] { value: 5 } - } - } - } -} -Test case: CALL -Source: ('h' + 'e' + 'l' + 'l' + 'o' + ' world').matches('h' + 'e' + 'l' + 'l' + 'o') -=====> -CALL [1] { - function: cel.@block - args: { - CREATE_LIST [2] { - elements: { - CALL [3] { - function: _+_ - args: { - CONSTANT [4] { value: "h" } - CONSTANT [5] { value: "e" } - } - } - CALL [6] { - function: _+_ - args: { - IDENT [7] { - name: @index0 - } - CONSTANT [8] { value: "l" } - } - } - CALL [9] { - function: _+_ - args: { - IDENT [10] { - name: @index1 + CALL [5] { + function: optional.ofNonZeroValue + args: { + CONSTANT [6] { value: 1 } + } + } + } } - CONSTANT [11] { value: "l" } - } - } - CALL [12] { - function: _+_ - args: { - IDENT [13] { - name: @index2 + ENTRY [7] { + field_key: single_int32 + optional_entry: true + value: { + CALL [8] { + function: optional.of + args: { + CONSTANT [9] { value: 4 } + } + } + } } - CONSTANT [14] { value: "o" } } } - CALL [15] { + } + } + CALL [10] { + function: _==_ + args: { + CALL [11] { function: _+_ args: { - IDENT [16] { - name: @index3 + SELECT [12] { + IDENT [13] { + name: @index0 + }.single_int32 + } + SELECT [14] { + IDENT [15] { + name: @index0 + }.single_int64 } - CONSTANT [17] { value: " world" } } } - } - } - CALL [18] { - function: matches - target: { - IDENT [19] { - name: @index4 - } - } - args: { - IDENT [20] { - name: @index3 - } + CONSTANT [16] { value: 5 } } } } } -Test case: CALL_ARGUMENT_NESTED_NO_COMMON_SUBEXPR -Source: 'hello world'.matches('h' + 'e' + 'l' + 'l' + 'o') +Test case: CALL +Source: ('h' + 'e' + 'l' + 'l' + 'o' + ' world').matches('h' + 'e' + 'l' + 'l' + 'o') =====> CALL [1] { function: cel.@block @@ -3140,147 +2816,164 @@ CALL [1] { CALL [12] { function: matches target: { - CONSTANT [13] { value: "hello world" } + CALL [13] { + function: _+_ + args: { + IDENT [14] { + name: @index0 + } + CONSTANT [15] { value: " world" } + } + } } args: { - IDENT [14] { + IDENT [16] { name: @index0 } } } } } -Test case: CALL_TARGET_NESTED_NO_COMMON_SUBEXPR -Source: ('h' + 'e' + 'l' + 'l' + 'o' + ' world').matches('hello') +Test case: CALL_ARGUMENT_NESTED_NO_COMMON_SUBEXPR +Source: 'hello world'.matches('h' + 'e' + 'l' + 'l' + 'o') =====> -CALL [1] { - function: cel.@block +CALL [2] { + function: matches + target: { + CONSTANT [1] { value: "hello world" } + } args: { - CREATE_LIST [2] { - elements: { - CALL [3] { + CALL [10] { + function: _+_ + args: { + CALL [8] { function: _+_ args: { - CALL [4] { + CALL [6] { function: _+_ args: { - CALL [5] { + CALL [4] { function: _+_ args: { - CALL [6] { - function: _+_ - args: { - CALL [7] { - function: _+_ - args: { - CONSTANT [8] { value: "h" } - CONSTANT [9] { value: "e" } - } - } - CONSTANT [10] { value: "l" } - } - } - CONSTANT [11] { value: "l" } + CONSTANT [3] { value: "h" } + CONSTANT [5] { value: "e" } } } - CONSTANT [12] { value: "o" } + CONSTANT [7] { value: "l" } } } - CONSTANT [13] { value: " world" } + CONSTANT [9] { value: "l" } } } - } - } - CALL [14] { - function: matches - target: { - IDENT [15] { - name: @index0 - } - } - args: { - CONSTANT [16] { value: "hello" } + CONSTANT [11] { value: "o" } } } } } -Test case: CALL_BOTH_ARGUMENT_TARGET_NESTED_NO_COMMON_SUBEXPR -Source: ('h' + 'e' + 'l' + 'l' + 'o' + ' world').matches('w' + 'o' + 'r' + 'l' + 'd') +Test case: CALL_TARGET_NESTED_NO_COMMON_SUBEXPR +Source: ('h' + 'e' + 'l' + 'l' + 'o' + ' world').matches('hello') =====> -CALL [1] { - function: cel.@block - args: { - CREATE_LIST [2] { - elements: { - CALL [3] { +CALL [12] { + function: matches + target: { + CALL [10] { + function: _+_ + args: { + CALL [8] { function: _+_ args: { - CALL [4] { + CALL [6] { function: _+_ args: { - CALL [5] { + CALL [4] { function: _+_ args: { - CALL [6] { + CALL [2] { function: _+_ args: { - CONSTANT [7] { value: "w" } - CONSTANT [8] { value: "o" } + CONSTANT [1] { value: "h" } + CONSTANT [3] { value: "e" } } } - CONSTANT [9] { value: "r" } + CONSTANT [5] { value: "l" } } } - CONSTANT [10] { value: "l" } + CONSTANT [7] { value: "l" } } } - CONSTANT [11] { value: "d" } + CONSTANT [9] { value: "o" } } } - CALL [12] { + CONSTANT [11] { value: " world" } + } + } + } + args: { + CONSTANT [13] { value: "hello" } + } +} +Test case: CALL_BOTH_ARGUMENT_TARGET_NESTED_NO_COMMON_SUBEXPR +Source: ('h' + 'e' + 'l' + 'l' + 'o' + ' world').matches('w' + 'o' + 'r' + 'l' + 'd') +=====> +CALL [12] { + function: matches + target: { + CALL [10] { + function: _+_ + args: { + CALL [8] { function: _+_ args: { - CALL [13] { + CALL [6] { function: _+_ args: { - CALL [14] { + CALL [4] { function: _+_ args: { - CALL [15] { + CALL [2] { function: _+_ args: { - CALL [16] { - function: _+_ - args: { - CONSTANT [17] { value: "h" } - CONSTANT [18] { value: "e" } - } - } - CONSTANT [19] { value: "l" } + CONSTANT [1] { value: "h" } + CONSTANT [3] { value: "e" } } } - CONSTANT [20] { value: "l" } + CONSTANT [5] { value: "l" } } } - CONSTANT [21] { value: "o" } + CONSTANT [7] { value: "l" } } } - CONSTANT [22] { value: " world" } + CONSTANT [9] { value: "o" } } } + CONSTANT [11] { value: " world" } } } - CALL [23] { - function: matches - target: { - IDENT [24] { - name: @index1 - } - } + } + args: { + CALL [20] { + function: _+_ args: { - IDENT [25] { - name: @index0 + CALL [18] { + function: _+_ + args: { + CALL [16] { + function: _+_ + args: { + CALL [14] { + function: _+_ + args: { + CONSTANT [13] { value: "w" } + CONSTANT [15] { value: "o" } + } + } + CONSTANT [17] { value: "r" } + } + } + CONSTANT [19] { value: "l" } + } } + CONSTANT [21] { value: "d" } } } } @@ -3294,74 +2987,66 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 - }.single_int64 - } - SELECT [9] { - IDENT [10] { - name: msg + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg + }.oneof_type + }.payload }.single_int64 } - SELECT [11] { - IDENT [12] { - name: @index1 - }.single_int32 - } } } - CALL [13] { + CALL [7] { function: _+_ args: { - CALL [14] { + CALL [8] { function: _+_ args: { - CALL [15] { + CALL [9] { function: _+_ args: { - CALL [16] { + CALL [10] { function: non_pure_custom_func args: { - IDENT [17] { - name: @index2 + IDENT [11] { + name: @index0 } } } - CALL [18] { + CALL [12] { function: non_pure_custom_func args: { - IDENT [19] { - name: @index4 + SELECT [13] { + SELECT [14] { + SELECT [15] { + IDENT [16] { + name: msg + }.oneof_type + }.payload + }.single_int32 } } } } } - CALL [20] { + CALL [17] { function: non_pure_custom_func args: { - IDENT [21] { - name: @index2 + IDENT [18] { + name: @index0 } } } } } - CALL [22] { + CALL [19] { function: non_pure_custom_func args: { - IDENT [23] { - name: @index3 + SELECT [20] { + IDENT [21] { + name: msg + }.single_int64 } } } @@ -3377,75 +3062,64 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 - }.single_int64 - } - CALL [9] { - function: pure_custom_func - args: { - IDENT [10] { - name: @index2 - } - } - } - CALL [11] { + CALL [3] { function: pure_custom_func args: { - SELECT [12] { - IDENT [13] { - name: msg + SELECT [4] { + SELECT [5] { + SELECT [6] { + IDENT [7] { + name: msg + }.oneof_type + }.payload }.single_int64 } } } - CALL [14] { + } + } + CALL [8] { + function: _+_ + args: { + CALL [9] { function: _+_ args: { - CALL [15] { + CALL [10] { function: _+_ args: { - IDENT [16] { - name: @index3 + IDENT [11] { + name: @index0 } - CALL [17] { + CALL [12] { function: pure_custom_func args: { - SELECT [18] { - IDENT [19] { - name: @index1 + SELECT [13] { + SELECT [14] { + SELECT [15] { + IDENT [16] { + name: msg + }.oneof_type + }.payload }.single_int32 } } } } } - IDENT [20] { - name: @index3 + IDENT [17] { + name: @index0 } } } - } - } - CALL [21] { - function: _+_ - args: { - IDENT [22] { - name: @index5 - } - IDENT [23] { - name: @index4 + CALL [18] { + function: pure_custom_func + args: { + SELECT [19] { + IDENT [20] { + name: msg + }.single_int64 + } + } } } } diff --git a/optimizer/src/test/resources/subexpression_ast_block_recursion_depth_8.baseline b/optimizer/src/test/resources/subexpression_ast_block_recursion_depth_8.baseline index 67f1b1308..7da4bdebb 100644 --- a/optimizer/src/test/resources/subexpression_ast_block_recursion_depth_8.baseline +++ b/optimizer/src/test/resources/subexpression_ast_block_recursion_depth_8.baseline @@ -6,20 +6,22 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 1 } - CONSTANT [5] { value: 2 } - } - } - CALL [6] { + CALL [3] { function: size args: { - IDENT [7] { - name: @index0 + CREATE_LIST [4] { + elements: { + CONSTANT [5] { value: 1 } + CONSTANT [6] { value: 2 } + } } } } + } + } + CALL [7] { + function: _==_ + args: { CALL [8] { function: _+_ args: { @@ -27,25 +29,17 @@ CALL [1] { function: _+_ args: { IDENT [10] { - name: @index1 + name: @index0 } IDENT [11] { - name: @index1 + name: @index0 } } } CONSTANT [12] { value: 1 } } } - } - } - CALL [13] { - function: _==_ - args: { - IDENT [14] { - name: @index2 - } - CONSTANT [15] { value: 5 } + CONSTANT [13] { value: 5 } } } } @@ -58,20 +52,22 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 1 } - CONSTANT [5] { value: 2 } - } - } - CALL [6] { + CALL [3] { function: size args: { - IDENT [7] { - name: @index0 + CREATE_LIST [4] { + elements: { + CONSTANT [5] { value: 1 } + CONSTANT [6] { value: 2 } + } } } } + } + } + CALL [7] { + function: _==_ + args: { CALL [8] { function: _+_ args: { @@ -83,27 +79,19 @@ CALL [1] { args: { CONSTANT [11] { value: 2 } IDENT [12] { - name: @index1 + name: @index0 } } } IDENT [13] { - name: @index1 + name: @index0 } } } CONSTANT [14] { value: 1 } } } - } - } - CALL [15] { - function: _==_ - args: { - IDENT [16] { - name: @index2 - } - CONSTANT [17] { value: 7 } + CONSTANT [15] { value: 7 } } } } @@ -116,69 +104,60 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 0 } - } - } - CALL [5] { + CALL [3] { function: size args: { - IDENT [6] { - name: @index0 + CREATE_LIST [4] { + elements: { + CONSTANT [5] { value: 0 } + } } } } - CREATE_LIST [7] { - elements: { - CONSTANT [8] { value: 1 } - CONSTANT [9] { value: 2 } - } - } - CALL [10] { + CALL [6] { function: size args: { - IDENT [11] { - name: @index2 + CREATE_LIST [7] { + elements: { + CONSTANT [8] { value: 1 } + CONSTANT [9] { value: 2 } + } } } } - CALL [12] { + } + } + CALL [10] { + function: _==_ + args: { + CALL [11] { function: _+_ args: { - CALL [13] { + CALL [12] { function: _+_ args: { - CALL [14] { + CALL [13] { function: _+_ args: { - IDENT [15] { - name: @index1 + IDENT [14] { + name: @index0 } - IDENT [16] { - name: @index1 + IDENT [15] { + name: @index0 } } } - IDENT [17] { - name: @index3 + IDENT [16] { + name: @index1 } } } - IDENT [18] { - name: @index3 + IDENT [17] { + name: @index1 } } } - } - } - CALL [19] { - function: _==_ - args: { - IDENT [20] { - name: @index4 - } - CONSTANT [21] { value: 6 } + CONSTANT [18] { value: 6 } } } } @@ -191,106 +170,94 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 0 } - } - } - CALL [5] { + CALL [3] { function: size args: { - IDENT [6] { - name: @index0 + CREATE_LIST [4] { + elements: { + CONSTANT [5] { value: 0 } + } } } } - CREATE_LIST [7] { - elements: { - CONSTANT [8] { value: 1 } - CONSTANT [9] { value: 2 } - } - } - CALL [10] { + CALL [6] { function: size args: { - IDENT [11] { - name: @index2 + CREATE_LIST [7] { + elements: { + CONSTANT [8] { value: 1 } + CONSTANT [9] { value: 2 } + } } } } - CREATE_LIST [12] { - elements: { - CONSTANT [13] { value: 1 } - CONSTANT [14] { value: 2 } - CONSTANT [15] { value: 3 } - } - } - CALL [16] { + CALL [10] { function: size args: { - IDENT [17] { - name: @index4 + CREATE_LIST [11] { + elements: { + CONSTANT [12] { value: 1 } + CONSTANT [13] { value: 2 } + CONSTANT [14] { value: 3 } + } } } } - CALL [18] { + } + } + CALL [15] { + function: _==_ + args: { + CALL [16] { function: _+_ args: { - CALL [19] { + CALL [17] { function: _+_ args: { - CALL [20] { + CALL [18] { function: _+_ args: { - CALL [21] { + CALL [19] { function: _+_ args: { - CALL [22] { + CALL [20] { function: _+_ args: { - CALL [23] { + CALL [21] { function: _+_ args: { - CONSTANT [24] { value: 5 } - IDENT [25] { - name: @index1 + CONSTANT [22] { value: 5 } + IDENT [23] { + name: @index0 } } } - IDENT [26] { - name: @index1 + IDENT [24] { + name: @index0 } } } - IDENT [27] { - name: @index3 + IDENT [25] { + name: @index1 } } } - IDENT [28] { - name: @index3 + IDENT [26] { + name: @index1 } } } - IDENT [29] { - name: @index5 + IDENT [27] { + name: @index2 } } } - IDENT [30] { - name: @index5 + IDENT [28] { + name: @index2 } } } - } - } - CALL [31] { - function: _==_ - args: { - IDENT [32] { - name: @index6 - } - CONSTANT [33] { value: 17 } + CONSTANT [29] { value: 17 } } } } @@ -304,142 +271,112 @@ CALL [1] { CREATE_LIST [2] { elements: { CALL [3] { - function: timestamp - args: { - CONSTANT [4] { value: 1000000000 } - } - } - CALL [5] { - function: int - args: { - IDENT [6] { - name: @index0 + function: getFullYear + target: { + CALL [4] { + function: timestamp + args: { + CALL [5] { + function: int + args: { + CALL [6] { + function: timestamp + args: { + CONSTANT [7] { value: 1000000000 } + } + } + } + } + } } } - } - CALL [7] { - function: timestamp args: { - IDENT [8] { - name: @index1 - } } } - CALL [9] { + CALL [8] { function: getFullYear target: { - IDENT [10] { - name: @index2 + CALL [9] { + function: timestamp + args: { + CALL [10] { + function: int + args: { + CALL [11] { + function: timestamp + args: { + CONSTANT [12] { value: 200 } + } + } + } + } + } } } args: { } } - CALL [11] { - function: timestamp - args: { - CONSTANT [12] { value: 50 } - } - } CALL [13] { - function: int - args: { - IDENT [14] { - name: @index4 - } - } - } - CALL [15] { function: timestamp args: { - IDENT [16] { - name: @index5 + CALL [14] { + function: int + args: { + CALL [15] { + function: timestamp + args: { + CONSTANT [16] { value: 50 } + } + } + } } } } CALL [17] { function: timestamp args: { - CONSTANT [18] { value: 200 } - } - } - CALL [19] { - function: int - args: { - IDENT [20] { - name: @index7 + CALL [18] { + function: int + args: { + CALL [19] { + function: timestamp + args: { + CONSTANT [20] { value: 75 } + } + } + } } } } CALL [21] { - function: timestamp - args: { - IDENT [22] { - name: @index8 - } - } - } - CALL [23] { - function: getFullYear - target: { - IDENT [24] { - name: @index9 - } - } - args: { - } - } - CALL [25] { - function: timestamp - args: { - CONSTANT [26] { value: 75 } - } - } - CALL [27] { - function: int - args: { - IDENT [28] { - name: @index11 - } - } - } - CALL [29] { - function: timestamp - args: { - IDENT [30] { - name: @index12 - } - } - } - CALL [31] { function: _+_ args: { - CALL [32] { + CALL [22] { function: _+_ args: { - CALL [33] { + CALL [23] { function: _+_ args: { - CALL [34] { + CALL [24] { function: _+_ args: { - CALL [35] { + CALL [25] { function: _+_ args: { - CALL [36] { + CALL [26] { function: _+_ args: { - CALL [37] { + CALL [27] { function: _+_ args: { - IDENT [38] { - name: @index3 + IDENT [28] { + name: @index0 } - CALL [39] { + CALL [29] { function: getFullYear target: { - IDENT [40] { - name: @index13 + IDENT [30] { + name: @index3 } } args: { @@ -447,11 +384,11 @@ CALL [1] { } } } - CALL [41] { + CALL [31] { function: getFullYear target: { - IDENT [42] { - name: @index6 + IDENT [32] { + name: @index2 } } args: { @@ -459,16 +396,16 @@ CALL [1] { } } } - IDENT [43] { - name: @index3 + IDENT [33] { + name: @index0 } } } - CALL [44] { + CALL [34] { function: getSeconds target: { - IDENT [45] { - name: @index6 + IDENT [35] { + name: @index2 } } args: { @@ -476,21 +413,21 @@ CALL [1] { } } } - IDENT [46] { - name: @index10 + IDENT [36] { + name: @index1 } } } - IDENT [47] { - name: @index10 + IDENT [37] { + name: @index1 } } } - CALL [48] { + CALL [38] { function: getMinutes target: { - IDENT [49] { - name: @index13 + IDENT [39] { + name: @index3 } } args: { @@ -498,26 +435,23 @@ CALL [1] { } } } - CALL [50] { + } + } + CALL [40] { + function: _==_ + args: { + CALL [41] { function: _+_ args: { - IDENT [51] { - name: @index14 + IDENT [42] { + name: @index4 } - IDENT [52] { - name: @index3 + IDENT [43] { + name: @index0 } } } - } - } - CALL [53] { - function: _==_ - args: { - IDENT [54] { - name: @index15 - } - CONSTANT [55] { value: 13934 } + CONSTANT [44] { value: 13934 } } } } @@ -530,53 +464,47 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_MAP [3] { - MAP_ENTRY [4] { - key: { - CONSTANT [5] { value: "a" } - } - value: { - CONSTANT [6] { value: 2 } - } - } - } - CALL [7] { + CALL [3] { function: _[_] args: { - IDENT [8] { - name: @index0 + CREATE_MAP [4] { + MAP_ENTRY [5] { + key: { + CONSTANT [6] { value: "a" } + } + value: { + CONSTANT [7] { value: 2 } + } + } } - CONSTANT [9] { value: "a" } + CONSTANT [8] { value: "a" } } } + } + } + CALL [9] { + function: _==_ + args: { CALL [10] { function: _+_ args: { IDENT [11] { - name: @index1 + name: @index0 } CALL [12] { function: _*_ args: { IDENT [13] { - name: @index1 + name: @index0 } IDENT [14] { - name: @index1 + name: @index0 } } } } } - } - } - CALL [15] { - function: _==_ - args: { - IDENT [16] { - name: @index2 - } - CONSTANT [17] { value: 6 } + CONSTANT [15] { value: 6 } } } } @@ -592,51 +520,48 @@ CALL [1] { CREATE_MAP [3] { MAP_ENTRY [4] { key: { - CONSTANT [5] { value: "b" } + CONSTANT [5] { value: "e" } } value: { - CONSTANT [6] { value: 1 } + CREATE_MAP [6] { + MAP_ENTRY [7] { + key: { + CONSTANT [8] { value: "b" } + } + value: { + CONSTANT [9] { value: 1 } + } + } + } } } } - CREATE_MAP [7] { - MAP_ENTRY [8] { + CREATE_MAP [10] { + MAP_ENTRY [11] { key: { - CONSTANT [9] { value: "e" } + CONSTANT [12] { value: "b" } } value: { - IDENT [10] { - name: @index0 - } + CONSTANT [13] { value: 1 } } } } } } - CREATE_MAP [11] { - MAP_ENTRY [12] { - key: { - CONSTANT [13] { value: "a" } - } - value: { - IDENT [14] { - name: @index0 - } - } - } + CREATE_MAP [14] { MAP_ENTRY [15] { key: { - CONSTANT [16] { value: "c" } + CONSTANT [16] { value: "a" } } value: { IDENT [17] { - name: @index0 + name: @index1 } } } MAP_ENTRY [18] { key: { - CONSTANT [19] { value: "d" } + CONSTANT [19] { value: "c" } } value: { IDENT [20] { @@ -646,11 +571,21 @@ CALL [1] { } MAP_ENTRY [21] { key: { - CONSTANT [22] { value: "e" } + CONSTANT [22] { value: "d" } } value: { IDENT [23] { - name: @index1 + name: @index0 + } + } + } + MAP_ENTRY [24] { + key: { + CONSTANT [25] { value: "e" } + } + value: { + IDENT [26] { + name: @index0 } } } @@ -679,37 +614,34 @@ CALL [1] { CONSTANT [10] { value: 2 } } } - CREATE_LIST [11] { - elements: { - IDENT [12] { - name: @index1 - } - IDENT [13] { - name: @index0 - } - } - } } } - CREATE_LIST [14] { + CREATE_LIST [11] { elements: { - CONSTANT [15] { value: 1 } - IDENT [16] { + CONSTANT [12] { value: 1 } + IDENT [13] { name: @index0 } - CONSTANT [17] { value: 2 } - IDENT [18] { + CONSTANT [14] { value: 2 } + IDENT [15] { name: @index0 } - CONSTANT [19] { value: 5 } - IDENT [20] { + CONSTANT [16] { value: 5 } + IDENT [17] { name: @index0 } - CONSTANT [21] { value: 7 } - IDENT [22] { - name: @index2 + CONSTANT [18] { value: 7 } + CREATE_LIST [19] { + elements: { + IDENT [20] { + name: @index1 + } + IDENT [21] { + name: @index0 + } + } } - IDENT [23] { + IDENT [22] { name: @index1 } } @@ -729,26 +661,23 @@ CALL [1] { name: msg }.single_int64 } - CALL [5] { + } + } + CALL [5] { + function: _==_ + args: { + CALL [6] { function: _+_ args: { - IDENT [6] { + IDENT [7] { name: @index0 } - IDENT [7] { + IDENT [8] { name: @index0 } } } - } - } - CALL [8] { - function: _==_ - args: { - IDENT [9] { - name: @index1 - } - CONSTANT [10] { value: 6 } + CONSTANT [9] { value: 6 } } } } @@ -762,58 +691,64 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg + }.oneof_type + }.payload + }.single_int64 } SELECT [7] { - IDENT [8] { - name: @index1 - }.single_int64 + SELECT [8] { + IDENT [9] { + name: msg + }.oneof_type + }.payload } - CALL [9] { + } + } + CALL [10] { + function: _==_ + args: { + CALL [11] { function: _+_ args: { - CALL [10] { + CALL [12] { function: _+_ args: { - CALL [11] { + CALL [13] { function: _+_ args: { - CALL [12] { + CALL [14] { function: _+_ args: { - IDENT [13] { - name: @index2 + IDENT [15] { + name: @index0 } - SELECT [14] { - IDENT [15] { + SELECT [16] { + IDENT [17] { name: @index1 }.single_int32 } } } - IDENT [16] { - name: @index2 + IDENT [18] { + name: @index0 } } } - SELECT [17] { - IDENT [18] { + SELECT [19] { + IDENT [20] { name: msg }.single_int64 } } } - SELECT [19] { - SELECT [20] { - SELECT [21] { - IDENT [22] { + SELECT [21] { + SELECT [22] { + SELECT [23] { + IDENT [24] { name: @index1 }.oneof_type }.payload @@ -821,14 +756,6 @@ CALL [1] { } } } - } - } - CALL [23] { - function: _==_ - args: { - IDENT [24] { - name: @index3 - } CONSTANT [25] { value: 31 } } } @@ -843,51 +770,33 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 - }.oneof_type - } - SELECT [9] { - IDENT [10] { - name: @index2 - }.payload - } - SELECT [11] { - IDENT [12] { - name: @index3 - }.oneof_type - } - SELECT [13] { - SELECT [14] { - SELECT [15] { - SELECT [16] { - IDENT [17] { - name: @index4 - }.child - }.child + SELECT [4] { + SELECT [5] { + SELECT [6] { + SELECT [7] { + IDENT [8] { + name: msg + }.oneof_type + }.payload + }.oneof_type }.payload - }.single_bool + }.oneof_type } - CALL [18] { + } + } + CALL [9] { + function: _||_ + args: { + CALL [10] { function: _||_ args: { - CONSTANT [19] { value: true } - SELECT [20] { - SELECT [21] { - SELECT [22] { - SELECT [23] { - IDENT [24] { - name: @index4 + CONSTANT [11] { value: true } + SELECT [12] { + SELECT [13] { + SELECT [14] { + SELECT [15] { + IDENT [16] { + name: @index0 }.payload }.oneof_type }.payload @@ -895,16 +804,16 @@ CALL [1] { } } } - } - } - CALL [25] { - function: _||_ - args: { - IDENT [26] { - name: @index6 - } - IDENT [27] { - name: @index5 + SELECT [17] { + SELECT [18] { + SELECT [19] { + SELECT [20] { + IDENT [21] { + name: @index0 + }.child + }.child + }.payload + }.single_bool } } } @@ -918,58 +827,46 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 - }.map_int32_int64 - } - CALL [9] { + CALL [3] { function: _[_] args: { - IDENT [10] { - name: @index2 + SELECT [4] { + SELECT [5] { + SELECT [6] { + IDENT [7] { + name: msg + }.oneof_type + }.payload + }.map_int32_int64 } - CONSTANT [11] { value: 1 } + CONSTANT [8] { value: 1 } } } - CALL [12] { + } + } + CALL [9] { + function: _==_ + args: { + CALL [10] { function: _+_ args: { - CALL [13] { + CALL [11] { function: _+_ args: { - IDENT [14] { - name: @index3 + IDENT [12] { + name: @index0 } - IDENT [15] { - name: @index3 + IDENT [13] { + name: @index0 } } } - IDENT [16] { - name: @index3 + IDENT [14] { + name: @index0 } } } - } - } - CALL [17] { - function: _==_ - args: { - IDENT [18] { - name: @index4 - } - CONSTANT [19] { value: 15 } + CONSTANT [15] { value: 15 } } } } @@ -983,66 +880,57 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg + }.oneof_type + }.payload }.map_int32_int64 } - CALL [9] { + } + } + CALL [7] { + function: _==_ + args: { + CALL [8] { function: _+_ args: { - CALL [10] { + CALL [9] { function: _+_ args: { - CALL [11] { + CALL [10] { function: _[_] args: { - IDENT [12] { - name: @index2 + IDENT [11] { + name: @index0 } - CONSTANT [13] { value: 0 } + CONSTANT [12] { value: 0 } } } - CALL [14] { + CALL [13] { function: _[_] args: { - IDENT [15] { - name: @index2 + IDENT [14] { + name: @index0 } - CONSTANT [16] { value: 1 } + CONSTANT [15] { value: 1 } } } } } - CALL [17] { + CALL [16] { function: _[_] args: { - IDENT [18] { - name: @index2 + IDENT [17] { + name: @index0 } - CONSTANT [19] { value: 2 } + CONSTANT [18] { value: 2 } } } } } - } - } - CALL [20] { - function: _==_ - args: { - IDENT [21] { - name: @index3 - } - CONSTANT [22] { value: 8 } + CONSTANT [19] { value: 8 } } } } @@ -1096,33 +984,30 @@ CALL [1] { name: msg }.single_int64 } - CALL [5] { + } + } + CALL [5] { + function: _==_ + args: { + CALL [6] { function: _?_:_ args: { - CALL [6] { + CALL [7] { function: _>_ args: { - IDENT [7] { + IDENT [8] { name: @index0 } - CONSTANT [8] { value: 0 } + CONSTANT [9] { value: 0 } } } - IDENT [9] { + IDENT [10] { name: @index0 } - CONSTANT [10] { value: 0 } + CONSTANT [11] { value: 0 } } } - } - } - CALL [11] { - function: _==_ - args: { - IDENT [12] { - name: @index1 - } - CONSTANT [13] { value: 3 } + CONSTANT [12] { value: 3 } } } } @@ -1140,47 +1025,44 @@ CALL [1] { name: msg }.single_int64 } - CALL [5] { + } + } + CALL [5] { + function: _?_:_ + args: { + CONSTANT [6] { value: false } + CONSTANT [7] { value: false } + CALL [8] { function: _==_ args: { - CALL [6] { + CALL [9] { function: _+_ args: { - IDENT [7] { + IDENT [10] { name: @index0 } - CALL [8] { + CALL [11] { function: _*_ args: { - CALL [9] { + CALL [12] { function: _+_ args: { - IDENT [10] { + IDENT [13] { name: @index0 } - CONSTANT [11] { value: 1 } + CONSTANT [14] { value: 1 } } } - CONSTANT [12] { value: 2 } + CONSTANT [15] { value: 2 } } } } } - CONSTANT [13] { value: 11 } + CONSTANT [16] { value: 11 } } } } } - CALL [14] { - function: _?_:_ - args: { - CONSTANT [15] { value: false } - CONSTANT [16] { value: false } - IDENT [17] { - name: @index1 - } - } - } } } Test case: NESTED_TERNARY @@ -1201,56 +1083,53 @@ CALL [1] { name: msg }.single_int32 } - CALL [7] { + } + } + CALL [7] { + function: _==_ + args: { + CALL [8] { function: _?_:_ args: { - CALL [8] { + CALL [9] { function: _>_ args: { - IDENT [9] { + IDENT [10] { name: @index0 } - CONSTANT [10] { value: 0 } + CONSTANT [11] { value: 0 } } } - CALL [11] { + CALL [12] { function: _?_:_ args: { - CALL [12] { + CALL [13] { function: _>_ args: { - IDENT [13] { + IDENT [14] { name: @index1 } - CONSTANT [14] { value: 0 } + CONSTANT [15] { value: 0 } } } - CALL [15] { + CALL [16] { function: _+_ args: { - IDENT [16] { + IDENT [17] { name: @index0 } - IDENT [17] { + IDENT [18] { name: @index1 } } } - CONSTANT [18] { value: 0 } + CONSTANT [19] { value: 0 } } } - CONSTANT [19] { value: 0 } + CONSTANT [20] { value: 0 } } } - } - } - CALL [20] { - function: _==_ - args: { - IDENT [21] { - name: @index2 - } - CONSTANT [22] { value: 8 } + CONSTANT [21] { value: 8 } } } } @@ -1263,343 +1142,318 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 1 } + CALL [3] { + function: size + args: { + CREATE_LIST [4] { + elements: { + COMPREHENSION [5] { + iter_var: @c0:0 + iter_range: { + CREATE_LIST [6] { + elements: { + CONSTANT [7] { value: 1 } + } + } + } + accu_var: @x0:0 + accu_init: { + CONSTANT [8] { value: false } + } + loop_condition: { + CALL [9] { + function: @not_strictly_false + args: { + CALL [10] { + function: !_ + args: { + IDENT [11] { + name: @x0:0 + } + } + } + } + } + } + loop_step: { + CALL [12] { + function: _||_ + args: { + IDENT [13] { + name: @x0:0 + } + CALL [14] { + function: _>_ + args: { + IDENT [15] { + name: @c0:0 + } + CONSTANT [16] { value: 0 } + } + } + } + } + } + result: { + IDENT [17] { + name: @x0:0 + } + } + } + } + } } } - CALL [5] { - function: _>_ + CALL [18] { + function: size args: { - IDENT [6] { - name: @c0:0 + CREATE_LIST [19] { + elements: { + COMPREHENSION [20] { + iter_var: @c0:0 + iter_range: { + CREATE_LIST [21] { + elements: { + CONSTANT [22] { value: 2 } + } + } + } + accu_var: @x0:0 + accu_init: { + CONSTANT [23] { value: false } + } + loop_condition: { + CALL [24] { + function: @not_strictly_false + args: { + CALL [25] { + function: !_ + args: { + IDENT [26] { + name: @x0:0 + } + } + } + } + } + } + loop_step: { + CALL [27] { + function: _||_ + args: { + IDENT [28] { + name: @x0:0 + } + CALL [29] { + function: _>_ + args: { + IDENT [30] { + name: @c0:0 + } + CONSTANT [31] { value: 1 } + } + } + } + } + } + result: { + IDENT [32] { + name: @x0:0 + } + } + } + } } - CONSTANT [7] { value: 0 } } } - CALL [8] { - function: _||_ + } + } + CALL [33] { + function: _==_ + args: { + CALL [34] { + function: _+_ args: { - IDENT [9] { - name: @x0:0 + CALL [35] { + function: _+_ + args: { + CALL [36] { + function: _+_ + args: { + IDENT [37] { + name: @index0 + } + IDENT [38] { + name: @index0 + } + } + } + IDENT [39] { + name: @index1 + } + } } - IDENT [10] { + IDENT [40] { name: @index1 } } } - COMPREHENSION [11] { - iter_var: @c0:0 - iter_range: { - IDENT [12] { - name: @index0 - } - } - accu_var: @x0:0 - accu_init: { - CONSTANT [13] { value: false } - } - loop_condition: { - CALL [14] { - function: @not_strictly_false - args: { - CALL [15] { - function: !_ + CONSTANT [41] { value: 4 } + } + } + } +} +Test case: MULTIPLE_MACROS_2 +Source: [[1].exists(i, i > 0)] + [[1].exists(j, j > 0)] + [['a'].exists(k, k == 'a')] + [['a'].exists(l, l == 'a')] == [true, true, true, true] +=====> +CALL [1] { + function: cel.@block + args: { + CREATE_LIST [2] { + elements: { + CREATE_LIST [3] { + elements: { + COMPREHENSION [4] { + iter_var: @c0:0 + iter_range: { + CREATE_LIST [5] { + elements: { + CONSTANT [6] { value: 1 } + } + } + } + accu_var: @x0:0 + accu_init: { + CONSTANT [7] { value: false } + } + loop_condition: { + CALL [8] { + function: @not_strictly_false args: { - IDENT [16] { + CALL [9] { + function: !_ + args: { + IDENT [10] { + name: @x0:0 + } + } + } + } + } + } + loop_step: { + CALL [11] { + function: _||_ + args: { + IDENT [12] { name: @x0:0 } + CALL [13] { + function: _>_ + args: { + IDENT [14] { + name: @c0:0 + } + CONSTANT [15] { value: 0 } + } + } } } } - } - } - loop_step: { - IDENT [17] { - name: @index2 - } - } - result: { - IDENT [18] { - name: @x0:0 - } - } - } - CREATE_LIST [19] { - elements: { - IDENT [20] { - name: @index3 - } - } - } - CALL [21] { - function: size - args: { - IDENT [22] { - name: @index4 + result: { + IDENT [16] { + name: @x0:0 + } + } } } } - CREATE_LIST [23] { + CREATE_LIST [17] { elements: { - CONSTANT [24] { value: 2 } - } - } - CALL [25] { - function: _>_ - args: { - IDENT [26] { - name: @c0:0 - } - CONSTANT [27] { value: 1 } - } - } - CALL [28] { - function: _||_ - args: { - IDENT [29] { - name: @x0:0 - } - IDENT [30] { - name: @index7 - } - } - } - COMPREHENSION [31] { - iter_var: @c0:0 - iter_range: { - IDENT [32] { - name: @index6 - } - } - accu_var: @x0:0 - accu_init: { - CONSTANT [33] { value: false } - } - loop_condition: { - CALL [34] { - function: @not_strictly_false - args: { - CALL [35] { - function: !_ + COMPREHENSION [18] { + iter_var: @c0:1 + iter_range: { + CREATE_LIST [19] { + elements: { + CONSTANT [20] { value: "a" } + } + } + } + accu_var: @x0:1 + accu_init: { + CONSTANT [21] { value: false } + } + loop_condition: { + CALL [22] { + function: @not_strictly_false args: { - IDENT [36] { - name: @x0:0 + CALL [23] { + function: !_ + args: { + IDENT [24] { + name: @x0:1 + } + } } } } } - } - } - loop_step: { - IDENT [37] { - name: @index8 - } - } - result: { - IDENT [38] { - name: @x0:0 - } - } - } - CREATE_LIST [39] { - elements: { - IDENT [40] { - name: @index9 - } - } - } - CALL [41] { - function: size - args: { - IDENT [42] { - name: @index10 - } - } - } - CALL [43] { - function: _+_ - args: { - CALL [44] { - function: _+_ - args: { - CALL [45] { - function: _+_ + loop_step: { + CALL [25] { + function: _||_ args: { - IDENT [46] { - name: @index5 + IDENT [26] { + name: @x0:1 } - IDENT [47] { - name: @index5 + CALL [27] { + function: _==_ + args: { + IDENT [28] { + name: @c0:1 + } + CONSTANT [29] { value: "a" } + } } } } - IDENT [48] { - name: @index11 + } + result: { + IDENT [30] { + name: @x0:1 } } } - IDENT [49] { - name: @index11 - } } } } } - CALL [50] { + CALL [31] { function: _==_ args: { - IDENT [51] { - name: @index12 - } - CONSTANT [52] { value: 4 } - } - } - } -} -Test case: MULTIPLE_MACROS_2 -Source: [[1].exists(i, i > 0)] + [[1].exists(j, j > 0)] + [['a'].exists(k, k == 'a')] + [['a'].exists(l, l == 'a')] == [true, true, true, true] -=====> -CALL [1] { - function: cel.@block - args: { - CREATE_LIST [2] { - elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 1 } - } - } - CALL [5] { - function: _>_ - args: { - IDENT [6] { - name: @c0:0 - } - CONSTANT [7] { value: 0 } - } - } - CALL [8] { - function: _||_ + CALL [32] { + function: _+_ args: { - IDENT [9] { - name: @x0:0 - } - IDENT [10] { - name: @index1 - } - } - } - COMPREHENSION [11] { - iter_var: @c0:0 - iter_range: { - IDENT [12] { - name: @index0 - } - } - accu_var: @x0:0 - accu_init: { - CONSTANT [13] { value: false } - } - loop_condition: { - CALL [14] { - function: @not_strictly_false + CALL [33] { + function: _+_ args: { - CALL [15] { - function: !_ + CALL [34] { + function: _+_ args: { - IDENT [16] { - name: @x0:0 + IDENT [35] { + name: @index0 } - } - } - } - } - } - loop_step: { - IDENT [17] { - name: @index2 - } - } - result: { - IDENT [18] { - name: @x0:0 - } - } - } - CREATE_LIST [19] { - elements: { - IDENT [20] { - name: @index3 - } - } - } - CREATE_LIST [21] { - elements: { - CONSTANT [22] { value: "a" } - } - } - CALL [23] { - function: _==_ - args: { - IDENT [24] { - name: @c0:1 - } - CONSTANT [25] { value: "a" } - } - } - CALL [26] { - function: _||_ - args: { - IDENT [27] { - name: @x0:1 - } - IDENT [28] { - name: @index6 - } - } - } - COMPREHENSION [29] { - iter_var: @c0:1 - iter_range: { - IDENT [30] { - name: @index5 - } - } - accu_var: @x0:1 - accu_init: { - CONSTANT [31] { value: false } - } - loop_condition: { - CALL [32] { - function: @not_strictly_false - args: { - CALL [33] { - function: !_ - args: { - IDENT [34] { - name: @x0:1 + IDENT [36] { + name: @index0 } } } + IDENT [37] { + name: @index1 + } } } - } - loop_step: { - IDENT [35] { - name: @index7 - } - } - result: { - IDENT [36] { - name: @x0:1 - } - } - } - CREATE_LIST [37] { - elements: { IDENT [38] { - name: @index8 + name: @index1 } } } @@ -1611,44 +1465,6 @@ CALL [1] { CONSTANT [43] { value: true } } } - CALL [44] { - function: _+_ - args: { - CALL [45] { - function: _+_ - args: { - CALL [46] { - function: _+_ - args: { - IDENT [47] { - name: @index4 - } - IDENT [48] { - name: @index4 - } - } - } - IDENT [49] { - name: @index9 - } - } - } - IDENT [50] { - name: @index9 - } - } - } - } - } - CALL [51] { - function: _==_ - args: { - IDENT [52] { - name: @index11 - } - IDENT [53] { - name: @index10 - } } } } @@ -1675,78 +1491,70 @@ CALL [1] { CONSTANT [10] { value: 4 } } } - CREATE_LIST [11] { - elements: { - IDENT [12] { - name: @index1 - } - IDENT [13] { - name: @index1 - } - IDENT [14] { - name: @index1 - } - } - } - COMPREHENSION [15] { + } + } + CALL [11] { + function: _==_ + args: { + COMPREHENSION [12] { iter_var: @c0:0 iter_range: { - IDENT [16] { + IDENT [13] { name: @index0 } } accu_var: @x0:0 accu_init: { - CREATE_LIST [17] { + CREATE_LIST [14] { elements: { } } } loop_condition: { - CONSTANT [18] { value: true } + CONSTANT [15] { value: true } } loop_step: { - CALL [19] { + CALL [16] { function: _+_ args: { - IDENT [20] { + IDENT [17] { name: @x0:0 } - CREATE_LIST [21] { + CREATE_LIST [18] { elements: { - COMPREHENSION [22] { + COMPREHENSION [19] { iter_var: @c1:0 iter_range: { - IDENT [23] { + IDENT [20] { name: @index0 } } accu_var: @x1:0 accu_init: { - CREATE_LIST [24] { + CREATE_LIST [21] { elements: { } } } loop_condition: { - CONSTANT [25] { value: true } + CONSTANT [22] { value: true } } loop_step: { - CALL [26] { + CALL [23] { function: _+_ args: { - IDENT [27] { + IDENT [24] { name: @x1:0 } - CREATE_LIST [28] { + CREATE_LIST [25] { elements: { - CALL [29] { + CALL [26] { function: _+_ args: { - IDENT [30] { + IDENT [27] { name: @c1:0 } - CONSTANT [31] { value: 1 } + CONSTANT [28] { value: 1 } } } } @@ -1755,7 +1563,7 @@ CALL [1] { } } result: { - IDENT [32] { + IDENT [29] { name: @x1:0 } } @@ -1766,21 +1574,23 @@ CALL [1] { } } result: { - IDENT [33] { + IDENT [30] { name: @x0:0 } } } - } - } - CALL [34] { - function: _==_ - args: { - IDENT [35] { - name: @index3 - } - IDENT [36] { - name: @index2 + CREATE_LIST [31] { + elements: { + IDENT [32] { + name: @index1 + } + IDENT [33] { + name: @index1 + } + IDENT [34] { + name: @index1 + } + } } } } @@ -1789,138 +1599,123 @@ CALL [1] { Test case: NESTED_MACROS_2 Source: [1, 2].map(y, [1, 2, 3].filter(x, x == y)) == [[1], [2]] =====> -CALL [1] { - function: cel.@block +CALL [31] { + function: _==_ args: { - CREATE_LIST [2] { - elements: { - CREATE_LIST [3] { + COMPREHENSION [30] { + iter_var: @c0:0 + iter_range: { + CREATE_LIST [1] { elements: { - CREATE_LIST [4] { - elements: { - CONSTANT [5] { value: 1 } - } - } - CREATE_LIST [6] { - elements: { - CONSTANT [7] { value: 2 } - } - } + CONSTANT [2] { value: 1 } + CONSTANT [3] { value: 2 } } } - COMPREHENSION [8] { - iter_var: @c0:0 - iter_range: { - CREATE_LIST [9] { - elements: { - CONSTANT [10] { value: 1 } - CONSTANT [11] { value: 2 } - } - } + } + accu_var: @x0:0 + accu_init: { + CREATE_LIST [24] { + elements: { } - accu_var: @x0:0 - accu_init: { - CREATE_LIST [12] { - elements: { - } + } + } + loop_condition: { + CONSTANT [25] { value: true } + } + loop_step: { + CALL [28] { + function: _+_ + args: { + IDENT [26] { + name: @x0:0 } - } - loop_condition: { - CONSTANT [13] { value: true } - } - loop_step: { - CALL [14] { - function: _+_ - args: { - IDENT [15] { - name: @x0:0 - } - CREATE_LIST [16] { - elements: { - COMPREHENSION [17] { - iter_var: @c1:0 - iter_range: { - CREATE_LIST [18] { - elements: { - CONSTANT [19] { value: 1 } - CONSTANT [20] { value: 2 } - CONSTANT [21] { value: 3 } - } - } + CREATE_LIST [27] { + elements: { + COMPREHENSION [23] { + iter_var: @c1:0 + iter_range: { + CREATE_LIST [6] { + elements: { + CONSTANT [7] { value: 1 } + CONSTANT [8] { value: 2 } + CONSTANT [9] { value: 3 } } - accu_var: @x1:0 - accu_init: { - CREATE_LIST [22] { - elements: { + } + } + accu_var: @x1:0 + accu_init: { + CREATE_LIST [15] { + elements: { + } + } + } + loop_condition: { + CONSTANT [16] { value: true } + } + loop_step: { + CALL [21] { + function: _?_:_ + args: { + CALL [13] { + function: _==_ + args: { + IDENT [12] { + name: @c1:0 + } + IDENT [14] { + name: @c0:0 + } } } - } - loop_condition: { - CONSTANT [23] { value: true } - } - loop_step: { - CALL [24] { - function: _?_:_ + CALL [19] { + function: _+_ args: { - CALL [25] { - function: _==_ - args: { - IDENT [26] { - name: @c1:0 - } - IDENT [27] { - name: @c0:0 - } - } + IDENT [17] { + name: @x1:0 } - CALL [28] { - function: _+_ - args: { - IDENT [29] { - name: @x1:0 - } - CREATE_LIST [30] { - elements: { - IDENT [31] { - name: @c1:0 - } - } + CREATE_LIST [18] { + elements: { + IDENT [11] { + name: @c1:0 } } } - IDENT [32] { - name: @x1:0 - } } } - } - result: { - IDENT [33] { + IDENT [20] { name: @x1:0 } } } } + result: { + IDENT [22] { + name: @x1:0 + } + } } } } } - result: { - IDENT [34] { - name: @x0:0 - } - } + } + } + result: { + IDENT [29] { + name: @x0:0 } } } - CALL [35] { - function: _==_ - args: { - IDENT [36] { - name: @index1 + CREATE_LIST [32] { + elements: { + CREATE_LIST [33] { + elements: { + CONSTANT [34] { value: 1 } + } } - IDENT [37] { - name: @index0 + CREATE_LIST [35] { + elements: { + CONSTANT [36] { value: 2 } + } } } } @@ -1934,74 +1729,72 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 1 } - CONSTANT [5] { value: 2 } - CONSTANT [6] { value: 3 } - } - } - CALL [7] { + CALL [3] { function: @in args: { - CONSTANT [8] { value: 1 } - IDENT [9] { - name: @index0 + CONSTANT [4] { value: 1 } + CREATE_LIST [5] { + elements: { + CONSTANT [6] { value: 1 } + CONSTANT [7] { value: 2 } + CONSTANT [8] { value: 3 } + } } } } - CALL [10] { + CREATE_LIST [9] { + elements: { + CONSTANT [10] { value: 1 } + CONSTANT [11] { value: 2 } + CONSTANT [12] { value: 3 } + } + } + } + } + CALL [13] { + function: _&&_ + args: { + CALL [14] { function: _&&_ args: { - CALL [11] { + IDENT [15] { + name: @index0 + } + CALL [16] { function: @in args: { - CONSTANT [12] { value: 3 } - CREATE_LIST [13] { - elements: { - CONSTANT [14] { value: 3 } - IDENT [15] { - name: @index0 - } - } + CONSTANT [17] { value: 2 } + IDENT [18] { + name: @index1 } } } - IDENT [16] { - name: @index1 - } } } - CALL [17] { + CALL [19] { function: _&&_ args: { - IDENT [18] { - name: @index1 - } - CALL [19] { + CALL [20] { function: @in args: { - CONSTANT [20] { value: 2 } - IDENT [21] { - name: @index0 + CONSTANT [21] { value: 3 } + CREATE_LIST [22] { + elements: { + CONSTANT [23] { value: 3 } + IDENT [24] { + name: @index1 + } + } } } } + IDENT [25] { + name: @index0 + } } } } } - CALL [22] { - function: _&&_ - args: { - IDENT [23] { - name: @index3 - } - IDENT [24] { - name: @index2 - } - } - } } } Test case: INCLUSION_MAP @@ -2022,31 +1815,37 @@ CALL [1] { } } } - CREATE_MAP [7] { - MAP_ENTRY [8] { + } + } + CALL [7] { + function: @in + args: { + CONSTANT [8] { value: 2 } + CREATE_MAP [9] { + MAP_ENTRY [10] { key: { - CONSTANT [9] { value: "a" } + CONSTANT [11] { value: "a" } } value: { - CONSTANT [10] { value: 1 } + CONSTANT [12] { value: 1 } } } - MAP_ENTRY [11] { + MAP_ENTRY [13] { key: { - CONSTANT [12] { value: 2 } + CONSTANT [14] { value: 2 } } value: { - IDENT [13] { + IDENT [15] { name: @index0 } } } - MAP_ENTRY [14] { + MAP_ENTRY [16] { key: { - CONSTANT [15] { value: 3 } + CONSTANT [17] { value: 3 } } value: { - IDENT [16] { + IDENT [18] { name: @index0 } } @@ -2054,15 +1853,6 @@ CALL [1] { } } } - CALL [17] { - function: @in - args: { - CONSTANT [18] { value: 2 } - IDENT [19] { - name: @index1 - } - } - } } } Test case: MACRO_ITER_VAR_NOT_REFERENCED @@ -2075,90 +1865,88 @@ CALL [1] { elements: { CREATE_LIST [3] { elements: { - CONSTANT [4] { value: 1 } - CONSTANT [5] { value: 2 } - } - } - CREATE_LIST [6] { - elements: { - CONSTANT [7] { value: 3 } - CONSTANT [8] { value: 4 } - } - } - CREATE_LIST [9] { - elements: { - IDENT [10] { - name: @index1 + CREATE_LIST [4] { + elements: { + CONSTANT [5] { value: 3 } + CONSTANT [6] { value: 4 } + } } - IDENT [11] { - name: @index1 + CREATE_LIST [7] { + elements: { + CONSTANT [8] { value: 3 } + CONSTANT [9] { value: 4 } + } } } } - CREATE_LIST [12] { + CREATE_LIST [10] { elements: { - IDENT [13] { - name: @index2 - } - IDENT [14] { - name: @index2 - } + CONSTANT [11] { value: 1 } + CONSTANT [12] { value: 2 } } } - COMPREHENSION [15] { + } + } + CALL [13] { + function: _==_ + args: { + COMPREHENSION [14] { iter_var: @c0:0 iter_range: { - IDENT [16] { - name: @index0 + IDENT [15] { + name: @index1 } } accu_var: @x0:0 accu_init: { - CREATE_LIST [17] { + CREATE_LIST [16] { elements: { } } } loop_condition: { - CONSTANT [18] { value: true } + CONSTANT [17] { value: true } } loop_step: { - CALL [19] { + CALL [18] { function: _+_ args: { - IDENT [20] { + IDENT [19] { name: @x0:0 } - CREATE_LIST [21] { + CREATE_LIST [20] { elements: { - COMPREHENSION [22] { + COMPREHENSION [21] { iter_var: @c1:0 iter_range: { - IDENT [23] { - name: @index0 + IDENT [22] { + name: @index1 } } accu_var: @x1:0 accu_init: { - CREATE_LIST [24] { + CREATE_LIST [23] { elements: { } } } loop_condition: { - CONSTANT [25] { value: true } + CONSTANT [24] { value: true } } loop_step: { - CALL [26] { + CALL [25] { function: _+_ args: { - IDENT [27] { + IDENT [26] { name: @x1:0 } - CREATE_LIST [28] { + CREATE_LIST [27] { elements: { - IDENT [29] { - name: @index1 + CREATE_LIST [28] { + elements: { + CONSTANT [29] { value: 3 } + CONSTANT [30] { value: 4 } + } } } } @@ -2166,7 +1954,7 @@ CALL [1] { } } result: { - IDENT [30] { + IDENT [31] { name: @x1:0 } } @@ -2177,21 +1965,20 @@ CALL [1] { } } result: { - IDENT [31] { + IDENT [32] { name: @x0:0 } } } - } - } - CALL [32] { - function: _==_ - args: { - IDENT [33] { - name: @index4 - } - IDENT [34] { - name: @index3 + CREATE_LIST [33] { + elements: { + IDENT [34] { + name: @index0 + } + IDENT [35] { + name: @index0 + } + } } } } @@ -2206,23 +1993,25 @@ CALL [1] { CREATE_LIST [2] { elements: { CALL [3] { - function: _-_ - args: { - IDENT [4] { - name: x - } - CONSTANT [5] { value: 1 } - } - } - CALL [6] { function: _>_ args: { - IDENT [7] { - name: @index0 + CALL [4] { + function: _-_ + args: { + IDENT [5] { + name: x + } + CONSTANT [6] { value: 1 } + } } - CONSTANT [8] { value: 3 } + CONSTANT [7] { value: 3 } } } + } + } + CALL [8] { + function: _||_ + args: { COMPREHENSION [9] { iter_var: @c0:0 iter_range: { @@ -2232,12 +2021,18 @@ CALL [1] { function: _?_:_ args: { IDENT [12] { - name: @index1 - } - IDENT [13] { name: @index0 } - CONSTANT [14] { value: 5 } + CALL [13] { + function: _-_ + args: { + IDENT [14] { + name: x + } + CONSTANT [15] { value: 1 } + } + } + CONSTANT [16] { value: 5 } } } } @@ -2245,16 +2040,16 @@ CALL [1] { } accu_var: @x0:0 accu_init: { - CONSTANT [15] { value: false } + CONSTANT [17] { value: false } } loop_condition: { - CALL [16] { + CALL [18] { function: @not_strictly_false args: { - CALL [17] { + CALL [19] { function: !_ args: { - IDENT [18] { + IDENT [20] { name: @x0:0 } } @@ -2263,46 +2058,38 @@ CALL [1] { } } loop_step: { - CALL [19] { + CALL [21] { function: _||_ args: { - IDENT [20] { + IDENT [22] { name: @x0:0 } - CALL [21] { + CALL [23] { function: _>_ args: { - CALL [22] { + CALL [24] { function: _-_ args: { - IDENT [23] { + IDENT [25] { name: @c0:0 } - CONSTANT [24] { value: 1 } + CONSTANT [26] { value: 1 } } } - CONSTANT [25] { value: 3 } + CONSTANT [27] { value: 3 } } } } } } result: { - IDENT [26] { + IDENT [28] { name: @x0:0 } } } - } - } - CALL [27] { - function: _||_ - args: { - IDENT [28] { - name: @index2 - } IDENT [29] { - name: @index1 + name: @index0 } } } @@ -2338,63 +2125,46 @@ CALL [1] { } } } - CALL [9] { - function: _+_ - args: { - IDENT [10] { - name: @x0:0 - } - CREATE_LIST [11] { - elements: { - CREATE_LIST [12] { - elements: { - IDENT [13] { - name: @index1 - } - IDENT [14] { - name: @index1 - } - } - } - } - } - } - } - COMPREHENSION [15] { + } + } + COMPREHENSION [9] { + iter_var: @c0:0 + iter_range: { + COMPREHENSION [10] { iter_var: @c1:0 iter_range: { - CREATE_LIST [16] { + CREATE_LIST [11] { elements: { - CONSTANT [17] { value: "foo" } - CONSTANT [18] { value: "bar" } + CONSTANT [12] { value: "foo" } + CONSTANT [13] { value: "bar" } } } } accu_var: @x1:0 accu_init: { - CREATE_LIST [19] { + CREATE_LIST [14] { elements: { } } } loop_condition: { - CONSTANT [20] { value: true } + CONSTANT [15] { value: true } } loop_step: { - CALL [21] { + CALL [16] { function: _+_ args: { - IDENT [22] { + IDENT [17] { name: @x1:0 } - CREATE_LIST [23] { + CREATE_LIST [18] { elements: { - CREATE_LIST [24] { + CREATE_LIST [19] { elements: { - IDENT [25] { + IDENT [20] { name: @index0 } - IDENT [26] { + IDENT [21] { name: @index0 } } @@ -2405,37 +2175,48 @@ CALL [1] { } } result: { - IDENT [27] { + IDENT [22] { name: @x1:0 } } } } - } - COMPREHENSION [28] { - iter_var: @c0:0 - iter_range: { - IDENT [29] { - name: @index3 - } - } accu_var: @x0:0 accu_init: { - CREATE_LIST [30] { + CREATE_LIST [23] { elements: { } } } loop_condition: { - CONSTANT [31] { value: true } + CONSTANT [24] { value: true } } loop_step: { - IDENT [32] { - name: @index2 + CALL [25] { + function: _+_ + args: { + IDENT [26] { + name: @x0:0 + } + CREATE_LIST [27] { + elements: { + CREATE_LIST [28] { + elements: { + IDENT [29] { + name: @index1 + } + IDENT [30] { + name: @index1 + } + } + } + } + } + } } } result: { - IDENT [33] { + IDENT [31] { name: @x0:0 } } @@ -2460,27 +2241,24 @@ CALL [1] { } } } - CALL [7] { - function: _[_] - args: { - IDENT [8] { - name: @index0 - } - CONSTANT [9] { value: "a" } - } - } } } - CALL [10] { + CALL [7] { function: _&&_ args: { - SELECT [11] { - IDENT [12] { + SELECT [8] { + IDENT [9] { name: @index0 }.a~presence_test } - IDENT [13] { - name: @index1 + CALL [10] { + function: _[_] + args: { + IDENT [11] { + name: @index0 + } + CONSTANT [12] { value: "a" } + } } } } @@ -2499,33 +2277,30 @@ CALL [1] { name: msg }.oneof_type } - CALL [5] { + } + } + CALL [5] { + function: _==_ + args: { + CALL [6] { function: _?_:_ args: { - SELECT [6] { - IDENT [7] { + SELECT [7] { + IDENT [8] { name: @index0 }.payload~presence_test } - SELECT [8] { - SELECT [9] { - IDENT [10] { + SELECT [9] { + SELECT [10] { + IDENT [11] { name: @index0 }.payload }.single_int64 } - CONSTANT [11] { value: 0 } + CONSTANT [12] { value: 0 } } } - } - } - CALL [12] { - function: _==_ - args: { - IDENT [13] { - name: @index1 - } - CONSTANT [14] { value: 10 } + CONSTANT [13] { value: 10 } } } } @@ -2539,51 +2314,44 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg + }.oneof_type + }.payload }.single_int64 } - CALL [9] { + } + } + CALL [7] { + function: _==_ + args: { + CALL [8] { function: _?_:_ args: { - SELECT [10] { - IDENT [11] { - name: @index0 + SELECT [9] { + SELECT [10] { + IDENT [11] { + name: msg + }.oneof_type }.payload~presence_test } IDENT [12] { - name: @index2 + name: @index0 } CALL [13] { function: _*_ args: { IDENT [14] { - name: @index2 + name: @index0 } CONSTANT [15] { value: 0 } } } } } - } - } - CALL [16] { - function: _==_ - args: { - IDENT [17] { - name: @index3 - } - CONSTANT [18] { value: 10 } + CONSTANT [16] { value: 10 } } } } @@ -2597,51 +2365,46 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg + }.oneof_type + }.payload }.single_int64 } - CALL [9] { + } + } + CALL [7] { + function: _==_ + args: { + CALL [8] { function: _?_:_ args: { - SELECT [10] { - IDENT [11] { - name: @index1 + SELECT [9] { + SELECT [10] { + SELECT [11] { + IDENT [12] { + name: msg + }.oneof_type + }.payload }.single_int64~presence_test } - IDENT [12] { - name: @index2 + IDENT [13] { + name: @index0 } - CALL [13] { + CALL [14] { function: _*_ args: { - IDENT [14] { - name: @index2 + IDENT [15] { + name: @index0 } - CONSTANT [15] { value: 0 } + CONSTANT [16] { value: 0 } } } } } - } - } - CALL [16] { - function: _==_ - args: { - IDENT [17] { - name: @index3 - } - CONSTANT [18] { value: 10 } + CONSTANT [17] { value: 10 } } } } @@ -2655,88 +2418,85 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg + }.oneof_type + }.payload + }.map_string_string } SELECT [7] { - IDENT [8] { - name: @index1 - }.map_string_string + SELECT [8] { + IDENT [9] { + name: msg + }.oneof_type + }.payload } - CALL [9] { - function: _?_:_ + } + } + CALL [10] { + function: _?_:_ + args: { + CALL [11] { + function: _&&_ args: { - CALL [10] { + CALL [12] { function: _&&_ args: { - SELECT [11] { - IDENT [12] { - name: @index1 - }.map_string_string~presence_test - } SELECT [13] { IDENT [14] { - name: @index2 - }.key~presence_test + name: msg + }.oneof_type~presence_test } - } - } - CALL [15] { - function: _==_ - args: { - SELECT [16] { - IDENT [17] { - name: @index2 - }.key + SELECT [15] { + SELECT [16] { + IDENT [17] { + name: msg + }.oneof_type + }.payload~presence_test } - CONSTANT [18] { value: "A" } } } - CONSTANT [19] { value: false } + SELECT [18] { + IDENT [19] { + name: @index1 + }.single_int64~presence_test + } } } CALL [20] { - function: _&&_ + function: _?_:_ args: { CALL [21] { function: _&&_ args: { SELECT [22] { IDENT [23] { - name: msg - }.oneof_type~presence_test + name: @index1 + }.map_string_string~presence_test } SELECT [24] { IDENT [25] { name: @index0 - }.payload~presence_test + }.key~presence_test } } } - SELECT [26] { - IDENT [27] { - name: @index1 - }.single_int64~presence_test + CALL [26] { + function: _==_ + args: { + SELECT [27] { + IDENT [28] { + name: @index0 + }.key + } + CONSTANT [29] { value: "A" } + } } + CONSTANT [30] { value: false } } } - } - } - CALL [28] { - function: _?_:_ - args: { - IDENT [29] { - name: @index4 - } - IDENT [30] { - name: @index3 - } CONSTANT [31] { value: false } } } @@ -2750,44 +2510,49 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CALL [3] { - function: optional.none - args: { - } - } - CREATE_LIST [4] { + CREATE_LIST [3] { elements: { - IDENT [5] { - name: @index0 + CALL [4] { + function: optional.none + args: { + } } - IDENT [6] { + IDENT [5] { name: opt_x } } optional_indices: [0, 1] } - CREATE_LIST [7] { + CREATE_LIST [6] { elements: { - CONSTANT [8] { value: 5 } + CONSTANT [7] { value: 5 } } } + } + } + CALL [8] { + function: _==_ + args: { CREATE_LIST [9] { elements: { CONSTANT [10] { value: 10 } - IDENT [11] { - name: @index2 + CALL [11] { + function: optional.none + args: { + } } IDENT [12] { - name: @index2 + name: @index0 + } + IDENT [13] { + name: @index0 } } + optional_indices: [0] } - CREATE_LIST [13] { + CREATE_LIST [14] { elements: { - CONSTANT [14] { value: 10 } - IDENT [15] { - name: @index0 - } + CONSTANT [15] { value: 10 } IDENT [16] { name: @index1 } @@ -2795,18 +2560,6 @@ CALL [1] { name: @index1 } } - optional_indices: [0] - } - } - } - CALL [18] { - function: _==_ - args: { - IDENT [19] { - name: @index4 - } - IDENT [20] { - name: @index3 } } } @@ -2821,53 +2574,44 @@ CALL [1] { CREATE_LIST [2] { elements: { CALL [3] { - function: optional.of - args: { - CONSTANT [4] { value: "hello" } - } - } - CREATE_MAP [5] { - MAP_ENTRY [6] { - key: { - CONSTANT [7] { value: "hello" } - } - optional_entry: true - value: { - IDENT [8] { - name: @index0 - } - } - } - } - CALL [9] { function: _[_] args: { - IDENT [10] { - name: @index1 + CREATE_MAP [4] { + MAP_ENTRY [5] { + key: { + CONSTANT [6] { value: "hello" } + } + optional_entry: true + value: { + CALL [7] { + function: optional.of + args: { + CONSTANT [8] { value: "hello" } + } + } + } + } } - CONSTANT [11] { value: "hello" } + CONSTANT [9] { value: "hello" } } } - CALL [12] { + } + } + CALL [10] { + function: _==_ + args: { + CALL [11] { function: _+_ args: { - IDENT [13] { - name: @index2 + IDENT [12] { + name: @index0 } - IDENT [14] { - name: @index2 + IDENT [13] { + name: @index0 } } } - } - } - CALL [15] { - function: _==_ - args: { - IDENT [16] { - name: @index3 - } - CONSTANT [17] { value: "hellohello" } + CONSTANT [14] { value: "hellohello" } } } } @@ -2890,69 +2634,66 @@ CALL [1] { } } } - CALL [7] { + } + } + CALL [7] { + function: _==_ + args: { + CALL [8] { function: orValue target: { - CALL [8] { + CALL [9] { function: or target: { - CALL [9] { + CALL [10] { function: _[?_] args: { - CREATE_MAP [10] { - MAP_ENTRY [11] { + CREATE_MAP [11] { + MAP_ENTRY [12] { key: { - CONSTANT [12] { value: "key" } + CONSTANT [13] { value: "key" } } optional_entry: true value: { - CALL [13] { + CALL [14] { function: optional.of args: { - CONSTANT [14] { value: "test" } + CONSTANT [15] { value: "test" } } } } } } - CONSTANT [15] { value: "bogus" } + CONSTANT [16] { value: "bogus" } } } } args: { - CALL [16] { + CALL [17] { function: _[?_] args: { - IDENT [17] { + IDENT [18] { name: @index0 } - CONSTANT [18] { value: "bogus" } + CONSTANT [19] { value: "bogus" } } } } } } args: { - CALL [19] { + CALL [20] { function: _[_] args: { - IDENT [20] { + IDENT [21] { name: @index0 } - CONSTANT [21] { value: "key" } + CONSTANT [22] { value: "key" } } } } } - } - } - CALL [22] { - function: _==_ - args: { - IDENT [23] { - name: @index1 - } - CONSTANT [24] { value: "test" } + CONSTANT [23] { value: "test" } } } } @@ -2965,139 +2706,62 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CALL [3] { - function: optional.ofNonZeroValue - args: { - CONSTANT [4] { value: 1 } - } - } - CALL [5] { - function: optional.of - args: { - CONSTANT [6] { value: 4 } - } - } - CREATE_STRUCT [7] { + CREATE_STRUCT [3] { name: TestAllTypes entries: { - ENTRY [8] { + ENTRY [4] { field_key: single_int64 optional_entry: true value: { - IDENT [9] { - name: @index0 - } - } - } - ENTRY [10] { - field_key: single_int32 - optional_entry: true - value: { - IDENT [11] { - name: @index1 + CALL [5] { + function: optional.ofNonZeroValue + args: { + CONSTANT [6] { value: 1 } + } } } } - } - } - CALL [12] { - function: _+_ - args: { - SELECT [13] { - IDENT [14] { - name: @index2 - }.single_int32 - } - SELECT [15] { - IDENT [16] { - name: @index2 - }.single_int64 - } - } - } - } - } - CALL [17] { - function: _==_ - args: { - IDENT [18] { - name: @index3 - } - CONSTANT [19] { value: 5 } - } - } - } -} -Test case: CALL -Source: ('h' + 'e' + 'l' + 'l' + 'o' + ' world').matches('h' + 'e' + 'l' + 'l' + 'o') -=====> -CALL [1] { - function: cel.@block - args: { - CREATE_LIST [2] { - elements: { - CALL [3] { - function: _+_ - args: { - CONSTANT [4] { value: "h" } - CONSTANT [5] { value: "e" } - } - } - CALL [6] { - function: _+_ - args: { - IDENT [7] { - name: @index0 - } - CONSTANT [8] { value: "l" } - } - } - CALL [9] { - function: _+_ - args: { - IDENT [10] { - name: @index1 + ENTRY [7] { + field_key: single_int32 + optional_entry: true + value: { + CALL [8] { + function: optional.of + args: { + CONSTANT [9] { value: 4 } + } + } + } } - CONSTANT [11] { value: "l" } } } - CALL [12] { + } + } + CALL [10] { + function: _==_ + args: { + CALL [11] { function: _+_ args: { - IDENT [13] { - name: @index2 + SELECT [12] { + IDENT [13] { + name: @index0 + }.single_int32 } - CONSTANT [14] { value: "o" } - } - } - CALL [15] { - function: _+_ - args: { - IDENT [16] { - name: @index3 + SELECT [14] { + IDENT [15] { + name: @index0 + }.single_int64 } - CONSTANT [17] { value: " world" } } } - } - } - CALL [18] { - function: matches - target: { - IDENT [19] { - name: @index4 - } - } - args: { - IDENT [20] { - name: @index3 - } + CONSTANT [16] { value: 5 } } } } } -Test case: CALL_ARGUMENT_NESTED_NO_COMMON_SUBEXPR -Source: 'hello world'.matches('h' + 'e' + 'l' + 'l' + 'o') +Test case: CALL +Source: ('h' + 'e' + 'l' + 'l' + 'o' + ' world').matches('h' + 'e' + 'l' + 'l' + 'o') =====> CALL [1] { function: cel.@block @@ -3134,147 +2798,164 @@ CALL [1] { CALL [12] { function: matches target: { - CONSTANT [13] { value: "hello world" } + CALL [13] { + function: _+_ + args: { + IDENT [14] { + name: @index0 + } + CONSTANT [15] { value: " world" } + } + } } args: { - IDENT [14] { + IDENT [16] { name: @index0 } } } } } -Test case: CALL_TARGET_NESTED_NO_COMMON_SUBEXPR -Source: ('h' + 'e' + 'l' + 'l' + 'o' + ' world').matches('hello') +Test case: CALL_ARGUMENT_NESTED_NO_COMMON_SUBEXPR +Source: 'hello world'.matches('h' + 'e' + 'l' + 'l' + 'o') =====> -CALL [1] { - function: cel.@block +CALL [2] { + function: matches + target: { + CONSTANT [1] { value: "hello world" } + } args: { - CREATE_LIST [2] { - elements: { - CALL [3] { + CALL [10] { + function: _+_ + args: { + CALL [8] { function: _+_ args: { - CALL [4] { + CALL [6] { function: _+_ args: { - CALL [5] { + CALL [4] { function: _+_ args: { - CALL [6] { - function: _+_ - args: { - CALL [7] { - function: _+_ - args: { - CONSTANT [8] { value: "h" } - CONSTANT [9] { value: "e" } - } - } - CONSTANT [10] { value: "l" } - } - } - CONSTANT [11] { value: "l" } + CONSTANT [3] { value: "h" } + CONSTANT [5] { value: "e" } } } - CONSTANT [12] { value: "o" } + CONSTANT [7] { value: "l" } } } - CONSTANT [13] { value: " world" } + CONSTANT [9] { value: "l" } } } - } - } - CALL [14] { - function: matches - target: { - IDENT [15] { - name: @index0 - } - } - args: { - CONSTANT [16] { value: "hello" } + CONSTANT [11] { value: "o" } } } } } -Test case: CALL_BOTH_ARGUMENT_TARGET_NESTED_NO_COMMON_SUBEXPR -Source: ('h' + 'e' + 'l' + 'l' + 'o' + ' world').matches('w' + 'o' + 'r' + 'l' + 'd') +Test case: CALL_TARGET_NESTED_NO_COMMON_SUBEXPR +Source: ('h' + 'e' + 'l' + 'l' + 'o' + ' world').matches('hello') =====> -CALL [1] { - function: cel.@block - args: { - CREATE_LIST [2] { - elements: { - CALL [3] { +CALL [12] { + function: matches + target: { + CALL [10] { + function: _+_ + args: { + CALL [8] { function: _+_ args: { - CALL [4] { + CALL [6] { function: _+_ args: { - CALL [5] { + CALL [4] { function: _+_ args: { - CALL [6] { + CALL [2] { function: _+_ args: { - CONSTANT [7] { value: "w" } - CONSTANT [8] { value: "o" } + CONSTANT [1] { value: "h" } + CONSTANT [3] { value: "e" } } } - CONSTANT [9] { value: "r" } + CONSTANT [5] { value: "l" } } } - CONSTANT [10] { value: "l" } + CONSTANT [7] { value: "l" } } } - CONSTANT [11] { value: "d" } + CONSTANT [9] { value: "o" } } } - CALL [12] { + CONSTANT [11] { value: " world" } + } + } + } + args: { + CONSTANT [13] { value: "hello" } + } +} +Test case: CALL_BOTH_ARGUMENT_TARGET_NESTED_NO_COMMON_SUBEXPR +Source: ('h' + 'e' + 'l' + 'l' + 'o' + ' world').matches('w' + 'o' + 'r' + 'l' + 'd') +=====> +CALL [12] { + function: matches + target: { + CALL [10] { + function: _+_ + args: { + CALL [8] { function: _+_ args: { - CALL [13] { + CALL [6] { function: _+_ args: { - CALL [14] { + CALL [4] { function: _+_ args: { - CALL [15] { + CALL [2] { function: _+_ args: { - CALL [16] { - function: _+_ - args: { - CONSTANT [17] { value: "h" } - CONSTANT [18] { value: "e" } - } - } - CONSTANT [19] { value: "l" } + CONSTANT [1] { value: "h" } + CONSTANT [3] { value: "e" } } } - CONSTANT [20] { value: "l" } + CONSTANT [5] { value: "l" } } } - CONSTANT [21] { value: "o" } + CONSTANT [7] { value: "l" } } } - CONSTANT [22] { value: " world" } + CONSTANT [9] { value: "o" } } } + CONSTANT [11] { value: " world" } } } - CALL [23] { - function: matches - target: { - IDENT [24] { - name: @index1 - } - } + } + args: { + CALL [20] { + function: _+_ args: { - IDENT [25] { - name: @index0 + CALL [18] { + function: _+_ + args: { + CALL [16] { + function: _+_ + args: { + CALL [14] { + function: _+_ + args: { + CONSTANT [13] { value: "w" } + CONSTANT [15] { value: "o" } + } + } + CONSTANT [17] { value: "r" } + } + } + CONSTANT [19] { value: "l" } + } } + CONSTANT [21] { value: "d" } } } } @@ -3288,74 +2969,66 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 - }.single_int64 - } - SELECT [9] { - IDENT [10] { - name: msg + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg + }.oneof_type + }.payload }.single_int64 } - SELECT [11] { - IDENT [12] { - name: @index1 - }.single_int32 - } } } - CALL [13] { + CALL [7] { function: _+_ args: { - CALL [14] { + CALL [8] { function: _+_ args: { - CALL [15] { + CALL [9] { function: _+_ args: { - CALL [16] { + CALL [10] { function: non_pure_custom_func args: { - IDENT [17] { - name: @index2 + IDENT [11] { + name: @index0 } } } - CALL [18] { + CALL [12] { function: non_pure_custom_func args: { - IDENT [19] { - name: @index4 + SELECT [13] { + SELECT [14] { + SELECT [15] { + IDENT [16] { + name: msg + }.oneof_type + }.payload + }.single_int32 } } } } } - CALL [20] { + CALL [17] { function: non_pure_custom_func args: { - IDENT [21] { - name: @index2 + IDENT [18] { + name: @index0 } } } } } - CALL [22] { + CALL [19] { function: non_pure_custom_func args: { - IDENT [23] { - name: @index3 + SELECT [20] { + IDENT [21] { + name: msg + }.single_int64 } } } @@ -3371,75 +3044,64 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 - }.single_int64 - } - CALL [9] { - function: pure_custom_func - args: { - IDENT [10] { - name: @index2 - } - } - } - CALL [11] { + CALL [3] { function: pure_custom_func args: { - SELECT [12] { - IDENT [13] { - name: msg + SELECT [4] { + SELECT [5] { + SELECT [6] { + IDENT [7] { + name: msg + }.oneof_type + }.payload }.single_int64 } } } - CALL [14] { + } + } + CALL [8] { + function: _+_ + args: { + CALL [9] { function: _+_ args: { - CALL [15] { + CALL [10] { function: _+_ args: { - IDENT [16] { - name: @index3 + IDENT [11] { + name: @index0 } - CALL [17] { + CALL [12] { function: pure_custom_func args: { - SELECT [18] { - IDENT [19] { - name: @index1 + SELECT [13] { + SELECT [14] { + SELECT [15] { + IDENT [16] { + name: msg + }.oneof_type + }.payload }.single_int32 } } } } } - IDENT [20] { - name: @index3 + IDENT [17] { + name: @index0 } } } - } - } - CALL [21] { - function: _+_ - args: { - IDENT [22] { - name: @index5 - } - IDENT [23] { - name: @index4 + CALL [18] { + function: pure_custom_func + args: { + SELECT [19] { + IDENT [20] { + name: msg + }.single_int64 + } + } } } } diff --git a/optimizer/src/test/resources/subexpression_ast_block_recursion_depth_9.baseline b/optimizer/src/test/resources/subexpression_ast_block_recursion_depth_9.baseline index fc16cdf85..b20801a0f 100644 --- a/optimizer/src/test/resources/subexpression_ast_block_recursion_depth_9.baseline +++ b/optimizer/src/test/resources/subexpression_ast_block_recursion_depth_9.baseline @@ -6,20 +6,22 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 1 } - CONSTANT [5] { value: 2 } - } - } - CALL [6] { + CALL [3] { function: size args: { - IDENT [7] { - name: @index0 + CREATE_LIST [4] { + elements: { + CONSTANT [5] { value: 1 } + CONSTANT [6] { value: 2 } + } } } } + } + } + CALL [7] { + function: _==_ + args: { CALL [8] { function: _+_ args: { @@ -27,25 +29,17 @@ CALL [1] { function: _+_ args: { IDENT [10] { - name: @index1 + name: @index0 } IDENT [11] { - name: @index1 + name: @index0 } } } CONSTANT [12] { value: 1 } } } - } - } - CALL [13] { - function: _==_ - args: { - IDENT [14] { - name: @index2 - } - CONSTANT [15] { value: 5 } + CONSTANT [13] { value: 5 } } } } @@ -58,20 +52,22 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 1 } - CONSTANT [5] { value: 2 } - } - } - CALL [6] { + CALL [3] { function: size args: { - IDENT [7] { - name: @index0 + CREATE_LIST [4] { + elements: { + CONSTANT [5] { value: 1 } + CONSTANT [6] { value: 2 } + } } } } + } + } + CALL [7] { + function: _==_ + args: { CALL [8] { function: _+_ args: { @@ -83,27 +79,19 @@ CALL [1] { args: { CONSTANT [11] { value: 2 } IDENT [12] { - name: @index1 + name: @index0 } } } IDENT [13] { - name: @index1 + name: @index0 } } } CONSTANT [14] { value: 1 } } } - } - } - CALL [15] { - function: _==_ - args: { - IDENT [16] { - name: @index2 - } - CONSTANT [17] { value: 7 } + CONSTANT [15] { value: 7 } } } } @@ -116,69 +104,60 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 0 } - } - } - CALL [5] { + CALL [3] { function: size args: { - IDENT [6] { - name: @index0 + CREATE_LIST [4] { + elements: { + CONSTANT [5] { value: 0 } + } } } } - CREATE_LIST [7] { - elements: { - CONSTANT [8] { value: 1 } - CONSTANT [9] { value: 2 } - } - } - CALL [10] { + CALL [6] { function: size args: { - IDENT [11] { - name: @index2 + CREATE_LIST [7] { + elements: { + CONSTANT [8] { value: 1 } + CONSTANT [9] { value: 2 } + } } } } - CALL [12] { + } + } + CALL [10] { + function: _==_ + args: { + CALL [11] { function: _+_ args: { - CALL [13] { + CALL [12] { function: _+_ args: { - CALL [14] { + CALL [13] { function: _+_ args: { - IDENT [15] { - name: @index1 + IDENT [14] { + name: @index0 } - IDENT [16] { - name: @index1 + IDENT [15] { + name: @index0 } } } - IDENT [17] { - name: @index3 + IDENT [16] { + name: @index1 } } } - IDENT [18] { - name: @index3 + IDENT [17] { + name: @index1 } } } - } - } - CALL [19] { - function: _==_ - args: { - IDENT [20] { - name: @index4 - } - CONSTANT [21] { value: 6 } + CONSTANT [18] { value: 6 } } } } @@ -191,106 +170,94 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 0 } - } - } - CALL [5] { + CALL [3] { function: size args: { - IDENT [6] { - name: @index0 + CREATE_LIST [4] { + elements: { + CONSTANT [5] { value: 0 } + } } } } - CREATE_LIST [7] { - elements: { - CONSTANT [8] { value: 1 } - CONSTANT [9] { value: 2 } - } - } - CALL [10] { + CALL [6] { function: size args: { - IDENT [11] { - name: @index2 + CREATE_LIST [7] { + elements: { + CONSTANT [8] { value: 1 } + CONSTANT [9] { value: 2 } + } } } } - CREATE_LIST [12] { - elements: { - CONSTANT [13] { value: 1 } - CONSTANT [14] { value: 2 } - CONSTANT [15] { value: 3 } - } - } - CALL [16] { + CALL [10] { function: size args: { - IDENT [17] { - name: @index4 + CREATE_LIST [11] { + elements: { + CONSTANT [12] { value: 1 } + CONSTANT [13] { value: 2 } + CONSTANT [14] { value: 3 } + } } } } - CALL [18] { + } + } + CALL [15] { + function: _==_ + args: { + CALL [16] { function: _+_ args: { - CALL [19] { + CALL [17] { function: _+_ args: { - CALL [20] { + CALL [18] { function: _+_ args: { - CALL [21] { + CALL [19] { function: _+_ args: { - CALL [22] { + CALL [20] { function: _+_ args: { - CALL [23] { + CALL [21] { function: _+_ args: { - CONSTANT [24] { value: 5 } - IDENT [25] { - name: @index1 + CONSTANT [22] { value: 5 } + IDENT [23] { + name: @index0 } } } - IDENT [26] { - name: @index1 + IDENT [24] { + name: @index0 } } } - IDENT [27] { - name: @index3 + IDENT [25] { + name: @index1 } } } - IDENT [28] { - name: @index3 + IDENT [26] { + name: @index1 } } } - IDENT [29] { - name: @index5 + IDENT [27] { + name: @index2 } } } - IDENT [30] { - name: @index5 + IDENT [28] { + name: @index2 } } } - } - } - CALL [31] { - function: _==_ - args: { - IDENT [32] { - name: @index6 - } - CONSTANT [33] { value: 17 } + CONSTANT [29] { value: 17 } } } } @@ -304,145 +271,115 @@ CALL [1] { CREATE_LIST [2] { elements: { CALL [3] { - function: timestamp - args: { - CONSTANT [4] { value: 1000000000 } - } - } - CALL [5] { - function: int - args: { - IDENT [6] { - name: @index0 + function: getFullYear + target: { + CALL [4] { + function: timestamp + args: { + CALL [5] { + function: int + args: { + CALL [6] { + function: timestamp + args: { + CONSTANT [7] { value: 1000000000 } + } + } + } + } + } } } - } - CALL [7] { - function: timestamp args: { - IDENT [8] { - name: @index1 - } } } - CALL [9] { + CALL [8] { function: getFullYear target: { - IDENT [10] { - name: @index2 + CALL [9] { + function: timestamp + args: { + CALL [10] { + function: int + args: { + CALL [11] { + function: timestamp + args: { + CONSTANT [12] { value: 200 } + } + } + } + } + } } } args: { } } - CALL [11] { - function: timestamp - args: { - CONSTANT [12] { value: 50 } - } - } CALL [13] { - function: int - args: { - IDENT [14] { - name: @index4 - } - } - } - CALL [15] { function: timestamp args: { - IDENT [16] { - name: @index5 + CALL [14] { + function: int + args: { + CALL [15] { + function: timestamp + args: { + CONSTANT [16] { value: 50 } + } + } + } } } } CALL [17] { function: timestamp args: { - CONSTANT [18] { value: 200 } - } - } - CALL [19] { - function: int - args: { - IDENT [20] { - name: @index7 + CALL [18] { + function: int + args: { + CALL [19] { + function: timestamp + args: { + CONSTANT [20] { value: 75 } + } + } + } } } } CALL [21] { - function: timestamp - args: { - IDENT [22] { - name: @index8 - } - } - } - CALL [23] { - function: getFullYear - target: { - IDENT [24] { - name: @index9 - } - } - args: { - } - } - CALL [25] { - function: timestamp - args: { - CONSTANT [26] { value: 75 } - } - } - CALL [27] { - function: int - args: { - IDENT [28] { - name: @index11 - } - } - } - CALL [29] { - function: timestamp - args: { - IDENT [30] { - name: @index12 - } - } - } - CALL [31] { function: _+_ args: { - CALL [32] { + CALL [22] { function: _+_ args: { - CALL [33] { + CALL [23] { function: _+_ args: { - CALL [34] { + CALL [24] { function: _+_ args: { - CALL [35] { + CALL [25] { function: _+_ args: { - CALL [36] { + CALL [26] { function: _+_ args: { - CALL [37] { + CALL [27] { function: _+_ args: { - CALL [38] { + CALL [28] { function: _+_ args: { - IDENT [39] { - name: @index3 + IDENT [29] { + name: @index0 } - CALL [40] { + CALL [30] { function: getFullYear target: { - IDENT [41] { - name: @index13 + IDENT [31] { + name: @index3 } } args: { @@ -450,11 +387,11 @@ CALL [1] { } } } - CALL [42] { + CALL [32] { function: getFullYear target: { - IDENT [43] { - name: @index6 + IDENT [33] { + name: @index2 } } args: { @@ -462,16 +399,16 @@ CALL [1] { } } } - IDENT [44] { - name: @index3 + IDENT [34] { + name: @index0 } } } - CALL [45] { + CALL [35] { function: getSeconds target: { - IDENT [46] { - name: @index6 + IDENT [36] { + name: @index2 } } args: { @@ -479,21 +416,21 @@ CALL [1] { } } } - IDENT [47] { - name: @index10 + IDENT [37] { + name: @index1 } } } - IDENT [48] { - name: @index10 + IDENT [38] { + name: @index1 } } } - CALL [49] { + CALL [39] { function: getMinutes target: { - IDENT [50] { - name: @index13 + IDENT [40] { + name: @index3 } } args: { @@ -501,20 +438,20 @@ CALL [1] { } } } - IDENT [51] { - name: @index3 + IDENT [41] { + name: @index0 } } } } } - CALL [52] { + CALL [42] { function: _==_ args: { - IDENT [53] { - name: @index14 + IDENT [43] { + name: @index4 } - CONSTANT [54] { value: 13934 } + CONSTANT [44] { value: 13934 } } } } @@ -527,53 +464,47 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_MAP [3] { - MAP_ENTRY [4] { - key: { - CONSTANT [5] { value: "a" } - } - value: { - CONSTANT [6] { value: 2 } - } - } - } - CALL [7] { + CALL [3] { function: _[_] args: { - IDENT [8] { - name: @index0 + CREATE_MAP [4] { + MAP_ENTRY [5] { + key: { + CONSTANT [6] { value: "a" } + } + value: { + CONSTANT [7] { value: 2 } + } + } } - CONSTANT [9] { value: "a" } + CONSTANT [8] { value: "a" } } } + } + } + CALL [9] { + function: _==_ + args: { CALL [10] { function: _+_ args: { IDENT [11] { - name: @index1 + name: @index0 } CALL [12] { function: _*_ args: { IDENT [13] { - name: @index1 + name: @index0 } IDENT [14] { - name: @index1 + name: @index0 } } } } } - } - } - CALL [15] { - function: _==_ - args: { - IDENT [16] { - name: @index2 - } - CONSTANT [17] { value: 6 } + CONSTANT [15] { value: 6 } } } } @@ -589,51 +520,48 @@ CALL [1] { CREATE_MAP [3] { MAP_ENTRY [4] { key: { - CONSTANT [5] { value: "b" } + CONSTANT [5] { value: "e" } } value: { - CONSTANT [6] { value: 1 } + CREATE_MAP [6] { + MAP_ENTRY [7] { + key: { + CONSTANT [8] { value: "b" } + } + value: { + CONSTANT [9] { value: 1 } + } + } + } } } } - CREATE_MAP [7] { - MAP_ENTRY [8] { + CREATE_MAP [10] { + MAP_ENTRY [11] { key: { - CONSTANT [9] { value: "e" } + CONSTANT [12] { value: "b" } } value: { - IDENT [10] { - name: @index0 - } + CONSTANT [13] { value: 1 } } } } } } - CREATE_MAP [11] { - MAP_ENTRY [12] { - key: { - CONSTANT [13] { value: "a" } - } - value: { - IDENT [14] { - name: @index0 - } - } - } + CREATE_MAP [14] { MAP_ENTRY [15] { key: { - CONSTANT [16] { value: "c" } + CONSTANT [16] { value: "a" } } value: { IDENT [17] { - name: @index0 + name: @index1 } } } MAP_ENTRY [18] { key: { - CONSTANT [19] { value: "d" } + CONSTANT [19] { value: "c" } } value: { IDENT [20] { @@ -643,11 +571,21 @@ CALL [1] { } MAP_ENTRY [21] { key: { - CONSTANT [22] { value: "e" } + CONSTANT [22] { value: "d" } } value: { IDENT [23] { - name: @index1 + name: @index0 + } + } + } + MAP_ENTRY [24] { + key: { + CONSTANT [25] { value: "e" } + } + value: { + IDENT [26] { + name: @index0 } } } @@ -676,37 +614,34 @@ CALL [1] { CONSTANT [10] { value: 2 } } } - CREATE_LIST [11] { - elements: { - IDENT [12] { - name: @index1 - } - IDENT [13] { - name: @index0 - } - } - } } } - CREATE_LIST [14] { + CREATE_LIST [11] { elements: { - CONSTANT [15] { value: 1 } - IDENT [16] { + CONSTANT [12] { value: 1 } + IDENT [13] { name: @index0 } - CONSTANT [17] { value: 2 } - IDENT [18] { + CONSTANT [14] { value: 2 } + IDENT [15] { name: @index0 } - CONSTANT [19] { value: 5 } - IDENT [20] { + CONSTANT [16] { value: 5 } + IDENT [17] { name: @index0 } - CONSTANT [21] { value: 7 } - IDENT [22] { - name: @index2 + CONSTANT [18] { value: 7 } + CREATE_LIST [19] { + elements: { + IDENT [20] { + name: @index1 + } + IDENT [21] { + name: @index0 + } + } } - IDENT [23] { + IDENT [22] { name: @index1 } } @@ -726,26 +661,23 @@ CALL [1] { name: msg }.single_int64 } - CALL [5] { + } + } + CALL [5] { + function: _==_ + args: { + CALL [6] { function: _+_ args: { - IDENT [6] { + IDENT [7] { name: @index0 } - IDENT [7] { + IDENT [8] { name: @index0 } } } - } - } - CALL [8] { - function: _==_ - args: { - IDENT [9] { - name: @index1 - } - CONSTANT [10] { value: 6 } + CONSTANT [9] { value: 6 } } } } @@ -759,58 +691,64 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg + }.oneof_type + }.payload + }.single_int64 } SELECT [7] { - IDENT [8] { - name: @index1 - }.single_int64 + SELECT [8] { + IDENT [9] { + name: msg + }.oneof_type + }.payload } - CALL [9] { + } + } + CALL [10] { + function: _==_ + args: { + CALL [11] { function: _+_ args: { - CALL [10] { + CALL [12] { function: _+_ args: { - CALL [11] { + CALL [13] { function: _+_ args: { - CALL [12] { + CALL [14] { function: _+_ args: { - IDENT [13] { - name: @index2 + IDENT [15] { + name: @index0 } - SELECT [14] { - IDENT [15] { + SELECT [16] { + IDENT [17] { name: @index1 }.single_int32 } } } - IDENT [16] { - name: @index2 + IDENT [18] { + name: @index0 } } } - SELECT [17] { - IDENT [18] { + SELECT [19] { + IDENT [20] { name: msg }.single_int64 } } } - SELECT [19] { - SELECT [20] { - SELECT [21] { - IDENT [22] { + SELECT [21] { + SELECT [22] { + SELECT [23] { + IDENT [24] { name: @index1 }.oneof_type }.payload @@ -818,14 +756,6 @@ CALL [1] { } } } - } - } - CALL [23] { - function: _==_ - args: { - IDENT [24] { - name: @index3 - } CONSTANT [25] { value: 31 } } } @@ -840,51 +770,33 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 - }.oneof_type - } - SELECT [9] { - IDENT [10] { - name: @index2 - }.payload - } - SELECT [11] { - IDENT [12] { - name: @index3 - }.oneof_type - } - SELECT [13] { - SELECT [14] { - SELECT [15] { - SELECT [16] { - IDENT [17] { - name: @index4 - }.child - }.child + SELECT [4] { + SELECT [5] { + SELECT [6] { + SELECT [7] { + IDENT [8] { + name: msg + }.oneof_type + }.payload + }.oneof_type }.payload - }.single_bool + }.oneof_type } - CALL [18] { + } + } + CALL [9] { + function: _||_ + args: { + CALL [10] { function: _||_ args: { - CONSTANT [19] { value: true } - SELECT [20] { - SELECT [21] { - SELECT [22] { - SELECT [23] { - IDENT [24] { - name: @index4 + CONSTANT [11] { value: true } + SELECT [12] { + SELECT [13] { + SELECT [14] { + SELECT [15] { + IDENT [16] { + name: @index0 }.payload }.oneof_type }.payload @@ -892,16 +804,16 @@ CALL [1] { } } } - } - } - CALL [25] { - function: _||_ - args: { - IDENT [26] { - name: @index6 - } - IDENT [27] { - name: @index5 + SELECT [17] { + SELECT [18] { + SELECT [19] { + SELECT [20] { + IDENT [21] { + name: @index0 + }.child + }.child + }.payload + }.single_bool } } } @@ -915,58 +827,46 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 - }.map_int32_int64 - } - CALL [9] { + CALL [3] { function: _[_] args: { - IDENT [10] { - name: @index2 + SELECT [4] { + SELECT [5] { + SELECT [6] { + IDENT [7] { + name: msg + }.oneof_type + }.payload + }.map_int32_int64 } - CONSTANT [11] { value: 1 } + CONSTANT [8] { value: 1 } } } - CALL [12] { + } + } + CALL [9] { + function: _==_ + args: { + CALL [10] { function: _+_ args: { - CALL [13] { + CALL [11] { function: _+_ args: { - IDENT [14] { - name: @index3 + IDENT [12] { + name: @index0 } - IDENT [15] { - name: @index3 + IDENT [13] { + name: @index0 } } } - IDENT [16] { - name: @index3 + IDENT [14] { + name: @index0 } } } - } - } - CALL [17] { - function: _==_ - args: { - IDENT [18] { - name: @index4 - } - CONSTANT [19] { value: 15 } + CONSTANT [15] { value: 15 } } } } @@ -980,66 +880,57 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg + }.oneof_type + }.payload }.map_int32_int64 } - CALL [9] { + } + } + CALL [7] { + function: _==_ + args: { + CALL [8] { function: _+_ args: { - CALL [10] { + CALL [9] { function: _+_ args: { - CALL [11] { + CALL [10] { function: _[_] args: { - IDENT [12] { - name: @index2 + IDENT [11] { + name: @index0 } - CONSTANT [13] { value: 0 } + CONSTANT [12] { value: 0 } } } - CALL [14] { + CALL [13] { function: _[_] args: { - IDENT [15] { - name: @index2 + IDENT [14] { + name: @index0 } - CONSTANT [16] { value: 1 } + CONSTANT [15] { value: 1 } } } } } - CALL [17] { + CALL [16] { function: _[_] args: { - IDENT [18] { - name: @index2 + IDENT [17] { + name: @index0 } - CONSTANT [19] { value: 2 } + CONSTANT [18] { value: 2 } } } } } - } - } - CALL [20] { - function: _==_ - args: { - IDENT [21] { - name: @index3 - } - CONSTANT [22] { value: 8 } + CONSTANT [19] { value: 8 } } } } @@ -1047,38 +938,26 @@ CALL [1] { Test case: SELECT_NESTED_NO_COMMON_SUBEXPR Source: msg.oneof_type.payload.oneof_type.payload.oneof_type.payload.oneof_type.payload.single_int64 =====> -CALL [1] { - function: cel.@block - args: { - CREATE_LIST [2] { - elements: { - SELECT [3] { - SELECT [4] { - SELECT [5] { - SELECT [6] { - SELECT [7] { - SELECT [8] { - SELECT [9] { - SELECT [10] { - IDENT [11] { - name: msg - }.oneof_type - }.payload - }.oneof_type - }.payload - }.oneof_type - }.payload - }.oneof_type - }.payload - } - } - } - SELECT [12] { - IDENT [13] { - name: @index0 - }.single_int64 - } - } +SELECT [10] { + SELECT [9] { + SELECT [8] { + SELECT [7] { + SELECT [6] { + SELECT [5] { + SELECT [4] { + SELECT [3] { + SELECT [2] { + IDENT [1] { + name: msg + }.oneof_type + }.payload + }.oneof_type + }.payload + }.oneof_type + }.payload + }.oneof_type + }.payload + }.single_int64 } Test case: TERNARY Source: (msg.single_int64 > 0 ? msg.single_int64 : 0) == 3 @@ -1093,33 +972,30 @@ CALL [1] { name: msg }.single_int64 } - CALL [5] { + } + } + CALL [5] { + function: _==_ + args: { + CALL [6] { function: _?_:_ args: { - CALL [6] { + CALL [7] { function: _>_ args: { - IDENT [7] { + IDENT [8] { name: @index0 } - CONSTANT [8] { value: 0 } + CONSTANT [9] { value: 0 } } } - IDENT [9] { + IDENT [10] { name: @index0 } - CONSTANT [10] { value: 0 } + CONSTANT [11] { value: 0 } } } - } - } - CALL [11] { - function: _==_ - args: { - IDENT [12] { - name: @index1 - } - CONSTANT [13] { value: 3 } + CONSTANT [12] { value: 3 } } } } @@ -1137,47 +1013,44 @@ CALL [1] { name: msg }.single_int64 } - CALL [5] { + } + } + CALL [5] { + function: _?_:_ + args: { + CONSTANT [6] { value: false } + CONSTANT [7] { value: false } + CALL [8] { function: _==_ args: { - CALL [6] { + CALL [9] { function: _+_ args: { - IDENT [7] { + IDENT [10] { name: @index0 } - CALL [8] { + CALL [11] { function: _*_ args: { - CALL [9] { + CALL [12] { function: _+_ args: { - IDENT [10] { + IDENT [13] { name: @index0 } - CONSTANT [11] { value: 1 } + CONSTANT [14] { value: 1 } } } - CONSTANT [12] { value: 2 } + CONSTANT [15] { value: 2 } } } } } - CONSTANT [13] { value: 11 } + CONSTANT [16] { value: 11 } } } } } - CALL [14] { - function: _?_:_ - args: { - CONSTANT [15] { value: false } - CONSTANT [16] { value: false } - IDENT [17] { - name: @index1 - } - } - } } } Test case: NESTED_TERNARY @@ -1198,56 +1071,53 @@ CALL [1] { name: msg }.single_int32 } - CALL [7] { + } + } + CALL [7] { + function: _==_ + args: { + CALL [8] { function: _?_:_ args: { - CALL [8] { + CALL [9] { function: _>_ args: { - IDENT [9] { + IDENT [10] { name: @index0 } - CONSTANT [10] { value: 0 } + CONSTANT [11] { value: 0 } } } - CALL [11] { + CALL [12] { function: _?_:_ args: { - CALL [12] { + CALL [13] { function: _>_ args: { - IDENT [13] { + IDENT [14] { name: @index1 } - CONSTANT [14] { value: 0 } + CONSTANT [15] { value: 0 } } } - CALL [15] { + CALL [16] { function: _+_ args: { - IDENT [16] { + IDENT [17] { name: @index0 } - IDENT [17] { + IDENT [18] { name: @index1 } } } - CONSTANT [18] { value: 0 } + CONSTANT [19] { value: 0 } } } - CONSTANT [19] { value: 0 } + CONSTANT [20] { value: 0 } } } - } - } - CALL [20] { - function: _==_ - args: { - IDENT [21] { - name: @index2 - } - CONSTANT [22] { value: 8 } + CONSTANT [21] { value: 8 } } } } @@ -1260,50 +1130,60 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 1 } - } - } - CALL [5] { - function: _>_ - args: { - IDENT [6] { - name: @c0:0 - } - CONSTANT [7] { value: 0 } - } - } - CALL [8] { - function: _||_ + CALL [3] { + function: size args: { - IDENT [9] { - name: @x0:0 - } - IDENT [10] { - name: @index1 - } - } - } - COMPREHENSION [11] { - iter_var: @c0:0 - iter_range: { - IDENT [12] { - name: @index0 - } - } - accu_var: @x0:0 - accu_init: { - CONSTANT [13] { value: false } - } - loop_condition: { - CALL [14] { - function: @not_strictly_false - args: { - CALL [15] { - function: !_ - args: { - IDENT [16] { + CREATE_LIST [4] { + elements: { + COMPREHENSION [5] { + iter_var: @c0:0 + iter_range: { + CREATE_LIST [6] { + elements: { + CONSTANT [7] { value: 1 } + } + } + } + accu_var: @x0:0 + accu_init: { + CONSTANT [8] { value: false } + } + loop_condition: { + CALL [9] { + function: @not_strictly_false + args: { + CALL [10] { + function: !_ + args: { + IDENT [11] { + name: @x0:0 + } + } + } + } + } + } + loop_step: { + CALL [12] { + function: _||_ + args: { + IDENT [13] { + name: @x0:0 + } + CALL [14] { + function: _>_ + args: { + IDENT [15] { + name: @c0:0 + } + CONSTANT [16] { value: 0 } + } + } + } + } + } + result: { + IDENT [17] { name: @x0:0 } } @@ -1311,76 +1191,61 @@ CALL [1] { } } } - loop_step: { - IDENT [17] { - name: @index2 - } - } - result: { - IDENT [18] { - name: @x0:0 - } - } - } - CREATE_LIST [19] { - elements: { - IDENT [20] { - name: @index3 - } - } } - CALL [21] { + CALL [18] { function: size args: { - IDENT [22] { - name: @index4 - } - } - } - CREATE_LIST [23] { - elements: { - CONSTANT [24] { value: 2 } - } - } - CALL [25] { - function: _>_ - args: { - IDENT [26] { - name: @c0:0 - } - CONSTANT [27] { value: 1 } - } - } - CALL [28] { - function: _||_ - args: { - IDENT [29] { - name: @x0:0 - } - IDENT [30] { - name: @index7 - } - } - } - COMPREHENSION [31] { - iter_var: @c0:0 - iter_range: { - IDENT [32] { - name: @index6 - } - } - accu_var: @x0:0 - accu_init: { - CONSTANT [33] { value: false } - } - loop_condition: { - CALL [34] { - function: @not_strictly_false - args: { - CALL [35] { - function: !_ - args: { - IDENT [36] { + CREATE_LIST [19] { + elements: { + COMPREHENSION [20] { + iter_var: @c0:0 + iter_range: { + CREATE_LIST [21] { + elements: { + CONSTANT [22] { value: 2 } + } + } + } + accu_var: @x0:0 + accu_init: { + CONSTANT [23] { value: false } + } + loop_condition: { + CALL [24] { + function: @not_strictly_false + args: { + CALL [25] { + function: !_ + args: { + IDENT [26] { + name: @x0:0 + } + } + } + } + } + } + loop_step: { + CALL [27] { + function: _||_ + args: { + IDENT [28] { + name: @x0:0 + } + CALL [29] { + function: _>_ + args: { + IDENT [30] { + name: @c0:0 + } + CONSTANT [31] { value: 1 } + } + } + } + } + } + result: { + IDENT [32] { name: @x0:0 } } @@ -1388,68 +1253,40 @@ CALL [1] { } } } - loop_step: { - IDENT [37] { - name: @index8 - } - } - result: { - IDENT [38] { - name: @x0:0 - } - } - } - CREATE_LIST [39] { - elements: { - IDENT [40] { - name: @index9 - } - } - } - CALL [41] { - function: size - args: { - IDENT [42] { - name: @index10 - } - } } - CALL [43] { + } + } + CALL [33] { + function: _==_ + args: { + CALL [34] { function: _+_ args: { - CALL [44] { + CALL [35] { function: _+_ args: { - CALL [45] { + CALL [36] { function: _+_ args: { - IDENT [46] { - name: @index5 + IDENT [37] { + name: @index0 } - IDENT [47] { - name: @index5 + IDENT [38] { + name: @index0 } } } - IDENT [48] { - name: @index11 + IDENT [39] { + name: @index1 } } } - IDENT [49] { - name: @index11 + IDENT [40] { + name: @index1 } } } - } - } - CALL [50] { - function: _==_ - args: { - IDENT [51] { - name: @index12 - } - CONSTANT [52] { value: 4 } + CONSTANT [41] { value: 4 } } } } @@ -1464,187 +1301,157 @@ CALL [1] { elements: { CREATE_LIST [3] { elements: { - CONSTANT [4] { value: 1 } - } - } - CALL [5] { - function: _>_ - args: { - IDENT [6] { - name: @c0:0 - } - CONSTANT [7] { value: 0 } - } - } - CALL [8] { - function: _||_ - args: { - IDENT [9] { - name: @x0:0 - } - IDENT [10] { - name: @index1 - } - } - } - COMPREHENSION [11] { - iter_var: @c0:0 - iter_range: { - IDENT [12] { - name: @index0 - } - } - accu_var: @x0:0 - accu_init: { - CONSTANT [13] { value: false } - } - loop_condition: { - CALL [14] { - function: @not_strictly_false - args: { - CALL [15] { - function: !_ + COMPREHENSION [4] { + iter_var: @c0:0 + iter_range: { + CREATE_LIST [5] { + elements: { + CONSTANT [6] { value: 1 } + } + } + } + accu_var: @x0:0 + accu_init: { + CONSTANT [7] { value: false } + } + loop_condition: { + CALL [8] { + function: @not_strictly_false args: { - IDENT [16] { + CALL [9] { + function: !_ + args: { + IDENT [10] { + name: @x0:0 + } + } + } + } + } + } + loop_step: { + CALL [11] { + function: _||_ + args: { + IDENT [12] { name: @x0:0 } + CALL [13] { + function: _>_ + args: { + IDENT [14] { + name: @c0:0 + } + CONSTANT [15] { value: 0 } + } + } } } } - } - } - loop_step: { - IDENT [17] { - name: @index2 - } - } - result: { - IDENT [18] { - name: @x0:0 - } - } - } - CREATE_LIST [19] { - elements: { - IDENT [20] { - name: @index3 + result: { + IDENT [16] { + name: @x0:0 + } + } } } } - CREATE_LIST [21] { + CREATE_LIST [17] { elements: { - CONSTANT [22] { value: "a" } - } - } - CALL [23] { - function: _==_ - args: { - IDENT [24] { - name: @c0:1 - } - CONSTANT [25] { value: "a" } - } - } - CALL [26] { - function: _||_ - args: { - IDENT [27] { - name: @x0:1 - } - IDENT [28] { - name: @index6 - } - } - } - COMPREHENSION [29] { - iter_var: @c0:1 - iter_range: { - IDENT [30] { - name: @index5 - } - } - accu_var: @x0:1 - accu_init: { - CONSTANT [31] { value: false } - } - loop_condition: { - CALL [32] { - function: @not_strictly_false - args: { - CALL [33] { - function: !_ + COMPREHENSION [18] { + iter_var: @c0:1 + iter_range: { + CREATE_LIST [19] { + elements: { + CONSTANT [20] { value: "a" } + } + } + } + accu_var: @x0:1 + accu_init: { + CONSTANT [21] { value: false } + } + loop_condition: { + CALL [22] { + function: @not_strictly_false args: { - IDENT [34] { - name: @x0:1 + CALL [23] { + function: !_ + args: { + IDENT [24] { + name: @x0:1 + } + } } } } } + loop_step: { + CALL [25] { + function: _||_ + args: { + IDENT [26] { + name: @x0:1 + } + CALL [27] { + function: _==_ + args: { + IDENT [28] { + name: @c0:1 + } + CONSTANT [29] { value: "a" } + } + } + } + } + } + result: { + IDENT [30] { + name: @x0:1 + } + } } } - loop_step: { - IDENT [35] { - name: @index7 - } - } - result: { - IDENT [36] { - name: @x0:1 - } - } - } - CREATE_LIST [37] { - elements: { - IDENT [38] { - name: @index8 - } - } - } - CREATE_LIST [39] { - elements: { - CONSTANT [40] { value: true } - CONSTANT [41] { value: true } - CONSTANT [42] { value: true } - CONSTANT [43] { value: true } - } } - CALL [44] { + } + } + CALL [31] { + function: _==_ + args: { + CALL [32] { function: _+_ args: { - CALL [45] { + CALL [33] { function: _+_ args: { - CALL [46] { + CALL [34] { function: _+_ args: { - IDENT [47] { - name: @index4 + IDENT [35] { + name: @index0 } - IDENT [48] { - name: @index4 + IDENT [36] { + name: @index0 } } } - IDENT [49] { - name: @index9 + IDENT [37] { + name: @index1 } } } - IDENT [50] { - name: @index9 + IDENT [38] { + name: @index1 } } } - } - } - CALL [51] { - function: _==_ - args: { - IDENT [52] { - name: @index11 - } - IDENT [53] { - name: @index10 + CREATE_LIST [39] { + elements: { + CONSTANT [40] { value: true } + CONSTANT [41] { value: true } + CONSTANT [42] { value: true } + CONSTANT [43] { value: true } + } } } } @@ -1672,78 +1479,70 @@ CALL [1] { CONSTANT [10] { value: 4 } } } - CREATE_LIST [11] { - elements: { - IDENT [12] { - name: @index1 - } - IDENT [13] { - name: @index1 - } - IDENT [14] { - name: @index1 - } - } - } - COMPREHENSION [15] { + } + } + CALL [11] { + function: _==_ + args: { + COMPREHENSION [12] { iter_var: @c0:0 iter_range: { - IDENT [16] { + IDENT [13] { name: @index0 } } accu_var: @x0:0 accu_init: { - CREATE_LIST [17] { + CREATE_LIST [14] { elements: { } } } loop_condition: { - CONSTANT [18] { value: true } + CONSTANT [15] { value: true } } loop_step: { - CALL [19] { + CALL [16] { function: _+_ args: { - IDENT [20] { + IDENT [17] { name: @x0:0 } - CREATE_LIST [21] { + CREATE_LIST [18] { elements: { - COMPREHENSION [22] { + COMPREHENSION [19] { iter_var: @c1:0 iter_range: { - IDENT [23] { + IDENT [20] { name: @index0 } } accu_var: @x1:0 accu_init: { - CREATE_LIST [24] { + CREATE_LIST [21] { elements: { } } } loop_condition: { - CONSTANT [25] { value: true } + CONSTANT [22] { value: true } } loop_step: { - CALL [26] { + CALL [23] { function: _+_ args: { - IDENT [27] { + IDENT [24] { name: @x1:0 } - CREATE_LIST [28] { + CREATE_LIST [25] { elements: { - CALL [29] { + CALL [26] { function: _+_ args: { - IDENT [30] { + IDENT [27] { name: @c1:0 } - CONSTANT [31] { value: 1 } + CONSTANT [28] { value: 1 } } } } @@ -1752,7 +1551,7 @@ CALL [1] { } } result: { - IDENT [32] { + IDENT [29] { name: @x1:0 } } @@ -1763,21 +1562,23 @@ CALL [1] { } } result: { - IDENT [33] { + IDENT [30] { name: @x0:0 } } } - } - } - CALL [34] { - function: _==_ - args: { - IDENT [35] { - name: @index3 - } - IDENT [36] { - name: @index2 + CREATE_LIST [31] { + elements: { + IDENT [32] { + name: @index1 + } + IDENT [33] { + name: @index1 + } + IDENT [34] { + name: @index1 + } + } } } } @@ -1786,138 +1587,123 @@ CALL [1] { Test case: NESTED_MACROS_2 Source: [1, 2].map(y, [1, 2, 3].filter(x, x == y)) == [[1], [2]] =====> -CALL [1] { - function: cel.@block +CALL [31] { + function: _==_ args: { - CREATE_LIST [2] { - elements: { - CREATE_LIST [3] { + COMPREHENSION [30] { + iter_var: @c0:0 + iter_range: { + CREATE_LIST [1] { elements: { - CREATE_LIST [4] { - elements: { - CONSTANT [5] { value: 1 } - } - } - CREATE_LIST [6] { - elements: { - CONSTANT [7] { value: 2 } - } - } + CONSTANT [2] { value: 1 } + CONSTANT [3] { value: 2 } } } - COMPREHENSION [8] { - iter_var: @c0:0 - iter_range: { - CREATE_LIST [9] { - elements: { - CONSTANT [10] { value: 1 } - CONSTANT [11] { value: 2 } - } - } + } + accu_var: @x0:0 + accu_init: { + CREATE_LIST [24] { + elements: { } - accu_var: @x0:0 - accu_init: { - CREATE_LIST [12] { - elements: { - } + } + } + loop_condition: { + CONSTANT [25] { value: true } + } + loop_step: { + CALL [28] { + function: _+_ + args: { + IDENT [26] { + name: @x0:0 } - } - loop_condition: { - CONSTANT [13] { value: true } - } - loop_step: { - CALL [14] { - function: _+_ - args: { - IDENT [15] { - name: @x0:0 - } - CREATE_LIST [16] { - elements: { - COMPREHENSION [17] { - iter_var: @c1:0 - iter_range: { - CREATE_LIST [18] { - elements: { - CONSTANT [19] { value: 1 } - CONSTANT [20] { value: 2 } - CONSTANT [21] { value: 3 } - } - } + CREATE_LIST [27] { + elements: { + COMPREHENSION [23] { + iter_var: @c1:0 + iter_range: { + CREATE_LIST [6] { + elements: { + CONSTANT [7] { value: 1 } + CONSTANT [8] { value: 2 } + CONSTANT [9] { value: 3 } } - accu_var: @x1:0 - accu_init: { - CREATE_LIST [22] { - elements: { + } + } + accu_var: @x1:0 + accu_init: { + CREATE_LIST [15] { + elements: { + } + } + } + loop_condition: { + CONSTANT [16] { value: true } + } + loop_step: { + CALL [21] { + function: _?_:_ + args: { + CALL [13] { + function: _==_ + args: { + IDENT [12] { + name: @c1:0 + } + IDENT [14] { + name: @c0:0 + } } } - } - loop_condition: { - CONSTANT [23] { value: true } - } - loop_step: { - CALL [24] { - function: _?_:_ + CALL [19] { + function: _+_ args: { - CALL [25] { - function: _==_ - args: { - IDENT [26] { - name: @c1:0 - } - IDENT [27] { - name: @c0:0 - } - } + IDENT [17] { + name: @x1:0 } - CALL [28] { - function: _+_ - args: { - IDENT [29] { - name: @x1:0 - } - CREATE_LIST [30] { - elements: { - IDENT [31] { - name: @c1:0 - } - } + CREATE_LIST [18] { + elements: { + IDENT [11] { + name: @c1:0 } } } - IDENT [32] { - name: @x1:0 - } } } - } - result: { - IDENT [33] { + IDENT [20] { name: @x1:0 } } } } + result: { + IDENT [22] { + name: @x1:0 + } + } } } } } - result: { - IDENT [34] { - name: @x0:0 - } - } + } + } + result: { + IDENT [29] { + name: @x0:0 } } } - CALL [35] { - function: _==_ - args: { - IDENT [36] { - name: @index1 + CREATE_LIST [32] { + elements: { + CREATE_LIST [33] { + elements: { + CONSTANT [34] { value: 1 } + } } - IDENT [37] { - name: @index0 + CREATE_LIST [35] { + elements: { + CONSTANT [36] { value: 2 } + } } } } @@ -1931,74 +1717,72 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CREATE_LIST [3] { - elements: { - CONSTANT [4] { value: 1 } - CONSTANT [5] { value: 2 } - CONSTANT [6] { value: 3 } - } - } - CALL [7] { + CALL [3] { function: @in args: { - CONSTANT [8] { value: 1 } - IDENT [9] { - name: @index0 + CONSTANT [4] { value: 1 } + CREATE_LIST [5] { + elements: { + CONSTANT [6] { value: 1 } + CONSTANT [7] { value: 2 } + CONSTANT [8] { value: 3 } + } } } } - CALL [10] { + CREATE_LIST [9] { + elements: { + CONSTANT [10] { value: 1 } + CONSTANT [11] { value: 2 } + CONSTANT [12] { value: 3 } + } + } + } + } + CALL [13] { + function: _&&_ + args: { + CALL [14] { function: _&&_ args: { - CALL [11] { + IDENT [15] { + name: @index0 + } + CALL [16] { function: @in args: { - CONSTANT [12] { value: 3 } - CREATE_LIST [13] { - elements: { - CONSTANT [14] { value: 3 } - IDENT [15] { - name: @index0 - } - } + CONSTANT [17] { value: 2 } + IDENT [18] { + name: @index1 } } } - IDENT [16] { - name: @index1 - } } } - CALL [17] { + CALL [19] { function: _&&_ args: { - IDENT [18] { - name: @index1 - } - CALL [19] { + CALL [20] { function: @in args: { - CONSTANT [20] { value: 2 } - IDENT [21] { - name: @index0 + CONSTANT [21] { value: 3 } + CREATE_LIST [22] { + elements: { + CONSTANT [23] { value: 3 } + IDENT [24] { + name: @index1 + } + } } } } + IDENT [25] { + name: @index0 + } } } } } - CALL [22] { - function: _&&_ - args: { - IDENT [23] { - name: @index3 - } - IDENT [24] { - name: @index2 - } - } - } } } Test case: INCLUSION_MAP @@ -2019,31 +1803,37 @@ CALL [1] { } } } - CREATE_MAP [7] { - MAP_ENTRY [8] { + } + } + CALL [7] { + function: @in + args: { + CONSTANT [8] { value: 2 } + CREATE_MAP [9] { + MAP_ENTRY [10] { key: { - CONSTANT [9] { value: "a" } + CONSTANT [11] { value: "a" } } value: { - CONSTANT [10] { value: 1 } + CONSTANT [12] { value: 1 } } } - MAP_ENTRY [11] { + MAP_ENTRY [13] { key: { - CONSTANT [12] { value: 2 } + CONSTANT [14] { value: 2 } } value: { - IDENT [13] { + IDENT [15] { name: @index0 } } } - MAP_ENTRY [14] { + MAP_ENTRY [16] { key: { - CONSTANT [15] { value: 3 } + CONSTANT [17] { value: 3 } } value: { - IDENT [16] { + IDENT [18] { name: @index0 } } @@ -2051,15 +1841,6 @@ CALL [1] { } } } - CALL [17] { - function: @in - args: { - CONSTANT [18] { value: 2 } - IDENT [19] { - name: @index1 - } - } - } } } Test case: MACRO_ITER_VAR_NOT_REFERENCED @@ -2072,90 +1853,88 @@ CALL [1] { elements: { CREATE_LIST [3] { elements: { - CONSTANT [4] { value: 1 } - CONSTANT [5] { value: 2 } - } - } - CREATE_LIST [6] { - elements: { - CONSTANT [7] { value: 3 } - CONSTANT [8] { value: 4 } - } - } - CREATE_LIST [9] { - elements: { - IDENT [10] { - name: @index1 + CREATE_LIST [4] { + elements: { + CONSTANT [5] { value: 3 } + CONSTANT [6] { value: 4 } + } } - IDENT [11] { - name: @index1 + CREATE_LIST [7] { + elements: { + CONSTANT [8] { value: 3 } + CONSTANT [9] { value: 4 } + } } } } - CREATE_LIST [12] { + CREATE_LIST [10] { elements: { - IDENT [13] { - name: @index2 - } - IDENT [14] { - name: @index2 - } + CONSTANT [11] { value: 1 } + CONSTANT [12] { value: 2 } } } - COMPREHENSION [15] { + } + } + CALL [13] { + function: _==_ + args: { + COMPREHENSION [14] { iter_var: @c0:0 iter_range: { - IDENT [16] { - name: @index0 + IDENT [15] { + name: @index1 } } accu_var: @x0:0 accu_init: { - CREATE_LIST [17] { + CREATE_LIST [16] { elements: { } } } loop_condition: { - CONSTANT [18] { value: true } + CONSTANT [17] { value: true } } loop_step: { - CALL [19] { + CALL [18] { function: _+_ args: { - IDENT [20] { + IDENT [19] { name: @x0:0 } - CREATE_LIST [21] { + CREATE_LIST [20] { elements: { - COMPREHENSION [22] { + COMPREHENSION [21] { iter_var: @c1:0 iter_range: { - IDENT [23] { - name: @index0 + IDENT [22] { + name: @index1 } } accu_var: @x1:0 accu_init: { - CREATE_LIST [24] { + CREATE_LIST [23] { elements: { } } } loop_condition: { - CONSTANT [25] { value: true } + CONSTANT [24] { value: true } } loop_step: { - CALL [26] { + CALL [25] { function: _+_ args: { - IDENT [27] { + IDENT [26] { name: @x1:0 } - CREATE_LIST [28] { + CREATE_LIST [27] { elements: { - IDENT [29] { - name: @index1 + CREATE_LIST [28] { + elements: { + CONSTANT [29] { value: 3 } + CONSTANT [30] { value: 4 } + } } } } @@ -2163,7 +1942,7 @@ CALL [1] { } } result: { - IDENT [30] { + IDENT [31] { name: @x1:0 } } @@ -2174,21 +1953,20 @@ CALL [1] { } } result: { - IDENT [31] { + IDENT [32] { name: @x0:0 } } } - } - } - CALL [32] { - function: _==_ - args: { - IDENT [33] { - name: @index4 - } - IDENT [34] { - name: @index3 + CREATE_LIST [33] { + elements: { + IDENT [34] { + name: @index0 + } + IDENT [35] { + name: @index0 + } + } } } } @@ -2203,23 +1981,25 @@ CALL [1] { CREATE_LIST [2] { elements: { CALL [3] { - function: _-_ - args: { - IDENT [4] { - name: x - } - CONSTANT [5] { value: 1 } - } - } - CALL [6] { function: _>_ args: { - IDENT [7] { - name: @index0 + CALL [4] { + function: _-_ + args: { + IDENT [5] { + name: x + } + CONSTANT [6] { value: 1 } + } } - CONSTANT [8] { value: 3 } + CONSTANT [7] { value: 3 } } } + } + } + CALL [8] { + function: _||_ + args: { COMPREHENSION [9] { iter_var: @c0:0 iter_range: { @@ -2229,12 +2009,18 @@ CALL [1] { function: _?_:_ args: { IDENT [12] { - name: @index1 - } - IDENT [13] { name: @index0 } - CONSTANT [14] { value: 5 } + CALL [13] { + function: _-_ + args: { + IDENT [14] { + name: x + } + CONSTANT [15] { value: 1 } + } + } + CONSTANT [16] { value: 5 } } } } @@ -2242,16 +2028,16 @@ CALL [1] { } accu_var: @x0:0 accu_init: { - CONSTANT [15] { value: false } + CONSTANT [17] { value: false } } loop_condition: { - CALL [16] { + CALL [18] { function: @not_strictly_false args: { - CALL [17] { + CALL [19] { function: !_ args: { - IDENT [18] { + IDENT [20] { name: @x0:0 } } @@ -2260,46 +2046,38 @@ CALL [1] { } } loop_step: { - CALL [19] { + CALL [21] { function: _||_ args: { - IDENT [20] { + IDENT [22] { name: @x0:0 } - CALL [21] { + CALL [23] { function: _>_ args: { - CALL [22] { + CALL [24] { function: _-_ args: { - IDENT [23] { + IDENT [25] { name: @c0:0 } - CONSTANT [24] { value: 1 } + CONSTANT [26] { value: 1 } } } - CONSTANT [25] { value: 3 } + CONSTANT [27] { value: 3 } } } } } } result: { - IDENT [26] { + IDENT [28] { name: @x0:0 } } } - } - } - CALL [27] { - function: _||_ - args: { - IDENT [28] { - name: @index2 - } IDENT [29] { - name: @index1 + name: @index0 } } } @@ -2335,63 +2113,46 @@ CALL [1] { } } } - CALL [9] { - function: _+_ - args: { - IDENT [10] { - name: @x0:0 - } - CREATE_LIST [11] { - elements: { - CREATE_LIST [12] { - elements: { - IDENT [13] { - name: @index1 - } - IDENT [14] { - name: @index1 - } - } - } - } - } - } - } - COMPREHENSION [15] { + } + } + COMPREHENSION [9] { + iter_var: @c0:0 + iter_range: { + COMPREHENSION [10] { iter_var: @c1:0 iter_range: { - CREATE_LIST [16] { + CREATE_LIST [11] { elements: { - CONSTANT [17] { value: "foo" } - CONSTANT [18] { value: "bar" } + CONSTANT [12] { value: "foo" } + CONSTANT [13] { value: "bar" } } } } accu_var: @x1:0 accu_init: { - CREATE_LIST [19] { + CREATE_LIST [14] { elements: { } } } loop_condition: { - CONSTANT [20] { value: true } + CONSTANT [15] { value: true } } loop_step: { - CALL [21] { + CALL [16] { function: _+_ args: { - IDENT [22] { + IDENT [17] { name: @x1:0 } - CREATE_LIST [23] { + CREATE_LIST [18] { elements: { - CREATE_LIST [24] { + CREATE_LIST [19] { elements: { - IDENT [25] { + IDENT [20] { name: @index0 } - IDENT [26] { + IDENT [21] { name: @index0 } } @@ -2402,37 +2163,48 @@ CALL [1] { } } result: { - IDENT [27] { + IDENT [22] { name: @x1:0 } } } } - } - COMPREHENSION [28] { - iter_var: @c0:0 - iter_range: { - IDENT [29] { - name: @index3 - } - } accu_var: @x0:0 accu_init: { - CREATE_LIST [30] { + CREATE_LIST [23] { elements: { } } } loop_condition: { - CONSTANT [31] { value: true } + CONSTANT [24] { value: true } } loop_step: { - IDENT [32] { - name: @index2 + CALL [25] { + function: _+_ + args: { + IDENT [26] { + name: @x0:0 + } + CREATE_LIST [27] { + elements: { + CREATE_LIST [28] { + elements: { + IDENT [29] { + name: @index1 + } + IDENT [30] { + name: @index1 + } + } + } + } + } + } } } result: { - IDENT [33] { + IDENT [31] { name: @x0:0 } } @@ -2457,27 +2229,24 @@ CALL [1] { } } } - CALL [7] { - function: _[_] - args: { - IDENT [8] { - name: @index0 - } - CONSTANT [9] { value: "a" } - } - } } } - CALL [10] { + CALL [7] { function: _&&_ args: { - SELECT [11] { - IDENT [12] { + SELECT [8] { + IDENT [9] { name: @index0 }.a~presence_test } - IDENT [13] { - name: @index1 + CALL [10] { + function: _[_] + args: { + IDENT [11] { + name: @index0 + } + CONSTANT [12] { value: "a" } + } } } } @@ -2496,33 +2265,30 @@ CALL [1] { name: msg }.oneof_type } - CALL [5] { + } + } + CALL [5] { + function: _==_ + args: { + CALL [6] { function: _?_:_ args: { - SELECT [6] { - IDENT [7] { + SELECT [7] { + IDENT [8] { name: @index0 }.payload~presence_test } - SELECT [8] { - SELECT [9] { - IDENT [10] { + SELECT [9] { + SELECT [10] { + IDENT [11] { name: @index0 }.payload }.single_int64 } - CONSTANT [11] { value: 0 } + CONSTANT [12] { value: 0 } } } - } - } - CALL [12] { - function: _==_ - args: { - IDENT [13] { - name: @index1 - } - CONSTANT [14] { value: 10 } + CONSTANT [13] { value: 10 } } } } @@ -2536,51 +2302,44 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg + }.oneof_type + }.payload }.single_int64 } - CALL [9] { + } + } + CALL [7] { + function: _==_ + args: { + CALL [8] { function: _?_:_ args: { - SELECT [10] { - IDENT [11] { - name: @index0 + SELECT [9] { + SELECT [10] { + IDENT [11] { + name: msg + }.oneof_type }.payload~presence_test } IDENT [12] { - name: @index2 + name: @index0 } CALL [13] { function: _*_ args: { IDENT [14] { - name: @index2 + name: @index0 } CONSTANT [15] { value: 0 } } } } } - } - } - CALL [16] { - function: _==_ - args: { - IDENT [17] { - name: @index3 - } - CONSTANT [18] { value: 10 } + CONSTANT [16] { value: 10 } } } } @@ -2594,51 +2353,46 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg + }.oneof_type + }.payload }.single_int64 } - CALL [9] { + } + } + CALL [7] { + function: _==_ + args: { + CALL [8] { function: _?_:_ args: { - SELECT [10] { - IDENT [11] { - name: @index1 + SELECT [9] { + SELECT [10] { + SELECT [11] { + IDENT [12] { + name: msg + }.oneof_type + }.payload }.single_int64~presence_test } - IDENT [12] { - name: @index2 + IDENT [13] { + name: @index0 } - CALL [13] { + CALL [14] { function: _*_ args: { - IDENT [14] { - name: @index2 + IDENT [15] { + name: @index0 } - CONSTANT [15] { value: 0 } + CONSTANT [16] { value: 0 } } } } } - } - } - CALL [16] { - function: _==_ - args: { - IDENT [17] { - name: @index3 - } - CONSTANT [18] { value: 10 } + CONSTANT [17] { value: 10 } } } } @@ -2652,88 +2406,85 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg + }.oneof_type + }.payload + }.map_string_string } SELECT [7] { - IDENT [8] { - name: @index1 - }.map_string_string + SELECT [8] { + IDENT [9] { + name: msg + }.oneof_type + }.payload } - CALL [9] { - function: _?_:_ + } + } + CALL [10] { + function: _?_:_ + args: { + CALL [11] { + function: _&&_ args: { - CALL [10] { + CALL [12] { function: _&&_ args: { - SELECT [11] { - IDENT [12] { - name: @index1 - }.map_string_string~presence_test - } SELECT [13] { IDENT [14] { - name: @index2 - }.key~presence_test + name: msg + }.oneof_type~presence_test } - } - } - CALL [15] { - function: _==_ - args: { - SELECT [16] { - IDENT [17] { - name: @index2 - }.key + SELECT [15] { + SELECT [16] { + IDENT [17] { + name: msg + }.oneof_type + }.payload~presence_test } - CONSTANT [18] { value: "A" } } } - CONSTANT [19] { value: false } + SELECT [18] { + IDENT [19] { + name: @index1 + }.single_int64~presence_test + } } } CALL [20] { - function: _&&_ + function: _?_:_ args: { CALL [21] { function: _&&_ args: { SELECT [22] { IDENT [23] { - name: msg - }.oneof_type~presence_test + name: @index1 + }.map_string_string~presence_test } SELECT [24] { IDENT [25] { name: @index0 - }.payload~presence_test + }.key~presence_test } } } - SELECT [26] { - IDENT [27] { - name: @index1 - }.single_int64~presence_test + CALL [26] { + function: _==_ + args: { + SELECT [27] { + IDENT [28] { + name: @index0 + }.key + } + CONSTANT [29] { value: "A" } + } } + CONSTANT [30] { value: false } } } - } - } - CALL [28] { - function: _?_:_ - args: { - IDENT [29] { - name: @index4 - } - IDENT [30] { - name: @index3 - } CONSTANT [31] { value: false } } } @@ -2747,44 +2498,49 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CALL [3] { - function: optional.none - args: { - } - } - CREATE_LIST [4] { + CREATE_LIST [3] { elements: { - IDENT [5] { - name: @index0 + CALL [4] { + function: optional.none + args: { + } } - IDENT [6] { + IDENT [5] { name: opt_x } } optional_indices: [0, 1] } - CREATE_LIST [7] { + CREATE_LIST [6] { elements: { - CONSTANT [8] { value: 5 } + CONSTANT [7] { value: 5 } } } + } + } + CALL [8] { + function: _==_ + args: { CREATE_LIST [9] { elements: { CONSTANT [10] { value: 10 } - IDENT [11] { - name: @index2 + CALL [11] { + function: optional.none + args: { + } } IDENT [12] { - name: @index2 + name: @index0 + } + IDENT [13] { + name: @index0 } } + optional_indices: [0] } - CREATE_LIST [13] { + CREATE_LIST [14] { elements: { - CONSTANT [14] { value: 10 } - IDENT [15] { - name: @index0 - } + CONSTANT [15] { value: 10 } IDENT [16] { name: @index1 } @@ -2792,18 +2548,6 @@ CALL [1] { name: @index1 } } - optional_indices: [0] - } - } - } - CALL [18] { - function: _==_ - args: { - IDENT [19] { - name: @index4 - } - IDENT [20] { - name: @index3 } } } @@ -2818,53 +2562,44 @@ CALL [1] { CREATE_LIST [2] { elements: { CALL [3] { - function: optional.of - args: { - CONSTANT [4] { value: "hello" } - } - } - CREATE_MAP [5] { - MAP_ENTRY [6] { - key: { - CONSTANT [7] { value: "hello" } - } - optional_entry: true - value: { - IDENT [8] { - name: @index0 - } - } - } - } - CALL [9] { function: _[_] args: { - IDENT [10] { - name: @index1 + CREATE_MAP [4] { + MAP_ENTRY [5] { + key: { + CONSTANT [6] { value: "hello" } + } + optional_entry: true + value: { + CALL [7] { + function: optional.of + args: { + CONSTANT [8] { value: "hello" } + } + } + } + } } - CONSTANT [11] { value: "hello" } + CONSTANT [9] { value: "hello" } } } - CALL [12] { + } + } + CALL [10] { + function: _==_ + args: { + CALL [11] { function: _+_ args: { - IDENT [13] { - name: @index2 + IDENT [12] { + name: @index0 } - IDENT [14] { - name: @index2 + IDENT [13] { + name: @index0 } } } - } - } - CALL [15] { - function: _==_ - args: { - IDENT [16] { - name: @index3 - } - CONSTANT [17] { value: "hellohello" } + CONSTANT [14] { value: "hellohello" } } } } @@ -2887,69 +2622,66 @@ CALL [1] { } } } - CALL [7] { + } + } + CALL [7] { + function: _==_ + args: { + CALL [8] { function: orValue target: { - CALL [8] { + CALL [9] { function: or target: { - CALL [9] { + CALL [10] { function: _[?_] args: { - CREATE_MAP [10] { - MAP_ENTRY [11] { + CREATE_MAP [11] { + MAP_ENTRY [12] { key: { - CONSTANT [12] { value: "key" } + CONSTANT [13] { value: "key" } } optional_entry: true value: { - CALL [13] { + CALL [14] { function: optional.of args: { - CONSTANT [14] { value: "test" } + CONSTANT [15] { value: "test" } } } } } } - CONSTANT [15] { value: "bogus" } + CONSTANT [16] { value: "bogus" } } } } args: { - CALL [16] { + CALL [17] { function: _[?_] args: { - IDENT [17] { + IDENT [18] { name: @index0 } - CONSTANT [18] { value: "bogus" } + CONSTANT [19] { value: "bogus" } } } } } } args: { - CALL [19] { + CALL [20] { function: _[_] args: { - IDENT [20] { + IDENT [21] { name: @index0 } - CONSTANT [21] { value: "key" } + CONSTANT [22] { value: "key" } } } } } - } - } - CALL [22] { - function: _==_ - args: { - IDENT [23] { - name: @index1 - } - CONSTANT [24] { value: "test" } + CONSTANT [23] { value: "test" } } } } @@ -2962,139 +2694,62 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - CALL [3] { - function: optional.ofNonZeroValue - args: { - CONSTANT [4] { value: 1 } - } - } - CALL [5] { - function: optional.of - args: { - CONSTANT [6] { value: 4 } - } - } - CREATE_STRUCT [7] { + CREATE_STRUCT [3] { name: TestAllTypes entries: { - ENTRY [8] { + ENTRY [4] { field_key: single_int64 optional_entry: true value: { - IDENT [9] { - name: @index0 - } - } - } - ENTRY [10] { - field_key: single_int32 - optional_entry: true - value: { - IDENT [11] { - name: @index1 - } - } - } - } - } - CALL [12] { - function: _+_ - args: { - SELECT [13] { - IDENT [14] { - name: @index2 - }.single_int32 - } - SELECT [15] { - IDENT [16] { - name: @index2 - }.single_int64 - } - } - } - } - } - CALL [17] { - function: _==_ - args: { - IDENT [18] { - name: @index3 - } - CONSTANT [19] { value: 5 } - } - } - } -} -Test case: CALL -Source: ('h' + 'e' + 'l' + 'l' + 'o' + ' world').matches('h' + 'e' + 'l' + 'l' + 'o') -=====> -CALL [1] { - function: cel.@block - args: { - CREATE_LIST [2] { - elements: { - CALL [3] { - function: _+_ - args: { - CONSTANT [4] { value: "h" } - CONSTANT [5] { value: "e" } - } - } - CALL [6] { - function: _+_ - args: { - IDENT [7] { - name: @index0 - } - CONSTANT [8] { value: "l" } - } - } - CALL [9] { - function: _+_ - args: { - IDENT [10] { - name: @index1 + CALL [5] { + function: optional.ofNonZeroValue + args: { + CONSTANT [6] { value: 1 } + } + } + } } - CONSTANT [11] { value: "l" } - } - } - CALL [12] { - function: _+_ - args: { - IDENT [13] { - name: @index2 + ENTRY [7] { + field_key: single_int32 + optional_entry: true + value: { + CALL [8] { + function: optional.of + args: { + CONSTANT [9] { value: 4 } + } + } + } } - CONSTANT [14] { value: "o" } } } - CALL [15] { + } + } + CALL [10] { + function: _==_ + args: { + CALL [11] { function: _+_ args: { - IDENT [16] { - name: @index3 + SELECT [12] { + IDENT [13] { + name: @index0 + }.single_int32 + } + SELECT [14] { + IDENT [15] { + name: @index0 + }.single_int64 } - CONSTANT [17] { value: " world" } } } - } - } - CALL [18] { - function: matches - target: { - IDENT [19] { - name: @index4 - } - } - args: { - IDENT [20] { - name: @index3 - } + CONSTANT [16] { value: 5 } } } } } -Test case: CALL_ARGUMENT_NESTED_NO_COMMON_SUBEXPR -Source: 'hello world'.matches('h' + 'e' + 'l' + 'l' + 'o') +Test case: CALL +Source: ('h' + 'e' + 'l' + 'l' + 'o' + ' world').matches('h' + 'e' + 'l' + 'l' + 'o') =====> CALL [1] { function: cel.@block @@ -3131,147 +2786,164 @@ CALL [1] { CALL [12] { function: matches target: { - CONSTANT [13] { value: "hello world" } + CALL [13] { + function: _+_ + args: { + IDENT [14] { + name: @index0 + } + CONSTANT [15] { value: " world" } + } + } } args: { - IDENT [14] { + IDENT [16] { name: @index0 } } } } } -Test case: CALL_TARGET_NESTED_NO_COMMON_SUBEXPR -Source: ('h' + 'e' + 'l' + 'l' + 'o' + ' world').matches('hello') +Test case: CALL_ARGUMENT_NESTED_NO_COMMON_SUBEXPR +Source: 'hello world'.matches('h' + 'e' + 'l' + 'l' + 'o') =====> -CALL [1] { - function: cel.@block +CALL [2] { + function: matches + target: { + CONSTANT [1] { value: "hello world" } + } args: { - CREATE_LIST [2] { - elements: { - CALL [3] { + CALL [10] { + function: _+_ + args: { + CALL [8] { function: _+_ args: { - CALL [4] { + CALL [6] { function: _+_ args: { - CALL [5] { + CALL [4] { function: _+_ args: { - CALL [6] { - function: _+_ - args: { - CALL [7] { - function: _+_ - args: { - CONSTANT [8] { value: "h" } - CONSTANT [9] { value: "e" } - } - } - CONSTANT [10] { value: "l" } - } - } - CONSTANT [11] { value: "l" } + CONSTANT [3] { value: "h" } + CONSTANT [5] { value: "e" } } } - CONSTANT [12] { value: "o" } + CONSTANT [7] { value: "l" } } } - CONSTANT [13] { value: " world" } + CONSTANT [9] { value: "l" } } } - } - } - CALL [14] { - function: matches - target: { - IDENT [15] { - name: @index0 - } - } - args: { - CONSTANT [16] { value: "hello" } + CONSTANT [11] { value: "o" } } } } } -Test case: CALL_BOTH_ARGUMENT_TARGET_NESTED_NO_COMMON_SUBEXPR -Source: ('h' + 'e' + 'l' + 'l' + 'o' + ' world').matches('w' + 'o' + 'r' + 'l' + 'd') +Test case: CALL_TARGET_NESTED_NO_COMMON_SUBEXPR +Source: ('h' + 'e' + 'l' + 'l' + 'o' + ' world').matches('hello') =====> -CALL [1] { - function: cel.@block - args: { - CREATE_LIST [2] { - elements: { - CALL [3] { +CALL [12] { + function: matches + target: { + CALL [10] { + function: _+_ + args: { + CALL [8] { function: _+_ args: { - CALL [4] { + CALL [6] { function: _+_ args: { - CALL [5] { + CALL [4] { function: _+_ args: { - CALL [6] { + CALL [2] { function: _+_ args: { - CONSTANT [7] { value: "w" } - CONSTANT [8] { value: "o" } + CONSTANT [1] { value: "h" } + CONSTANT [3] { value: "e" } } } - CONSTANT [9] { value: "r" } + CONSTANT [5] { value: "l" } } } - CONSTANT [10] { value: "l" } + CONSTANT [7] { value: "l" } } } - CONSTANT [11] { value: "d" } + CONSTANT [9] { value: "o" } } } - CALL [12] { + CONSTANT [11] { value: " world" } + } + } + } + args: { + CONSTANT [13] { value: "hello" } + } +} +Test case: CALL_BOTH_ARGUMENT_TARGET_NESTED_NO_COMMON_SUBEXPR +Source: ('h' + 'e' + 'l' + 'l' + 'o' + ' world').matches('w' + 'o' + 'r' + 'l' + 'd') +=====> +CALL [12] { + function: matches + target: { + CALL [10] { + function: _+_ + args: { + CALL [8] { function: _+_ args: { - CALL [13] { + CALL [6] { function: _+_ args: { - CALL [14] { + CALL [4] { function: _+_ args: { - CALL [15] { + CALL [2] { function: _+_ args: { - CALL [16] { - function: _+_ - args: { - CONSTANT [17] { value: "h" } - CONSTANT [18] { value: "e" } - } - } - CONSTANT [19] { value: "l" } + CONSTANT [1] { value: "h" } + CONSTANT [3] { value: "e" } } } - CONSTANT [20] { value: "l" } + CONSTANT [5] { value: "l" } } } - CONSTANT [21] { value: "o" } + CONSTANT [7] { value: "l" } } } - CONSTANT [22] { value: " world" } + CONSTANT [9] { value: "o" } } } + CONSTANT [11] { value: " world" } } } - CALL [23] { - function: matches - target: { - IDENT [24] { - name: @index1 - } - } + } + args: { + CALL [20] { + function: _+_ args: { - IDENT [25] { - name: @index0 + CALL [18] { + function: _+_ + args: { + CALL [16] { + function: _+_ + args: { + CALL [14] { + function: _+_ + args: { + CONSTANT [13] { value: "w" } + CONSTANT [15] { value: "o" } + } + } + CONSTANT [17] { value: "r" } + } + } + CONSTANT [19] { value: "l" } + } } + CONSTANT [21] { value: "d" } } } } @@ -3285,74 +2957,66 @@ CALL [1] { CREATE_LIST [2] { elements: { SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 - }.single_int64 - } - SELECT [9] { - IDENT [10] { - name: msg + SELECT [4] { + SELECT [5] { + IDENT [6] { + name: msg + }.oneof_type + }.payload }.single_int64 } - SELECT [11] { - IDENT [12] { - name: @index1 - }.single_int32 - } } } - CALL [13] { + CALL [7] { function: _+_ args: { - CALL [14] { + CALL [8] { function: _+_ args: { - CALL [15] { + CALL [9] { function: _+_ args: { - CALL [16] { + CALL [10] { function: non_pure_custom_func args: { - IDENT [17] { - name: @index2 + IDENT [11] { + name: @index0 } } } - CALL [18] { + CALL [12] { function: non_pure_custom_func args: { - IDENT [19] { - name: @index4 + SELECT [13] { + SELECT [14] { + SELECT [15] { + IDENT [16] { + name: msg + }.oneof_type + }.payload + }.single_int32 } } } } } - CALL [20] { + CALL [17] { function: non_pure_custom_func args: { - IDENT [21] { - name: @index2 + IDENT [18] { + name: @index0 } } } } } - CALL [22] { + CALL [19] { function: non_pure_custom_func args: { - IDENT [23] { - name: @index3 + SELECT [20] { + IDENT [21] { + name: msg + }.single_int64 } } } @@ -3368,75 +3032,64 @@ CALL [1] { args: { CREATE_LIST [2] { elements: { - SELECT [3] { - IDENT [4] { - name: msg - }.oneof_type - } - SELECT [5] { - IDENT [6] { - name: @index0 - }.payload - } - SELECT [7] { - IDENT [8] { - name: @index1 - }.single_int64 - } - CALL [9] { - function: pure_custom_func - args: { - IDENT [10] { - name: @index2 - } - } - } - CALL [11] { + CALL [3] { function: pure_custom_func args: { - SELECT [12] { - IDENT [13] { - name: msg + SELECT [4] { + SELECT [5] { + SELECT [6] { + IDENT [7] { + name: msg + }.oneof_type + }.payload }.single_int64 } } } - CALL [14] { + } + } + CALL [8] { + function: _+_ + args: { + CALL [9] { function: _+_ args: { - CALL [15] { + CALL [10] { function: _+_ args: { - IDENT [16] { - name: @index3 + IDENT [11] { + name: @index0 } - CALL [17] { + CALL [12] { function: pure_custom_func args: { - SELECT [18] { - IDENT [19] { - name: @index1 + SELECT [13] { + SELECT [14] { + SELECT [15] { + IDENT [16] { + name: msg + }.oneof_type + }.payload }.single_int32 } } } } } - IDENT [20] { - name: @index3 + IDENT [17] { + name: @index0 } } } - } - } - CALL [21] { - function: _+_ - args: { - IDENT [22] { - name: @index5 - } - IDENT [23] { - name: @index4 + CALL [18] { + function: pure_custom_func + args: { + SELECT [19] { + IDENT [20] { + name: msg + }.single_int64 + } + } } } } diff --git a/optimizer/src/test/resources/subexpression_unparsed.baseline b/optimizer/src/test/resources/subexpression_unparsed.baseline index f820ae1e8..28d55996b 100644 --- a/optimizer/src/test/resources/subexpression_unparsed.baseline +++ b/optimizer/src/test/resources/subexpression_unparsed.baseline @@ -5,14 +5,14 @@ Result: true [CASCADED_BINDS]: cel.bind(@r0, size([1, 2]), @r0 + @r0) + 1 == 5 [BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([size([1, 2])], @index0 + @index0 + 1 == 5) [BLOCK_RECURSION_DEPTH_1]: cel.@block([[1, 2], size(@index0), @index1 + @index1, @index2 + 1], @index3 == 5) -[BLOCK_RECURSION_DEPTH_2]: cel.@block([[1, 2], size(@index0), @index1 + @index1 + 1], @index2 == 5) -[BLOCK_RECURSION_DEPTH_3]: cel.@block([[1, 2], size(@index0), @index1 + @index1 + 1], @index2 == 5) -[BLOCK_RECURSION_DEPTH_4]: cel.@block([[1, 2], size(@index0), @index1 + @index1 + 1], @index2 == 5) -[BLOCK_RECURSION_DEPTH_5]: cel.@block([[1, 2], size(@index0), @index1 + @index1 + 1], @index2 == 5) -[BLOCK_RECURSION_DEPTH_6]: cel.@block([[1, 2], size(@index0), @index1 + @index1 + 1], @index2 == 5) -[BLOCK_RECURSION_DEPTH_7]: cel.@block([[1, 2], size(@index0), @index1 + @index1 + 1], @index2 == 5) -[BLOCK_RECURSION_DEPTH_8]: cel.@block([[1, 2], size(@index0), @index1 + @index1 + 1], @index2 == 5) -[BLOCK_RECURSION_DEPTH_9]: cel.@block([[1, 2], size(@index0), @index1 + @index1 + 1], @index2 == 5) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([size([1, 2]), @index0 + @index0 + 1], @index1 == 5) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([size([1, 2])], @index0 + @index0 + 1 == 5) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([size([1, 2])], @index0 + @index0 + 1 == 5) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([size([1, 2])], @index0 + @index0 + 1 == 5) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([size([1, 2])], @index0 + @index0 + 1 == 5) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([size([1, 2])], @index0 + @index0 + 1 == 5) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([size([1, 2])], @index0 + @index0 + 1 == 5) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([size([1, 2])], @index0 + @index0 + 1 == 5) Test case: SIZE_2 Source: 2 + size([1,2]) + size([1,2]) + 1 == 7 @@ -21,14 +21,14 @@ Result: true [CASCADED_BINDS]: cel.bind(@r0, size([1, 2]), 2 + @r0 + @r0) + 1 == 7 [BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([size([1, 2])], 2 + @index0 + @index0 + 1 == 7) [BLOCK_RECURSION_DEPTH_1]: cel.@block([[1, 2], size(@index0), 2 + @index1, @index2 + @index1, @index3 + 1], @index4 == 7) -[BLOCK_RECURSION_DEPTH_2]: cel.@block([[1, 2], size(@index0), 2 + @index1 + @index1, @index2 + 1], @index3 == 7) -[BLOCK_RECURSION_DEPTH_3]: cel.@block([[1, 2], size(@index0), 2 + @index1 + @index1 + 1], @index2 == 7) -[BLOCK_RECURSION_DEPTH_4]: cel.@block([[1, 2], size(@index0), 2 + @index1 + @index1 + 1], @index2 == 7) -[BLOCK_RECURSION_DEPTH_5]: cel.@block([[1, 2], size(@index0), 2 + @index1 + @index1 + 1], @index2 == 7) -[BLOCK_RECURSION_DEPTH_6]: cel.@block([[1, 2], size(@index0), 2 + @index1 + @index1 + 1], @index2 == 7) -[BLOCK_RECURSION_DEPTH_7]: cel.@block([[1, 2], size(@index0), 2 + @index1 + @index1 + 1], @index2 == 7) -[BLOCK_RECURSION_DEPTH_8]: cel.@block([[1, 2], size(@index0), 2 + @index1 + @index1 + 1], @index2 == 7) -[BLOCK_RECURSION_DEPTH_9]: cel.@block([[1, 2], size(@index0), 2 + @index1 + @index1 + 1], @index2 == 7) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([size([1, 2]), 2 + @index0 + @index0], @index1 + 1 == 7) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([size([1, 2]), 2 + @index0 + @index0 + 1], @index1 == 7) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([size([1, 2])], 2 + @index0 + @index0 + 1 == 7) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([size([1, 2])], 2 + @index0 + @index0 + 1 == 7) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([size([1, 2])], 2 + @index0 + @index0 + 1 == 7) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([size([1, 2])], 2 + @index0 + @index0 + 1 == 7) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([size([1, 2])], 2 + @index0 + @index0 + 1 == 7) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([size([1, 2])], 2 + @index0 + @index0 + 1 == 7) Test case: SIZE_3 Source: size([0]) + size([0]) + size([1,2]) + size([1,2]) == 6 @@ -37,14 +37,14 @@ Result: true [CASCADED_BINDS]: cel.bind(@r1, size([1, 2]), cel.bind(@r0, size([0]), @r0 + @r0) + @r1 + @r1) == 6 [BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([size([0]), size([1, 2])], @index0 + @index0 + @index1 + @index1 == 6) [BLOCK_RECURSION_DEPTH_1]: cel.@block([[0], size(@index0), [1, 2], size(@index2), @index1 + @index1, @index4 + @index3, @index5 + @index3], @index6 == 6) -[BLOCK_RECURSION_DEPTH_2]: cel.@block([[0], size(@index0), [1, 2], size(@index2), @index1 + @index1 + @index3, @index4 + @index3], @index5 == 6) -[BLOCK_RECURSION_DEPTH_3]: cel.@block([[0], size(@index0), [1, 2], size(@index2), @index1 + @index1 + @index3 + @index3], @index4 == 6) -[BLOCK_RECURSION_DEPTH_4]: cel.@block([[0], size(@index0), [1, 2], size(@index2), @index1 + @index1 + @index3 + @index3], @index4 == 6) -[BLOCK_RECURSION_DEPTH_5]: cel.@block([[0], size(@index0), [1, 2], size(@index2), @index1 + @index1 + @index3 + @index3], @index4 == 6) -[BLOCK_RECURSION_DEPTH_6]: cel.@block([[0], size(@index0), [1, 2], size(@index2), @index1 + @index1 + @index3 + @index3], @index4 == 6) -[BLOCK_RECURSION_DEPTH_7]: cel.@block([[0], size(@index0), [1, 2], size(@index2), @index1 + @index1 + @index3 + @index3], @index4 == 6) -[BLOCK_RECURSION_DEPTH_8]: cel.@block([[0], size(@index0), [1, 2], size(@index2), @index1 + @index1 + @index3 + @index3], @index4 == 6) -[BLOCK_RECURSION_DEPTH_9]: cel.@block([[0], size(@index0), [1, 2], size(@index2), @index1 + @index1 + @index3 + @index3], @index4 == 6) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([size([0]), size([1, 2]), @index0 + @index0 + @index1], @index2 + @index1 == 6) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([size([0]), size([1, 2]), @index0 + @index0 + @index1 + @index1], @index2 == 6) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([size([0]), size([1, 2])], @index0 + @index0 + @index1 + @index1 == 6) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([size([0]), size([1, 2])], @index0 + @index0 + @index1 + @index1 == 6) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([size([0]), size([1, 2])], @index0 + @index0 + @index1 + @index1 == 6) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([size([0]), size([1, 2])], @index0 + @index0 + @index1 + @index1 == 6) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([size([0]), size([1, 2])], @index0 + @index0 + @index1 + @index1 == 6) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([size([0]), size([1, 2])], @index0 + @index0 + @index1 + @index1 == 6) Test case: SIZE_4 Source: 5 + size([0]) + size([0]) + size([1,2]) + size([1,2]) + size([1,2,3]) + size([1,2,3]) == 17 @@ -53,14 +53,14 @@ Result: true [CASCADED_BINDS]: cel.bind(@r2, size([1, 2, 3]), cel.bind(@r1, size([1, 2]), cel.bind(@r0, size([0]), 5 + @r0 + @r0) + @r1 + @r1) + @r2 + @r2) == 17 [BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([size([0]), size([1, 2]), size([1, 2, 3])], 5 + @index0 + @index0 + @index1 + @index1 + @index2 + @index2 == 17) [BLOCK_RECURSION_DEPTH_1]: cel.@block([[0], size(@index0), [1, 2], size(@index2), [1, 2, 3], size(@index4), 5 + @index1, @index6 + @index1, @index7 + @index3, @index8 + @index3, @index9 + @index5, @index10 + @index5], @index11 == 17) -[BLOCK_RECURSION_DEPTH_2]: cel.@block([[0], size(@index0), [1, 2], size(@index2), [1, 2, 3], size(@index4), 5 + @index1 + @index1, @index6 + @index3 + @index3, @index7 + @index5 + @index5], @index8 == 17) -[BLOCK_RECURSION_DEPTH_3]: cel.@block([[0], size(@index0), [1, 2], size(@index2), [1, 2, 3], size(@index4), 5 + @index1 + @index1 + @index3, @index6 + @index3 + @index5 + @index5], @index7 == 17) -[BLOCK_RECURSION_DEPTH_4]: cel.@block([[0], size(@index0), [1, 2], size(@index2), [1, 2, 3], size(@index4), 5 + @index1 + @index1 + @index3 + @index3, @index6 + @index5 + @index5], @index7 == 17) -[BLOCK_RECURSION_DEPTH_5]: cel.@block([[0], size(@index0), [1, 2], size(@index2), [1, 2, 3], size(@index4), 5 + @index1 + @index1 + @index3 + @index3 + @index5, @index6 + @index5], @index7 == 17) -[BLOCK_RECURSION_DEPTH_6]: cel.@block([[0], size(@index0), [1, 2], size(@index2), [1, 2, 3], size(@index4), 5 + @index1 + @index1 + @index3 + @index3 + @index5 + @index5], @index6 == 17) -[BLOCK_RECURSION_DEPTH_7]: cel.@block([[0], size(@index0), [1, 2], size(@index2), [1, 2, 3], size(@index4), 5 + @index1 + @index1 + @index3 + @index3 + @index5 + @index5], @index6 == 17) -[BLOCK_RECURSION_DEPTH_8]: cel.@block([[0], size(@index0), [1, 2], size(@index2), [1, 2, 3], size(@index4), 5 + @index1 + @index1 + @index3 + @index3 + @index5 + @index5], @index6 == 17) -[BLOCK_RECURSION_DEPTH_9]: cel.@block([[0], size(@index0), [1, 2], size(@index2), [1, 2, 3], size(@index4), 5 + @index1 + @index1 + @index3 + @index3 + @index5 + @index5], @index6 == 17) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([size([0]), size([1, 2]), size([1, 2, 3]), 5 + @index0 + @index0, @index3 + @index1 + @index1, @index4 + @index2 + @index2], @index5 == 17) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([size([0]), size([1, 2]), size([1, 2, 3]), 5 + @index0 + @index0 + @index1, @index3 + @index1 + @index2 + @index2], @index4 == 17) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([size([0]), size([1, 2]), size([1, 2, 3]), 5 + @index0 + @index0 + @index1 + @index1], @index3 + @index2 + @index2 == 17) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([size([0]), size([1, 2]), size([1, 2, 3]), 5 + @index0 + @index0 + @index1 + @index1 + @index2], @index3 + @index2 == 17) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([size([0]), size([1, 2]), size([1, 2, 3]), 5 + @index0 + @index0 + @index1 + @index1 + @index2 + @index2], @index3 == 17) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([size([0]), size([1, 2]), size([1, 2, 3])], 5 + @index0 + @index0 + @index1 + @index1 + @index2 + @index2 == 17) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([size([0]), size([1, 2]), size([1, 2, 3])], 5 + @index0 + @index0 + @index1 + @index1 + @index2 + @index2 == 17) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([size([0]), size([1, 2]), size([1, 2, 3])], 5 + @index0 + @index0 + @index1 + @index1 + @index2 + @index2 == 17) Test case: TIMESTAMP Source: timestamp(int(timestamp(1000000000))).getFullYear() + timestamp(int(timestamp(75))).getFullYear() + timestamp(int(timestamp(50))).getFullYear() + timestamp(int(timestamp(1000000000))).getFullYear() + timestamp(int(timestamp(50))).getSeconds() + timestamp(int(timestamp(200))).getFullYear() + timestamp(int(timestamp(200))).getFullYear() + timestamp(int(timestamp(75))).getMinutes() + timestamp(int(timestamp(1000000000))).getFullYear() == 13934 @@ -68,15 +68,15 @@ Source: timestamp(int(timestamp(1000000000))).getFullYear() + timestamp(int(time Result: true [CASCADED_BINDS]: cel.bind(@r0, timestamp(int(timestamp(1000000000))).getFullYear(), cel.bind(@r3, timestamp(int(timestamp(75))), cel.bind(@r2, timestamp(int(timestamp(200))).getFullYear(), cel.bind(@r1, timestamp(int(timestamp(50))), @r0 + @r3.getFullYear() + @r1.getFullYear() + @r0 + @r1.getSeconds()) + @r2 + @r2) + @r3.getMinutes()) + @r0) == 13934 [BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([timestamp(int(timestamp(1000000000))).getFullYear(), timestamp(int(timestamp(50))), timestamp(int(timestamp(200))).getFullYear(), timestamp(int(timestamp(75)))], @index0 + @index3.getFullYear() + @index1.getFullYear() + @index0 + @index1.getSeconds() + @index2 + @index2 + @index3.getMinutes() + @index0 == 13934) -[BLOCK_RECURSION_DEPTH_1]: cel.@block([timestamp(1000000000), int(@index0), timestamp(@index1), @index2.getFullYear(), timestamp(50), int(@index4), timestamp(@index5), timestamp(200), int(@index7), timestamp(@index8), @index9.getFullYear(), timestamp(75), int(@index11), timestamp(@index12), @index13.getMinutes(), @index6.getSeconds(), @index6.getFullYear(), @index13.getFullYear(), @index3 + @index17, @index18 + @index16, @index19 + @index3, @index20 + @index15, @index21 + @index10, @index22 + @index10, @index23 + @index14, @index24 + @index3], @index25 == 13934) -[BLOCK_RECURSION_DEPTH_2]: cel.@block([timestamp(1000000000), int(@index0), timestamp(@index1), @index2.getFullYear(), timestamp(50), int(@index4), timestamp(@index5), timestamp(200), int(@index7), timestamp(@index8), @index9.getFullYear(), timestamp(75), int(@index11), timestamp(@index12), @index13.getMinutes(), @index6.getSeconds(), @index6.getFullYear(), @index3 + @index13.getFullYear(), @index17 + @index16 + @index3, @index18 + @index15 + @index10, @index19 + @index10 + @index14, @index20 + @index3], @index21 == 13934) -[BLOCK_RECURSION_DEPTH_3]: cel.@block([timestamp(1000000000), int(@index0), timestamp(@index1), @index2.getFullYear(), timestamp(50), int(@index4), timestamp(@index5), timestamp(200), int(@index7), timestamp(@index8), @index9.getFullYear(), timestamp(75), int(@index11), timestamp(@index12), @index13.getMinutes(), @index6.getSeconds(), @index3 + @index13.getFullYear() + @index6.getFullYear(), @index16 + @index3 + @index15 + @index10, @index17 + @index10 + @index14 + @index3], @index18 == 13934) -[BLOCK_RECURSION_DEPTH_4]: cel.@block([timestamp(1000000000), int(@index0), timestamp(@index1), @index2.getFullYear(), timestamp(50), int(@index4), timestamp(@index5), timestamp(200), int(@index7), timestamp(@index8), @index9.getFullYear(), timestamp(75), int(@index11), timestamp(@index12), @index13.getMinutes(), @index6.getSeconds(), @index3 + @index13.getFullYear() + @index6.getFullYear() + @index3, @index16 + @index15 + @index10 + @index10 + @index14, @index17 + @index3], @index18 == 13934) -[BLOCK_RECURSION_DEPTH_5]: cel.@block([timestamp(1000000000), int(@index0), timestamp(@index1), @index2.getFullYear(), timestamp(50), int(@index4), timestamp(@index5), timestamp(200), int(@index7), timestamp(@index8), @index9.getFullYear(), timestamp(75), int(@index11), timestamp(@index12), @index13.getMinutes(), @index3 + @index13.getFullYear() + @index6.getFullYear() + @index3 + @index6.getSeconds(), @index15 + @index10 + @index10 + @index14 + @index3], @index16 == 13934) -[BLOCK_RECURSION_DEPTH_6]: cel.@block([timestamp(1000000000), int(@index0), timestamp(@index1), @index2.getFullYear(), timestamp(50), int(@index4), timestamp(@index5), timestamp(200), int(@index7), timestamp(@index8), @index9.getFullYear(), timestamp(75), int(@index11), timestamp(@index12), @index13.getMinutes(), @index3 + @index13.getFullYear() + @index6.getFullYear() + @index3 + @index6.getSeconds() + @index10, @index15 + @index10 + @index14 + @index3], @index16 == 13934) -[BLOCK_RECURSION_DEPTH_7]: cel.@block([timestamp(1000000000), int(@index0), timestamp(@index1), @index2.getFullYear(), timestamp(50), int(@index4), timestamp(@index5), timestamp(200), int(@index7), timestamp(@index8), @index9.getFullYear(), timestamp(75), int(@index11), timestamp(@index12), @index13.getMinutes(), @index3 + @index13.getFullYear() + @index6.getFullYear() + @index3 + @index6.getSeconds() + @index10 + @index10, @index15 + @index14 + @index3], @index16 == 13934) -[BLOCK_RECURSION_DEPTH_8]: cel.@block([timestamp(1000000000), int(@index0), timestamp(@index1), @index2.getFullYear(), timestamp(50), int(@index4), timestamp(@index5), timestamp(200), int(@index7), timestamp(@index8), @index9.getFullYear(), timestamp(75), int(@index11), timestamp(@index12), @index3 + @index13.getFullYear() + @index6.getFullYear() + @index3 + @index6.getSeconds() + @index10 + @index10 + @index13.getMinutes(), @index14 + @index3], @index15 == 13934) -[BLOCK_RECURSION_DEPTH_9]: cel.@block([timestamp(1000000000), int(@index0), timestamp(@index1), @index2.getFullYear(), timestamp(50), int(@index4), timestamp(@index5), timestamp(200), int(@index7), timestamp(@index8), @index9.getFullYear(), timestamp(75), int(@index11), timestamp(@index12), @index3 + @index13.getFullYear() + @index6.getFullYear() + @index3 + @index6.getSeconds() + @index10 + @index10 + @index13.getMinutes() + @index3], @index14 == 13934) +[BLOCK_RECURSION_DEPTH_1]: cel.@block([timestamp(1000000000), int(@index0), timestamp(@index1), @index2.getFullYear(), timestamp(50), int(@index4), timestamp(@index5), timestamp(200), int(@index7), timestamp(@index8), @index9.getFullYear(), timestamp(75), int(@index11), timestamp(@index12), @index13.getFullYear(), @index3 + @index14, @index6.getFullYear(), @index15 + @index16, @index17 + @index3, @index6.getSeconds(), @index18 + @index19, @index20 + @index10, @index21 + @index10, @index13.getMinutes(), @index22 + @index23, @index24 + @index3], @index25 == 13934) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([int(timestamp(1000000000)), timestamp(@index0).getFullYear(), int(timestamp(50)), int(timestamp(200)), timestamp(@index3).getFullYear(), int(timestamp(75)), timestamp(@index2), timestamp(@index5), @index1 + @index7.getFullYear(), @index8 + @index6.getFullYear(), @index9 + @index1 + @index6.getSeconds(), @index10 + @index4 + @index4, @index11 + @index7.getMinutes()], @index12 + @index1 == 13934) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([timestamp(int(timestamp(1000000000))), timestamp(int(timestamp(50))), timestamp(int(timestamp(200))), timestamp(int(timestamp(75))), @index0.getFullYear(), @index2.getFullYear(), @index4 + @index3.getFullYear() + @index1.getFullYear(), @index6 + @index4 + @index1.getSeconds() + @index5, @index7 + @index5 + @index3.getMinutes() + @index4], @index8 == 13934) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([timestamp(int(timestamp(1000000000))).getFullYear(), timestamp(int(timestamp(200))).getFullYear(), timestamp(int(timestamp(50))), timestamp(int(timestamp(75))), @index0 + @index3.getFullYear() + @index2.getFullYear() + @index0, @index4 + @index2.getSeconds() + @index1 + @index1], @index5 + @index3.getMinutes() + @index0 == 13934) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([timestamp(int(timestamp(1000000000))).getFullYear(), timestamp(int(timestamp(200))).getFullYear(), timestamp(int(timestamp(50))), timestamp(int(timestamp(75))), @index0 + @index3.getFullYear() + @index2.getFullYear() + @index0 + @index2.getSeconds()], @index4 + @index1 + @index1 + @index3.getMinutes() + @index0 == 13934) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([timestamp(int(timestamp(1000000000))).getFullYear(), timestamp(int(timestamp(200))).getFullYear(), timestamp(int(timestamp(50))), timestamp(int(timestamp(75))), @index0 + @index3.getFullYear() + @index2.getFullYear() + @index0 + @index2.getSeconds() + @index1], @index4 + @index1 + @index3.getMinutes() + @index0 == 13934) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([timestamp(int(timestamp(1000000000))).getFullYear(), timestamp(int(timestamp(200))).getFullYear(), timestamp(int(timestamp(50))), timestamp(int(timestamp(75))), @index0 + @index3.getFullYear() + @index2.getFullYear() + @index0 + @index2.getSeconds() + @index1 + @index1], @index4 + @index3.getMinutes() + @index0 == 13934) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([timestamp(int(timestamp(1000000000))).getFullYear(), timestamp(int(timestamp(200))).getFullYear(), timestamp(int(timestamp(50))), timestamp(int(timestamp(75))), @index0 + @index3.getFullYear() + @index2.getFullYear() + @index0 + @index2.getSeconds() + @index1 + @index1 + @index3.getMinutes()], @index4 + @index0 == 13934) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([timestamp(int(timestamp(1000000000))).getFullYear(), timestamp(int(timestamp(200))).getFullYear(), timestamp(int(timestamp(50))), timestamp(int(timestamp(75))), @index0 + @index3.getFullYear() + @index2.getFullYear() + @index0 + @index2.getSeconds() + @index1 + @index1 + @index3.getMinutes() + @index0], @index4 == 13934) Test case: MAP_INDEX Source: {"a": 2}["a"] + {"a": 2}["a"] * {"a": 2}["a"] == 6 @@ -85,14 +85,14 @@ Result: true [CASCADED_BINDS]: cel.bind(@r0, {"a": 2}["a"], @r0 + @r0 * @r0) == 6 [BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([{"a": 2}["a"]], @index0 + @index0 * @index0 == 6) [BLOCK_RECURSION_DEPTH_1]: cel.@block([{"a": 2}, @index0["a"], @index1 * @index1, @index1 + @index2], @index3 == 6) -[BLOCK_RECURSION_DEPTH_2]: cel.@block([{"a": 2}, @index0["a"], @index1 + @index1 * @index1], @index2 == 6) -[BLOCK_RECURSION_DEPTH_3]: cel.@block([{"a": 2}, @index0["a"], @index1 + @index1 * @index1], @index2 == 6) -[BLOCK_RECURSION_DEPTH_4]: cel.@block([{"a": 2}, @index0["a"], @index1 + @index1 * @index1], @index2 == 6) -[BLOCK_RECURSION_DEPTH_5]: cel.@block([{"a": 2}, @index0["a"], @index1 + @index1 * @index1], @index2 == 6) -[BLOCK_RECURSION_DEPTH_6]: cel.@block([{"a": 2}, @index0["a"], @index1 + @index1 * @index1], @index2 == 6) -[BLOCK_RECURSION_DEPTH_7]: cel.@block([{"a": 2}, @index0["a"], @index1 + @index1 * @index1], @index2 == 6) -[BLOCK_RECURSION_DEPTH_8]: cel.@block([{"a": 2}, @index0["a"], @index1 + @index1 * @index1], @index2 == 6) -[BLOCK_RECURSION_DEPTH_9]: cel.@block([{"a": 2}, @index0["a"], @index1 + @index1 * @index1], @index2 == 6) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([{"a": 2}["a"], @index0 + @index0 * @index0], @index1 == 6) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([{"a": 2}["a"]], @index0 + @index0 * @index0 == 6) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([{"a": 2}["a"]], @index0 + @index0 * @index0 == 6) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([{"a": 2}["a"]], @index0 + @index0 * @index0 == 6) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([{"a": 2}["a"]], @index0 + @index0 * @index0 == 6) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([{"a": 2}["a"]], @index0 + @index0 * @index0 == 6) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([{"a": 2}["a"]], @index0 + @index0 * @index0 == 6) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([{"a": 2}["a"]], @index0 + @index0 * @index0 == 6) Test case: NESTED_MAP_CONSTRUCTION Source: {'a': {'b': 1}, 'c': {'b': 1}, 'd': {'e': {'b': 1}}, 'e': {'e': {'b': 1}}} @@ -101,14 +101,14 @@ Result: {a={b=1}, c={b=1}, d={e={b=1}}, e={e={b=1}}} [CASCADED_BINDS]: cel.bind(@r0, {"b": 1}, cel.bind(@r1, {"e": @r0}, {"a": @r0, "c": @r0, "d": @r1, "e": @r1})) [BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([{"b": 1}, {"e": @index0}], {"a": @index0, "c": @index0, "d": @index1, "e": @index1}) [BLOCK_RECURSION_DEPTH_1]: cel.@block([{"b": 1}, {"e": @index0}], {"a": @index0, "c": @index0, "d": @index1, "e": @index1}) -[BLOCK_RECURSION_DEPTH_2]: cel.@block([{"b": 1}, {"e": @index0}], {"a": @index0, "c": @index0, "d": @index1, "e": @index1}) -[BLOCK_RECURSION_DEPTH_3]: cel.@block([{"b": 1}, {"e": @index0}], {"a": @index0, "c": @index0, "d": @index1, "e": @index1}) -[BLOCK_RECURSION_DEPTH_4]: cel.@block([{"b": 1}, {"e": @index0}], {"a": @index0, "c": @index0, "d": @index1, "e": @index1}) -[BLOCK_RECURSION_DEPTH_5]: cel.@block([{"b": 1}, {"e": @index0}], {"a": @index0, "c": @index0, "d": @index1, "e": @index1}) -[BLOCK_RECURSION_DEPTH_6]: cel.@block([{"b": 1}, {"e": @index0}], {"a": @index0, "c": @index0, "d": @index1, "e": @index1}) -[BLOCK_RECURSION_DEPTH_7]: cel.@block([{"b": 1}, {"e": @index0}], {"a": @index0, "c": @index0, "d": @index1, "e": @index1}) -[BLOCK_RECURSION_DEPTH_8]: cel.@block([{"b": 1}, {"e": @index0}], {"a": @index0, "c": @index0, "d": @index1, "e": @index1}) -[BLOCK_RECURSION_DEPTH_9]: cel.@block([{"b": 1}, {"e": @index0}], {"a": @index0, "c": @index0, "d": @index1, "e": @index1}) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([{"e": {"b": 1}}, {"b": 1}], {"a": @index1, "c": @index1, "d": @index0, "e": @index0}) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([{"e": {"b": 1}}, {"b": 1}], {"a": @index1, "c": @index1, "d": @index0, "e": @index0}) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([{"e": {"b": 1}}, {"b": 1}], {"a": @index1, "c": @index1, "d": @index0, "e": @index0}) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([{"e": {"b": 1}}, {"b": 1}], {"a": @index1, "c": @index1, "d": @index0, "e": @index0}) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([{"e": {"b": 1}}, {"b": 1}], {"a": @index1, "c": @index1, "d": @index0, "e": @index0}) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([{"e": {"b": 1}}, {"b": 1}], {"a": @index1, "c": @index1, "d": @index0, "e": @index0}) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([{"e": {"b": 1}}, {"b": 1}], {"a": @index1, "c": @index1, "d": @index0, "e": @index0}) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([{"e": {"b": 1}}, {"b": 1}], {"a": @index1, "c": @index1, "d": @index0, "e": @index0}) Test case: NESTED_LIST_CONSTRUCTION Source: [1, [1,2,3,4], 2, [1,2,3,4], 5, [1,2,3,4], 7, [[1,2], [1,2,3,4]], [1,2]] @@ -117,14 +117,14 @@ Result: [1, [1, 2, 3, 4], 2, [1, 2, 3, 4], 5, [1, 2, 3, 4], 7, [[1, 2], [1, 2, 3 [CASCADED_BINDS]: cel.bind(@r0, [1, 2, 3, 4], cel.bind(@r1, [1, 2], [1, @r0, 2, @r0, 5, @r0, 7, [@r1, @r0], @r1])) [BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([[1, 2, 3, 4], [1, 2]], [1, @index0, 2, @index0, 5, @index0, 7, [@index1, @index0], @index1]) [BLOCK_RECURSION_DEPTH_1]: cel.@block([[1, 2, 3, 4], [1, 2], [@index1, @index0]], [1, @index0, 2, @index0, 5, @index0, 7, @index2, @index1]) -[BLOCK_RECURSION_DEPTH_2]: cel.@block([[1, 2, 3, 4], [1, 2], [@index1, @index0]], [1, @index0, 2, @index0, 5, @index0, 7, @index2, @index1]) -[BLOCK_RECURSION_DEPTH_3]: cel.@block([[1, 2, 3, 4], [1, 2], [@index1, @index0]], [1, @index0, 2, @index0, 5, @index0, 7, @index2, @index1]) -[BLOCK_RECURSION_DEPTH_4]: cel.@block([[1, 2, 3, 4], [1, 2], [@index1, @index0]], [1, @index0, 2, @index0, 5, @index0, 7, @index2, @index1]) -[BLOCK_RECURSION_DEPTH_5]: cel.@block([[1, 2, 3, 4], [1, 2], [@index1, @index0]], [1, @index0, 2, @index0, 5, @index0, 7, @index2, @index1]) -[BLOCK_RECURSION_DEPTH_6]: cel.@block([[1, 2, 3, 4], [1, 2], [@index1, @index0]], [1, @index0, 2, @index0, 5, @index0, 7, @index2, @index1]) -[BLOCK_RECURSION_DEPTH_7]: cel.@block([[1, 2, 3, 4], [1, 2], [@index1, @index0]], [1, @index0, 2, @index0, 5, @index0, 7, @index2, @index1]) -[BLOCK_RECURSION_DEPTH_8]: cel.@block([[1, 2, 3, 4], [1, 2], [@index1, @index0]], [1, @index0, 2, @index0, 5, @index0, 7, @index2, @index1]) -[BLOCK_RECURSION_DEPTH_9]: cel.@block([[1, 2, 3, 4], [1, 2], [@index1, @index0]], [1, @index0, 2, @index0, 5, @index0, 7, @index2, @index1]) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([[1, 2, 3, 4], [1, 2]], [1, @index0, 2, @index0, 5, @index0, 7, [@index1, @index0], @index1]) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([[1, 2, 3, 4], [1, 2]], [1, @index0, 2, @index0, 5, @index0, 7, [@index1, @index0], @index1]) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([[1, 2, 3, 4], [1, 2]], [1, @index0, 2, @index0, 5, @index0, 7, [@index1, @index0], @index1]) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([[1, 2, 3, 4], [1, 2]], [1, @index0, 2, @index0, 5, @index0, 7, [@index1, @index0], @index1]) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([[1, 2, 3, 4], [1, 2]], [1, @index0, 2, @index0, 5, @index0, 7, [@index1, @index0], @index1]) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([[1, 2, 3, 4], [1, 2]], [1, @index0, 2, @index0, 5, @index0, 7, [@index1, @index0], @index1]) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([[1, 2, 3, 4], [1, 2]], [1, @index0, 2, @index0, 5, @index0, 7, [@index1, @index0], @index1]) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([[1, 2, 3, 4], [1, 2]], [1, @index0, 2, @index0, 5, @index0, 7, [@index1, @index0], @index1]) Test case: SELECT Source: msg.single_int64 + msg.single_int64 == 6 @@ -133,14 +133,14 @@ Result: true [CASCADED_BINDS]: cel.bind(@r0, msg.single_int64, @r0 + @r0) == 6 [BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([msg.single_int64], @index0 + @index0 == 6) [BLOCK_RECURSION_DEPTH_1]: cel.@block([msg.single_int64, @index0 + @index0], @index1 == 6) -[BLOCK_RECURSION_DEPTH_2]: cel.@block([msg.single_int64, @index0 + @index0], @index1 == 6) -[BLOCK_RECURSION_DEPTH_3]: cel.@block([msg.single_int64, @index0 + @index0], @index1 == 6) -[BLOCK_RECURSION_DEPTH_4]: cel.@block([msg.single_int64, @index0 + @index0], @index1 == 6) -[BLOCK_RECURSION_DEPTH_5]: cel.@block([msg.single_int64, @index0 + @index0], @index1 == 6) -[BLOCK_RECURSION_DEPTH_6]: cel.@block([msg.single_int64, @index0 + @index0], @index1 == 6) -[BLOCK_RECURSION_DEPTH_7]: cel.@block([msg.single_int64, @index0 + @index0], @index1 == 6) -[BLOCK_RECURSION_DEPTH_8]: cel.@block([msg.single_int64, @index0 + @index0], @index1 == 6) -[BLOCK_RECURSION_DEPTH_9]: cel.@block([msg.single_int64, @index0 + @index0], @index1 == 6) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([msg.single_int64], @index0 + @index0 == 6) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([msg.single_int64], @index0 + @index0 == 6) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([msg.single_int64], @index0 + @index0 == 6) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([msg.single_int64], @index0 + @index0 == 6) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([msg.single_int64], @index0 + @index0 == 6) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([msg.single_int64], @index0 + @index0 == 6) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([msg.single_int64], @index0 + @index0 == 6) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([msg.single_int64], @index0 + @index0 == 6) Test case: SELECT_NESTED_1 Source: msg.oneof_type.payload.single_int64 + msg.oneof_type.payload.single_int32 + msg.oneof_type.payload.single_int64 + msg.single_int64 + msg.oneof_type.payload.oneof_type.payload.single_int64 == 31 @@ -148,15 +148,15 @@ Source: msg.oneof_type.payload.single_int64 + msg.oneof_type.payload.single_int3 Result: true [CASCADED_BINDS]: cel.bind(@r0, msg.oneof_type.payload, cel.bind(@r1, @r0.single_int64, @r1 + @r0.single_int32 + @r1) + msg.single_int64 + @r0.oneof_type.payload.single_int64) == 31 [BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([msg.oneof_type.payload, @index0.single_int64], @index1 + @index0.single_int32 + @index1 + msg.single_int64 + @index0.oneof_type.payload.single_int64 == 31) -[BLOCK_RECURSION_DEPTH_1]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, @index1.oneof_type, @index3.payload, @index4.single_int64, msg.single_int64, @index1.single_int32, @index2 + @index7, @index8 + @index2, @index9 + @index6, @index10 + @index5], @index11 == 31) -[BLOCK_RECURSION_DEPTH_2]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, @index1.oneof_type.payload, @index3.single_int64, msg.single_int64, @index2 + @index1.single_int32, @index6 + @index2 + @index5, @index7 + @index4], @index8 == 31) -[BLOCK_RECURSION_DEPTH_3]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, @index1.oneof_type.payload.single_int64, msg.single_int64, @index2 + @index1.single_int32 + @index2, @index5 + @index4 + @index3], @index6 == 31) -[BLOCK_RECURSION_DEPTH_4]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, @index1.oneof_type.payload.single_int64, @index2 + @index1.single_int32 + @index2 + msg.single_int64, @index4 + @index3], @index5 == 31) -[BLOCK_RECURSION_DEPTH_5]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, @index2 + @index1.single_int32 + @index2 + msg.single_int64 + @index1.oneof_type.payload.single_int64], @index3 == 31) -[BLOCK_RECURSION_DEPTH_6]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, @index2 + @index1.single_int32 + @index2 + msg.single_int64 + @index1.oneof_type.payload.single_int64], @index3 == 31) -[BLOCK_RECURSION_DEPTH_7]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, @index2 + @index1.single_int32 + @index2 + msg.single_int64 + @index1.oneof_type.payload.single_int64], @index3 == 31) -[BLOCK_RECURSION_DEPTH_8]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, @index2 + @index1.single_int32 + @index2 + msg.single_int64 + @index1.oneof_type.payload.single_int64], @index3 == 31) -[BLOCK_RECURSION_DEPTH_9]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, @index2 + @index1.single_int32 + @index2 + msg.single_int64 + @index1.oneof_type.payload.single_int64], @index3 == 31) +[BLOCK_RECURSION_DEPTH_1]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, @index1.single_int32, @index2 + @index3, @index4 + @index2, msg.single_int64, @index5 + @index6, @index1.oneof_type, @index8.payload, @index9.single_int64, @index7 + @index10], @index11 == 31) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([msg.oneof_type.payload, @index0.single_int64, @index1 + @index0.single_int32, @index2 + @index1 + msg.single_int64, @index0.oneof_type.payload, @index3 + @index4.single_int64], @index5 == 31) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([msg.oneof_type.payload.single_int64, msg.oneof_type.payload, @index0 + @index1.single_int32 + @index0, @index1.oneof_type.payload.single_int64, @index2 + msg.single_int64 + @index3], @index4 == 31) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([msg.oneof_type.payload.single_int64, msg.oneof_type.payload, @index0 + @index1.single_int32 + @index0 + msg.single_int64, @index2 + @index1.oneof_type.payload.single_int64], @index3 == 31) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([msg.oneof_type.payload.single_int64, msg.oneof_type.payload, @index0 + @index1.single_int32 + @index0 + msg.single_int64 + @index1.oneof_type.payload.single_int64], @index2 == 31) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([msg.oneof_type.payload.single_int64, msg.oneof_type.payload], @index0 + @index1.single_int32 + @index0 + msg.single_int64 + @index1.oneof_type.payload.single_int64 == 31) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([msg.oneof_type.payload.single_int64, msg.oneof_type.payload], @index0 + @index1.single_int32 + @index0 + msg.single_int64 + @index1.oneof_type.payload.single_int64 == 31) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([msg.oneof_type.payload.single_int64, msg.oneof_type.payload], @index0 + @index1.single_int32 + @index0 + msg.single_int64 + @index1.oneof_type.payload.single_int64 == 31) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([msg.oneof_type.payload.single_int64, msg.oneof_type.payload], @index0 + @index1.single_int32 + @index0 + msg.single_int64 + @index1.oneof_type.payload.single_int64 == 31) Test case: SELECT_NESTED_2 Source: true || msg.oneof_type.payload.oneof_type.payload.oneof_type.payload.oneof_type.payload.single_bool || msg.oneof_type.payload.oneof_type.payload.oneof_type.child.child.payload.single_bool @@ -164,15 +164,15 @@ Source: true || msg.oneof_type.payload.oneof_type.payload.oneof_type.payload.one Result: true [CASCADED_BINDS]: cel.bind(@r0, msg.oneof_type.payload.oneof_type.payload.oneof_type, true || @r0.payload.oneof_type.payload.single_bool || @r0.child.child.payload.single_bool) [BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([msg.oneof_type.payload.oneof_type.payload.oneof_type], true || @index0.payload.oneof_type.payload.single_bool || @index0.child.child.payload.single_bool) -[BLOCK_RECURSION_DEPTH_1]: cel.@block([msg.oneof_type, @index0.payload, @index1.oneof_type, @index2.payload, @index3.oneof_type, @index4.child, @index5.child, @index6.payload, @index7.single_bool, @index4.payload, @index9.oneof_type, @index10.payload, @index11.single_bool, true || @index12], @index13 || @index8) -[BLOCK_RECURSION_DEPTH_2]: cel.@block([msg.oneof_type, @index0.payload, @index1.oneof_type, @index2.payload, @index3.oneof_type, @index4.child.child, @index5.payload.single_bool, @index4.payload.oneof_type, @index7.payload.single_bool, true || @index8], @index9 || @index6) -[BLOCK_RECURSION_DEPTH_3]: cel.@block([msg.oneof_type, @index0.payload, @index1.oneof_type, @index2.payload, @index3.oneof_type, @index4.child.child.payload, @index5.single_bool, @index4.payload.oneof_type.payload, true || @index7.single_bool], @index8 || @index6) -[BLOCK_RECURSION_DEPTH_4]: cel.@block([msg.oneof_type, @index0.payload, @index1.oneof_type, @index2.payload, @index3.oneof_type, @index4.child.child.payload.single_bool, @index4.payload.oneof_type.payload.single_bool, true || @index6], @index7 || @index5) -[BLOCK_RECURSION_DEPTH_5]: cel.@block([msg.oneof_type, @index0.payload, @index1.oneof_type, @index2.payload, @index3.oneof_type, @index4.child.child.payload.single_bool, true || @index4.payload.oneof_type.payload.single_bool], @index6 || @index5) -[BLOCK_RECURSION_DEPTH_6]: cel.@block([msg.oneof_type, @index0.payload, @index1.oneof_type, @index2.payload, @index3.oneof_type, @index4.child.child.payload.single_bool, true || @index4.payload.oneof_type.payload.single_bool], @index6 || @index5) -[BLOCK_RECURSION_DEPTH_7]: cel.@block([msg.oneof_type, @index0.payload, @index1.oneof_type, @index2.payload, @index3.oneof_type, @index4.child.child.payload.single_bool, true || @index4.payload.oneof_type.payload.single_bool], @index6 || @index5) -[BLOCK_RECURSION_DEPTH_8]: cel.@block([msg.oneof_type, @index0.payload, @index1.oneof_type, @index2.payload, @index3.oneof_type, @index4.child.child.payload.single_bool, true || @index4.payload.oneof_type.payload.single_bool], @index6 || @index5) -[BLOCK_RECURSION_DEPTH_9]: cel.@block([msg.oneof_type, @index0.payload, @index1.oneof_type, @index2.payload, @index3.oneof_type, @index4.child.child.payload.single_bool, true || @index4.payload.oneof_type.payload.single_bool], @index6 || @index5) +[BLOCK_RECURSION_DEPTH_1]: cel.@block([msg.oneof_type, @index0.payload, @index1.oneof_type, @index2.payload, @index3.oneof_type, @index4.payload, @index5.oneof_type, @index6.payload, @index7.single_bool, true || @index8, @index4.child, @index10.child, @index11.payload, @index12.single_bool], @index9 || @index13) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([msg.oneof_type.payload, @index0.oneof_type.payload, @index1.oneof_type, @index2.payload.oneof_type, @index3.payload.single_bool, @index2.child.child, @index5.payload.single_bool], true || @index4 || @index6) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([msg.oneof_type.payload.oneof_type, @index0.payload.oneof_type, @index1.payload.oneof_type.payload, @index1.child.child.payload], true || @index2.single_bool || @index3.single_bool) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([msg.oneof_type.payload.oneof_type.payload, @index0.oneof_type, @index1.payload.oneof_type.payload.single_bool, @index1.child.child.payload.single_bool], true || @index2 || @index3) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([msg.oneof_type.payload.oneof_type.payload.oneof_type, true || @index0.payload.oneof_type.payload.single_bool], @index1 || @index0.child.child.payload.single_bool) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([msg.oneof_type.payload.oneof_type.payload.oneof_type], true || @index0.payload.oneof_type.payload.single_bool || @index0.child.child.payload.single_bool) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([msg.oneof_type.payload.oneof_type.payload.oneof_type], true || @index0.payload.oneof_type.payload.single_bool || @index0.child.child.payload.single_bool) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([msg.oneof_type.payload.oneof_type.payload.oneof_type], true || @index0.payload.oneof_type.payload.single_bool || @index0.child.child.payload.single_bool) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([msg.oneof_type.payload.oneof_type.payload.oneof_type], true || @index0.payload.oneof_type.payload.single_bool || @index0.child.child.payload.single_bool) Test case: SELECT_NESTED_MESSAGE_MAP_INDEX_1 Source: msg.oneof_type.payload.map_int32_int64[1] + msg.oneof_type.payload.map_int32_int64[1] + msg.oneof_type.payload.map_int32_int64[1] == 15 @@ -181,14 +181,14 @@ Result: true [CASCADED_BINDS]: cel.bind(@r0, msg.oneof_type.payload.map_int32_int64[1], @r0 + @r0 + @r0) == 15 [BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([msg.oneof_type.payload.map_int32_int64[1]], @index0 + @index0 + @index0 == 15) [BLOCK_RECURSION_DEPTH_1]: cel.@block([msg.oneof_type, @index0.payload, @index1.map_int32_int64, @index2[1], @index3 + @index3, @index4 + @index3], @index5 == 15) -[BLOCK_RECURSION_DEPTH_2]: cel.@block([msg.oneof_type, @index0.payload, @index1.map_int32_int64, @index2[1], @index3 + @index3 + @index3], @index4 == 15) -[BLOCK_RECURSION_DEPTH_3]: cel.@block([msg.oneof_type, @index0.payload, @index1.map_int32_int64, @index2[1], @index3 + @index3 + @index3], @index4 == 15) -[BLOCK_RECURSION_DEPTH_4]: cel.@block([msg.oneof_type, @index0.payload, @index1.map_int32_int64, @index2[1], @index3 + @index3 + @index3], @index4 == 15) -[BLOCK_RECURSION_DEPTH_5]: cel.@block([msg.oneof_type, @index0.payload, @index1.map_int32_int64, @index2[1], @index3 + @index3 + @index3], @index4 == 15) -[BLOCK_RECURSION_DEPTH_6]: cel.@block([msg.oneof_type, @index0.payload, @index1.map_int32_int64, @index2[1], @index3 + @index3 + @index3], @index4 == 15) -[BLOCK_RECURSION_DEPTH_7]: cel.@block([msg.oneof_type, @index0.payload, @index1.map_int32_int64, @index2[1], @index3 + @index3 + @index3], @index4 == 15) -[BLOCK_RECURSION_DEPTH_8]: cel.@block([msg.oneof_type, @index0.payload, @index1.map_int32_int64, @index2[1], @index3 + @index3 + @index3], @index4 == 15) -[BLOCK_RECURSION_DEPTH_9]: cel.@block([msg.oneof_type, @index0.payload, @index1.map_int32_int64, @index2[1], @index3 + @index3 + @index3], @index4 == 15) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([msg.oneof_type.payload, @index0.map_int32_int64[1], @index1 + @index1 + @index1], @index2 == 15) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([msg.oneof_type.payload.map_int32_int64, @index0[1]], @index1 + @index1 + @index1 == 15) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([msg.oneof_type.payload.map_int32_int64[1]], @index0 + @index0 + @index0 == 15) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([msg.oneof_type.payload.map_int32_int64[1]], @index0 + @index0 + @index0 == 15) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([msg.oneof_type.payload.map_int32_int64[1]], @index0 + @index0 + @index0 == 15) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([msg.oneof_type.payload.map_int32_int64[1]], @index0 + @index0 + @index0 == 15) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([msg.oneof_type.payload.map_int32_int64[1]], @index0 + @index0 + @index0 == 15) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([msg.oneof_type.payload.map_int32_int64[1]], @index0 + @index0 + @index0 == 15) Test case: SELECT_NESTED_MESSAGE_MAP_INDEX_2 Source: msg.oneof_type.payload.map_int32_int64[0] + msg.oneof_type.payload.map_int32_int64[1] + msg.oneof_type.payload.map_int32_int64[2] == 8 @@ -196,15 +196,15 @@ Source: msg.oneof_type.payload.map_int32_int64[0] + msg.oneof_type.payload.map_i Result: true [CASCADED_BINDS]: cel.bind(@r0, msg.oneof_type.payload.map_int32_int64, @r0[0] + @r0[1] + @r0[2]) == 8 [BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([msg.oneof_type.payload.map_int32_int64], @index0[0] + @index0[1] + @index0[2] == 8) -[BLOCK_RECURSION_DEPTH_1]: cel.@block([msg.oneof_type, @index0.payload, @index1.map_int32_int64, @index2[2], @index2[1], @index2[0], @index5 + @index4, @index6 + @index3], @index7 == 8) -[BLOCK_RECURSION_DEPTH_2]: cel.@block([msg.oneof_type, @index0.payload, @index1.map_int32_int64, @index2[2], @index2[0] + @index2[1], @index4 + @index3], @index5 == 8) -[BLOCK_RECURSION_DEPTH_3]: cel.@block([msg.oneof_type, @index0.payload, @index1.map_int32_int64, @index2[0] + @index2[1] + @index2[2]], @index3 == 8) -[BLOCK_RECURSION_DEPTH_4]: cel.@block([msg.oneof_type, @index0.payload, @index1.map_int32_int64, @index2[0] + @index2[1] + @index2[2]], @index3 == 8) -[BLOCK_RECURSION_DEPTH_5]: cel.@block([msg.oneof_type, @index0.payload, @index1.map_int32_int64, @index2[0] + @index2[1] + @index2[2]], @index3 == 8) -[BLOCK_RECURSION_DEPTH_6]: cel.@block([msg.oneof_type, @index0.payload, @index1.map_int32_int64, @index2[0] + @index2[1] + @index2[2]], @index3 == 8) -[BLOCK_RECURSION_DEPTH_7]: cel.@block([msg.oneof_type, @index0.payload, @index1.map_int32_int64, @index2[0] + @index2[1] + @index2[2]], @index3 == 8) -[BLOCK_RECURSION_DEPTH_8]: cel.@block([msg.oneof_type, @index0.payload, @index1.map_int32_int64, @index2[0] + @index2[1] + @index2[2]], @index3 == 8) -[BLOCK_RECURSION_DEPTH_9]: cel.@block([msg.oneof_type, @index0.payload, @index1.map_int32_int64, @index2[0] + @index2[1] + @index2[2]], @index3 == 8) +[BLOCK_RECURSION_DEPTH_1]: cel.@block([msg.oneof_type, @index0.payload, @index1.map_int32_int64, @index2[0], @index2[1], @index3 + @index4, @index2[2], @index5 + @index6], @index7 == 8) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([msg.oneof_type.payload, @index0.map_int32_int64, @index1[0] + @index1[1], @index2 + @index1[2]], @index3 == 8) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([msg.oneof_type.payload.map_int32_int64, @index0[0] + @index0[1] + @index0[2]], @index1 == 8) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([msg.oneof_type.payload.map_int32_int64], @index0[0] + @index0[1] + @index0[2] == 8) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([msg.oneof_type.payload.map_int32_int64], @index0[0] + @index0[1] + @index0[2] == 8) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([msg.oneof_type.payload.map_int32_int64], @index0[0] + @index0[1] + @index0[2] == 8) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([msg.oneof_type.payload.map_int32_int64], @index0[0] + @index0[1] + @index0[2] == 8) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([msg.oneof_type.payload.map_int32_int64], @index0[0] + @index0[1] + @index0[2] == 8) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([msg.oneof_type.payload.map_int32_int64], @index0[0] + @index0[1] + @index0[2] == 8) Test case: SELECT_NESTED_NO_COMMON_SUBEXPR Source: msg.oneof_type.payload.oneof_type.payload.oneof_type.payload.oneof_type.payload.single_int64 @@ -214,13 +214,13 @@ Result: 0 [BLOCK_COMMON_SUBEXPR_ONLY]: msg.oneof_type.payload.oneof_type.payload.oneof_type.payload.oneof_type.payload.single_int64 [BLOCK_RECURSION_DEPTH_1]: cel.@block([msg.oneof_type, @index0.payload, @index1.oneof_type, @index2.payload, @index3.oneof_type, @index4.payload, @index5.oneof_type, @index6.payload], @index7.single_int64) [BLOCK_RECURSION_DEPTH_2]: cel.@block([msg.oneof_type.payload, @index0.oneof_type.payload, @index1.oneof_type.payload, @index2.oneof_type.payload], @index3.single_int64) -[BLOCK_RECURSION_DEPTH_3]: cel.@block([msg.oneof_type.payload.oneof_type, @index0.payload.oneof_type.payload, @index1.oneof_type.payload], @index2.single_int64) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([msg.oneof_type.payload.oneof_type, @index0.payload.oneof_type.payload], @index1.oneof_type.payload.single_int64) [BLOCK_RECURSION_DEPTH_4]: cel.@block([msg.oneof_type.payload.oneof_type.payload, @index0.oneof_type.payload.oneof_type.payload], @index1.single_int64) -[BLOCK_RECURSION_DEPTH_5]: cel.@block([msg.oneof_type.payload.oneof_type.payload.oneof_type, @index0.payload.oneof_type.payload], @index1.single_int64) -[BLOCK_RECURSION_DEPTH_6]: cel.@block([msg.oneof_type.payload.oneof_type.payload.oneof_type.payload, @index0.oneof_type.payload], @index1.single_int64) -[BLOCK_RECURSION_DEPTH_7]: cel.@block([msg.oneof_type.payload.oneof_type.payload.oneof_type.payload.oneof_type, @index0.payload], @index1.single_int64) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([msg.oneof_type.payload.oneof_type.payload.oneof_type], @index0.payload.oneof_type.payload.single_int64) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([msg.oneof_type.payload.oneof_type.payload.oneof_type.payload], @index0.oneof_type.payload.single_int64) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([msg.oneof_type.payload.oneof_type.payload.oneof_type.payload.oneof_type], @index0.payload.single_int64) [BLOCK_RECURSION_DEPTH_8]: cel.@block([msg.oneof_type.payload.oneof_type.payload.oneof_type.payload.oneof_type.payload], @index0.single_int64) -[BLOCK_RECURSION_DEPTH_9]: cel.@block([msg.oneof_type.payload.oneof_type.payload.oneof_type.payload.oneof_type.payload], @index0.single_int64) +[BLOCK_RECURSION_DEPTH_9]: msg.oneof_type.payload.oneof_type.payload.oneof_type.payload.oneof_type.payload.single_int64 Test case: TERNARY Source: (msg.single_int64 > 0 ? msg.single_int64 : 0) == 3 @@ -230,13 +230,13 @@ Result: true [BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([msg.single_int64], ((@index0 > 0) ? @index0 : 0) == 3) [BLOCK_RECURSION_DEPTH_1]: cel.@block([msg.single_int64, @index0 > 0, @index1 ? @index0 : 0], @index2 == 3) [BLOCK_RECURSION_DEPTH_2]: cel.@block([msg.single_int64, (@index0 > 0) ? @index0 : 0], @index1 == 3) -[BLOCK_RECURSION_DEPTH_3]: cel.@block([msg.single_int64, (@index0 > 0) ? @index0 : 0], @index1 == 3) -[BLOCK_RECURSION_DEPTH_4]: cel.@block([msg.single_int64, (@index0 > 0) ? @index0 : 0], @index1 == 3) -[BLOCK_RECURSION_DEPTH_5]: cel.@block([msg.single_int64, (@index0 > 0) ? @index0 : 0], @index1 == 3) -[BLOCK_RECURSION_DEPTH_6]: cel.@block([msg.single_int64, (@index0 > 0) ? @index0 : 0], @index1 == 3) -[BLOCK_RECURSION_DEPTH_7]: cel.@block([msg.single_int64, (@index0 > 0) ? @index0 : 0], @index1 == 3) -[BLOCK_RECURSION_DEPTH_8]: cel.@block([msg.single_int64, (@index0 > 0) ? @index0 : 0], @index1 == 3) -[BLOCK_RECURSION_DEPTH_9]: cel.@block([msg.single_int64, (@index0 > 0) ? @index0 : 0], @index1 == 3) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([msg.single_int64], ((@index0 > 0) ? @index0 : 0) == 3) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([msg.single_int64], ((@index0 > 0) ? @index0 : 0) == 3) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([msg.single_int64], ((@index0 > 0) ? @index0 : 0) == 3) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([msg.single_int64], ((@index0 > 0) ? @index0 : 0) == 3) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([msg.single_int64], ((@index0 > 0) ? @index0 : 0) == 3) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([msg.single_int64], ((@index0 > 0) ? @index0 : 0) == 3) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([msg.single_int64], ((@index0 > 0) ? @index0 : 0) == 3) Test case: TERNARY_BIND_RHS_ONLY Source: false ? false : (msg.single_int64) + ((msg.single_int64 + 1) * 2) == 11 @@ -246,13 +246,13 @@ Result: true [BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([msg.single_int64], false ? false : (@index0 + (@index0 + 1) * 2 == 11)) [BLOCK_RECURSION_DEPTH_1]: cel.@block([msg.single_int64, @index0 + 1, @index1 * 2, @index0 + @index2, @index3 == 11], false ? false : @index4) [BLOCK_RECURSION_DEPTH_2]: cel.@block([msg.single_int64, (@index0 + 1) * 2, @index0 + @index1 == 11], false ? false : @index2) -[BLOCK_RECURSION_DEPTH_3]: cel.@block([msg.single_int64, @index0 + (@index0 + 1) * 2, @index1 == 11], false ? false : @index2) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([msg.single_int64, @index0 + (@index0 + 1) * 2], false ? false : (@index1 == 11)) [BLOCK_RECURSION_DEPTH_4]: cel.@block([msg.single_int64, @index0 + (@index0 + 1) * 2 == 11], false ? false : @index1) -[BLOCK_RECURSION_DEPTH_5]: cel.@block([msg.single_int64, @index0 + (@index0 + 1) * 2 == 11], false ? false : @index1) -[BLOCK_RECURSION_DEPTH_6]: cel.@block([msg.single_int64, @index0 + (@index0 + 1) * 2 == 11], false ? false : @index1) -[BLOCK_RECURSION_DEPTH_7]: cel.@block([msg.single_int64, @index0 + (@index0 + 1) * 2 == 11], false ? false : @index1) -[BLOCK_RECURSION_DEPTH_8]: cel.@block([msg.single_int64, @index0 + (@index0 + 1) * 2 == 11], false ? false : @index1) -[BLOCK_RECURSION_DEPTH_9]: cel.@block([msg.single_int64, @index0 + (@index0 + 1) * 2 == 11], false ? false : @index1) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([msg.single_int64], false ? false : (@index0 + (@index0 + 1) * 2 == 11)) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([msg.single_int64], false ? false : (@index0 + (@index0 + 1) * 2 == 11)) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([msg.single_int64], false ? false : (@index0 + (@index0 + 1) * 2 == 11)) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([msg.single_int64], false ? false : (@index0 + (@index0 + 1) * 2 == 11)) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([msg.single_int64], false ? false : (@index0 + (@index0 + 1) * 2 == 11)) Test case: NESTED_TERNARY Source: (msg.single_int64 > 0 ? (msg.single_int32 > 0 ? msg.single_int64 + msg.single_int32 : 0) : 0) == 8 @@ -260,15 +260,15 @@ Source: (msg.single_int64 > 0 ? (msg.single_int32 > 0 ? msg.single_int64 + msg.s Result: true [CASCADED_BINDS]: cel.bind(@r0, msg.single_int64, (@r0 > 0) ? cel.bind(@r1, msg.single_int32, (@r1 > 0) ? (@r0 + @r1) : 0) : 0) == 8 [BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([msg.single_int64, msg.single_int32], ((@index0 > 0) ? ((@index1 > 0) ? (@index0 + @index1) : 0) : 0) == 8) -[BLOCK_RECURSION_DEPTH_1]: cel.@block([msg.single_int64, msg.single_int32, @index0 + @index1, @index1 > 0, @index3 ? @index2 : 0, @index0 > 0, @index5 ? @index4 : 0], @index6 == 8) +[BLOCK_RECURSION_DEPTH_1]: cel.@block([msg.single_int64, msg.single_int32, @index0 > 0, @index1 > 0, @index0 + @index1, @index3 ? @index4 : 0, @index2 ? @index5 : 0], @index6 == 8) [BLOCK_RECURSION_DEPTH_2]: cel.@block([msg.single_int64, msg.single_int32, (@index1 > 0) ? (@index0 + @index1) : 0, (@index0 > 0) ? @index2 : 0], @index3 == 8) [BLOCK_RECURSION_DEPTH_3]: cel.@block([msg.single_int64, msg.single_int32, (@index0 > 0) ? ((@index1 > 0) ? (@index0 + @index1) : 0) : 0], @index2 == 8) -[BLOCK_RECURSION_DEPTH_4]: cel.@block([msg.single_int64, msg.single_int32, (@index0 > 0) ? ((@index1 > 0) ? (@index0 + @index1) : 0) : 0], @index2 == 8) -[BLOCK_RECURSION_DEPTH_5]: cel.@block([msg.single_int64, msg.single_int32, (@index0 > 0) ? ((@index1 > 0) ? (@index0 + @index1) : 0) : 0], @index2 == 8) -[BLOCK_RECURSION_DEPTH_6]: cel.@block([msg.single_int64, msg.single_int32, (@index0 > 0) ? ((@index1 > 0) ? (@index0 + @index1) : 0) : 0], @index2 == 8) -[BLOCK_RECURSION_DEPTH_7]: cel.@block([msg.single_int64, msg.single_int32, (@index0 > 0) ? ((@index1 > 0) ? (@index0 + @index1) : 0) : 0], @index2 == 8) -[BLOCK_RECURSION_DEPTH_8]: cel.@block([msg.single_int64, msg.single_int32, (@index0 > 0) ? ((@index1 > 0) ? (@index0 + @index1) : 0) : 0], @index2 == 8) -[BLOCK_RECURSION_DEPTH_9]: cel.@block([msg.single_int64, msg.single_int32, (@index0 > 0) ? ((@index1 > 0) ? (@index0 + @index1) : 0) : 0], @index2 == 8) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([msg.single_int64, msg.single_int32], ((@index0 > 0) ? ((@index1 > 0) ? (@index0 + @index1) : 0) : 0) == 8) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([msg.single_int64, msg.single_int32], ((@index0 > 0) ? ((@index1 > 0) ? (@index0 + @index1) : 0) : 0) == 8) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([msg.single_int64, msg.single_int32], ((@index0 > 0) ? ((@index1 > 0) ? (@index0 + @index1) : 0) : 0) == 8) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([msg.single_int64, msg.single_int32], ((@index0 > 0) ? ((@index1 > 0) ? (@index0 + @index1) : 0) : 0) == 8) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([msg.single_int64, msg.single_int32], ((@index0 > 0) ? ((@index1 > 0) ? (@index0 + @index1) : 0) : 0) == 8) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([msg.single_int64, msg.single_int32], ((@index0 > 0) ? ((@index1 > 0) ? (@index0 + @index1) : 0) : 0) == 8) Test case: MULTIPLE_MACROS_1 Source: size([[1].exists(i, i > 0)]) + size([[1].exists(j, j > 0)]) + size([[2].exists(k, k > 1)]) + size([[2].exists(l, l > 1)]) == 4 @@ -277,14 +277,14 @@ Result: true [CASCADED_BINDS]: cel.bind(@r1, size([[2].exists(@c0:0, @c0:0 > 1)]), cel.bind(@r0, size([[1].exists(@c0:0, @c0:0 > 0)]), @r0 + @r0) + @r1 + @r1) == 4 [BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([size([[1].exists(@c0:0, @c0:0 > 0)]), size([[2].exists(@c0:0, @c0:0 > 1)])], @index0 + @index0 + @index1 + @index1 == 4) [BLOCK_RECURSION_DEPTH_1]: cel.@block([[1], @c0:0 > 0, @x0:0 || @index1, [2], @c0:0 > 1, @x0:0 || @index4], size([@index0.exists(@c0:0, @index1)]) + size([@index0.exists(@c0:0, @index1)]) + size([@index3.exists(@c0:0, @index4)]) + size([@index3.exists(@c0:0, @index4)]) == 4) -[BLOCK_RECURSION_DEPTH_2]: cel.@block([[1], @c0:0 > 0, @x0:0 || @index1, [2], @c0:0 > 1, @x0:0 || @index4], size([@index0.exists(@c0:0, @index1)]) + size([@index0.exists(@c0:0, @index1)]) + size([@index3.exists(@c0:0, @index4)]) + size([@index3.exists(@c0:0, @index4)]) == 4) -[BLOCK_RECURSION_DEPTH_3]: cel.@block([[1], @c0:0 > 0, @x0:0 || @index1, @index0.exists(@c0:0, @index1), [@index3], size(@index4), [2], @c0:0 > 1, @x0:0 || @index7, @index6.exists(@c0:0, @index7), [@index9], size(@index10), @index5 + @index5 + @index11 + @index11], @index12 == 4) -[BLOCK_RECURSION_DEPTH_4]: cel.@block([[1], @c0:0 > 0, @x0:0 || @index1, @index0.exists(@c0:0, @index1), [@index3], size(@index4), [2], @c0:0 > 1, @x0:0 || @index7, @index6.exists(@c0:0, @index7), [@index9], size(@index10), @index5 + @index5 + @index11 + @index11], @index12 == 4) -[BLOCK_RECURSION_DEPTH_5]: cel.@block([[1], @c0:0 > 0, @x0:0 || @index1, @index0.exists(@c0:0, @index1), [@index3], size(@index4), [2], @c0:0 > 1, @x0:0 || @index7, @index6.exists(@c0:0, @index7), [@index9], size(@index10), @index5 + @index5 + @index11 + @index11], @index12 == 4) -[BLOCK_RECURSION_DEPTH_6]: cel.@block([[1], @c0:0 > 0, @x0:0 || @index1, @index0.exists(@c0:0, @index1), [@index3], size(@index4), [2], @c0:0 > 1, @x0:0 || @index7, @index6.exists(@c0:0, @index7), [@index9], size(@index10), @index5 + @index5 + @index11 + @index11], @index12 == 4) -[BLOCK_RECURSION_DEPTH_7]: cel.@block([[1], @c0:0 > 0, @x0:0 || @index1, @index0.exists(@c0:0, @index1), [@index3], size(@index4), [2], @c0:0 > 1, @x0:0 || @index7, @index6.exists(@c0:0, @index7), [@index9], size(@index10), @index5 + @index5 + @index11 + @index11], @index12 == 4) -[BLOCK_RECURSION_DEPTH_8]: cel.@block([[1], @c0:0 > 0, @x0:0 || @index1, @index0.exists(@c0:0, @index1), [@index3], size(@index4), [2], @c0:0 > 1, @x0:0 || @index7, @index6.exists(@c0:0, @index7), [@index9], size(@index10), @index5 + @index5 + @index11 + @index11], @index12 == 4) -[BLOCK_RECURSION_DEPTH_9]: cel.@block([[1], @c0:0 > 0, @x0:0 || @index1, @index0.exists(@c0:0, @index1), [@index3], size(@index4), [2], @c0:0 > 1, @x0:0 || @index7, @index6.exists(@c0:0, @index7), [@index9], size(@index10), @index5 + @index5 + @index11 + @index11], @index12 == 4) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([@x0:0 || @c0:0 > 0, @x0:0 || @c0:0 > 1, [1], [2]], size([@index2.exists(@c0:0, @c0:0 > 0)]) + size([@index2.exists(@c0:0, @c0:0 > 0)]) + size([@index3.exists(@c0:0, @c0:0 > 1)]) + size([@index3.exists(@c0:0, @c0:0 > 1)]) == 4) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([[1].exists(@c0:0, @c0:0 > 0), [2].exists(@c0:0, @c0:0 > 1), size([@index0]), size([@index1]), @index2 + @index2 + @index3 + @index3], @index4 == 4) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([[[1].exists(@c0:0, @c0:0 > 0)], [[2].exists(@c0:0, @c0:0 > 1)], size(@index0), size(@index1)], @index2 + @index2 + @index3 + @index3 == 4) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([size([[1].exists(@c0:0, @c0:0 > 0)]), size([[2].exists(@c0:0, @c0:0 > 1)])], @index0 + @index0 + @index1 + @index1 == 4) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([size([[1].exists(@c0:0, @c0:0 > 0)]), size([[2].exists(@c0:0, @c0:0 > 1)])], @index0 + @index0 + @index1 + @index1 == 4) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([size([[1].exists(@c0:0, @c0:0 > 0)]), size([[2].exists(@c0:0, @c0:0 > 1)])], @index0 + @index0 + @index1 + @index1 == 4) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([size([[1].exists(@c0:0, @c0:0 > 0)]), size([[2].exists(@c0:0, @c0:0 > 1)])], @index0 + @index0 + @index1 + @index1 == 4) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([size([[1].exists(@c0:0, @c0:0 > 0)]), size([[2].exists(@c0:0, @c0:0 > 1)])], @index0 + @index0 + @index1 + @index1 == 4) Test case: MULTIPLE_MACROS_2 Source: [[1].exists(i, i > 0)] + [[1].exists(j, j > 0)] + [['a'].exists(k, k == 'a')] + [['a'].exists(l, l == 'a')] == [true, true, true, true] @@ -293,14 +293,14 @@ Result: true [CASCADED_BINDS]: cel.bind(@r1, [["a"].exists(@c0:1, @c0:1 == "a")], cel.bind(@r0, [[1].exists(@c0:0, @c0:0 > 0)], @r0 + @r0) + @r1 + @r1) == [true, true, true, true] [BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([[[1].exists(@c0:0, @c0:0 > 0)], [["a"].exists(@c0:1, @c0:1 == "a")]], @index0 + @index0 + @index1 + @index1 == [true, true, true, true]) [BLOCK_RECURSION_DEPTH_1]: cel.@block([[1], @c0:0 > 0, @x0:0 || @index1, ["a"], @c0:1 == "a", @x0:1 || @index4, [true, true, true, true]], [@index0.exists(@c0:0, @index1)] + [@index0.exists(@c0:0, @index1)] + [@index3.exists(@c0:1, @index4)] + [@index3.exists(@c0:1, @index4)] == @index6) -[BLOCK_RECURSION_DEPTH_2]: cel.@block([[1], @c0:0 > 0, @x0:0 || @index1, ["a"], @c0:1 == "a", @x0:1 || @index4, [true, true, true, true]], [@index0.exists(@c0:0, @index1)] + [@index0.exists(@c0:0, @index1)] + [@index3.exists(@c0:1, @index4)] + [@index3.exists(@c0:1, @index4)] == @index6) -[BLOCK_RECURSION_DEPTH_3]: cel.@block([[1], @c0:0 > 0, @x0:0 || @index1, @index0.exists(@c0:0, @index1), [@index3], ["a"], @c0:1 == "a", @x0:1 || @index6, @index5.exists(@c0:1, @index6), [@index8], [true, true, true, true], @index4 + @index4 + @index9 + @index9], @index11 == @index10) -[BLOCK_RECURSION_DEPTH_4]: cel.@block([[1], @c0:0 > 0, @x0:0 || @index1, @index0.exists(@c0:0, @index1), [@index3], ["a"], @c0:1 == "a", @x0:1 || @index6, @index5.exists(@c0:1, @index6), [@index8], [true, true, true, true], @index4 + @index4 + @index9 + @index9], @index11 == @index10) -[BLOCK_RECURSION_DEPTH_5]: cel.@block([[1], @c0:0 > 0, @x0:0 || @index1, @index0.exists(@c0:0, @index1), [@index3], ["a"], @c0:1 == "a", @x0:1 || @index6, @index5.exists(@c0:1, @index6), [@index8], [true, true, true, true], @index4 + @index4 + @index9 + @index9], @index11 == @index10) -[BLOCK_RECURSION_DEPTH_6]: cel.@block([[1], @c0:0 > 0, @x0:0 || @index1, @index0.exists(@c0:0, @index1), [@index3], ["a"], @c0:1 == "a", @x0:1 || @index6, @index5.exists(@c0:1, @index6), [@index8], [true, true, true, true], @index4 + @index4 + @index9 + @index9], @index11 == @index10) -[BLOCK_RECURSION_DEPTH_7]: cel.@block([[1], @c0:0 > 0, @x0:0 || @index1, @index0.exists(@c0:0, @index1), [@index3], ["a"], @c0:1 == "a", @x0:1 || @index6, @index5.exists(@c0:1, @index6), [@index8], [true, true, true, true], @index4 + @index4 + @index9 + @index9], @index11 == @index10) -[BLOCK_RECURSION_DEPTH_8]: cel.@block([[1], @c0:0 > 0, @x0:0 || @index1, @index0.exists(@c0:0, @index1), [@index3], ["a"], @c0:1 == "a", @x0:1 || @index6, @index5.exists(@c0:1, @index6), [@index8], [true, true, true, true], @index4 + @index4 + @index9 + @index9], @index11 == @index10) -[BLOCK_RECURSION_DEPTH_9]: cel.@block([[1], @c0:0 > 0, @x0:0 || @index1, @index0.exists(@c0:0, @index1), [@index3], ["a"], @c0:1 == "a", @x0:1 || @index6, @index5.exists(@c0:1, @index6), [@index8], [true, true, true, true], @index4 + @index4 + @index9 + @index9], @index11 == @index10) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([@x0:0 || @c0:0 > 0, @x0:1 || @c0:1 == "a", [1], ["a"], [true, true, true, true]], [@index2.exists(@c0:0, @c0:0 > 0)] + [@index2.exists(@c0:0, @c0:0 > 0)] + [@index3.exists(@c0:1, @c0:1 == "a")] + [@index3.exists(@c0:1, @c0:1 == "a")] == @index4) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([[1].exists(@c0:0, @c0:0 > 0), ["a"].exists(@c0:1, @c0:1 == "a"), [@index0], [@index1], @index2 + @index2 + @index3 + @index3], @index4 == [true, true, true, true]) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([[[1].exists(@c0:0, @c0:0 > 0)], [["a"].exists(@c0:1, @c0:1 == "a")]], @index0 + @index0 + @index1 + @index1 == [true, true, true, true]) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([[[1].exists(@c0:0, @c0:0 > 0)], [["a"].exists(@c0:1, @c0:1 == "a")]], @index0 + @index0 + @index1 + @index1 == [true, true, true, true]) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([[[1].exists(@c0:0, @c0:0 > 0)], [["a"].exists(@c0:1, @c0:1 == "a")]], @index0 + @index0 + @index1 + @index1 == [true, true, true, true]) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([[[1].exists(@c0:0, @c0:0 > 0)], [["a"].exists(@c0:1, @c0:1 == "a")]], @index0 + @index0 + @index1 + @index1 == [true, true, true, true]) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([[[1].exists(@c0:0, @c0:0 > 0)], [["a"].exists(@c0:1, @c0:1 == "a")]], @index0 + @index0 + @index1 + @index1 == [true, true, true, true]) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([[[1].exists(@c0:0, @c0:0 > 0)], [["a"].exists(@c0:1, @c0:1 == "a")]], @index0 + @index0 + @index1 + @index1 == [true, true, true, true]) Test case: NESTED_MACROS Source: [1,2,3].map(i, [1, 2, 3].map(i, i + 1)) == [[2, 3, 4], [2, 3, 4], [2, 3, 4]] @@ -308,15 +308,15 @@ Source: [1,2,3].map(i, [1, 2, 3].map(i, i + 1)) == [[2, 3, 4], [2, 3, 4], [2, 3, Result: true [CASCADED_BINDS]: cel.bind(@r0, [1, 2, 3], @r0.map(@c0:0, @r0.map(@c1:0, @c1:0 + 1))) == cel.bind(@r1, [2, 3, 4], [@r1, @r1, @r1]) [BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([[1, 2, 3], [2, 3, 4]], @index0.map(@c0:0, @index0.map(@c1:0, @c1:0 + 1)) == [@index1, @index1, @index1]) -[BLOCK_RECURSION_DEPTH_1]: cel.@block([[1, 2, 3], [2, 3, 4], [@index1, @index1, @index1], @c1:0 + 1, [@index3], @x1:0 + @index4], @index0.map(@c0:0, @index0.map(@c1:0, @index3)) == @index2) -[BLOCK_RECURSION_DEPTH_2]: cel.@block([[1, 2, 3], [2, 3, 4], [@index1, @index1, @index1], [@c1:0 + 1], @index0.map(@c1:0, @c1:0 + 1), @x0:0 + [@index4], @index0.map(@c0:0, @index4)], @index6 == @index2) +[BLOCK_RECURSION_DEPTH_1]: cel.@block([[1, 2, 3], [2, 3, 4], @c1:0 + 1, [@index2], @x1:0 + @index3, [@index1, @index1, @index1]], @index0.map(@c0:0, @index0.map(@c1:0, @index2)) == @index5) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([[1, 2, 3], [2, 3, 4], [@c1:0 + 1], @index0.map(@c1:0, @c1:0 + 1), @x0:0 + [@index3], @index0.map(@c0:0, @index3)], @index5 == [@index1, @index1, @index1]) [BLOCK_RECURSION_DEPTH_3]: Unparse Error: java.lang.IllegalArgumentException: unexpected expr kind: NOT_SET -[BLOCK_RECURSION_DEPTH_4]: cel.@block([[1, 2, 3], [2, 3, 4], [@index1, @index1, @index1], @index0.map(@c1:0, @c1:0 + 1), @index0.map(@c0:0, @index3)], @index4 == @index2) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([[1, 2, 3], [2, 3, 4], @index0.map(@c1:0, @c1:0 + 1)], @index0.map(@c0:0, @index2) == [@index1, @index1, @index1]) [BLOCK_RECURSION_DEPTH_5]: Unparse Error: java.lang.IllegalArgumentException: unexpected expr kind: NOT_SET [BLOCK_RECURSION_DEPTH_6]: Unparse Error: java.lang.IllegalArgumentException: unexpected expr kind: NOT_SET -[BLOCK_RECURSION_DEPTH_7]: cel.@block([[1, 2, 3], [2, 3, 4], [@index1, @index1, @index1], @index0.map(@c0:0, @index0.map(@c1:0, @c1:0 + 1))], @index3 == @index2) -[BLOCK_RECURSION_DEPTH_8]: cel.@block([[1, 2, 3], [2, 3, 4], [@index1, @index1, @index1], @index0.map(@c0:0, @index0.map(@c1:0, @c1:0 + 1))], @index3 == @index2) -[BLOCK_RECURSION_DEPTH_9]: cel.@block([[1, 2, 3], [2, 3, 4], [@index1, @index1, @index1], @index0.map(@c0:0, @index0.map(@c1:0, @c1:0 + 1))], @index3 == @index2) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([[1, 2, 3], [2, 3, 4], @index0.map(@c0:0, @index0.map(@c1:0, @c1:0 + 1))], @index2 == [@index1, @index1, @index1]) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([[1, 2, 3], [2, 3, 4]], @index0.map(@c0:0, @index0.map(@c1:0, @c1:0 + 1)) == [@index1, @index1, @index1]) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([[1, 2, 3], [2, 3, 4]], @index0.map(@c0:0, @index0.map(@c1:0, @c1:0 + 1)) == [@index1, @index1, @index1]) Test case: NESTED_MACROS_2 Source: [1, 2].map(y, [1, 2, 3].filter(x, x == y)) == [[1], [2]] @@ -324,15 +324,15 @@ Source: [1, 2].map(y, [1, 2, 3].filter(x, x == y)) == [[1], [2]] Result: true [CASCADED_BINDS]: [1, 2].map(@c0:0, [1, 2, 3].filter(@c1:0, @c1:0 == @c0:0)) == [[1], [2]] [BLOCK_COMMON_SUBEXPR_ONLY]: [1, 2].map(@c0:0, [1, 2, 3].filter(@c1:0, @c1:0 == @c0:0)) == [[1], [2]] -[BLOCK_RECURSION_DEPTH_1]: cel.@block([[2], [1], [@index1, @index0], [@c1:0], @x1:0 + @index3, @c1:0 == @c0:0, @index5 ? @index4 : @x1:0, [1, 2, 3], [1, 2]], @index8.map(@c0:0, @index7.filter(@c1:0, @index5)) == @index2) -[BLOCK_RECURSION_DEPTH_2]: cel.@block([[[1], [2]], @x1:0 + [@c1:0], (@c1:0 == @c0:0) ? @index1 : @x1:0, [1, 2, 3].filter(@c1:0, @c1:0 == @c0:0), @x0:0 + [@index3], [1, 2].map(@c0:0, @index3)], @index5 == @index0) +[BLOCK_RECURSION_DEPTH_1]: cel.@block([[1, 2], [1, 2, 3], @c1:0 == @c0:0, [@c1:0], @x1:0 + @index3, @index2 ? @index4 : @x1:0, [1], [2], [@index6, @index7]], @index0.map(@c0:0, @index1.filter(@c1:0, @index2)) == @index8) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([@x1:0 + [@c1:0], (@c1:0 == @c0:0) ? @index0 : @x1:0, [1, 2, 3].filter(@c1:0, @c1:0 == @c0:0), @x0:0 + [@index2], [1, 2].map(@c0:0, @index2), [[1], [2]]], @index4 == @index5) [BLOCK_RECURSION_DEPTH_3]: Unparse Error: java.lang.IllegalArgumentException: unexpected expr kind: NOT_SET -[BLOCK_RECURSION_DEPTH_4]: cel.@block([[[1], [2]], [1, 2, 3].filter(@c1:0, @c1:0 == @c0:0), [1, 2].map(@c0:0, @index1)], @index2 == @index0) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([[1, 2, 3].filter(@c1:0, @c1:0 == @c0:0)], [1, 2].map(@c0:0, @index0) == [[1], [2]]) [BLOCK_RECURSION_DEPTH_5]: Unparse Error: java.lang.IllegalArgumentException: unexpected expr kind: NOT_SET [BLOCK_RECURSION_DEPTH_6]: Unparse Error: java.lang.IllegalArgumentException: unexpected expr kind: NOT_SET -[BLOCK_RECURSION_DEPTH_7]: cel.@block([[[1], [2]], [1, 2].map(@c0:0, [1, 2, 3].filter(@c1:0, @c1:0 == @c0:0))], @index1 == @index0) -[BLOCK_RECURSION_DEPTH_8]: cel.@block([[[1], [2]], [1, 2].map(@c0:0, [1, 2, 3].filter(@c1:0, @c1:0 == @c0:0))], @index1 == @index0) -[BLOCK_RECURSION_DEPTH_9]: cel.@block([[[1], [2]], [1, 2].map(@c0:0, [1, 2, 3].filter(@c1:0, @c1:0 == @c0:0))], @index1 == @index0) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([[1, 2].map(@c0:0, [1, 2, 3].filter(@c1:0, @c1:0 == @c0:0))], @index0 == [[1], [2]]) +[BLOCK_RECURSION_DEPTH_8]: [1, 2].map(@c0:0, [1, 2, 3].filter(@c1:0, @c1:0 == @c0:0)) == [[1], [2]] +[BLOCK_RECURSION_DEPTH_9]: [1, 2].map(@c0:0, [1, 2, 3].filter(@c1:0, @c1:0 == @c0:0)) == [[1], [2]] Test case: INCLUSION_LIST Source: 1 in [1,2,3] && 2 in [1,2,3] && 3 in [3, [1,2,3]] && 1 in [1,2,3] @@ -340,15 +340,15 @@ Source: 1 in [1,2,3] && 2 in [1,2,3] && 3 in [3, [1,2,3]] && 1 in [1,2,3] Result: true [CASCADED_BINDS]: cel.bind(@r0, [1, 2, 3], cel.bind(@r1, 1 in @r0, @r1 && 2 in @r0 && 3 in [3, @r0] && @r1)) [BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([[1, 2, 3], 1 in @index0], @index1 && 2 in @index0 && 3 in [3, @index0] && @index1) -[BLOCK_RECURSION_DEPTH_1]: cel.@block([[1, 2, 3], 1 in @index0, [3, @index0], 3 in @index2, @index3 && @index1, 2 in @index0, @index1 && @index5], @index6 && @index4) -[BLOCK_RECURSION_DEPTH_2]: cel.@block([[1, 2, 3], 1 in @index0, 3 in [3, @index0], @index2 && @index1, @index1 && 2 in @index0], @index4 && @index3) -[BLOCK_RECURSION_DEPTH_3]: cel.@block([[1, 2, 3], 1 in @index0, 3 in [3, @index0] && @index1, @index1 && 2 in @index0], @index3 && @index2) -[BLOCK_RECURSION_DEPTH_4]: cel.@block([[1, 2, 3], 1 in @index0, 3 in [3, @index0] && @index1, @index1 && 2 in @index0], @index3 && @index2) -[BLOCK_RECURSION_DEPTH_5]: cel.@block([[1, 2, 3], 1 in @index0, 3 in [3, @index0] && @index1, @index1 && 2 in @index0], @index3 && @index2) -[BLOCK_RECURSION_DEPTH_6]: cel.@block([[1, 2, 3], 1 in @index0, 3 in [3, @index0] && @index1, @index1 && 2 in @index0], @index3 && @index2) -[BLOCK_RECURSION_DEPTH_7]: cel.@block([[1, 2, 3], 1 in @index0, 3 in [3, @index0] && @index1, @index1 && 2 in @index0], @index3 && @index2) -[BLOCK_RECURSION_DEPTH_8]: cel.@block([[1, 2, 3], 1 in @index0, 3 in [3, @index0] && @index1, @index1 && 2 in @index0], @index3 && @index2) -[BLOCK_RECURSION_DEPTH_9]: cel.@block([[1, 2, 3], 1 in @index0, 3 in [3, @index0] && @index1, @index1 && 2 in @index0], @index3 && @index2) +[BLOCK_RECURSION_DEPTH_1]: cel.@block([[1, 2, 3], 1 in @index0, 2 in @index0, @index1 && @index2, [3, @index0], 3 in @index4, @index5 && @index1], @index3 && @index6) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([1 in [1, 2, 3], [1, 2, 3], @index0 && 2 in @index1, 3 in [3, @index1]], @index2 && @index3 && @index0) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([1 in [1, 2, 3], [1, 2, 3], 3 in [3, @index1] && @index0], @index0 && 2 in @index1 && @index2) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([1 in [1, 2, 3], [1, 2, 3]], @index0 && 2 in @index1 && 3 in [3, @index1] && @index0) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([1 in [1, 2, 3], [1, 2, 3]], @index0 && 2 in @index1 && 3 in [3, @index1] && @index0) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([1 in [1, 2, 3], [1, 2, 3]], @index0 && 2 in @index1 && 3 in [3, @index1] && @index0) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([1 in [1, 2, 3], [1, 2, 3]], @index0 && 2 in @index1 && 3 in [3, @index1] && @index0) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([1 in [1, 2, 3], [1, 2, 3]], @index0 && 2 in @index1 && 3 in [3, @index1] && @index0) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([1 in [1, 2, 3], [1, 2, 3]], @index0 && 2 in @index1 && 3 in [3, @index1] && @index0) Test case: INCLUSION_MAP Source: 2 in {'a': 1, 2: {true: false}, 3: {true: false}} @@ -357,14 +357,14 @@ Result: true [CASCADED_BINDS]: 2 in cel.bind(@r0, {true: false}, {"a": 1, 2: @r0, 3: @r0}) [BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([{true: false}], 2 in {"a": 1, 2: @index0, 3: @index0}) [BLOCK_RECURSION_DEPTH_1]: cel.@block([{true: false}, {"a": 1, 2: @index0, 3: @index0}], 2 in @index1) -[BLOCK_RECURSION_DEPTH_2]: cel.@block([{true: false}, {"a": 1, 2: @index0, 3: @index0}], 2 in @index1) -[BLOCK_RECURSION_DEPTH_3]: cel.@block([{true: false}, {"a": 1, 2: @index0, 3: @index0}], 2 in @index1) -[BLOCK_RECURSION_DEPTH_4]: cel.@block([{true: false}, {"a": 1, 2: @index0, 3: @index0}], 2 in @index1) -[BLOCK_RECURSION_DEPTH_5]: cel.@block([{true: false}, {"a": 1, 2: @index0, 3: @index0}], 2 in @index1) -[BLOCK_RECURSION_DEPTH_6]: cel.@block([{true: false}, {"a": 1, 2: @index0, 3: @index0}], 2 in @index1) -[BLOCK_RECURSION_DEPTH_7]: cel.@block([{true: false}, {"a": 1, 2: @index0, 3: @index0}], 2 in @index1) -[BLOCK_RECURSION_DEPTH_8]: cel.@block([{true: false}, {"a": 1, 2: @index0, 3: @index0}], 2 in @index1) -[BLOCK_RECURSION_DEPTH_9]: cel.@block([{true: false}, {"a": 1, 2: @index0, 3: @index0}], 2 in @index1) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([{true: false}], 2 in {"a": 1, 2: @index0, 3: @index0}) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([{true: false}], 2 in {"a": 1, 2: @index0, 3: @index0}) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([{true: false}], 2 in {"a": 1, 2: @index0, 3: @index0}) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([{true: false}], 2 in {"a": 1, 2: @index0, 3: @index0}) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([{true: false}], 2 in {"a": 1, 2: @index0, 3: @index0}) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([{true: false}], 2 in {"a": 1, 2: @index0, 3: @index0}) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([{true: false}], 2 in {"a": 1, 2: @index0, 3: @index0}) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([{true: false}], 2 in {"a": 1, 2: @index0, 3: @index0}) Test case: MACRO_ITER_VAR_NOT_REFERENCED Source: [1,2].map(i, [1, 2].map(i, [3,4])) == [[[3, 4], [3, 4]], [[3, 4], [3, 4]]] @@ -372,15 +372,15 @@ Source: [1,2].map(i, [1, 2].map(i, [3,4])) == [[[3, 4], [3, 4]], [[3, 4], [3, 4] Result: true [CASCADED_BINDS]: cel.bind(@r1, [3, 4], cel.bind(@r0, [1, 2], @r0.map(@c0:0, @r0.map(@c1:0, @r1))) == cel.bind(@r2, [@r1, @r1], [@r2, @r2])) [BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([[1, 2], [3, 4], [@index1, @index1]], @index0.map(@c0:0, @index0.map(@c1:0, @index1)) == [@index2, @index2]) -[BLOCK_RECURSION_DEPTH_1]: cel.@block([[1, 2], [3, 4], [@index1, @index1], [@index2, @index2], [@index1], @x1:0 + @index4], @index0.map(@c0:0, @index0.map(@c1:0, @index1)) == @index3) -[BLOCK_RECURSION_DEPTH_2]: cel.@block([[1, 2], [3, 4], [@index1, @index1], [@index2, @index2], @x1:0 + [@index1], @index0.map(@c1:0, @index1), @x0:0 + [@index5], @index0.map(@c0:0, @index5)], @index7 == @index3) -[BLOCK_RECURSION_DEPTH_3]: cel.@block([[1, 2], [3, 4], [@index1, @index1], [@index2, @index2], @index0.map(@c1:0, @index1), @index0.map(@c0:0, @index4)], @index5 == @index3) -[BLOCK_RECURSION_DEPTH_4]: Unparse Error: java.lang.IllegalArgumentException: unexpected expr kind: NOT_SET +[BLOCK_RECURSION_DEPTH_1]: cel.@block([[1, 2], [3, 4], [@index1, @index1], [@index1], @x1:0 + @index3, [@index2, @index2]], @index0.map(@c0:0, @index0.map(@c1:0, @index1)) == @index5) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([[[3, 4], [3, 4]], [1, 2], [[3, 4]], @index1.map(@c1:0, [3, 4]), @x0:0 + [@index3], @index1.map(@c0:0, @index3)], @index5 == [@index0, @index0]) +[BLOCK_RECURSION_DEPTH_3]: Unparse Error: java.lang.IllegalArgumentException: unexpected expr kind: NOT_SET +[BLOCK_RECURSION_DEPTH_4]: cel.@block([[[3, 4], [3, 4]], [1, 2], @index1.map(@c1:0, [3, 4])], @index1.map(@c0:0, @index2) == [@index0, @index0]) [BLOCK_RECURSION_DEPTH_5]: Unparse Error: java.lang.IllegalArgumentException: unexpected expr kind: NOT_SET -[BLOCK_RECURSION_DEPTH_6]: cel.@block([[1, 2], [3, 4], [@index1, @index1], [@index2, @index2], @index0.map(@c0:0, @index0.map(@c1:0, @index1))], @index4 == @index3) -[BLOCK_RECURSION_DEPTH_7]: cel.@block([[1, 2], [3, 4], [@index1, @index1], [@index2, @index2], @index0.map(@c0:0, @index0.map(@c1:0, @index1))], @index4 == @index3) -[BLOCK_RECURSION_DEPTH_8]: cel.@block([[1, 2], [3, 4], [@index1, @index1], [@index2, @index2], @index0.map(@c0:0, @index0.map(@c1:0, @index1))], @index4 == @index3) -[BLOCK_RECURSION_DEPTH_9]: cel.@block([[1, 2], [3, 4], [@index1, @index1], [@index2, @index2], @index0.map(@c0:0, @index0.map(@c1:0, @index1))], @index4 == @index3) +[BLOCK_RECURSION_DEPTH_6]: Unparse Error: java.lang.IllegalArgumentException: unexpected expr kind: NOT_SET +[BLOCK_RECURSION_DEPTH_7]: cel.@block([[[3, 4], [3, 4]], [1, 2], @index1.map(@c0:0, @index1.map(@c1:0, [3, 4]))], @index2 == [@index0, @index0]) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([[[3, 4], [3, 4]], [1, 2]], @index1.map(@c0:0, @index1.map(@c1:0, [3, 4])) == [@index0, @index0]) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([[[3, 4], [3, 4]], [1, 2]], @index1.map(@c0:0, @index1.map(@c1:0, [3, 4])) == [@index0, @index0]) Test case: MACRO_SHADOWED_VARIABLE Source: [x - 1 > 3 ? x - 1 : 5].exists(x, x - 1 > 3) || x - 1 > 3 @@ -388,15 +388,15 @@ Source: [x - 1 > 3 ? x - 1 : 5].exists(x, x - 1 > 3) || x - 1 > 3 Result: true [CASCADED_BINDS]: cel.bind(@r0, x - 1, cel.bind(@r1, @r0 > 3, [@r1 ? @r0 : 5].exists(@c0:0, @c0:0 - 1 > 3) || @r1)) [BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([x - 1, @index0 > 3], [@index1 ? @index0 : 5].exists(@c0:0, @c0:0 - 1 > 3) || @index1) -[BLOCK_RECURSION_DEPTH_1]: cel.@block([x - 1, @index0 > 3, @c0:0 - 1, @index2 > 3, @x0:0 || @index3, @index1 ? @index0 : 5, [@index5]], @index6.exists(@c0:0, @index3) || @index1) -[BLOCK_RECURSION_DEPTH_2]: cel.@block([x - 1, @index0 > 3, @c0:0 - 1 > 3, @x0:0 || @index2, [@index1 ? @index0 : 5]], @index4.exists(@c0:0, @index2) || @index1) -[BLOCK_RECURSION_DEPTH_3]: cel.@block([x - 1, @index0 > 3, @x0:0 || @c0:0 - 1 > 3, [@index1 ? @index0 : 5].exists(@c0:0, @c0:0 - 1 > 3)], @index3 || @index1) -[BLOCK_RECURSION_DEPTH_4]: cel.@block([x - 1, @index0 > 3, [@index1 ? @index0 : 5].exists(@c0:0, @c0:0 - 1 > 3)], @index2 || @index1) -[BLOCK_RECURSION_DEPTH_5]: cel.@block([x - 1, @index0 > 3, [@index1 ? @index0 : 5].exists(@c0:0, @c0:0 - 1 > 3)], @index2 || @index1) -[BLOCK_RECURSION_DEPTH_6]: cel.@block([x - 1, @index0 > 3, [@index1 ? @index0 : 5].exists(@c0:0, @c0:0 - 1 > 3)], @index2 || @index1) -[BLOCK_RECURSION_DEPTH_7]: cel.@block([x - 1, @index0 > 3, [@index1 ? @index0 : 5].exists(@c0:0, @c0:0 - 1 > 3)], @index2 || @index1) -[BLOCK_RECURSION_DEPTH_8]: cel.@block([x - 1, @index0 > 3, [@index1 ? @index0 : 5].exists(@c0:0, @c0:0 - 1 > 3)], @index2 || @index1) -[BLOCK_RECURSION_DEPTH_9]: cel.@block([x - 1, @index0 > 3, [@index1 ? @index0 : 5].exists(@c0:0, @c0:0 - 1 > 3)], @index2 || @index1) +[BLOCK_RECURSION_DEPTH_1]: cel.@block([x - 1, @index0 > 3, @index1 ? @index0 : 5, [@index2], @c0:0 - 1, @index4 > 3, @x0:0 || @index5], @index3.exists(@c0:0, @index5) || @index1) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([x - 1 > 3, @index0 ? (x - 1) : 5, @c0:0 - 1 > 3, [@index1], @x0:0 || @index2], @index3.exists(@c0:0, @index2) || @index0) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([x - 1 > 3, [@index0 ? (x - 1) : 5], @x0:0 || @c0:0 - 1 > 3, @index1.exists(@c0:0, @c0:0 - 1 > 3)], @index3 || @index0) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([x - 1 > 3, [@index0 ? (x - 1) : 5].exists(@c0:0, @c0:0 - 1 > 3)], @index1 || @index0) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([x - 1 > 3], [@index0 ? (x - 1) : 5].exists(@c0:0, @c0:0 - 1 > 3) || @index0) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([x - 1 > 3], [@index0 ? (x - 1) : 5].exists(@c0:0, @c0:0 - 1 > 3) || @index0) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([x - 1 > 3], [@index0 ? (x - 1) : 5].exists(@c0:0, @c0:0 - 1 > 3) || @index0) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([x - 1 > 3], [@index0 ? (x - 1) : 5].exists(@c0:0, @c0:0 - 1 > 3) || @index0) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([x - 1 > 3], [@index0 ? (x - 1) : 5].exists(@c0:0, @c0:0 - 1 > 3) || @index0) Test case: MACRO_SHADOWED_VARIABLE_2 Source: ["foo", "bar"].map(x, [x + x, x + x]).map(x, [x + x, x + x]) @@ -404,15 +404,15 @@ Source: ["foo", "bar"].map(x, [x + x, x + x]).map(x, [x + x, x + x]) Result: [[[foofoo, foofoo, foofoo, foofoo], [foofoo, foofoo, foofoo, foofoo]], [[barbar, barbar, barbar, barbar], [barbar, barbar, barbar, barbar]]] [CASCADED_BINDS]: ["foo", "bar"].map(@c1:0, cel.bind(@r0, @c1:0 + @c1:0, [@r0, @r0])).map(@c0:0, cel.bind(@r1, @c0:0 + @c0:0, [@r1, @r1])) [BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([@c1:0 + @c1:0, @c0:0 + @c0:0], ["foo", "bar"].map(@c1:0, [@index0, @index0]).map(@c0:0, [@index1, @index1])) -[BLOCK_RECURSION_DEPTH_1]: cel.@block([@c1:0 + @c1:0, @c0:0 + @c0:0, [@index1, @index1], [@index2], @x0:0 + @index3, [@index0, @index0], [@index5], @x1:0 + @index6, ["foo", "bar"]], @index8.map(@c1:0, @index5).map(@c0:0, @index2)) -[BLOCK_RECURSION_DEPTH_2]: cel.@block([@c1:0 + @c1:0, @c0:0 + @c0:0, [[@index1, @index1]], @x0:0 + @index2, [[@index0, @index0]], ["foo", "bar"].map(@c1:0, [@index0, @index0])], @index5.map(@c0:0, [@index1, @index1])) -[BLOCK_RECURSION_DEPTH_3]: cel.@block([@c1:0 + @c1:0, @c0:0 + @c0:0, @x0:0 + [[@index1, @index1]], @x1:0 + [[@index0, @index0]], ["foo", "bar"].map(@c1:0, [@index0, @index0])], @index4.map(@c0:0, [@index1, @index1])) -[BLOCK_RECURSION_DEPTH_4]: cel.@block([@c1:0 + @c1:0, @c0:0 + @c0:0, @x0:0 + [[@index1, @index1]], ["foo", "bar"].map(@c1:0, [@index0, @index0])], @index3.map(@c0:0, [@index1, @index1])) -[BLOCK_RECURSION_DEPTH_5]: cel.@block([@c1:0 + @c1:0, @c0:0 + @c0:0, @x0:0 + [[@index1, @index1]], ["foo", "bar"].map(@c1:0, [@index0, @index0])], @index3.map(@c0:0, [@index1, @index1])) -[BLOCK_RECURSION_DEPTH_6]: cel.@block([@c1:0 + @c1:0, @c0:0 + @c0:0, @x0:0 + [[@index1, @index1]], ["foo", "bar"].map(@c1:0, [@index0, @index0])], @index3.map(@c0:0, [@index1, @index1])) -[BLOCK_RECURSION_DEPTH_7]: cel.@block([@c1:0 + @c1:0, @c0:0 + @c0:0, @x0:0 + [[@index1, @index1]], ["foo", "bar"].map(@c1:0, [@index0, @index0])], @index3.map(@c0:0, [@index1, @index1])) -[BLOCK_RECURSION_DEPTH_8]: cel.@block([@c1:0 + @c1:0, @c0:0 + @c0:0, @x0:0 + [[@index1, @index1]], ["foo", "bar"].map(@c1:0, [@index0, @index0])], @index3.map(@c0:0, [@index1, @index1])) -[BLOCK_RECURSION_DEPTH_9]: cel.@block([@c1:0 + @c1:0, @c0:0 + @c0:0, @x0:0 + [[@index1, @index1]], ["foo", "bar"].map(@c1:0, [@index0, @index0])], @index3.map(@c0:0, [@index1, @index1])) +[BLOCK_RECURSION_DEPTH_1]: cel.@block([@c1:0 + @c1:0, @c0:0 + @c0:0, ["foo", "bar"], [@index0, @index0], [@index3], @x1:0 + @index4, [@index1, @index1], [@index6], @x0:0 + @index7], @index2.map(@c1:0, @index3).map(@c0:0, @index6)) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([@c1:0 + @c1:0, @c0:0 + @c0:0, [[@index0, @index0]], ["foo", "bar"].map(@c1:0, [@index0, @index0]), [[@index1, @index1]]], @index3.map(@c0:0, [@index1, @index1])) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([@c1:0 + @c1:0, @c0:0 + @c0:0, @x1:0 + [[@index0, @index0]], @x0:0 + [[@index1, @index1]]], ["foo", "bar"].map(@c1:0, [@index0, @index0]).map(@c0:0, [@index1, @index1])) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([@c1:0 + @c1:0, @c0:0 + @c0:0, ["foo", "bar"].map(@c1:0, [@index0, @index0])], @index2.map(@c0:0, [@index1, @index1])) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([@c1:0 + @c1:0, @c0:0 + @c0:0], ["foo", "bar"].map(@c1:0, [@index0, @index0]).map(@c0:0, [@index1, @index1])) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([@c1:0 + @c1:0, @c0:0 + @c0:0], ["foo", "bar"].map(@c1:0, [@index0, @index0]).map(@c0:0, [@index1, @index1])) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([@c1:0 + @c1:0, @c0:0 + @c0:0], ["foo", "bar"].map(@c1:0, [@index0, @index0]).map(@c0:0, [@index1, @index1])) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([@c1:0 + @c1:0, @c0:0 + @c0:0], ["foo", "bar"].map(@c1:0, [@index0, @index0]).map(@c0:0, [@index1, @index1])) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([@c1:0 + @c1:0, @c0:0 + @c0:0], ["foo", "bar"].map(@c1:0, [@index0, @index0]).map(@c0:0, [@index1, @index1])) Test case: PRESENCE_TEST Source: has({'a': true}.a) && {'a':true}['a'] @@ -421,14 +421,14 @@ Result: true [CASCADED_BINDS]: cel.bind(@r0, {"a": true}, has(@r0.a) && @r0["a"]) [BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([{"a": true}], has(@index0.a) && @index0["a"]) [BLOCK_RECURSION_DEPTH_1]: cel.@block([{"a": true}, @index0["a"]], has(@index0.a) && @index1) -[BLOCK_RECURSION_DEPTH_2]: cel.@block([{"a": true}, @index0["a"]], has(@index0.a) && @index1) -[BLOCK_RECURSION_DEPTH_3]: cel.@block([{"a": true}, @index0["a"]], has(@index0.a) && @index1) -[BLOCK_RECURSION_DEPTH_4]: cel.@block([{"a": true}, @index0["a"]], has(@index0.a) && @index1) -[BLOCK_RECURSION_DEPTH_5]: cel.@block([{"a": true}, @index0["a"]], has(@index0.a) && @index1) -[BLOCK_RECURSION_DEPTH_6]: cel.@block([{"a": true}, @index0["a"]], has(@index0.a) && @index1) -[BLOCK_RECURSION_DEPTH_7]: cel.@block([{"a": true}, @index0["a"]], has(@index0.a) && @index1) -[BLOCK_RECURSION_DEPTH_8]: cel.@block([{"a": true}, @index0["a"]], has(@index0.a) && @index1) -[BLOCK_RECURSION_DEPTH_9]: cel.@block([{"a": true}, @index0["a"]], has(@index0.a) && @index1) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([{"a": true}], has(@index0.a) && @index0["a"]) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([{"a": true}], has(@index0.a) && @index0["a"]) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([{"a": true}], has(@index0.a) && @index0["a"]) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([{"a": true}], has(@index0.a) && @index0["a"]) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([{"a": true}], has(@index0.a) && @index0["a"]) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([{"a": true}], has(@index0.a) && @index0["a"]) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([{"a": true}], has(@index0.a) && @index0["a"]) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([{"a": true}], has(@index0.a) && @index0["a"]) Test case: PRESENCE_TEST_WITH_TERNARY Source: (has(msg.oneof_type.payload) ? msg.oneof_type.payload.single_int64 : 0) == 10 @@ -439,12 +439,12 @@ Result: true [BLOCK_RECURSION_DEPTH_1]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64], (has(@index0.payload) ? @index2 : 0) == 10) [BLOCK_RECURSION_DEPTH_2]: cel.@block([msg.oneof_type, @index0.payload.single_int64, has(@index0.payload) ? @index1 : 0], @index2 == 10) [BLOCK_RECURSION_DEPTH_3]: cel.@block([msg.oneof_type, has(@index0.payload) ? @index0.payload.single_int64 : 0], @index1 == 10) -[BLOCK_RECURSION_DEPTH_4]: cel.@block([msg.oneof_type, has(@index0.payload) ? @index0.payload.single_int64 : 0], @index1 == 10) -[BLOCK_RECURSION_DEPTH_5]: cel.@block([msg.oneof_type, has(@index0.payload) ? @index0.payload.single_int64 : 0], @index1 == 10) -[BLOCK_RECURSION_DEPTH_6]: cel.@block([msg.oneof_type, has(@index0.payload) ? @index0.payload.single_int64 : 0], @index1 == 10) -[BLOCK_RECURSION_DEPTH_7]: cel.@block([msg.oneof_type, has(@index0.payload) ? @index0.payload.single_int64 : 0], @index1 == 10) -[BLOCK_RECURSION_DEPTH_8]: cel.@block([msg.oneof_type, has(@index0.payload) ? @index0.payload.single_int64 : 0], @index1 == 10) -[BLOCK_RECURSION_DEPTH_9]: cel.@block([msg.oneof_type, has(@index0.payload) ? @index0.payload.single_int64 : 0], @index1 == 10) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([msg.oneof_type], (has(@index0.payload) ? @index0.payload.single_int64 : 0) == 10) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([msg.oneof_type], (has(@index0.payload) ? @index0.payload.single_int64 : 0) == 10) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([msg.oneof_type], (has(@index0.payload) ? @index0.payload.single_int64 : 0) == 10) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([msg.oneof_type], (has(@index0.payload) ? @index0.payload.single_int64 : 0) == 10) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([msg.oneof_type], (has(@index0.payload) ? @index0.payload.single_int64 : 0) == 10) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([msg.oneof_type], (has(@index0.payload) ? @index0.payload.single_int64 : 0) == 10) Test case: PRESENCE_TEST_WITH_TERNARY_2 Source: (has(msg.oneof_type.payload) ? msg.oneof_type.payload.single_int64 : msg.oneof_type.payload.single_int64 * 0) == 10 @@ -453,14 +453,14 @@ Result: true [CASCADED_BINDS]: cel.bind(@r0, msg.oneof_type, cel.bind(@r1, @r0.payload.single_int64, has(@r0.payload) ? @r1 : (@r1 * 0))) == 10 [BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([msg.oneof_type, @index0.payload.single_int64], (has(@index0.payload) ? @index1 : (@index1 * 0)) == 10) [BLOCK_RECURSION_DEPTH_1]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, @index2 * 0], (has(@index0.payload) ? @index2 : @index3) == 10) -[BLOCK_RECURSION_DEPTH_2]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, has(@index0.payload) ? @index2 : (@index2 * 0)], @index3 == 10) -[BLOCK_RECURSION_DEPTH_3]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, has(@index0.payload) ? @index2 : (@index2 * 0)], @index3 == 10) -[BLOCK_RECURSION_DEPTH_4]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, has(@index0.payload) ? @index2 : (@index2 * 0)], @index3 == 10) -[BLOCK_RECURSION_DEPTH_5]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, has(@index0.payload) ? @index2 : (@index2 * 0)], @index3 == 10) -[BLOCK_RECURSION_DEPTH_6]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, has(@index0.payload) ? @index2 : (@index2 * 0)], @index3 == 10) -[BLOCK_RECURSION_DEPTH_7]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, has(@index0.payload) ? @index2 : (@index2 * 0)], @index3 == 10) -[BLOCK_RECURSION_DEPTH_8]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, has(@index0.payload) ? @index2 : (@index2 * 0)], @index3 == 10) -[BLOCK_RECURSION_DEPTH_9]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, has(@index0.payload) ? @index2 : (@index2 * 0)], @index3 == 10) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([msg.oneof_type.payload, @index0.single_int64, msg.oneof_type, has(@index2.payload) ? @index1 : (@index1 * 0)], @index3 == 10) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([msg.oneof_type.payload.single_int64, has(msg.oneof_type.payload) ? @index0 : (@index0 * 0)], @index1 == 10) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([msg.oneof_type.payload.single_int64], (has(msg.oneof_type.payload) ? @index0 : (@index0 * 0)) == 10) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([msg.oneof_type.payload.single_int64], (has(msg.oneof_type.payload) ? @index0 : (@index0 * 0)) == 10) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([msg.oneof_type.payload.single_int64], (has(msg.oneof_type.payload) ? @index0 : (@index0 * 0)) == 10) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([msg.oneof_type.payload.single_int64], (has(msg.oneof_type.payload) ? @index0 : (@index0 * 0)) == 10) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([msg.oneof_type.payload.single_int64], (has(msg.oneof_type.payload) ? @index0 : (@index0 * 0)) == 10) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([msg.oneof_type.payload.single_int64], (has(msg.oneof_type.payload) ? @index0 : (@index0 * 0)) == 10) Test case: PRESENCE_TEST_WITH_TERNARY_3 Source: (has(msg.oneof_type.payload.single_int64) ? msg.oneof_type.payload.single_int64 : msg.oneof_type.payload.single_int64 * 0) == 10 @@ -469,14 +469,14 @@ Result: true [CASCADED_BINDS]: cel.bind(@r0, msg.oneof_type.payload, cel.bind(@r1, @r0.single_int64, has(@r0.single_int64) ? @r1 : (@r1 * 0))) == 10 [BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([msg.oneof_type.payload, @index0.single_int64], (has(@index0.single_int64) ? @index1 : (@index1 * 0)) == 10) [BLOCK_RECURSION_DEPTH_1]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, @index2 * 0], (has(@index1.single_int64) ? @index2 : @index3) == 10) -[BLOCK_RECURSION_DEPTH_2]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, has(@index1.single_int64) ? @index2 : (@index2 * 0)], @index3 == 10) -[BLOCK_RECURSION_DEPTH_3]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, has(@index1.single_int64) ? @index2 : (@index2 * 0)], @index3 == 10) -[BLOCK_RECURSION_DEPTH_4]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, has(@index1.single_int64) ? @index2 : (@index2 * 0)], @index3 == 10) -[BLOCK_RECURSION_DEPTH_5]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, has(@index1.single_int64) ? @index2 : (@index2 * 0)], @index3 == 10) -[BLOCK_RECURSION_DEPTH_6]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, has(@index1.single_int64) ? @index2 : (@index2 * 0)], @index3 == 10) -[BLOCK_RECURSION_DEPTH_7]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, has(@index1.single_int64) ? @index2 : (@index2 * 0)], @index3 == 10) -[BLOCK_RECURSION_DEPTH_8]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, has(@index1.single_int64) ? @index2 : (@index2 * 0)], @index3 == 10) -[BLOCK_RECURSION_DEPTH_9]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, has(@index1.single_int64) ? @index2 : (@index2 * 0)], @index3 == 10) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([msg.oneof_type.payload, @index0.single_int64, has(@index0.single_int64) ? @index1 : (@index1 * 0)], @index2 == 10) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([msg.oneof_type.payload.single_int64, msg.oneof_type.payload], (has(@index1.single_int64) ? @index0 : (@index0 * 0)) == 10) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([msg.oneof_type.payload.single_int64, has(msg.oneof_type.payload.single_int64) ? @index0 : (@index0 * 0)], @index1 == 10) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([msg.oneof_type.payload.single_int64], (has(msg.oneof_type.payload.single_int64) ? @index0 : (@index0 * 0)) == 10) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([msg.oneof_type.payload.single_int64], (has(msg.oneof_type.payload.single_int64) ? @index0 : (@index0 * 0)) == 10) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([msg.oneof_type.payload.single_int64], (has(msg.oneof_type.payload.single_int64) ? @index0 : (@index0 * 0)) == 10) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([msg.oneof_type.payload.single_int64], (has(msg.oneof_type.payload.single_int64) ? @index0 : (@index0 * 0)) == 10) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([msg.oneof_type.payload.single_int64], (has(msg.oneof_type.payload.single_int64) ? @index0 : (@index0 * 0)) == 10) Test case: PRESENCE_TEST_WITH_TERNARY_NESTED Source: (has(msg.oneof_type) && has(msg.oneof_type.payload) && has(msg.oneof_type.payload.single_int64)) ? ((has(msg.oneof_type.payload.map_string_string) && has(msg.oneof_type.payload.map_string_string.key)) ? msg.oneof_type.payload.map_string_string.key == 'A' : false) : false @@ -485,14 +485,14 @@ Result: true [CASCADED_BINDS]: cel.bind(@r0, msg.oneof_type, cel.bind(@r1, @r0.payload, (has(msg.oneof_type) && has(@r0.payload) && has(@r1.single_int64)) ? cel.bind(@r2, @r1.map_string_string, (has(@r1.map_string_string) && has(@r2.key)) ? (@r2.key == "A") : false) : false)) [BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([msg.oneof_type, @index0.payload, @index1.map_string_string], (has(msg.oneof_type) && has(@index0.payload) && has(@index1.single_int64)) ? ((has(@index1.map_string_string) && has(@index2.key)) ? (@index2.key == "A") : false) : false) [BLOCK_RECURSION_DEPTH_1]: cel.@block([msg.oneof_type, @index0.payload, @index1.map_string_string, @index2.key, @index3 == "A"], (has(msg.oneof_type) && has(@index0.payload) && has(@index1.single_int64)) ? ((has(@index1.map_string_string) && has(@index2.key)) ? @index4 : false) : false) -[BLOCK_RECURSION_DEPTH_2]: cel.@block([msg.oneof_type, @index0.payload, @index1.map_string_string, @index2.key == "A", has(@index1.map_string_string) && has(@index2.key), @index4 ? @index3 : false, has(msg.oneof_type) && has(@index0.payload), @index6 && has(@index1.single_int64)], @index7 ? @index5 : false) -[BLOCK_RECURSION_DEPTH_3]: cel.@block([msg.oneof_type, @index0.payload, @index1.map_string_string, (has(@index1.map_string_string) && has(@index2.key)) ? (@index2.key == "A") : false, has(msg.oneof_type) && has(@index0.payload) && has(@index1.single_int64)], @index4 ? @index3 : false) -[BLOCK_RECURSION_DEPTH_4]: cel.@block([msg.oneof_type, @index0.payload, @index1.map_string_string, (has(@index1.map_string_string) && has(@index2.key)) ? (@index2.key == "A") : false, has(msg.oneof_type) && has(@index0.payload) && has(@index1.single_int64)], @index4 ? @index3 : false) -[BLOCK_RECURSION_DEPTH_5]: cel.@block([msg.oneof_type, @index0.payload, @index1.map_string_string, (has(@index1.map_string_string) && has(@index2.key)) ? (@index2.key == "A") : false, has(msg.oneof_type) && has(@index0.payload) && has(@index1.single_int64)], @index4 ? @index3 : false) -[BLOCK_RECURSION_DEPTH_6]: cel.@block([msg.oneof_type, @index0.payload, @index1.map_string_string, (has(@index1.map_string_string) && has(@index2.key)) ? (@index2.key == "A") : false, has(msg.oneof_type) && has(@index0.payload) && has(@index1.single_int64)], @index4 ? @index3 : false) -[BLOCK_RECURSION_DEPTH_7]: cel.@block([msg.oneof_type, @index0.payload, @index1.map_string_string, (has(@index1.map_string_string) && has(@index2.key)) ? (@index2.key == "A") : false, has(msg.oneof_type) && has(@index0.payload) && has(@index1.single_int64)], @index4 ? @index3 : false) -[BLOCK_RECURSION_DEPTH_8]: cel.@block([msg.oneof_type, @index0.payload, @index1.map_string_string, (has(@index1.map_string_string) && has(@index2.key)) ? (@index2.key == "A") : false, has(msg.oneof_type) && has(@index0.payload) && has(@index1.single_int64)], @index4 ? @index3 : false) -[BLOCK_RECURSION_DEPTH_9]: cel.@block([msg.oneof_type, @index0.payload, @index1.map_string_string, (has(@index1.map_string_string) && has(@index2.key)) ? (@index2.key == "A") : false, has(msg.oneof_type) && has(@index0.payload) && has(@index1.single_int64)], @index4 ? @index3 : false) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([msg.oneof_type.payload, @index0.map_string_string, has(@index0.map_string_string) && has(@index1.key), @index1.key == "A", msg.oneof_type, has(msg.oneof_type) && has(@index4.payload), @index5 && has(@index0.single_int64)], @index6 ? (@index2 ? @index3 : false) : false) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([msg.oneof_type.payload.map_string_string, msg.oneof_type.payload, has(msg.oneof_type) && has(msg.oneof_type.payload), (has(@index1.map_string_string) && has(@index0.key)) ? (@index0.key == "A") : false], (@index2 && has(@index1.single_int64)) ? @index3 : false) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([msg.oneof_type.payload.map_string_string, msg.oneof_type.payload, has(msg.oneof_type) && has(msg.oneof_type.payload) && has(@index1.single_int64)], @index2 ? ((has(@index1.map_string_string) && has(@index0.key)) ? (@index0.key == "A") : false) : false) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([msg.oneof_type.payload.map_string_string, msg.oneof_type.payload], (has(msg.oneof_type) && has(msg.oneof_type.payload) && has(@index1.single_int64)) ? ((has(@index1.map_string_string) && has(@index0.key)) ? (@index0.key == "A") : false) : false) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([msg.oneof_type.payload.map_string_string, msg.oneof_type.payload], (has(msg.oneof_type) && has(msg.oneof_type.payload) && has(@index1.single_int64)) ? ((has(@index1.map_string_string) && has(@index0.key)) ? (@index0.key == "A") : false) : false) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([msg.oneof_type.payload.map_string_string, msg.oneof_type.payload], (has(msg.oneof_type) && has(msg.oneof_type.payload) && has(@index1.single_int64)) ? ((has(@index1.map_string_string) && has(@index0.key)) ? (@index0.key == "A") : false) : false) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([msg.oneof_type.payload.map_string_string, msg.oneof_type.payload], (has(msg.oneof_type) && has(msg.oneof_type.payload) && has(@index1.single_int64)) ? ((has(@index1.map_string_string) && has(@index0.key)) ? (@index0.key == "A") : false) : false) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([msg.oneof_type.payload.map_string_string, msg.oneof_type.payload], (has(msg.oneof_type) && has(msg.oneof_type.payload) && has(@index1.single_int64)) ? ((has(@index1.map_string_string) && has(@index0.key)) ? (@index0.key == "A") : false) : false) Test case: OPTIONAL_LIST Source: [10, ?optional.none(), [?optional.none(), ?opt_x], [?optional.none(), ?opt_x]] == [10, [5], [5]] @@ -500,15 +500,15 @@ Source: [10, ?optional.none(), [?optional.none(), ?opt_x], [?optional.none(), ?o Result: true [CASCADED_BINDS]: cel.bind(@r0, optional.none(), cel.bind(@r1, [?@r0, ?opt_x], [10, ?@r0, @r1, @r1])) == cel.bind(@r2, [5], [10, @r2, @r2]) [BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([optional.none(), [?@index0, ?opt_x], [5]], [10, ?@index0, @index1, @index1] == [10, @index2, @index2]) -[BLOCK_RECURSION_DEPTH_1]: cel.@block([optional.none(), [?@index0, ?opt_x], [5], [10, @index2, @index2], [10, ?@index0, @index1, @index1]], @index4 == @index3) -[BLOCK_RECURSION_DEPTH_2]: cel.@block([optional.none(), [?@index0, ?opt_x], [5], [10, @index2, @index2], [10, ?@index0, @index1, @index1]], @index4 == @index3) -[BLOCK_RECURSION_DEPTH_3]: cel.@block([optional.none(), [?@index0, ?opt_x], [5], [10, @index2, @index2], [10, ?@index0, @index1, @index1]], @index4 == @index3) -[BLOCK_RECURSION_DEPTH_4]: cel.@block([optional.none(), [?@index0, ?opt_x], [5], [10, @index2, @index2], [10, ?@index0, @index1, @index1]], @index4 == @index3) -[BLOCK_RECURSION_DEPTH_5]: cel.@block([optional.none(), [?@index0, ?opt_x], [5], [10, @index2, @index2], [10, ?@index0, @index1, @index1]], @index4 == @index3) -[BLOCK_RECURSION_DEPTH_6]: cel.@block([optional.none(), [?@index0, ?opt_x], [5], [10, @index2, @index2], [10, ?@index0, @index1, @index1]], @index4 == @index3) -[BLOCK_RECURSION_DEPTH_7]: cel.@block([optional.none(), [?@index0, ?opt_x], [5], [10, @index2, @index2], [10, ?@index0, @index1, @index1]], @index4 == @index3) -[BLOCK_RECURSION_DEPTH_8]: cel.@block([optional.none(), [?@index0, ?opt_x], [5], [10, @index2, @index2], [10, ?@index0, @index1, @index1]], @index4 == @index3) -[BLOCK_RECURSION_DEPTH_9]: cel.@block([optional.none(), [?@index0, ?opt_x], [5], [10, @index2, @index2], [10, ?@index0, @index1, @index1]], @index4 == @index3) +[BLOCK_RECURSION_DEPTH_1]: cel.@block([optional.none(), [?@index0, ?opt_x], [5], [10, ?@index0, @index1, @index1], [10, @index2, @index2]], @index3 == @index4) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([[?optional.none(), ?opt_x], [5], [10, ?optional.none(), @index0, @index0]], @index2 == [10, @index1, @index1]) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([[?optional.none(), ?opt_x], [5]], [10, ?optional.none(), @index0, @index0] == [10, @index1, @index1]) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([[?optional.none(), ?opt_x], [5]], [10, ?optional.none(), @index0, @index0] == [10, @index1, @index1]) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([[?optional.none(), ?opt_x], [5]], [10, ?optional.none(), @index0, @index0] == [10, @index1, @index1]) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([[?optional.none(), ?opt_x], [5]], [10, ?optional.none(), @index0, @index0] == [10, @index1, @index1]) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([[?optional.none(), ?opt_x], [5]], [10, ?optional.none(), @index0, @index0] == [10, @index1, @index1]) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([[?optional.none(), ?opt_x], [5]], [10, ?optional.none(), @index0, @index0] == [10, @index1, @index1]) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([[?optional.none(), ?opt_x], [5]], [10, ?optional.none(), @index0, @index0] == [10, @index1, @index1]) Test case: OPTIONAL_MAP Source: {?'hello': optional.of('hello')}['hello'] + {?'hello': optional.of('hello')}['hello'] == 'hellohello' @@ -517,14 +517,14 @@ Result: true [CASCADED_BINDS]: cel.bind(@r0, {?"hello": optional.of("hello")}["hello"], @r0 + @r0) == "hellohello" [BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([{?"hello": optional.of("hello")}["hello"]], @index0 + @index0 == "hellohello") [BLOCK_RECURSION_DEPTH_1]: cel.@block([optional.of("hello"), {?"hello": @index0}, @index1["hello"], @index2 + @index2], @index3 == "hellohello") -[BLOCK_RECURSION_DEPTH_2]: cel.@block([optional.of("hello"), {?"hello": @index0}, @index1["hello"], @index2 + @index2], @index3 == "hellohello") -[BLOCK_RECURSION_DEPTH_3]: cel.@block([optional.of("hello"), {?"hello": @index0}, @index1["hello"], @index2 + @index2], @index3 == "hellohello") -[BLOCK_RECURSION_DEPTH_4]: cel.@block([optional.of("hello"), {?"hello": @index0}, @index1["hello"], @index2 + @index2], @index3 == "hellohello") -[BLOCK_RECURSION_DEPTH_5]: cel.@block([optional.of("hello"), {?"hello": @index0}, @index1["hello"], @index2 + @index2], @index3 == "hellohello") -[BLOCK_RECURSION_DEPTH_6]: cel.@block([optional.of("hello"), {?"hello": @index0}, @index1["hello"], @index2 + @index2], @index3 == "hellohello") -[BLOCK_RECURSION_DEPTH_7]: cel.@block([optional.of("hello"), {?"hello": @index0}, @index1["hello"], @index2 + @index2], @index3 == "hellohello") -[BLOCK_RECURSION_DEPTH_8]: cel.@block([optional.of("hello"), {?"hello": @index0}, @index1["hello"], @index2 + @index2], @index3 == "hellohello") -[BLOCK_RECURSION_DEPTH_9]: cel.@block([optional.of("hello"), {?"hello": @index0}, @index1["hello"], @index2 + @index2], @index3 == "hellohello") +[BLOCK_RECURSION_DEPTH_2]: cel.@block([{?"hello": optional.of("hello")}, @index0["hello"]], @index1 + @index1 == "hellohello") +[BLOCK_RECURSION_DEPTH_3]: cel.@block([{?"hello": optional.of("hello")}["hello"]], @index0 + @index0 == "hellohello") +[BLOCK_RECURSION_DEPTH_4]: cel.@block([{?"hello": optional.of("hello")}["hello"]], @index0 + @index0 == "hellohello") +[BLOCK_RECURSION_DEPTH_5]: cel.@block([{?"hello": optional.of("hello")}["hello"]], @index0 + @index0 == "hellohello") +[BLOCK_RECURSION_DEPTH_6]: cel.@block([{?"hello": optional.of("hello")}["hello"]], @index0 + @index0 == "hellohello") +[BLOCK_RECURSION_DEPTH_7]: cel.@block([{?"hello": optional.of("hello")}["hello"]], @index0 + @index0 == "hellohello") +[BLOCK_RECURSION_DEPTH_8]: cel.@block([{?"hello": optional.of("hello")}["hello"]], @index0 + @index0 == "hellohello") +[BLOCK_RECURSION_DEPTH_9]: cel.@block([{?"hello": optional.of("hello")}["hello"]], @index0 + @index0 == "hellohello") Test case: OPTIONAL_MAP_CHAINED Source: {?'key': optional.of('test')}[?'bogus'].or({'key': 'test'}[?'bogus']).orValue({'key': 'test'}['key']) == 'test' @@ -532,15 +532,15 @@ Source: {?'key': optional.of('test')}[?'bogus'].or({'key': 'test'}[?'bogus']).or Result: true [CASCADED_BINDS]: cel.bind(@r0, {"key": "test"}, {?"key": optional.of("test")}[?"bogus"].or(@r0[?"bogus"]).orValue(@r0["key"])) == "test" [BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([{"key": "test"}], {?"key": optional.of("test")}[?"bogus"].or(@index0[?"bogus"]).orValue(@index0["key"]) == "test") -[BLOCK_RECURSION_DEPTH_1]: cel.@block([{"key": "test"}, @index0["key"], @index0[?"bogus"], optional.of("test"), {?"key": @index3}, @index4[?"bogus"], @index5.or(@index2), @index6.orValue(@index1)], @index7 == "test") -[BLOCK_RECURSION_DEPTH_2]: cel.@block([{"key": "test"}, @index0["key"], @index0[?"bogus"], {?"key": optional.of("test")}, @index3[?"bogus"].or(@index2), @index4.orValue(@index1)], @index5 == "test") -[BLOCK_RECURSION_DEPTH_3]: cel.@block([{"key": "test"}, @index0["key"], @index0[?"bogus"], {?"key": optional.of("test")}[?"bogus"], @index3.or(@index2).orValue(@index1)], @index4 == "test") -[BLOCK_RECURSION_DEPTH_4]: cel.@block([{"key": "test"}, @index0["key"], {?"key": optional.of("test")}[?"bogus"].or(@index0[?"bogus"]), @index2.orValue(@index1)], @index3 == "test") +[BLOCK_RECURSION_DEPTH_1]: cel.@block([{"key": "test"}, optional.of("test"), {?"key": @index1}, @index2[?"bogus"], @index0[?"bogus"], @index3.or(@index4), @index0["key"], @index5.orValue(@index6)], @index7 == "test") +[BLOCK_RECURSION_DEPTH_2]: cel.@block([{"key": "test"}, {?"key": optional.of("test")}, @index1[?"bogus"].or(@index0[?"bogus"]), @index2.orValue(@index0["key"])], @index3 == "test") +[BLOCK_RECURSION_DEPTH_3]: cel.@block([{"key": "test"}, {?"key": optional.of("test")}[?"bogus"], @index1.or(@index0[?"bogus"]).orValue(@index0["key"])], @index2 == "test") +[BLOCK_RECURSION_DEPTH_4]: cel.@block([{"key": "test"}, {?"key": optional.of("test")}[?"bogus"].or(@index0[?"bogus"])], @index1.orValue(@index0["key"]) == "test") [BLOCK_RECURSION_DEPTH_5]: cel.@block([{"key": "test"}, {?"key": optional.of("test")}[?"bogus"].or(@index0[?"bogus"]).orValue(@index0["key"])], @index1 == "test") -[BLOCK_RECURSION_DEPTH_6]: cel.@block([{"key": "test"}, {?"key": optional.of("test")}[?"bogus"].or(@index0[?"bogus"]).orValue(@index0["key"])], @index1 == "test") -[BLOCK_RECURSION_DEPTH_7]: cel.@block([{"key": "test"}, {?"key": optional.of("test")}[?"bogus"].or(@index0[?"bogus"]).orValue(@index0["key"])], @index1 == "test") -[BLOCK_RECURSION_DEPTH_8]: cel.@block([{"key": "test"}, {?"key": optional.of("test")}[?"bogus"].or(@index0[?"bogus"]).orValue(@index0["key"])], @index1 == "test") -[BLOCK_RECURSION_DEPTH_9]: cel.@block([{"key": "test"}, {?"key": optional.of("test")}[?"bogus"].or(@index0[?"bogus"]).orValue(@index0["key"])], @index1 == "test") +[BLOCK_RECURSION_DEPTH_6]: cel.@block([{"key": "test"}], {?"key": optional.of("test")}[?"bogus"].or(@index0[?"bogus"]).orValue(@index0["key"]) == "test") +[BLOCK_RECURSION_DEPTH_7]: cel.@block([{"key": "test"}], {?"key": optional.of("test")}[?"bogus"].or(@index0[?"bogus"]).orValue(@index0["key"]) == "test") +[BLOCK_RECURSION_DEPTH_8]: cel.@block([{"key": "test"}], {?"key": optional.of("test")}[?"bogus"].or(@index0[?"bogus"]).orValue(@index0["key"]) == "test") +[BLOCK_RECURSION_DEPTH_9]: cel.@block([{"key": "test"}], {?"key": optional.of("test")}[?"bogus"].or(@index0[?"bogus"]).orValue(@index0["key"]) == "test") Test case: OPTIONAL_MESSAGE Source: TestAllTypes{?single_int64: optional.ofNonZeroValue(1), ?single_int32: optional.of(4)}.single_int32 + TestAllTypes{?single_int64: optional.ofNonZeroValue(1), ?single_int32: optional.of(4)}.single_int64 == 5 @@ -548,15 +548,15 @@ Source: TestAllTypes{?single_int64: optional.ofNonZeroValue(1), ?single_int32: o Result: true [CASCADED_BINDS]: cel.bind(@r0, TestAllTypes{?single_int64: optional.ofNonZeroValue(1), ?single_int32: optional.of(4)}, @r0.single_int32 + @r0.single_int64) == 5 [BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([TestAllTypes{?single_int64: optional.ofNonZeroValue(1), ?single_int32: optional.of(4)}], @index0.single_int32 + @index0.single_int64 == 5) -[BLOCK_RECURSION_DEPTH_1]: cel.@block([optional.ofNonZeroValue(1), optional.of(4), TestAllTypes{?single_int64: @index0, ?single_int32: @index1}, @index2.single_int64, @index2.single_int32, @index4 + @index3], @index5 == 5) -[BLOCK_RECURSION_DEPTH_2]: cel.@block([optional.ofNonZeroValue(1), optional.of(4), TestAllTypes{?single_int64: @index0, ?single_int32: @index1}, @index2.single_int32 + @index2.single_int64], @index3 == 5) -[BLOCK_RECURSION_DEPTH_3]: cel.@block([optional.ofNonZeroValue(1), optional.of(4), TestAllTypes{?single_int64: @index0, ?single_int32: @index1}, @index2.single_int32 + @index2.single_int64], @index3 == 5) -[BLOCK_RECURSION_DEPTH_4]: cel.@block([optional.ofNonZeroValue(1), optional.of(4), TestAllTypes{?single_int64: @index0, ?single_int32: @index1}, @index2.single_int32 + @index2.single_int64], @index3 == 5) -[BLOCK_RECURSION_DEPTH_5]: cel.@block([optional.ofNonZeroValue(1), optional.of(4), TestAllTypes{?single_int64: @index0, ?single_int32: @index1}, @index2.single_int32 + @index2.single_int64], @index3 == 5) -[BLOCK_RECURSION_DEPTH_6]: cel.@block([optional.ofNonZeroValue(1), optional.of(4), TestAllTypes{?single_int64: @index0, ?single_int32: @index1}, @index2.single_int32 + @index2.single_int64], @index3 == 5) -[BLOCK_RECURSION_DEPTH_7]: cel.@block([optional.ofNonZeroValue(1), optional.of(4), TestAllTypes{?single_int64: @index0, ?single_int32: @index1}, @index2.single_int32 + @index2.single_int64], @index3 == 5) -[BLOCK_RECURSION_DEPTH_8]: cel.@block([optional.ofNonZeroValue(1), optional.of(4), TestAllTypes{?single_int64: @index0, ?single_int32: @index1}, @index2.single_int32 + @index2.single_int64], @index3 == 5) -[BLOCK_RECURSION_DEPTH_9]: cel.@block([optional.ofNonZeroValue(1), optional.of(4), TestAllTypes{?single_int64: @index0, ?single_int32: @index1}, @index2.single_int32 + @index2.single_int64], @index3 == 5) +[BLOCK_RECURSION_DEPTH_1]: cel.@block([optional.ofNonZeroValue(1), optional.of(4), TestAllTypes{?single_int64: @index0, ?single_int32: @index1}, @index2.single_int32, @index2.single_int64, @index3 + @index4], @index5 == 5) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([TestAllTypes{?single_int64: optional.ofNonZeroValue(1), ?single_int32: optional.of(4)}, @index0.single_int32 + @index0.single_int64], @index1 == 5) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([TestAllTypes{?single_int64: optional.ofNonZeroValue(1), ?single_int32: optional.of(4)}], @index0.single_int32 + @index0.single_int64 == 5) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([TestAllTypes{?single_int64: optional.ofNonZeroValue(1), ?single_int32: optional.of(4)}], @index0.single_int32 + @index0.single_int64 == 5) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([TestAllTypes{?single_int64: optional.ofNonZeroValue(1), ?single_int32: optional.of(4)}], @index0.single_int32 + @index0.single_int64 == 5) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([TestAllTypes{?single_int64: optional.ofNonZeroValue(1), ?single_int32: optional.of(4)}], @index0.single_int32 + @index0.single_int64 == 5) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([TestAllTypes{?single_int64: optional.ofNonZeroValue(1), ?single_int32: optional.of(4)}], @index0.single_int32 + @index0.single_int64 == 5) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([TestAllTypes{?single_int64: optional.ofNonZeroValue(1), ?single_int32: optional.of(4)}], @index0.single_int32 + @index0.single_int64 == 5) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([TestAllTypes{?single_int64: optional.ofNonZeroValue(1), ?single_int32: optional.of(4)}], @index0.single_int32 + @index0.single_int64 == 5) Test case: CALL Source: ('h' + 'e' + 'l' + 'l' + 'o' + ' world').matches('h' + 'e' + 'l' + 'l' + 'o') @@ -565,14 +565,14 @@ Result: true [CASCADED_BINDS]: cel.bind(@r0, "h" + "e" + "l" + "l" + "o", (@r0 + " world").matches(@r0)) [BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block(["h" + "e" + "l" + "l" + "o"], (@index0 + " world").matches(@index0)) [BLOCK_RECURSION_DEPTH_1]: cel.@block(["h" + "e", @index0 + "l", @index1 + "l", @index2 + "o", @index3 + " world"], @index4.matches(@index3)) -[BLOCK_RECURSION_DEPTH_2]: cel.@block(["h" + "e", @index0 + "l", @index1 + "l", @index2 + "o", @index3 + " world"], @index4.matches(@index3)) -[BLOCK_RECURSION_DEPTH_3]: cel.@block(["h" + "e", @index0 + "l", @index1 + "l", @index2 + "o", @index3 + " world"], @index4.matches(@index3)) -[BLOCK_RECURSION_DEPTH_4]: cel.@block(["h" + "e", @index0 + "l", @index1 + "l", @index2 + "o", @index3 + " world"], @index4.matches(@index3)) -[BLOCK_RECURSION_DEPTH_5]: cel.@block(["h" + "e", @index0 + "l", @index1 + "l", @index2 + "o", @index3 + " world"], @index4.matches(@index3)) -[BLOCK_RECURSION_DEPTH_6]: cel.@block(["h" + "e", @index0 + "l", @index1 + "l", @index2 + "o", @index3 + " world"], @index4.matches(@index3)) -[BLOCK_RECURSION_DEPTH_7]: cel.@block(["h" + "e", @index0 + "l", @index1 + "l", @index2 + "o", @index3 + " world"], @index4.matches(@index3)) -[BLOCK_RECURSION_DEPTH_8]: cel.@block(["h" + "e", @index0 + "l", @index1 + "l", @index2 + "o", @index3 + " world"], @index4.matches(@index3)) -[BLOCK_RECURSION_DEPTH_9]: cel.@block(["h" + "e", @index0 + "l", @index1 + "l", @index2 + "o", @index3 + " world"], @index4.matches(@index3)) +[BLOCK_RECURSION_DEPTH_2]: cel.@block(["h" + "e" + "l", @index0 + "l" + "o"], (@index1 + " world").matches(@index1)) +[BLOCK_RECURSION_DEPTH_3]: cel.@block(["h" + "e" + "l" + "l", @index0 + "o"], (@index1 + " world").matches(@index1)) +[BLOCK_RECURSION_DEPTH_4]: cel.@block(["h" + "e" + "l" + "l" + "o"], (@index0 + " world").matches(@index0)) +[BLOCK_RECURSION_DEPTH_5]: cel.@block(["h" + "e" + "l" + "l" + "o"], (@index0 + " world").matches(@index0)) +[BLOCK_RECURSION_DEPTH_6]: cel.@block(["h" + "e" + "l" + "l" + "o"], (@index0 + " world").matches(@index0)) +[BLOCK_RECURSION_DEPTH_7]: cel.@block(["h" + "e" + "l" + "l" + "o"], (@index0 + " world").matches(@index0)) +[BLOCK_RECURSION_DEPTH_8]: cel.@block(["h" + "e" + "l" + "l" + "o"], (@index0 + " world").matches(@index0)) +[BLOCK_RECURSION_DEPTH_9]: cel.@block(["h" + "e" + "l" + "l" + "o"], (@index0 + " world").matches(@index0)) Test case: CALL_ARGUMENT_NESTED_NO_COMMON_SUBEXPR Source: 'hello world'.matches('h' + 'e' + 'l' + 'l' + 'o') @@ -582,13 +582,13 @@ Result: true [BLOCK_COMMON_SUBEXPR_ONLY]: "hello world".matches("h" + "e" + "l" + "l" + "o") [BLOCK_RECURSION_DEPTH_1]: cel.@block(["h" + "e", @index0 + "l", @index1 + "l", @index2 + "o"], "hello world".matches(@index3)) [BLOCK_RECURSION_DEPTH_2]: cel.@block(["h" + "e" + "l", @index0 + "l" + "o"], "hello world".matches(@index1)) -[BLOCK_RECURSION_DEPTH_3]: cel.@block(["h" + "e" + "l" + "l", @index0 + "o"], "hello world".matches(@index1)) +[BLOCK_RECURSION_DEPTH_3]: cel.@block(["h" + "e" + "l" + "l"], "hello world".matches(@index0 + "o")) [BLOCK_RECURSION_DEPTH_4]: cel.@block(["h" + "e" + "l" + "l" + "o"], "hello world".matches(@index0)) -[BLOCK_RECURSION_DEPTH_5]: cel.@block(["h" + "e" + "l" + "l" + "o"], "hello world".matches(@index0)) -[BLOCK_RECURSION_DEPTH_6]: cel.@block(["h" + "e" + "l" + "l" + "o"], "hello world".matches(@index0)) -[BLOCK_RECURSION_DEPTH_7]: cel.@block(["h" + "e" + "l" + "l" + "o"], "hello world".matches(@index0)) -[BLOCK_RECURSION_DEPTH_8]: cel.@block(["h" + "e" + "l" + "l" + "o"], "hello world".matches(@index0)) -[BLOCK_RECURSION_DEPTH_9]: cel.@block(["h" + "e" + "l" + "l" + "o"], "hello world".matches(@index0)) +[BLOCK_RECURSION_DEPTH_5]: "hello world".matches("h" + "e" + "l" + "l" + "o") +[BLOCK_RECURSION_DEPTH_6]: "hello world".matches("h" + "e" + "l" + "l" + "o") +[BLOCK_RECURSION_DEPTH_7]: "hello world".matches("h" + "e" + "l" + "l" + "o") +[BLOCK_RECURSION_DEPTH_8]: "hello world".matches("h" + "e" + "l" + "l" + "o") +[BLOCK_RECURSION_DEPTH_9]: "hello world".matches("h" + "e" + "l" + "l" + "o") Test case: CALL_TARGET_NESTED_NO_COMMON_SUBEXPR Source: ('h' + 'e' + 'l' + 'l' + 'o' + ' world').matches('hello') @@ -597,14 +597,14 @@ Result: true [CASCADED_BINDS]: ("h" + "e" + "l" + "l" + "o" + " world").matches("hello") [BLOCK_COMMON_SUBEXPR_ONLY]: ("h" + "e" + "l" + "l" + "o" + " world").matches("hello") [BLOCK_RECURSION_DEPTH_1]: cel.@block(["h" + "e", @index0 + "l", @index1 + "l", @index2 + "o", @index3 + " world"], @index4.matches("hello")) -[BLOCK_RECURSION_DEPTH_2]: cel.@block(["h" + "e" + "l", @index0 + "l" + "o", @index1 + " world"], @index2.matches("hello")) -[BLOCK_RECURSION_DEPTH_3]: cel.@block(["h" + "e" + "l" + "l", @index0 + "o" + " world"], @index1.matches("hello")) -[BLOCK_RECURSION_DEPTH_4]: cel.@block(["h" + "e" + "l" + "l" + "o", @index0 + " world"], @index1.matches("hello")) +[BLOCK_RECURSION_DEPTH_2]: cel.@block(["h" + "e" + "l", @index0 + "l" + "o"], (@index1 + " world").matches("hello")) +[BLOCK_RECURSION_DEPTH_3]: cel.@block(["h" + "e" + "l" + "l"], (@index0 + "o" + " world").matches("hello")) +[BLOCK_RECURSION_DEPTH_4]: cel.@block(["h" + "e" + "l" + "l" + "o"], (@index0 + " world").matches("hello")) [BLOCK_RECURSION_DEPTH_5]: cel.@block(["h" + "e" + "l" + "l" + "o" + " world"], @index0.matches("hello")) -[BLOCK_RECURSION_DEPTH_6]: cel.@block(["h" + "e" + "l" + "l" + "o" + " world"], @index0.matches("hello")) -[BLOCK_RECURSION_DEPTH_7]: cel.@block(["h" + "e" + "l" + "l" + "o" + " world"], @index0.matches("hello")) -[BLOCK_RECURSION_DEPTH_8]: cel.@block(["h" + "e" + "l" + "l" + "o" + " world"], @index0.matches("hello")) -[BLOCK_RECURSION_DEPTH_9]: cel.@block(["h" + "e" + "l" + "l" + "o" + " world"], @index0.matches("hello")) +[BLOCK_RECURSION_DEPTH_6]: ("h" + "e" + "l" + "l" + "o" + " world").matches("hello") +[BLOCK_RECURSION_DEPTH_7]: ("h" + "e" + "l" + "l" + "o" + " world").matches("hello") +[BLOCK_RECURSION_DEPTH_8]: ("h" + "e" + "l" + "l" + "o" + " world").matches("hello") +[BLOCK_RECURSION_DEPTH_9]: ("h" + "e" + "l" + "l" + "o" + " world").matches("hello") Test case: CALL_BOTH_ARGUMENT_TARGET_NESTED_NO_COMMON_SUBEXPR Source: ('h' + 'e' + 'l' + 'l' + 'o' + ' world').matches('w' + 'o' + 'r' + 'l' + 'd') @@ -612,15 +612,15 @@ Source: ('h' + 'e' + 'l' + 'l' + 'o' + ' world').matches('w' + 'o' + 'r' + 'l' + Result: true [CASCADED_BINDS]: ("h" + "e" + "l" + "l" + "o" + " world").matches("w" + "o" + "r" + "l" + "d") [BLOCK_COMMON_SUBEXPR_ONLY]: ("h" + "e" + "l" + "l" + "o" + " world").matches("w" + "o" + "r" + "l" + "d") -[BLOCK_RECURSION_DEPTH_1]: cel.@block(["w" + "o", @index0 + "r", @index1 + "l", @index2 + "d", "h" + "e", @index4 + "l", @index5 + "l", @index6 + "o", @index7 + " world"], @index8.matches(@index3)) -[BLOCK_RECURSION_DEPTH_2]: cel.@block(["w" + "o" + "r", @index0 + "l" + "d", "h" + "e" + "l", @index2 + "l" + "o", @index3 + " world"], @index4.matches(@index1)) -[BLOCK_RECURSION_DEPTH_3]: cel.@block(["w" + "o" + "r" + "l", @index0 + "d", "h" + "e" + "l" + "l", @index2 + "o" + " world"], @index3.matches(@index1)) -[BLOCK_RECURSION_DEPTH_4]: cel.@block(["w" + "o" + "r" + "l" + "d", "h" + "e" + "l" + "l" + "o", @index1 + " world"], @index2.matches(@index0)) -[BLOCK_RECURSION_DEPTH_5]: cel.@block(["w" + "o" + "r" + "l" + "d", "h" + "e" + "l" + "l" + "o" + " world"], @index1.matches(@index0)) -[BLOCK_RECURSION_DEPTH_6]: cel.@block(["w" + "o" + "r" + "l" + "d", "h" + "e" + "l" + "l" + "o" + " world"], @index1.matches(@index0)) -[BLOCK_RECURSION_DEPTH_7]: cel.@block(["w" + "o" + "r" + "l" + "d", "h" + "e" + "l" + "l" + "o" + " world"], @index1.matches(@index0)) -[BLOCK_RECURSION_DEPTH_8]: cel.@block(["w" + "o" + "r" + "l" + "d", "h" + "e" + "l" + "l" + "o" + " world"], @index1.matches(@index0)) -[BLOCK_RECURSION_DEPTH_9]: cel.@block(["w" + "o" + "r" + "l" + "d", "h" + "e" + "l" + "l" + "o" + " world"], @index1.matches(@index0)) +[BLOCK_RECURSION_DEPTH_1]: cel.@block(["h" + "e", @index0 + "l", @index1 + "l", @index2 + "o", @index3 + " world", "w" + "o", @index5 + "r", @index6 + "l", @index7 + "d"], @index4.matches(@index8)) +[BLOCK_RECURSION_DEPTH_2]: cel.@block(["h" + "e" + "l", @index0 + "l" + "o", "w" + "o" + "r", @index2 + "l" + "d"], (@index1 + " world").matches(@index3)) +[BLOCK_RECURSION_DEPTH_3]: cel.@block(["h" + "e" + "l" + "l", "w" + "o" + "r" + "l"], (@index0 + "o" + " world").matches(@index1 + "d")) +[BLOCK_RECURSION_DEPTH_4]: cel.@block(["h" + "e" + "l" + "l" + "o", "w" + "o" + "r" + "l" + "d"], (@index0 + " world").matches(@index1)) +[BLOCK_RECURSION_DEPTH_5]: cel.@block(["h" + "e" + "l" + "l" + "o" + " world"], @index0.matches("w" + "o" + "r" + "l" + "d")) +[BLOCK_RECURSION_DEPTH_6]: ("h" + "e" + "l" + "l" + "o" + " world").matches("w" + "o" + "r" + "l" + "d") +[BLOCK_RECURSION_DEPTH_7]: ("h" + "e" + "l" + "l" + "o" + " world").matches("w" + "o" + "r" + "l" + "d") +[BLOCK_RECURSION_DEPTH_8]: ("h" + "e" + "l" + "l" + "o" + " world").matches("w" + "o" + "r" + "l" + "d") +[BLOCK_RECURSION_DEPTH_9]: ("h" + "e" + "l" + "l" + "o" + " world").matches("w" + "o" + "r" + "l" + "d") Test case: CUSTOM_FUNCTION_INELIMINABLE Source: non_pure_custom_func(msg.oneof_type.payload.single_int64) + non_pure_custom_func(msg.oneof_type.payload.single_int32) + non_pure_custom_func(msg.oneof_type.payload.single_int64) + non_pure_custom_func(msg.single_int64) @@ -628,15 +628,15 @@ Source: non_pure_custom_func(msg.oneof_type.payload.single_int64) + non_pure_cus Result: 31 [CASCADED_BINDS]: cel.bind(@r0, msg.oneof_type.payload, cel.bind(@r1, @r0.single_int64, non_pure_custom_func(@r1) + non_pure_custom_func(@r0.single_int32) + non_pure_custom_func(@r1))) + non_pure_custom_func(msg.single_int64) [BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([msg.oneof_type.payload, @index0.single_int64], non_pure_custom_func(@index1) + non_pure_custom_func(@index0.single_int32) + non_pure_custom_func(@index1) + non_pure_custom_func(msg.single_int64)) -[BLOCK_RECURSION_DEPTH_1]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, msg.single_int64, @index1.single_int32], non_pure_custom_func(@index2) + non_pure_custom_func(@index4) + non_pure_custom_func(@index2) + non_pure_custom_func(@index3)) -[BLOCK_RECURSION_DEPTH_2]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, msg.single_int64, @index1.single_int32], non_pure_custom_func(@index2) + non_pure_custom_func(@index4) + non_pure_custom_func(@index2) + non_pure_custom_func(@index3)) -[BLOCK_RECURSION_DEPTH_3]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, msg.single_int64, @index1.single_int32], non_pure_custom_func(@index2) + non_pure_custom_func(@index4) + non_pure_custom_func(@index2) + non_pure_custom_func(@index3)) -[BLOCK_RECURSION_DEPTH_4]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, msg.single_int64, @index1.single_int32], non_pure_custom_func(@index2) + non_pure_custom_func(@index4) + non_pure_custom_func(@index2) + non_pure_custom_func(@index3)) -[BLOCK_RECURSION_DEPTH_5]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, msg.single_int64, @index1.single_int32], non_pure_custom_func(@index2) + non_pure_custom_func(@index4) + non_pure_custom_func(@index2) + non_pure_custom_func(@index3)) -[BLOCK_RECURSION_DEPTH_6]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, msg.single_int64, @index1.single_int32], non_pure_custom_func(@index2) + non_pure_custom_func(@index4) + non_pure_custom_func(@index2) + non_pure_custom_func(@index3)) -[BLOCK_RECURSION_DEPTH_7]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, msg.single_int64, @index1.single_int32], non_pure_custom_func(@index2) + non_pure_custom_func(@index4) + non_pure_custom_func(@index2) + non_pure_custom_func(@index3)) -[BLOCK_RECURSION_DEPTH_8]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, msg.single_int64, @index1.single_int32], non_pure_custom_func(@index2) + non_pure_custom_func(@index4) + non_pure_custom_func(@index2) + non_pure_custom_func(@index3)) -[BLOCK_RECURSION_DEPTH_9]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, msg.single_int64, @index1.single_int32], non_pure_custom_func(@index2) + non_pure_custom_func(@index4) + non_pure_custom_func(@index2) + non_pure_custom_func(@index3)) +[BLOCK_RECURSION_DEPTH_1]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64], non_pure_custom_func(@index2) + non_pure_custom_func(@index1.single_int32) + non_pure_custom_func(@index2) + non_pure_custom_func(msg.single_int64)) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([msg.oneof_type.payload, @index0.single_int64], non_pure_custom_func(@index1) + non_pure_custom_func(@index0.single_int32) + non_pure_custom_func(@index1) + non_pure_custom_func(msg.single_int64)) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([msg.oneof_type.payload.single_int64], non_pure_custom_func(@index0) + non_pure_custom_func(msg.oneof_type.payload.single_int32) + non_pure_custom_func(@index0) + non_pure_custom_func(msg.single_int64)) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([msg.oneof_type.payload.single_int64], non_pure_custom_func(@index0) + non_pure_custom_func(msg.oneof_type.payload.single_int32) + non_pure_custom_func(@index0) + non_pure_custom_func(msg.single_int64)) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([msg.oneof_type.payload.single_int64], non_pure_custom_func(@index0) + non_pure_custom_func(msg.oneof_type.payload.single_int32) + non_pure_custom_func(@index0) + non_pure_custom_func(msg.single_int64)) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([msg.oneof_type.payload.single_int64], non_pure_custom_func(@index0) + non_pure_custom_func(msg.oneof_type.payload.single_int32) + non_pure_custom_func(@index0) + non_pure_custom_func(msg.single_int64)) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([msg.oneof_type.payload.single_int64], non_pure_custom_func(@index0) + non_pure_custom_func(msg.oneof_type.payload.single_int32) + non_pure_custom_func(@index0) + non_pure_custom_func(msg.single_int64)) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([msg.oneof_type.payload.single_int64], non_pure_custom_func(@index0) + non_pure_custom_func(msg.oneof_type.payload.single_int32) + non_pure_custom_func(@index0) + non_pure_custom_func(msg.single_int64)) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([msg.oneof_type.payload.single_int64], non_pure_custom_func(@index0) + non_pure_custom_func(msg.oneof_type.payload.single_int32) + non_pure_custom_func(@index0) + non_pure_custom_func(msg.single_int64)) Test case: CUSTOM_FUNCTION_ELIMINABLE Source: pure_custom_func(msg.oneof_type.payload.single_int64) + pure_custom_func(msg.oneof_type.payload.single_int32) + pure_custom_func(msg.oneof_type.payload.single_int64) + pure_custom_func(msg.single_int64) @@ -644,12 +644,12 @@ Source: pure_custom_func(msg.oneof_type.payload.single_int64) + pure_custom_func Result: 31 [CASCADED_BINDS]: cel.bind(@r0, msg.oneof_type.payload, cel.bind(@r1, pure_custom_func(@r0.single_int64), @r1 + pure_custom_func(@r0.single_int32) + @r1)) + pure_custom_func(msg.single_int64) [BLOCK_COMMON_SUBEXPR_ONLY]: cel.@block([msg.oneof_type.payload, pure_custom_func(@index0.single_int64)], @index1 + pure_custom_func(@index0.single_int32) + @index1 + pure_custom_func(msg.single_int64)) -[BLOCK_RECURSION_DEPTH_1]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, pure_custom_func(@index2), msg.single_int64, pure_custom_func(@index4), @index1.single_int32, pure_custom_func(@index6), @index3 + @index7, @index8 + @index3], @index9 + @index5) -[BLOCK_RECURSION_DEPTH_2]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, pure_custom_func(@index2), pure_custom_func(msg.single_int64), pure_custom_func(@index1.single_int32), @index3 + @index5 + @index3], @index6 + @index4) -[BLOCK_RECURSION_DEPTH_3]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, pure_custom_func(@index2), pure_custom_func(msg.single_int64), @index3 + pure_custom_func(@index1.single_int32), @index5 + @index3], @index6 + @index4) -[BLOCK_RECURSION_DEPTH_4]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, pure_custom_func(@index2), pure_custom_func(msg.single_int64), @index3 + pure_custom_func(@index1.single_int32) + @index3], @index5 + @index4) -[BLOCK_RECURSION_DEPTH_5]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, pure_custom_func(@index2), pure_custom_func(msg.single_int64), @index3 + pure_custom_func(@index1.single_int32) + @index3], @index5 + @index4) -[BLOCK_RECURSION_DEPTH_6]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, pure_custom_func(@index2), pure_custom_func(msg.single_int64), @index3 + pure_custom_func(@index1.single_int32) + @index3], @index5 + @index4) -[BLOCK_RECURSION_DEPTH_7]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, pure_custom_func(@index2), pure_custom_func(msg.single_int64), @index3 + pure_custom_func(@index1.single_int32) + @index3], @index5 + @index4) -[BLOCK_RECURSION_DEPTH_8]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, pure_custom_func(@index2), pure_custom_func(msg.single_int64), @index3 + pure_custom_func(@index1.single_int32) + @index3], @index5 + @index4) -[BLOCK_RECURSION_DEPTH_9]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, pure_custom_func(@index2), pure_custom_func(msg.single_int64), @index3 + pure_custom_func(@index1.single_int32) + @index3], @index5 + @index4) +[BLOCK_RECURSION_DEPTH_1]: cel.@block([msg.oneof_type, @index0.payload, @index1.single_int64, pure_custom_func(@index2), @index1.single_int32, pure_custom_func(@index4), @index3 + @index5, @index6 + @index3, msg.single_int64, pure_custom_func(@index8)], @index7 + @index9) +[BLOCK_RECURSION_DEPTH_2]: cel.@block([msg.oneof_type.payload, pure_custom_func(@index0.single_int64), pure_custom_func(@index0.single_int32), @index1 + @index2 + @index1, pure_custom_func(msg.single_int64)], @index3 + @index4) +[BLOCK_RECURSION_DEPTH_3]: cel.@block([msg.oneof_type.payload.single_int64, pure_custom_func(@index0), msg.oneof_type.payload.single_int32, @index1 + pure_custom_func(@index2) + @index1], @index3 + pure_custom_func(msg.single_int64)) +[BLOCK_RECURSION_DEPTH_4]: cel.@block([pure_custom_func(msg.oneof_type.payload.single_int64), pure_custom_func(msg.oneof_type.payload.single_int32)], @index0 + @index1 + @index0 + pure_custom_func(msg.single_int64)) +[BLOCK_RECURSION_DEPTH_5]: cel.@block([pure_custom_func(msg.oneof_type.payload.single_int64), @index0 + pure_custom_func(msg.oneof_type.payload.single_int32)], @index1 + @index0 + pure_custom_func(msg.single_int64)) +[BLOCK_RECURSION_DEPTH_6]: cel.@block([pure_custom_func(msg.oneof_type.payload.single_int64), @index0 + pure_custom_func(msg.oneof_type.payload.single_int32) + @index0], @index1 + pure_custom_func(msg.single_int64)) +[BLOCK_RECURSION_DEPTH_7]: cel.@block([pure_custom_func(msg.oneof_type.payload.single_int64)], @index0 + pure_custom_func(msg.oneof_type.payload.single_int32) + @index0 + pure_custom_func(msg.single_int64)) +[BLOCK_RECURSION_DEPTH_8]: cel.@block([pure_custom_func(msg.oneof_type.payload.single_int64)], @index0 + pure_custom_func(msg.oneof_type.payload.single_int32) + @index0 + pure_custom_func(msg.single_int64)) +[BLOCK_RECURSION_DEPTH_9]: cel.@block([pure_custom_func(msg.oneof_type.payload.single_int64)], @index0 + pure_custom_func(msg.oneof_type.payload.single_int32) + @index0 + pure_custom_func(msg.single_int64))