Source Code Editor Semantic Change Detection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing source code editors lack the ability to distinguish between modifications that affect the semantics and those that do not, leading to potential programming errors and unintended software behavior during editing.

Innovation Solution

A method and system for editing source code that determines whether modifications change the semantics, allowing only non-semantical changes in 'protected mode' and providing suggestions or rejecting changes that do, with optional automatic or manual verification using object code comparison or defined modification lists.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If source code editors allow free modification of source code, then ease of operation is improved, but reliability deteriorates due to accidental typing and programming errors

Engineering Contradiction:
Improveease of editingVSAvoiderror prevention
Core Design Contradiction:
Ease of operationVSReliability

Solution Approach 1:

The editor provides feedback to the user by determining whether a modification changes the semantics of the source code. When a semantic change is detected, the editor notifies the user, allowing them to understand the impact of their modification before it is applied, thus balancing ease of editing with error prevention

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The editor performs preliminary determination of semantic changes before the modification is finalized. By checking whether the modification affects runtime semantics in advance, the system prevents accidental errors while allowing intentional changes, resolving the contradiction between ease of operation and reliability

Inventive Principle:
Principle #10Preliminary action

2Reliability

If the editor determines semantic changes automatically, then reliability is improved, but device complexity increases

Engineering Contradiction:
Improvesemantic change detectionVSAvoideditor complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The editor uses its own processing capabilities to determine semantic changes automatically. By employing the processor to analyze modifications and compile source code when necessary, the system performs self-verification without requiring external tools or complex additional hardware, thus improving reliability while keeping complexity manageable

Inventive Principle:
Principle #25Self-service

3Measurement precision

If the editor provides detailed modification analysis, then measurement precision is improved, but loss of time increases

Engineering Contradiction:
Improvemodification analysis accuracyVSAvoidverification time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The editor performs partial analysis by determining only whether semantic changes occur, rather than providing exhaustive analysis of every possible modification aspect. This partial action approach maintains sufficient measurement precision for reliability while minimizing the time required for verification

Inventive Principle:
Principle #16Partial or excessive action

Solution Approach 2:

The system changes the parameter of analysis depth based on the modification type and context. By adjusting the level of analysis dynamically, the editor provides detailed measurement precision when needed while reducing verification time for straightforward modifications, thus resolving the contradiction between precision and time loss

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS9823902B2Editing source code
Publication Date: 2017.11.21 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US9823902B2 patent drawing
  • US9823902B2 patent drawing
  • US9823902B2 patent drawing

AI summary

A method for editing source code includes receiving a modification to the source code made by a user, determining whether the modification would change the semantics of the source code, and handling the modification depending on the result of the determining.