Disjunctive Program Synthesis for Robust Programming-by-Example

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current program-by-example (PBE) systems face challenges in generating robust programs due to the large state space of possible programs, leading to failures on new inputs, as they prematurely commit to a single choice during synthesis, restricting the expressiveness and correctness of the final program.

Innovation Solution

A PBE system that synthesizes a disjunctive program including multiple top-ranked alternatives, delaying the choice of sub-programs until execution time, allowing the system to select the appropriate logic or disjunct based on new input, thereby increasing robustness and accuracy.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a single program is selected during synthesis based on limited examples, then the synthesis process is efficient and simple, but the program lacks robustness and fails on new inputs

Engineering Contradiction:
Improveprogram robustnessVSAvoidprogram structure
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent applies dynamics by making the program structure flexible and adaptive rather than static. Instead of committing to a single program structure during synthesis, the system generates multiple alternative programs (disjuncts) that can dynamically select the appropriate logic based on runtime input characteristics. This allows the program to adapt to different input patterns while maintaining a unified structure that encompasses multiple possibilities.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent changes the parameter of program selection from a fixed single choice to a variable set of choices. By representing the program as a disjunctive structure with multiple alternatives, the system can change which specific logic is active based on the characteristics of the input data. This parameter change enables the program to maintain robustness across different inputs without requiring a completely different structure for each case.

Inventive Principle:
Principle #35Parameter changes

2Reliability

If multiple programs are considered to improve robustness, then the program handles new inputs better, but the state space becomes too large to manage

Engineering Contradiction:
Improveprogram robustnessVSAvoidnumber of candidate programs
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The patent applies segmentation by dividing the program into multiple discrete alternative logics (disjuncts) rather than treating it as a single monolithic structure. Each disjunct represents a specific hypothesis about the input-output relationship. This segmentation allows the system to manage complexity by breaking down the overall program into smaller, more manageable pieces that can be independently evaluated and combined.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent creates a universal program structure that can serve multiple functions by incorporating several alternative logics within a single disjunctive framework. Rather than creating separate programs for different scenarios, the system builds one multi-functional program that can handle various input patterns by selecting the appropriate disjunct at runtime. This universal structure reduces the total quantity of programs needed while maintaining robustness.

Inventive Principle:
Principle #6Universality (Multi-functionality)

3Productivity

If the system commits to one program choice during synthesis, then the synthesis process is faster, but it cannot adapt to varied input patterns

Engineering Contradiction:
Improvesynthesis speedVSAvoidinput handling capability
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The patent applies preliminary action by preparing multiple alternative programs (disjuncts) during the synthesis phase rather than waiting until runtime to determine which logic to use. This preliminary generation of alternatives allows the system to maintain a ready-to-execute set of options without significantly extending the synthesis time, as the alternatives are generated systematically rather than exhaustively.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces an intermediary disjunctive structure that mediates between the synthesis phase and execution phase. This intermediary structure holds multiple alternative logics in a suspended state, allowing rapid synthesis while preserving adaptability. At runtime, this intermediary structure enables quick selection of the appropriate logic based on input characteristics, bridging the gap between fast synthesis and versatile adaptation.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS10671353B2Programming-by-example using disjunctive programs
Publication Date: 2020.06.02 MICROSOFT TECHNOLOGY LICENSING LLC
  • US10671353B2 patent drawing
  • US10671353B2 patent drawing
  • US10671353B2 patent drawing

AI summary

Systems, methods, and computer-executable instructions for synthesizing a program for a task. A domain specific language that includes a disjunctive symbol and an input/output example for the task are received. A program for the task is synthesized based on the input/output example and the domain specific language. Sub-programs for an instance of the disjunctive symbol are synthesized, A set of feature calculators and target feature values are determined. The program for the task is returned. The program includes the sub-programs, the set of feature calculators and the target feature values.