Reliability Contracts for State Consistency in Exceptional Conditions

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Code developers face challenges in authoring reliable code that is state-consistent, especially when dealing with exceptional conditions like thread aborts, out-of-memory situations, and stack overflows, as they lack guarantees about the behavior of dependent methods from other sources.

Innovation Solution

Reliability contracts are introduced to declare the intent of executable code regarding potential state corruption under exceptional conditions, providing clear guarantees about the behavior of methods, which can be associated with executable code to facilitate better programming, execution, and testing.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of information

If developers rely on product documentation to discover guarantees about called methods, then documentation is available for review, but the accuracy and reliability of the guarantees are insufficient due to communication loss between authors and documenters

Engineering Contradiction:
Improvecommunication accuracyVSAvoidcode reliability
Core Design Contradiction:
Loss of informationVSReliability

Solution Approach 1:

The patent introduces reliability contracts as an intermediary mechanism that directly connects method authors with calling method developers. Instead of relying on product documentation as an intermediary that loses information, the reliability contract serves as a precise, machine-readable specification that preserves the exact intent and guarantees of the method author, eliminating communication loss between authors and documenters.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent replaces the manual documentation process (mechanical system involving human authors and documenters) with an automated reliability contract system. The reliability contract is generated directly from the method code through static analysis, substituting the error-prone human documentation process with an automated system that preserves accuracy without communication loss.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

2Productivity

If developers author code without reliability guarantees from called methods, then code can be written more quickly, but the reliability and state consistency of the calling method cannot be guaranteed

Engineering Contradiction:
Improvecode development speedVSAvoidstate consistency
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent applies preliminary action by establishing reliability contracts before the calling method is executed or tested. The reliability contract specifies the exceptional conditions under which the called method may corrupt state, allowing the calling method developer to write code with appropriate safeguards in advance, rather than discovering reliability issues during execution or testing.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent implements beforehand cushioning by providing reliability contracts that warn developers about potential state corruption from called methods. This allows developers to prepare compensating measures in advance, such as implementing proper exception handling, validation logic, or alternative error handling strategies, cushioning against the potential harmful effects of exceptional conditions before they occur.

Inventive Principle:
Principle #11Beforehand cushioning (Prior cushioning)

3Reliability

If reliability contracts are associated with executable code, then explicit guarantees about state consistency are provided, but the complexity of programming and testing increases

Engineering Contradiction:
Improveexplicit guaranteesVSAvoidprogramming complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent replaces the manual process of writing and verifying reliability guarantees with automated static analysis tools. The reliability contract is generated automatically from the method code, and compliance can be verified through automated testing frameworks, substituting complex manual verification processes with automated tools that reduce the burden on developers.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Solution Approach 2:

The reliability contract system enables self-service by allowing the called method to automatically provide its own reliability specification. The method author writes the reliability contract alongside the method code, and the contract serves as self-documentation that automatically communicates reliability guarantees to consumers of the method, eliminating the need for separate documentation processes.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS7571428B2Reliability contracts
Publication Date: 2009.08.04 MICROSOFT TECHNOLOGY LICENSING LLC
  • US7571428B2 patent drawing
  • US7571428B2 patent drawing
  • US7571428B2 patent drawing

AI summary

Reliability contracts declare an intent of executable code, and may be associated with at least a portion of the executable code. The intent of the executable code in the face of particular conditions may be declared for the use in any one of a programming, execution, or testing environment.