Skip to content

v0.4.0

Compare
Choose a tag to compare
@l46kok l46kok released this 06 Mar 23:37
· 210 commits to main since this release

This release introduces a new static optimizer that performs Common Subexpression Elimination to improve upon evaluation efficiency.

Breaking Changes

ConstantFoldingOptimizer.INSTANCE is made inaccessible with the following PR. Callers must use getInstance or newInstance methods instead.

  • Add ConstantFoldingOptions by @copybara-service in #214

What's Changed

  • Implement Optimizer for Common Subexpression Elimination by @copybara-service in #208
  • Allow MutableAst to insert a new bind macro by @copybara-service in #203
  • Perform CSE on comprehension loop step by mangling identifier names by @copybara-service in #210
  • Perform CSE on presence tests by @copybara-service in #212
  • Allow configuration of MutableAst by making it instantiable by @copybara-service in #213
  • Properly set subtree height for navigable expr's children by @copybara-service in #242
  • Augment CSE to produce optimized ASTs using cel.block by @copybara-service in #236
  • Tag AST containing cel.block call by @copybara-service in #237
  • Add mangled comprehension variables as identifier declaration to the environment by @copybara-service in #244
  • Assign unique indices for mangled comprehension identifiers with different types by @copybara-service in #243
  • Add .toBuilder methods to constructed CEL environments by @copybara-service in #233
  • Allow cel.bind to be lazily evaluated by @copybara-service in #221
  • Enable lazy comprehension eval by default by @copybara-service in #222
  • Remove enableComprehensionLazyEval flag by @copybara-service in #225
  • Add serialization capability for tagged AST extensions by @copybara-service in #229
  • Add capability to evaluate cel.block calls in the runtime by @copybara-service in #226
  • Add height property to CelNavigableExpr by @copybara-service in #239
  • Mangle identifier name for comprehension result by @copybara-service in #245
  • Create an enum for functions used in CelOptionalLibrary by @copybara-service in #246
  • Allow setting nesting limit for extractable subexpressions. by @copybara-service in #240
  • Create baseline tests for SubexpressionOptimizer by @copybara-service in #249
  • Move cel.bind memoization into ScopedResolver by @copybara-service in #230
  • Remove redundant indices when optimizing with recursion depth by @copybara-service in #258
  • Add baseline tests for constant folding applied before subexpression optimization by @copybara-service in #264
  • Allow mutation of AST containing expanded macro that does not exist in macro_call map by @copybara-service in #266
  • Assert correctness on AST ran through SubexpressionOptimizer by @copybara-service in #252
  • Retain tagged extension when it exists in both original and new ASTs by @copybara-service in #267
  • Add an option for controlling short-circuiting behavior for logical operators #269

Fixes

  • Fix constant folding to work with list provided as an identifier by @l46kok in #199
  • Fix standard function 'type' to accept a parameter type of TypeParamType instead of Dyn by @copybara-service in #207
  • Fix constant folding when ternary arg is replaced with a comprehension by @copybara-service in #268
  • Fix constant folding with in operator involving comprehension identifiers by @copybara-service in #263
  • Prevent string.format injection when interpreter exception is being built by @copybara-service in #218
  • Fix optional list/map indexing with unknowns. Fix optional map indexing via field selection. by @copybara-service in #262
  • Fix replacing namespaced identifiers for accu_init by @copybara-service in #261
  • Optimize parsing a large string literal by avoiding making substring copies #270

Miscellaneous

  • Include optimizer and validator in publish script by @copybara-service in #197
  • Update to Truth 1.4.0. by @copybara-service in #234
  • Migrate usages of Truth8.assertThat to equivalent usages of Truth.assertThat. by @copybara-service in #235
  • Add link to Protocol Buffers tutorials in codelab README.md by @modhanami in #254
  • Add an enum for Standard functions that are non-operators by @copybara-service in #209
  • Prepare 0.4.0 release by @copybara-service in #272

New Contributors

Full Changelog: v0.3.1...v0.4.0