Automated Introspection for Object-Oriented Source Code Analysis
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Modern object-oriented software applications with millions of lines of source code pose a significant challenge due to their complex class hierarchies, making it difficult for developers to understand and introspect classes and methods without automated tools, which would otherwise require manual development and increase development time.
Innovation Solution
A system and method for automated introspection of object-oriented source code that parses the code to determine objects and classes, generates a class table, and creates source code methods for class-level introspection, enabling automated understanding and analysis of complex class hierarchies without manual intervention.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Loss of information
If manual introspection of classes and methods is performed, then understanding of code structure is achieved, but development time increases significantly
Solution Approach 1:
The system enables self-service introspection by automatically generating and executing introspection methods within the source code. The computing device parses the source code, determines classes and objects, generates a class table, and creates introspection methods that can be executed to retrieve class information without human intervention, thus eliminating the time-consuming manual analysis process while preserving complete structural understanding
Solution Approach 2:
The patent introduces an intermediary computing device that acts as a mediator between the source code and the developer. This intermediary automatically performs the introspection tasks by parsing code, generating class tables, and executing introspection methods, thereby transferring the time-consuming analysis work from the developer to the automated system while maintaining full visibility of code structure
2Extent of automation
If automated introspection tool is developed, then introspection capability is provided, but development time increases due to implementing new methods
Solution Approach 1:
The system provides self-service automation by generating introspection methods automatically within the source code itself. The computing device parses existing source code, determines class structures, and inserts introspection methods that can be executed to retrieve class information. This eliminates the need for developers to manually build introspection tools from scratch, as the system generates and executes its own introspection capabilities automatically
Solution Approach 2:
The patent applies preliminary action by pre-generating class tables and introspection methods during the parsing phase before actual introspection is needed. The system analyzes source code structure in advance, creates comprehensive class tables with all necessary information, and prepares introspection methods that can be executed on-demand, thereby eliminating the need for time-consuming tool development while providing immediate introspection capability
Data Source
AI summary
A computer-implemented method, computer system, and computer program product for introspection of classes within source code. A computing device receives access to object-oriented source code. The computing device parses the source code to determine one or more objects contained in the source code. The computing device determines one or more classes associated with the one or more objects. The computing device generates a class table including one or more class data points associated with the one or more determined classes. The computing device generates one or more source code methods to perform a class-level introspection based upon the generated class table.


