-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathProgramPlanner.java
More file actions
666 lines (571 loc) · 22.8 KB
/
ProgramPlanner.java
File metadata and controls
666 lines (571 loc) · 22.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package dev.cel.runtime.planner;
import com.google.auto.value.AutoValue;
import com.google.common.base.Strings;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.errorprone.annotations.CheckReturnValue;
import com.google.errorprone.annotations.Immutable;
import dev.cel.common.CelAbstractSyntaxTree;
import dev.cel.common.CelContainer;
import dev.cel.common.CelOptions;
import dev.cel.common.Operator;
import dev.cel.common.annotations.Internal;
import dev.cel.common.ast.CelConstant;
import dev.cel.common.ast.CelExpr;
import dev.cel.common.ast.CelExpr.CelCall;
import dev.cel.common.ast.CelExpr.CelComprehension;
import dev.cel.common.ast.CelExpr.CelList;
import dev.cel.common.ast.CelExpr.CelMap;
import dev.cel.common.ast.CelExpr.CelSelect;
import dev.cel.common.ast.CelExpr.CelStruct;
import dev.cel.common.ast.CelExpr.CelStruct.Entry;
import dev.cel.common.ast.CelReference;
import dev.cel.common.exceptions.CelOverloadNotFoundException;
import dev.cel.common.types.CelKind;
import dev.cel.common.types.CelType;
import dev.cel.common.types.CelTypeProvider;
import dev.cel.common.types.SimpleType;
import dev.cel.common.types.TypeType;
import dev.cel.common.values.CelValueConverter;
import dev.cel.common.values.CelValueProvider;
import dev.cel.runtime.CelEvaluationException;
import dev.cel.runtime.CelEvaluationExceptionBuilder;
import dev.cel.runtime.CelResolvedOverload;
import dev.cel.runtime.DefaultDispatcher;
import dev.cel.runtime.Program;
import java.util.HashMap;
import java.util.NoSuchElementException;
import java.util.Optional;
import org.jspecify.annotations.Nullable;
/**
* {@code ProgramPlanner} resolves functions, types, and identifiers at plan time given a
* parsed-only or a type-checked expression.
*/
@Immutable
@Internal
public final class ProgramPlanner {
private final CelTypeProvider typeProvider;
private final CelValueProvider valueProvider;
private final DefaultDispatcher dispatcher;
private final AttributeFactory attributeFactory;
private final CelContainer container;
private final CelOptions options;
private final CelValueConverter celValueConverter;
private final ImmutableSet<String> lateBoundFunctionNames;
/**
* Plans a {@link Program} from the provided parsed-only or type-checked {@link
* CelAbstractSyntaxTree}.
*/
public Program plan(CelAbstractSyntaxTree ast) throws CelEvaluationException {
PlannedInterpretable plannedInterpretable;
ErrorMetadata errorMetadata =
ErrorMetadata.create(ast.getSource().getPositionsMap(), ast.getSource().getDescription());
try {
plannedInterpretable = plan(ast.getExpr(), PlannerContext.create(ast));
} catch (RuntimeException e) {
throw CelEvaluationExceptionBuilder.newBuilder(e.getMessage())
.setMetadata(errorMetadata, ast.getExpr().id())
.setCause(e)
.build();
}
return PlannedProgram.create(plannedInterpretable, errorMetadata, options);
}
private PlannedInterpretable plan(CelExpr celExpr, PlannerContext ctx) {
switch (celExpr.getKind()) {
case CONSTANT:
return planConstant(celExpr.id(), celExpr.constant());
case IDENT:
return planIdent(celExpr, ctx);
case SELECT:
return planSelect(celExpr, ctx);
case CALL:
return planCall(celExpr, ctx);
case LIST:
return planCreateList(celExpr, ctx);
case STRUCT:
return planCreateStruct(celExpr, ctx);
case MAP:
return planCreateMap(celExpr, ctx);
case COMPREHENSION:
return planComprehension(celExpr, ctx);
case NOT_SET:
throw new UnsupportedOperationException("Unsupported kind: " + celExpr.getKind());
default:
throw new UnsupportedOperationException("Unexpected kind: " + celExpr.getKind());
}
}
private PlannedInterpretable planSelect(CelExpr celExpr, PlannerContext ctx) {
CelSelect select = celExpr.select();
PlannedInterpretable operand = plan(select.operand(), ctx);
InterpretableAttribute attribute;
if (operand instanceof EvalAttribute) {
attribute = (EvalAttribute) operand;
} else {
attribute =
EvalAttribute.create(celExpr.id(), attributeFactory.newRelativeAttribute(operand));
}
if (select.testOnly()) {
attribute = EvalTestOnly.create(celExpr.id(), attribute);
}
Qualifier qualifier = StringQualifier.create(select.field());
return attribute.addQualifier(celExpr.id(), qualifier);
}
private PlannedInterpretable planConstant(long exprId, CelConstant celConstant) {
switch (celConstant.getKind()) {
case NULL_VALUE:
return EvalConstant.create(exprId, celConstant.nullValue());
case BOOLEAN_VALUE:
return EvalConstant.create(exprId, celConstant.booleanValue());
case INT64_VALUE:
return EvalConstant.create(exprId, celConstant.int64Value());
case UINT64_VALUE:
return EvalConstant.create(exprId, celConstant.uint64Value());
case DOUBLE_VALUE:
return EvalConstant.create(exprId, celConstant.doubleValue());
case STRING_VALUE:
return EvalConstant.create(exprId, celConstant.stringValue());
case BYTES_VALUE:
return EvalConstant.create(exprId, celConstant.bytesValue());
default:
throw new IllegalStateException("Unsupported kind: " + celConstant.getKind());
}
}
private PlannedInterpretable planIdent(CelExpr celExpr, PlannerContext ctx) {
CelReference ref = ctx.referenceMap().get(celExpr.id());
if (ref != null) {
return planCheckedIdent(celExpr.id(), ref, ctx.typeMap());
}
String identName = celExpr.ident().name();
if (ctx.isLocalVar(identName)) {
return EvalAttribute.create(celExpr.id(), attributeFactory.newAbsoluteAttribute(identName));
}
return EvalAttribute.create(celExpr.id(), attributeFactory.newMaybeAttribute(identName));
}
private PlannedInterpretable planCheckedIdent(
long id, CelReference identRef, ImmutableMap<Long, CelType> typeMap) {
if (identRef.value().isPresent()) {
return planConstant(id, identRef.value().get());
}
CelType type = typeMap.get(id);
if (type.kind().equals(CelKind.TYPE)) {
TypeType identType =
typeProvider
.findType(identRef.name())
.map(
t ->
(t instanceof TypeType)
// Coalesce all type(foo) "type" into a sentinel runtime type to allow for
// erasure based type comparisons
? TypeType.create(SimpleType.DYN)
: TypeType.create(t))
.orElseThrow(
() ->
new NoSuchElementException(
"Reference to an undefined type: " + identRef.name()));
return EvalConstant.create(id, identType);
}
return EvalAttribute.create(id, attributeFactory.newAbsoluteAttribute(identRef.name()));
}
private PlannedInterpretable planCall(CelExpr expr, PlannerContext ctx) {
ResolvedFunction resolvedFunction = resolveFunction(expr, ctx.referenceMap());
CelExpr target = resolvedFunction.target().orElse(null);
int argCount = expr.call().args().size();
if (target != null) {
argCount++;
}
PlannedInterpretable[] evaluatedArgs = new PlannedInterpretable[argCount];
int offset = 0;
if (target != null) {
evaluatedArgs[0] = plan(target, ctx);
offset++;
}
ImmutableList<CelExpr> args = expr.call().args();
for (int argIndex = 0; argIndex < args.size(); argIndex++) {
evaluatedArgs[argIndex + offset] = plan(args.get(argIndex), ctx);
}
String functionName = resolvedFunction.functionName();
Operator operator = Operator.findReverse(functionName).orElse(null);
if (operator != null) {
switch (operator) {
case LOGICAL_OR:
return EvalOr.create(expr.id(), evaluatedArgs);
case LOGICAL_AND:
return EvalAnd.create(expr.id(), evaluatedArgs);
case CONDITIONAL:
return EvalConditional.create(expr.id(), evaluatedArgs);
default:
// fall-through
}
}
CelResolvedOverload resolvedOverload = null;
if (resolvedFunction.overloadId().isPresent()) {
resolvedOverload = dispatcher.findOverload(resolvedFunction.overloadId().get()).orElse(null);
}
if (resolvedOverload == null) {
// Parsed-only function dispatch
resolvedOverload = dispatcher.findOverload(functionName).orElse(null);
}
PlannedInterpretable optionalCall =
maybeInterceptOptionalCalls(resolvedOverload, functionName, evaluatedArgs, expr)
.orElse(null);
if (optionalCall != null) {
return optionalCall;
}
if (resolvedOverload == null) {
if (!lateBoundFunctionNames.contains(functionName)) {
CelReference reference = ctx.referenceMap().get(expr.id());
if (reference != null) {
throw new CelOverloadNotFoundException(functionName, reference.overloadIds());
} else {
throw new CelOverloadNotFoundException(functionName);
}
}
ImmutableList<String> overloadIds = ImmutableList.of();
if (resolvedFunction.overloadId().isPresent()) {
overloadIds = ImmutableList.of(resolvedFunction.overloadId().get());
}
return EvalLateBoundCall.create(
expr.id(), functionName, overloadIds, evaluatedArgs, celValueConverter);
}
switch (argCount) {
case 0:
return EvalZeroArity.create(expr.id(), resolvedOverload, celValueConverter);
case 1:
return EvalUnary.create(expr.id(), resolvedOverload, evaluatedArgs[0], celValueConverter);
case 2:
return EvalBinary.create(
expr.id(), resolvedOverload, evaluatedArgs[0], evaluatedArgs[1], celValueConverter);
default:
return EvalVarArgsCall.create(
expr.id(), resolvedOverload, evaluatedArgs, celValueConverter);
}
}
/**
* Intercepts a potential optional function call.
*
* <p>This is analogous to cel-go's decorator. This could be moved to {@code CelOptionalLibrary}
* once we add the support for it.
*/
private Optional<PlannedInterpretable> maybeInterceptOptionalCalls(
@Nullable CelResolvedOverload resolvedOverload,
String functionName,
PlannedInterpretable[] evaluatedArgs,
CelExpr expr) {
if (evaluatedArgs.length != 2) {
return Optional.empty();
}
String overloadId = resolvedOverload == null ? "" : resolvedOverload.getOverloadId();
switch (functionName) {
case "or":
if (overloadId.isEmpty() || overloadId.equals("optional_or_optional")) {
return Optional.of(EvalOptionalOr.create(expr.id(), evaluatedArgs[0], evaluatedArgs[1]));
}
return Optional.empty();
case "orValue":
if (overloadId.isEmpty() || overloadId.equals("optional_orValue_value")) {
return Optional.of(
EvalOptionalOrValue.create(expr.id(), evaluatedArgs[0], evaluatedArgs[1]));
}
return Optional.empty();
default:
break;
}
if (Operator.OPTIONAL_SELECT.getFunction().equals(functionName)) {
String field = expr.call().args().get(1).constant().stringValue();
InterpretableAttribute attribute;
if (evaluatedArgs[0] instanceof EvalAttribute) {
attribute = (EvalAttribute) evaluatedArgs[0];
} else {
attribute =
EvalAttribute.create(
expr.id(), attributeFactory.newRelativeAttribute(evaluatedArgs[0]));
}
Qualifier qualifier = StringQualifier.create(field);
PlannedInterpretable selectAttribute = attribute.addQualifier(expr.id(), qualifier);
return Optional.of(
EvalOptionalSelectField.create(
expr.id(), evaluatedArgs[0], field, selectAttribute, celValueConverter));
}
return Optional.empty();
}
private PlannedInterpretable planCreateStruct(CelExpr celExpr, PlannerContext ctx) {
CelStruct struct = celExpr.struct();
CelType structType = resolveStructType(celExpr, ctx);
ImmutableList<Entry> entries = struct.entries();
String[] keys = new String[entries.size()];
PlannedInterpretable[] values = new PlannedInterpretable[entries.size()];
boolean[] isOptional = new boolean[entries.size()];
for (int i = 0; i < entries.size(); i++) {
Entry entry = entries.get(i);
keys[i] = entry.fieldKey();
values[i] = plan(entry.value(), ctx);
isOptional[i] = entry.optionalEntry();
}
return EvalCreateStruct.create(
celExpr.id(), valueProvider, structType, keys, values, isOptional);
}
private PlannedInterpretable planCreateList(CelExpr celExpr, PlannerContext ctx) {
CelList list = celExpr.list();
ImmutableList<CelExpr> elements = list.elements();
PlannedInterpretable[] values = new PlannedInterpretable[elements.size()];
for (int i = 0; i < elements.size(); i++) {
values[i] = plan(elements.get(i), ctx);
}
boolean[] isOptional = new boolean[elements.size()];
for (int optionalIndex : list.optionalIndices()) {
isOptional[optionalIndex] = true;
}
return EvalCreateList.create(celExpr.id(), values, isOptional);
}
private PlannedInterpretable planCreateMap(CelExpr celExpr, PlannerContext ctx) {
CelMap map = celExpr.map();
ImmutableList<CelMap.Entry> entries = map.entries();
PlannedInterpretable[] keys = new PlannedInterpretable[entries.size()];
PlannedInterpretable[] values = new PlannedInterpretable[entries.size()];
boolean[] isOptional = new boolean[entries.size()];
for (int i = 0; i < entries.size(); i++) {
CelMap.Entry entry = entries.get(i);
keys[i] = plan(entry.key(), ctx);
values[i] = plan(entry.value(), ctx);
isOptional[i] = entry.optionalEntry();
}
return EvalCreateMap.create(celExpr.id(), keys, values, isOptional);
}
private PlannedInterpretable planComprehension(CelExpr expr, PlannerContext ctx) {
CelComprehension comprehension = expr.comprehension();
PlannedInterpretable accuInit = plan(comprehension.accuInit(), ctx);
PlannedInterpretable iterRange = plan(comprehension.iterRange(), ctx);
ctx.pushLocalVars(comprehension.accuVar(), comprehension.iterVar(), comprehension.iterVar2());
PlannedInterpretable loopCondition = plan(comprehension.loopCondition(), ctx);
PlannedInterpretable loopStep = plan(comprehension.loopStep(), ctx);
ctx.popLocalVars(comprehension.iterVar(), comprehension.iterVar2());
PlannedInterpretable result = plan(comprehension.result(), ctx);
ctx.popLocalVars(comprehension.accuVar());
return EvalFold.create(
expr.id(),
comprehension.accuVar(),
accuInit,
comprehension.iterVar(),
comprehension.iterVar2(),
iterRange,
loopCondition,
loopStep,
result);
}
/**
* resolveFunction determines the call target, function name, and overload name (when unambiguous)
* from the given call expr.
*/
private ResolvedFunction resolveFunction(
CelExpr expr, ImmutableMap<Long, CelReference> referenceMap) {
CelCall call = expr.call();
Optional<CelExpr> maybeTarget = call.target();
String functionName = call.function();
CelReference reference = referenceMap.get(expr.id());
if (reference != null) {
// Checked expression
if (reference.overloadIds().size() == 1) {
ResolvedFunction.Builder builder =
ResolvedFunction.newBuilder()
.setFunctionName(functionName)
.setOverloadId(reference.overloadIds().get(0));
maybeTarget.ifPresent(builder::setTarget);
return builder.build();
}
}
// Parsed-only function resolution.
//
// There are two distinct cases we must handle:
//
// 1. Non-qualified function calls. This will resolve into either:
// - A simple global call foo()
// - A fully qualified global call through normal container resolution foo.bar.qux()
// 2. Qualified function calls:
// - A member call on an identifier foo.bar()
// - A fully qualified global call, through normal container resolution or abbreviations
// foo.bar.qux()
if (!maybeTarget.isPresent()) {
for (String cand : container.resolveCandidateNames(functionName)) {
CelResolvedOverload overload = dispatcher.findOverload(cand).orElse(null);
if (overload != null) {
return ResolvedFunction.newBuilder().setFunctionName(cand).build();
}
}
// Normal global call
return ResolvedFunction.newBuilder().setFunctionName(functionName).build();
}
CelExpr target = maybeTarget.get();
String qualifiedPrefix = toQualifiedName(target).orElse(null);
if (qualifiedPrefix != null) {
String qualifiedName = qualifiedPrefix + "." + functionName;
for (String cand : container.resolveCandidateNames(qualifiedName)) {
CelResolvedOverload overload = dispatcher.findOverload(cand).orElse(null);
if (overload != null) {
return ResolvedFunction.newBuilder().setFunctionName(cand).build();
}
}
}
// Normal member call
return ResolvedFunction.newBuilder().setFunctionName(functionName).setTarget(target).build();
}
private CelType resolveStructType(CelExpr expr, PlannerContext ctx) {
CelType checkedType = ctx.typeMap().get(expr.id());
if (checkedType != null) {
CelKind kind = checkedType.kind();
// Type-checked ASTs do not need a type-provider lookup as long as it's of expected kind.
if (isValidStructKind(kind)) {
return checkedType;
}
}
CelStruct struct = expr.struct();
String messageName = struct.messageName();
for (String typeName : container.resolveCandidateNames(messageName)) {
CelType structType = typeProvider.findType(typeName).orElse(null);
if (structType == null) {
continue;
}
CelKind kind = structType.kind();
if (!isValidStructKind(kind)) {
throw new IllegalArgumentException(
String.format(
"Expected struct type for %s, got %s", structType.name(), structType.kind()));
}
return structType;
}
throw new IllegalArgumentException("Undefined type name: " + messageName);
}
private static boolean isValidStructKind(CelKind kind) {
return kind.equals(CelKind.STRUCT)
|| kind.equals(CelKind.TIMESTAMP)
|| kind.equals(CelKind.DURATION);
}
/** Converts a given expression into a qualified name, if possible. */
private Optional<String> toQualifiedName(CelExpr operand) {
switch (operand.getKind()) {
case IDENT:
return Optional.of(operand.ident().name());
case SELECT:
CelSelect select = operand.select();
String maybeQualified = toQualifiedName(select.operand()).orElse(null);
if (maybeQualified != null) {
return Optional.of(maybeQualified + "." + select.field());
}
break;
default:
// fall-through
}
return Optional.empty();
}
@AutoValue
abstract static class ResolvedFunction {
abstract String functionName();
abstract Optional<CelExpr> target();
abstract Optional<String> overloadId();
@AutoValue.Builder
abstract static class Builder {
abstract Builder setFunctionName(String functionName);
abstract Builder setTarget(CelExpr target);
abstract Builder setOverloadId(String overloadId);
@CheckReturnValue
abstract ResolvedFunction build();
}
private static Builder newBuilder() {
return new AutoValue_ProgramPlanner_ResolvedFunction.Builder();
}
}
static final class PlannerContext {
private final ImmutableMap<Long, CelReference> referenceMap;
private final ImmutableMap<Long, CelType> typeMap;
private final HashMap<String, Integer> localVars = new HashMap<>();
ImmutableMap<Long, CelReference> referenceMap() {
return referenceMap;
}
ImmutableMap<Long, CelType> typeMap() {
return typeMap;
}
private void pushLocalVars(String... names) {
for (String name : names) {
if (Strings.isNullOrEmpty(name)) {
continue;
}
localVars.merge(name, 1, Integer::sum);
}
}
private void popLocalVars(String... names) {
for (String name : names) {
if (Strings.isNullOrEmpty(name)) {
continue;
}
Integer count = localVars.get(name);
if (count != null) {
if (count == 1) {
localVars.remove(name);
} else {
localVars.put(name, count - 1);
}
}
}
}
/** Checks if the given name is a local variable in the current scope. */
private boolean isLocalVar(String name) {
return localVars.containsKey(name);
}
private PlannerContext(
ImmutableMap<Long, CelReference> referenceMap, ImmutableMap<Long, CelType> typeMap) {
this.referenceMap = referenceMap;
this.typeMap = typeMap;
}
static PlannerContext create(CelAbstractSyntaxTree ast) {
return new PlannerContext(ast.getReferenceMap(), ast.getTypeMap());
}
}
public static ProgramPlanner newPlanner(
CelTypeProvider typeProvider,
CelValueProvider valueProvider,
DefaultDispatcher dispatcher,
CelValueConverter celValueConverter,
CelContainer container,
CelOptions options,
ImmutableSet<String> lateBoundFunctionNames) {
return new ProgramPlanner(
typeProvider,
valueProvider,
dispatcher,
celValueConverter,
container,
options,
lateBoundFunctionNames);
}
private ProgramPlanner(
CelTypeProvider typeProvider,
CelValueProvider valueProvider,
DefaultDispatcher dispatcher,
CelValueConverter celValueConverter,
CelContainer container,
CelOptions options,
ImmutableSet<String> lateBoundFunctionNames) {
this.typeProvider = typeProvider;
this.valueProvider = valueProvider;
this.dispatcher = dispatcher;
this.celValueConverter = celValueConverter;
this.container = container;
this.options = options;
this.lateBoundFunctionNames = lateBoundFunctionNames;
this.attributeFactory =
AttributeFactory.newAttributeFactory(container, typeProvider, celValueConverter);
}
}