Source Map for Visual Paradigm Debugging

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
Improvecode execution compatibilityVSAvoiddebugging difficulty
Core Design Contradiction:
Adaptability or versatilityVSDifficulty of detecting and measuring

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.

Inventive Principle:
Principle #24Intermediary (Mediator)

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.

Inventive Principle:
Principle #10Preliminary action

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

Engineering Contradiction:
Improvecode integration easeVSAvoiddebugging operation ease
Core Design Contradiction:
Ease of manufactureVSEase of operation

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.

Inventive Principle:
Principle #24Intermediary (Mediator)

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.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

Data Source

PatentUS8949790B2Debugging visual and embedded programs
Publication Date: 2015.02.03 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US8949790B2 patent drawing
  • US8949790B2 patent drawing
  • US8949790B2 patent drawing

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.