Virtual Machine Callback Aspect Weaving

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Traditional aspect-oriented programming systems are inflexible as they can only apply aspects at well-defined points in the code evaluated by the virtual machine, limiting their ability to dynamically incorporate crosscutting concerns into modular applications.

Innovation Solution

Implementing aspects via callbacks within a virtual machine allows for dynamic weaving of aspect code at any point during execution, including conditional statements, method calls, and exception handlers, without modifying the intermediate code, thereby enhancing flexibility.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If traditional aspect-oriented programming systems are used, then aspects can be applied at well-defined points in the code, but the system becomes inflexible and cannot dynamically incorporate crosscutting concerns

Engineering Contradiction:
Improveflexibility in applying aspectsVSAvoidsystem complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent implements dynamic aspect application by allowing aspects to be applied at any point during virtual machine execution rather than being fixed at well-defined points. The aspect weaver can dynamically insert aspect code at conditional statements, method calls, or exception handlers during runtime, making the system adaptable to different execution contexts without requiring complex pre-defined weaving points.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent introduces an intermediary mechanism where the virtual machine itself acts as the mediator between aspect code and application code. Instead of requiring specialized loaders or code modification, the virtual machine executes aspect code as callbacks that can be invoked at any execution point, simplifying the overall system architecture while maintaining high flexibility.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Adaptability or versatility

If aspects are applied by modifying intermediate code, then crosscutting functionality is incorporated, but the virtual machine operation cannot be directly changed

Engineering Contradiction:
Improveability to change virtual machine operationVSAvoidcode modification requirement
Core Design Contradiction:
Adaptability or versatilityVSEase of manufacture

Solution Approach 1:

The patent inverts the traditional approach by not modifying the intermediate code to change virtual machine behavior, but rather keeping the intermediate code static and changing the virtual machine's operation through callback mechanisms. The virtual machine is enhanced to execute aspect code as callbacks that can be invoked at any point, allowing direct control over virtual machine behavior without code modification.

Inventive Principle:
Principle #13The other way round (Inversion)

Solution Approach 2:

The patent replaces the mechanical code modification approach with a callback-based mechanism. Instead of modifying intermediate code structure, the system uses callback functions that the virtual machine executes at appropriate points, substituting the mechanical process of code modification with a more flexible functional approach that directly controls virtual machine operation.

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

3Ease of operation

If specialized loaders are used to insert aspect code, then aspects can be woven into application code, but the system requires additional complexity and cannot operate without specialized components

Engineering Contradiction:
Improveaspect application simplicityVSAvoidspecialized loader requirement
Core Design Contradiction:
Ease of operationVSDevice complexity

Solution Approach 1:

The patent implements self-service by enabling the virtual machine to handle aspect code execution independently without requiring external specialized loaders. The virtual machine is enhanced to directly execute aspect code as callbacks at any execution point, allowing the system to serve itself by integrating aspect functionality into the core virtual machine operation rather than relying on separate specialized components.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS9910688B2Implementing aspects with callbacks in virtual machines
Publication Date: 2018.03.06 RED HAT INC
  • US9910688B2 patent drawing

AI summary

Implementing aspects via callback in a virtual machine, where an aspect weaver weaves the aspect with a module to provide primary and crosscutting functionality in the runtime execution of the module. The virtual machine has multiple modules that are part of an application implementing separation of concerns. Each of the multiple modules has a distinct functionality portion and a common functionality portion, common to all modules. The common functionality is referenced by the virtual machine via callback for the multiple modules. Aspect code is loaded as a callback that is applied to the multiple modules by the virtual machine. Loading the aspect code as a callback can implement the aspect at any point in the modules, including conditional statements, calls to methods of objects or classes, loops, any point in an exception handler, or to monitor changes in variables.