Cross-Language Code Generation for Data Structure Compatibility
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current software development processes require re-implementing code across different languages like MatLAB and C++ due to differences in data structures and commands, leading to inefficiencies in data sharing and collaboration between developers.
Innovation Solution
A method and system, such as COGENT, that allows defining a data structure in a domain-specific language, generating equivalent structures and algorithms in multiple software languages, and providing utilities for marshalling and de-marshalling data between them, enabling seamless data sharing without further manipulation.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If code is re-implemented from scratch in different software languages, then developers can use their language-specific expertise, but data sharing and collaboration between different software types become inefficient
Solution Approach 1:
The patent uses code generation technology to automatically copy and adapt data structure definitions from one language to another. A data structure defined in MatLAB is automatically copied and transformed into equivalent C++ code through template-based generation, eliminating manual reimplementation while preserving language-specific characteristics
Solution Approach 2:
The patent introduces an intermediary code generation system that acts as a mediator between different software languages. This intermediary automatically translates data structure definitions between MatLAB and C++, enabling seamless data sharing without direct manual intervention or loss of information
2Adaptability or versatility
If developers manually adapt code between different software languages, then data structures can be made compatible, but the process requires significant manual effort and rework
Solution Approach 1:
The patent implements self-service through automated code generation. The system automatically generates compatible data structures in target languages without requiring manual adaptation by developers. The code generator autonomously handles the complexity of cross-language compatibility, freeing developers from manual rework and significantly improving productivity
3Adaptability or versatility
If different software types are used for design and implementation, then each software can leverage its strengths, but data exchange between them becomes complex and error-prone
Solution Approach 1:
The patent ensures reliable data exchange by copying data structure definitions accurately between software environments. The automated generation process preserves the integrity and semantics of original MatLAB data structures when transforming them to C++, eliminating manual transcription errors and ensuring data exchange reliability while maintaining software specialization
Data Source
AI summary
A system and method provide for easy sharing of data between different software languages. A method begins by creating a definition defining a data structure with a domain specific language. The definition is then input to a code generator which generates data structures and algorithms in a first software language. The same generator software also creates equivalent data structures and algorithms in a second software language that is different than the first software language. The two output implementations provide compatible utilities for marshalling and de-marshalling data back and forth between the first software language and the second software language without requiring further manipulation of the two implementations.


