Declarative Synchronization Annotations for Multi-Threaded Code

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing multi-threaded programs face challenges in synchronization due to the tight coupling of low-level synchronization primitives with procedural code, leading to obscure code, increased complexity, and fragility, making it difficult to maintain and extend these programs without introducing synchronization hazards.

Innovation Solution

The use of high-level declarative synchronization annotations in multi-threaded applications allows for the separation of synchronization logic from functional logic, enabling independent implementation and optimization, with annotation processors generating synchronization code that can be compiled and executed by multiple threads.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If low-level synchronization primitives are tightly coupled with procedural code, then synchronization control can be achieved, but code comprehensibility and maintainability deteriorate

Engineering Contradiction:
Improvesynchronization controlVSAvoidcode comprehensibility
Core Design Contradiction:
ReliabilityVSEase of operation

Solution Approach 1:

The patent segments synchronization logic from procedural code by introducing separate synchronization policy modules. These policies are defined independently and can be applied to procedural code without mixing synchronization statements with business logic, thereby maintaining code comprehensibility while ensuring proper synchronization control.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces synchronization policies as intermediary layers between procedural code and low-level primitives. These policies act as mediators that translate high-level synchronization requirements into low-level primitive operations, improving code comprehensibility while maintaining synchronization reliability.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If more synchronization code is added to keep up with procedural code complexity, then synchronization coverage is improved, but code complexity and maintenance burden increase

Engineering Contradiction:
Improvesynchronization coverageVSAvoidcode complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent creates universal synchronization policies that can be applied to multiple procedural code sections. A single policy definition can serve multiple synchronization needs throughout the program, reducing overall code complexity while maintaining comprehensive synchronization coverage.

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

Solution Approach 2:

The patent allows synchronization policies to be defined in advance, separate from procedural code development. These pre-defined policies can be automatically applied when needed, reducing the maintenance burden as procedural code evolves without requiring proportional updates to synchronization code.

Inventive Principle:
Principle #10Preliminary action

3Adaptability or versatility

If procedural code evolves, then program functionality is improved, but synchronization policies require updates increasing programmer distraction

Engineering Contradiction:
Improveprogram evolutionVSAvoidprogrammer distraction
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

By segmenting synchronization concerns into separate, independently manageable policy definitions, the patent allows procedural code to evolve without requiring synchronized updates to synchronization logic. Changes in one area do not necessarily trigger changes in another, reducing programmer distraction.

Inventive Principle:
Principle #1Segmentation

4Stability of the object's composition

If synchronization code is mixed with procedural code, then integration is achieved, but extension of existing programs with new features becomes difficult

Engineering Contradiction:
Improvecode integrationVSAvoidprogram extendability
Core Design Contradiction:
Stability of the object's compositionVSAdaptability or versatility

Solution Approach 1:

The patent extracts synchronization logic from procedural code into separate policy definitions. This extraction maintains the integrated behavior of synchronized programs while allowing procedural code to be extended with new features without being constrained by mixed synchronization code, thereby improving program extendability.

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentUS10216500B2Method and apparatus for synchronization annotation
Publication Date: 2019.02.26 ORACLE INT CORP
  • US10216500B2 patent drawing
  • US10216500B2 patent drawing
  • US10216500B2 patent drawing

AI summary

Methods and system for providing synchronization of a multi-threaded application includes analyzing a source file of the application to identify one or more synchronization annotations contained therein, wherein the synchronization annotations are defined using declarative statements. One or more synchronization annotation processors are identified and invoked for processing the one or more synchronization annotations identified in the source file so as to generate code files. The source file is compiled to generate one or more class files by compiling the procedural code within the source file to generate one or more class files, and compiling the code files to generate the one or more class files. The class files associated with the code files are used by the multiple threads during execution of the application to arbitrate access to methods and data manipulated by classes within the class files associated with the procedural code.