Modular Protocol Checker for Object-Oriented Code

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing protocol checking approaches in object-oriented software are either too restrictive with aliasing or not suitable for interactive development, failing to ensure correct implementation of protocols, especially in the presence of multiple references to objects.

Innovation Solution

A sound modular protocol checking approach based on typestates that uses access permissions to track and manage aliasing, allowing flexibility while ensuring protocol compliance through method implementations and inheritance handling.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If global analysis is used to check protocols, then aliasing is accounted for, but the approach is not suitable for interactive use during development

Engineering Contradiction:
Improveprotocol checking accuracyVSAvoidinteractive development support
Core Design Contradiction:
ReliabilityVSEase of operation

Solution Approach 1:

The patent divides the protocol checking process into modular components that can be applied incrementally during development. Instead of requiring complete global analysis, the system checks protocols method by method, allowing developers to get feedback interactively while writing code, thus resolving the contradiction between reliability and ease of operation

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system performs preliminary protocol checking on individual methods before full integration, allowing early detection of protocol violations. This preliminary action enables interactive development support while maintaining checking accuracy through progressive verification

Inventive Principle:
Principle #10Preliminary action

2Ease of operation

If modular protocol checkers are used, then interactive development is supported, but aliasing restrictions are imposed that exclude realistic code

Engineering Contradiction:
Improveinteractive development supportVSAvoidaliasing flexibility
Core Design Contradiction:
Ease of operationVSAdaptability or versatility

Solution Approach 1:

The patent introduces dynamic alias tracking that adapts to the actual aliasing patterns in the code rather than imposing static restrictions. The system dynamically determines which objects are aliased and adjusts checking accordingly, allowing realistic code with various aliasing patterns to be checked interactively

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system changes the parameters of alias tracking from fixed restrictions to flexible, context-dependent tracking. By monitoring actual reference patterns and adjusting checking behavior based on detected aliasing, the system maintains interactive support while accommodating diverse real-world code patterns

Inventive Principle:
Principle #35Parameter changes

3Reliability

If conservative reasoning is applied to track aliasing, then protocol violations are detected, but precision in reasoning about object manipulations is reduced

Engineering Contradiction:
Improveprotocol violation detectionVSAvoidobject state tracking precision
Core Design Contradiction:
ReliabilityVSMeasurement precision

Solution Approach 1:

The system applies conservative reasoning only where necessary for protocol violation detection, rather than universally. By selectively applying conservatism based on actual aliasing contexts, the system maintains sufficient precision for detecting violations while avoiding unnecessary loss of precision in object state tracking

Inventive Principle:
Principle #16Partial or excessive action

Solution Approach 2:

The system uses feedback from actual runtime observations to refine its reasoning about object states. By monitoring actual aliasing patterns and using this feedback to adjust checking precision, the system achieves reliable violation detection while maintaining high precision in tracking object manipulations where applicable

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS8327327B2Method for statically checking an object-oriented computer program module
Publication Date: 2012.12.04 CARNEGIE MELLON UNIV
  • US8327327B2 patent drawing
  • US8327327B2 patent drawing
  • US8327327B2 patent drawing

AI summary

A method for statically checking an object-oriented computer program module includes the step of identifying objects within a computer program module, at least one of the objects having a plurality of references thereto, possibly from multiple clients. A discipline of permissions is imposed on the objects identified within the computer program module. The permissions enable tracking, from among a discrete set of changeable states, a subset of states each object might be in. A determination is made regarding whether the imposed permissions are violated by a potential reference to any of the identified objects. The results of the determination are output to a user.