Reactive Expression Optimization via Automatic Generation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing reactive programming systems require significant 'plumbing code' to propagate input updates, often obscuring a programmer's intent and being inefficient in minimizing computational work associated with updating reactive expressions.

Innovation Solution

A mechanism to automatically generate reactive expressions from non-reactive expressions, utilizing techniques like the 'Lift' function and optimization components to avoid side effects and excessive reevaluation, thereby improving performance.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If reactive programming systems manually propagate input updates through plumbing code, then updates can be propagated, but the code becomes complex and programmer intent is obscured

Engineering Contradiction:
Improveprogrammer intent clarityVSAvoidplumbing code complexity
Core Design Contradiction:
Ease of operationVSDevice complexity

Solution Approach 1:

The patent introduces an optimization component as an intermediary between the reactive expression generation and execution. This component automatically analyzes generated reactive expressions, identifies optimization opportunities, and applies transformations without requiring programmers to write complex propagation code. The optimization component mediates between the simple expression definition and the complex update propagation mechanics, hiding the plumbing code complexity while maintaining update propagation functionality.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The system enables reactive expressions to self-optimize through the optimization component, which automatically analyzes and transforms expressions without manual intervention. The plumbing code and optimization logic are self-managing, automatically identifying and eliminating redundant computations, duplicate side effects, and excessive reevaluations without requiring programmers to write complex propagation management code.

Inventive Principle:
Principle #25Self-service

2Reliability

If reactive expressions are frequently reevaluated to maintain reactivity, then updates are propagated accurately, but computational work increases excessively

Engineering Contradiction:
Improveupdate propagation accuracyVSAvoidcomputational work
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The optimization component applies partial reevaluation by selectively identifying which reactive expressions need to be reevaluated based on their dependency on changed inputs. Instead of reevaluating all reactive expressions whenever any input changes, the system performs only the necessary partial reevaluations, eliminating excessive computational work while maintaining accurate update propagation for expressions that actually depend on changed values.

Inventive Principle:
Principle #16Partial or excessive action

Solution Approach 2:

The system changes the parameter of reevaluation frequency from a uniform high frequency to a variable frequency based on expression-specific dependencies. The optimization component analyzes dependency relationships and adjusts reevaluation parameters dynamically, reevaluating only those expressions whose computed values actually depend on changed inputs, thereby reducing overall computational work while maintaining update accuracy.

Inventive Principle:
Principle #35Parameter changes

3Reliability

If reactive expressions reevaluate frequently to propagate updates, then reactivity is maintained, but duplicate side effects occur

Engineering Contradiction:
Improvereactivity maintenanceVSAvoidduplicate side effects
Core Design Contradiction:
ReliabilityVSObject-generated harmful factors

Solution Approach 1:

The optimization component implements feedback mechanisms that track which reactive expressions have been reevaluated and which side effects have already been executed. When an input change occurs, the system uses feedback information about previous reevaluations and side effect executions to determine whether reevaluation and side effect execution are necessary, thereby preventing duplicate side effects while maintaining reactivity for expressions that actually need updates.

Inventive Principle:
Principle #23Feedback

4Adaptability or versatility

If manual plumbing code is used to propagate updates, then reactive behavior can be achieved, but the system becomes difficult to maintain

Engineering Contradiction:
Improvereactive programming capabilityVSAvoidsystem maintainability
Core Design Contradiction:
Adaptability or versatilityVSEase of repair

Solution Approach 1:

The patent segments the reactive programming system into distinct components: expression definition, automatic reactive expression generation, optimization analysis, and execution. The optimization component further segments the maintenance burden by automatically handling optimization tasks such as eliminating duplicate side effects and excessive reevaluations. This segmentation isolates the complex propagation logic from programmer-written code, making the system more adaptable while improving maintainability through automated optimization.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentEP2776922B1Reactive expression generation and optimization
Publication Date: 2019.12.25 MICROSOFT TECHNOLOGY LICENSING LLC
  • EP2776922B1 patent drawingFigure 1
  • EP2776922B1 patent drawingFigure 2
  • EP2776922B1 patent drawingFigure 3

AI summary

Reactive programming is facilitated. Reactive expressions can be generated automatically from non-reactive expressions or in other words standard expressions. Additionally or alternatively, reactive expressions can be optimized in a number of different ways to minimize computational work.