Automated Code Renumbering via Dual-Pass Algorithm
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current programming tools, such as those used in the Navy's ATLAS language, require significant effort and are prone to errors when modifying software source code, particularly in renumbering, reformatting, and re-referencing branching statements, due to the complexity of algorithms that track line numbers and maintain logical order.
Innovation Solution
The 'ATLAS Worx' system employs a dual-pass approach with complex algorithms to automatically renumber and reformat ATLAS code, maintaining a database of line numbers and target line numbers, allowing for efficient and error-free renumbering of entire programs with minimal user intervention, including the ability to assign 'zero-suffix' line numbers and uniform increments.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Manufacturing precision
If manual renumbering of code is performed, then line numbers can be updated, but time consumption and error probability increase significantly
Solution Approach 1:
The system performs automated self-renumbering of code lines by detecting insertions and deletions, then automatically adjusting all line numbers and their references throughout the program without requiring manual intervention. The computer reads the modified code, identifies changes, and renumbers all affected lines including target line numbers in branching statements.
Solution Approach 2:
The manual mechanical process of tracking and rewriting line numbers is replaced by an automated computer-based system that uses algorithms to detect code modifications and perform renumbering operations. The system substitutes human manual labor with automated electronic processing, reading code files, detecting insertions/deletions, and updating line numbers programmatically.
2Stability of the object's composition
If entire program is renumbered after any modification, then line number consistency is maintained, but productivity decreases due to unnecessary renumbering
Solution Approach 1:
The renumbering process is segmented by first detecting the specific location and type of modification (insertion or deletion), then only renumbering the affected section of code rather than the entire program. The system identifies the modified region and limits renumbering operations to that segment, preserving unchanged sections.
Solution Approach 2:
Instead of performing complete program renumbering for every modification, the system applies partial renumbering only to the extent necessary - renumbering only the lines affected by the insertion or deletion and their dependent references. This avoids excessive action while maintaining consistency where needed.
3Adaptability or versatility
If line deletions and insertions are made manually, then code can be modified, but tracking target line numbers becomes complex and error-prone
Solution Approach 1:
The system implements feedback by detecting modifications to the code structure, then using this information to automatically adjust line numbers and update all references to affected lines. The system reads the modified code, identifies changes in line positions, and feeds this information back to perform appropriate renumbering of target line numbers in branching statements and other references.
Solution Approach 2:
The computer system acts as an intermediary between the programmer and the line number tracking task. Instead of the programmer directly tracking line numbers, the intermediary system automatically detects modifications and performs tracking, freeing the programmer from this complex task while maintaining accuracy.
Data Source
AI summary
Systems and methods for automated renumbering, reformatting, and re-referencing of branching statements or go-to instruction line referencing within modified code using a dual-pass approach that includes operations using predicted new line numbers, error detection/correction, and alignment correction processing.


