Conversion Tree Program Convention Violation Detection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for determining whether a program violates a convention are inefficient due to the need for pre-prepared abstract syntax trees, which are varied and difficult to create, leading to false detections and requiring specialized knowledge, limiting the ability to detect unexpected defects and modify conventions.

Innovation Solution

An apparatus and method that use a conversion tree generated from an abstract syntax tree using predetermined conversion rules, comparing it to stored violation information to determine convention violations, and providing modification methods while accounting for false detection patterns.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If abstract syntax trees are pre-prepared to detect convention violations, then detection accuracy is improved, but device complexity and difficulty of manufacture increase significantly

Engineering Contradiction:
Improvedetection accuracyVSAvoidcomplexity of pre-preparing abstract syntax trees
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The system performs preliminary conversion of abstract syntax trees into conversion trees using predetermined conversion rules before the actual violation detection process. This preliminary action simplifies the subsequent detection by transforming complex AST structures into standardized conversion trees that are easier to compare against violation patterns.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces conversion trees as an intermediary representation between the original abstract syntax trees and the violation detection process. These conversion trees serve as a mediating structure that simplifies the comparison operation while preserving the essential structural information needed for accurate violation detection.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If specialized knowledge is required for control flow analysis, then detection reliability is improved, but ease of operation deteriorates

Engineering Contradiction:
Improvedetection reliabilityVSAvoidease of adding or modifying conventions
Core Design Contradiction:
ReliabilityVSEase of operation

Solution Approach 1:

The system automatically performs the conversion from abstract syntax trees to conversion trees using predetermined conversion rules without requiring manual intervention or specialized knowledge. This self-service mechanism enables project members to add or modify conventions independently without needing to understand complex control flow analysis techniques.

Inventive Principle:
Principle #25Self-service

3Measurement precision

If all violation patterns are pre-prepared, then detection coverage is improved, but loss of time increases due to maintenance burden

Engineering Contradiction:
Improvedetection coverageVSAvoidtime for maintaining violation patterns
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The conversion tree structure serves multiple functions: it standardizes diverse abstract syntax tree structures into a common format, enables consistent violation detection across different convention types, and facilitates easy modification of detection rules without requiring changes to the underlying conversion logic.

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

Data Source

PatentUS7669192B2Method to find a violation of a coding rule in program
Publication Date: 2010.02.23 X CORP
  • US7669192B2 patent drawing
  • US7669192B2 patent drawing
  • US7669192B2 patent drawing

AI summary

An apparatus for determining whether or not a program violates a convention, including an input unit for receiving an input of a target program to be an object of a determination on whether to violate the convention; a violation storing unit for beforehand storing any one of an abstract syntax tree and a pattern which indicate a structure of a program violating the convention; a converter for converting the abstract syntax tree of the target program to a conversion tree with a predetermined conversion rule; and a determination unit for determining that the target program violates the convention on condition that at least a part of the conversion tree agrees with an abstract syntax tree violating the convention.