Source Map for Visual Paradigm Debugging
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Debugging visual programs and embedded source code is challenging due to the lack of a direct link between the visual paradigm and the executed code, making it difficult to implement effective debugging tools, especially when code is translated into intermediate forms like Java and embedded in other contexts.
Innovation Solution
A system and method for generating a Source Map (SMAP) that maps visual objects in a visual paradigm to line numbers in the associated code output, allowing for debugging by determining an order number for each visual object and mapping it to the corresponding code lines, and embedding a relocatable SMAP within the embedded source code to maintain original context debugging.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If visual paradigm code is translated into intermediate code (e.g., Java) for execution, then the program can be executed by standard interpreters, but the link between visual objects and code lines is lost making debugging difficult
Solution Approach 1:
The patent introduces a source map file as an intermediary data structure that contains mapping information between visual objects and code lines. This source map acts as a mediator that connects the visual paradigm layer with the executed code layer, enabling the debugger to translate between visual object references and actual code line numbers without breaking the execution compatibility of the intermediate code.
Solution Approach 2:
The source map is generated in advance during the code generation phase, before the debugging process begins. By pre-computing and storing the mapping relationships between visual objects and code lines in the source map file, the system prepares the debugging information structure ahead of time, eliminating the need for complex runtime tracking and enabling efficient debugging operations.
2Ease of manufacture
If embedded code is generated within intermediate forms (e.g., XML, Java) for integration, then the code can be incorporated into parent editors and executed, but debugging must occur in the intermediate context rather than the original context
Solution Approach 1:
The source map serves as an intermediary that preserves the connection between the embedded code's original visual context and its intermediate form. By storing mapping information that references visual objects rather than intermediate code structures, the source map enables the debugger to operate in the original visual context even though the code is embedded in an intermediate form within the parent editor.
Solution Approach 2:
The patent adds a new dimension of abstraction by introducing visual object identifiers that exist independently of the intermediate code structure. Instead of debugging through the intermediate form's code lines, the system operates in the visual paradigm dimension, using the source map to translate between these dimensions. This allows debugging to occur in the more intuitive visual context while the code remains integrated in its intermediate form.
Data Source
AI summary
SMAPs are generated for use in debugging visual paradigms. A system can debug a non-Java source, or a visual paradigm, embedded inside another distinct paradigm. The system may include a visual object ordering system that determines an order number for each of a plurality of visual objects in the visual paradigm, and a mapping system that maps the order number of each visual object to a set of line numbers in the associated code output.


