Code Violation Comparison Across Versions

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In software development, existing methods for testing and verifying code against coding standards, such as MISRA C and MISRA C++, are inefficient in tracking and reducing coding standard violations across multiple versions of complex software products, particularly in large teams where development time spans weeks or months.

Innovation Solution

A system and method that includes a code verification engine to check code against metrics, a code differencing engine to compare versions, and an interactive presentation unit to generate hierarchical analysis reports, allowing users to visualize and compare coding standard violations across different versions of code, identify added, deleted, or modified code, and overlay violations onto source code listings.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If static analysis tools are used to check code against coding standards, then coding standard violations can be identified, but it becomes difficult to track and compare violations across multiple versions of complex software products

Engineering Contradiction:
Improvecoding standard violation detectionVSAvoidtracking violation changes across versions
Core Design Contradiction:
Measurement precisionVSLoss of information

Solution Approach 1:

The system creates a copy of the code base at each version checkpoint and stores it in a code base repository. This allows static analysis to be performed on each version independently while preserving the ability to compare violations across versions by examining the stored copies.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

A code comparison engine acts as an intermediary between the static analysis results and the developer. It automatically compares coding standard violations between different versions, identifies new violations introduced by changes, and presents this information to developers without requiring manual analysis.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If developers manually examine and correct coding standard violations in large complex software products, then code quality can be improved, but the process becomes time-consuming and inefficient

Engineering Contradiction:
Improvecode qualityVSAvoiddevelopment time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system provides automated feedback to developers by integrating with the development environment. When code changes are detected, the system automatically analyzes the changes, identifies new coding standard violations, and notifies the developer through the development environment, enabling immediate correction without manual intervention.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The system performs preliminary static analysis on code changes before they are committed to the code base. By detecting and reporting coding standard violations in advance, developers can correct issues during the development process rather than during later testing or maintenance phases.

Inventive Principle:
Principle #10Preliminary action

3Measurement precision

If comprehensive static analysis is performed on each version of complex software, then all coding standard violations can be identified, but the complexity of managing and comparing results across versions increases significantly

Engineering Contradiction:
Improveviolation detection completenessVSAvoidresult management complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The code comparison engine extracts only the relevant information from comprehensive static analysis results - specifically, the coding standard violations and their locations. By focusing on this extracted information rather than analyzing entire code bases manually, the system simplifies the comparison process while maintaining detection completeness.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The system segments the code base into manageable units and analyzes changes at the function or file level. This segmentation allows the comparison engine to efficiently identify which specific parts of the code have changed and focus the violation comparison on those segments, reducing overall complexity.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS8745586B1System and method for coding standard testing
Publication Date: 2014.06.03 MATHWORKS INC
  • US8745586B1 patent drawing
  • US8745586B1 patent drawing
  • US8745586B1 patent drawing

AI summary

A system facilitates verification of computer code. The system receives multiple versions of the computer code. A code verification engine checks the received code against one or more metrics, such as coding standard violations. A code differencing compares the received versions of computer code, and identifies the differences between them. An interactive presentation unit presents one or more analysis reports regarding coding violations located in the received versions. An analysis report includes a plurality of entries hierarchically organized in conformance with the entities of the received code. The analysis report indicates the number of coding violations identified for the entities of the received code in a side-by-side, comparative arrangement. A user can thus compare the number of coding violations present in the received versions.