Code Energy Defect Detection Using Dynamic Execution Analysis

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional code efficiency analysis techniques fail to account for dynamic interactions during code execution, leading to inefficiencies in energy consumption that are not addressed by static analysis methods.

Innovation Solution

A system utilizing machine-learning techniques to analyze computer code snippets through embedding models and a code defect detection model to identify and correct defects impacting dynamic energy efficiency, incorporating data from code commits, energy efficiency rules, and log key messages, and employing generative adversarial networks for training.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Device complexity

If static energy efficiency analysis is performed at higher levels of computer code, then analysis simplicity is improved, but measurement precision of dynamic energy efficiency deteriorates

Engineering Contradiction:
Improveanalysis simplicityVSAvoiddynamic energy efficiency measurement precision
Core Design Contradiction:
Device complexityVSMeasurement precision

Solution Approach 1:

The patent segments the code analysis process into multiple levels: static analysis at higher levels and dynamic analysis at lower levels. The system divides code into functions and basic blocks, analyzing each segment's energy consumption characteristics separately while considering their interactions during execution.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent transitions from static to dynamic analysis by introducing execution traces that capture actual runtime behavior. The system monitors energy consumption during code execution, allowing the analysis to adapt to dynamic interactions between code segments, memory access patterns, and processor states.

Inventive Principle:
Principle #15Dynamics

2Measurement precision

If dynamic interactions during code execution are accounted for, then measurement precision of energy efficiency is improved, but device complexity increases

Engineering Contradiction:
Improveenergy efficiency measurement precisionVSAvoidsystem complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent introduces an intermediary layer consisting of execution traces and instrumentation code that mediates between the complex dynamic execution environment and the analysis system. These traces capture essential energy-relevant events without requiring direct modification of the underlying hardware or operating system.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent performs preliminary instrumentation of the code before execution, embedding monitoring points at critical locations such as function boundaries and memory access points. This preliminary action prepares the system to capture energy consumption data efficiently during execution without adding complexity during the actual analysis phase.

Inventive Principle:
Principle #10Preliminary action

3Measurement precision

If comprehensive analysis of code snippets is performed using machine-learning techniques, then detection precision of energy efficiency defects is improved, but loss of time in data collection and processing increases

Engineering Contradiction:
Improvedefect detection precisionVSAvoiddata collection and processing time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent applies partial analysis by focusing machine learning techniques on specific high-impact code patterns identified through static analysis. Rather than analyzing all code equally, the system targets functions and basic blocks that are most likely to contain energy efficiency defects based on preliminary static assessment and historical data.

Inventive Principle:
Principle #16Partial or excessive action

Solution Approach 2:

The patent performs preliminary static analysis and data preparation before applying machine learning models. Execution traces are pre-processed and feature-engineered in advance, allowing the machine learning component to work with prepared data structures that reduce processing time during actual defect detection.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS12602214B2Dynamic evaluation and improvement of energy efficiency of computer code
Publication Date: 2026.04.14 ACCENTURE GLOBAL SOLUTIONS LTD
  • US12602214B2 patent drawing
  • US12602214B2 patent drawing
  • US12602214B2 patent drawing

AI summary

Methods, computer systems, and apparatus, including computer programs encoded on computer storage media, for evaluating an energy efficiency of a computer code snippet. A computer-implemented system obtains code data characterizing a computer code snippet and rule data characterizing one or more energy efficiency rules, and processes the code data and rule data using machine-learning models to detect energy efficiency defects in the computer code snippet that negatively impact a dynamic energy efficiency of the computer code snippet upon execution by the computing device.