Compiler Future Construct for Sequential to Distributed Code Conversion
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing distributed computing systems require complex understanding of parallel programming concepts, making it difficult to convert sequential code into efficient distributed code for parallel execution across multiple processing nodes.
Innovation Solution
The introduction of a 'future' construct in sequential code allows for the generation of distributed code by separating future calls and present sections, enabling concurrent execution while preserving sequential semantics, and using a compiler to create multiple programs that execute on different machines, with minor syntactic changes to the source code.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If specialized frameworks or libraries are used to implement distributed processing, then execution performance is improved through parallel processing, but the complexity of programming increases due to the need to understand parallel programming concepts
Solution Approach 1:
The patent introduces a future construct as an intermediary mechanism that bridges sequential programming and parallel execution. This construct allows programmers to specify future computations without immediately executing them, enabling the system to automatically manage parallelization while maintaining sequential code structure. The future construct acts as a mediator between the simple sequential programming model and the complex distributed execution environment.
Solution Approach 2:
The patent segments the computation into present sections (immediately executed code) and future sections (deferred computations). This segmentation allows the compiler to identify independent computational units that can be executed in parallel across multiple processing nodes, while the programmer continues to write code in a sequential style. The segmentation enables automatic parallelization without requiring the programmer to understand parallel programming concepts.
2Productivity
If sequential code is converted to distributed code for parallel execution, then performance is improved, but the conversion process becomes complex requiring data structure changes and specialized knowledge
Solution Approach 1:
The patent enables the compiler to automatically perform the conversion from sequential to distributed code without requiring manual intervention or complex data structure changes. The future construct provides the compiler with sufficient information to automatically identify parallelization opportunities, generate distributed code, and manage execution across multiple processing nodes. This self-service approach eliminates the need for programmers to manually convert code or understand complex parallel programming concepts.
Solution Approach 2:
The patent uses preliminary annotation of future constructs in the sequential code to provide the compiler with advance information about which computations can be executed in parallel. This preliminary marking allows the compiler to prepare the distributed execution plan during compilation, separating the concerns of code writing (sequential) from code execution (parallel), and eliminating the need for complex runtime conversions or data structure modifications.
3Productivity
If manual conversion to distributed code is performed, then parallel execution capability is achieved, but the time and effort required for code development increases
Solution Approach 1:
The future construct serves as an intermediary that automatically bridges sequential code and parallel execution, eliminating the need for manual conversion efforts. By simply annotating future computations with the future keyword, programmers enable automatic parallelization without investing additional time in understanding distributed systems or manually rewriting code for parallel execution.
Solution Approach 2:
The compiler automatically performs the complex task of converting sequential code to distributed code by analyzing the future constructs and generating appropriate parallel execution plans. This self-service conversion process eliminates the time-consuming manual conversion process, allowing programmers to focus on writing sequential code while the compiler handles the parallelization automatically.
Data Source
AI summary
A distributed code including a plurality of programs is created based on a sequential code that includes at least one call of a first function associated with a future, where at least a first of the plurality of programs is to execute the first function associated with the future, and at least a second of the plurality of programs is to execute a second function in a present section of the sequential code. A normalization function is included in each of the plurality of programs to normalize virtual addresses accessed by the first and second functions.


