Source Code Anomaly Detection Framework for Procedural Paradigms

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Integrated development environments face challenges in detecting anomalies in source code due to increasing complexity, particularly in configuring frameworks that cater to different programming paradigms.

Innovation Solution

A framework integrated with the IDE that instantiates specific models such as source code parsing, declaration, and user interface models to analyze source code, determine anomalies, and provide solutions based on decision logic associated with procedural programming paradigms, allowing for context-dependent anomaly detection and correction.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If integrated development environments provide more contextual features to ease software development, then development efficiency is improved, but system complexity increases

Engineering Contradiction:
Improvedevelopment efficiencyVSAvoidIDE complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The IDE is segmented into multiple specialized models (parsing model, declaration model, analysis model, etc.), each responsible for specific source code analysis tasks. This segmentation allows the system to provide comprehensive contextual features while managing complexity through modular architecture.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The framework implements a universal anomaly detection mechanism that works across different programming paradigms and languages. The multiple models collectively provide multi-functional capability to detect various types of source code anomalies (typographical errors, undeclared variables, data type mismatches) while maintaining a unified system structure.

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

2Measurement precision

If a framework is made configurable based on programming paradigm context to detect anomalies, then anomaly detection accuracy is improved, but framework complexity increases

Engineering Contradiction:
Improveanomaly detection accuracyVSAvoidframework complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

Different models are configured with paradigm-specific rules and logic tailored to their specialized functions. For example, the parsing model applies grammar rules appropriate for the detected programming paradigm, while the declaration model checks variable declarations according to paradigm-specific conventions. This local quality approach enables accurate anomaly detection without requiring the entire framework to be complex.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The framework dynamically selects and configures appropriate models based on the detected programming paradigm. The system adapts its behavior and applies different detection rules depending on whether the source code is in procedural, object-oriented, or functional paradigm, enabling context-dependent anomaly detection while maintaining a unified framework structure.

Inventive Principle:
Principle #15Dynamics

3Reliability

If multiple specialized models are instantiated for source code analysis, then anomaly detection capability is improved, but processing time increases

Engineering Contradiction:
Improveanomaly detection capabilityVSAvoidprocessing time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The parsing model performs preliminary analysis of the source code structure and identifies programming paradigm early in the process. This preliminary action enables subsequent models to be configured appropriately and avoids redundant analysis, reducing overall processing time while maintaining comprehensive anomaly detection capability.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The models operate in a continuous pipeline where the output of one model becomes the input for the next. The parsing model feeds into the declaration model, which feeds into the analysis model, enabling continuous processing without repeated parsing or redundant analysis, thus improving efficiency while maintaining detection reliability.

Inventive Principle:
Principle #20Continuity of useful action

Data Source

PatentUS10606728B2Framework for detecting source code anomalies
Publication Date: 2020.03.31 SAP SE
  • US10606728B2 patent drawing
  • US10606728B2 patent drawing
  • US10606728B2 patent drawing

AI summary

Methods and system are disclosed that determine anomalies in the source code in a procedural program paradigm. In one aspect, an input to analyze source code may be received via an integrated development environment. Upon receiving the input, a source code analyzer model may be instantiated at a framework. Based on decision logic associated with the procedural programming paradigm, the source code may be analyzed by the instantiated source code analyzer model at the framework. In response to the analysis, anomalies associated with the source code may be determined at the framework. Upon determining the anomalies, a user interface model may be instantiated at the framework. The instantiated user interface model may provide a user interface that may display a list of solutions in response to the determined anomalies in the source code. An end user may select the solution that may be inserted into the source code.