Cornerstone - the G4 Platform
XDelta Limited, one of the world’s leading providers of business critical systems design, implementation and support services has signed a partnership agreement with software migration tools specialist Cornerstone Technology BV.
Cornerstone have developed a highly sophisticated code analysis and conversion toolset known as the G4 Platform. This works with the entire body of code that makes up a complete application, not just the individual programs or modules. Building the G4 Repository from the entire code base gives visibility of the interactions between the various programs and surrounding control processes that make up the whole application.
The G4 Platform also provides an automated method of transforming code and converting languages as part of platform migration. Language conversion and code transformation can be achieved extremely quickly once the conversion rules have been built and proven to deliver correct results.
Source code analysis and application migration
Typical uses of the G4 Platform during a migration project include:
- Code analysis for maintenance purposes, for example to understand the call tree structures, the extent to which various routines are utilised and the proportion of now unused code that has not yet been removed.
- Code analysis for quality purposes, for example to review code received from outsourced developers or to understand the complexity of the code structure.
- Code transformation, for example to re-structure the layout or to make consistent rule-based changes such as introducing abstraction layers.
- Code language conversion, for example to automate the conversion from DEC BASIC to C++, or from DCL to PERL scripts.
- Data schema transformation, for example to assist with data migration from RMS files to SQL or NoSQL databases.
Cornerstone’s G4 Platform successfully implements the concept of a general purpose analyser that is driven by “grammar rules”, which describe the structure and syntax of the input streams. A grammar rule definition is created based on knowledge of the input streams and the programming languages used to write the applications. The input process decomposes the code in a similar manner to the front-end of a compiler. It parses and tokenises the input stream in accordance with the input stream grammar rules to construct the metadata.
This powerful technique enables the G4 Platform to syntactically analyse any input stream for which the underlying grammar can be described. It also enables "any to any" language conversion by first analysing the input stream, applying the conversion rules to the metadata, then generating the output stream in accordance with the defined conversion rules.
Source code analysis
The G4 Platform is built around a central repository that holds information about the application code. The G4 Repository is populated by the G4 Loader from the metadata. The G4 Analyzer provides a view of the code structure, call trees, variable usage, dependencies, synchonisation points, etc. across the set of programs that make up the applications. As the analysis proceeds, the grammar rules can be refined to cater for customer specific programming styles and conventions.
Source code metrics
The G4 Dashboard presents metrics and detailed information in an easily assimilated format for code analysis and quality measurement. The G4 Analyzer gives accurate information for dependency and impact analysis across the entire application code base. This can be used to provide detailed information during the development process, thus allowing better monitoring and management of the development and maintenance processes.
Source code transformation and language conversion
The G4 Converter performs code transformation and language conversion driven by “conversion rules”, which describe the mapping of the input stream constructs to the output stream constructs. This allows automated language conversion, which is an incremental process based on gradual change and the results of testing.
As the conversion proceeds, the conversion rules are refined to deliver better results. Once the conversion rules are complete and verified to be correct, the applications can be migrated extremely quickly, typically within a few hours. This means that there is generally no need to freeze the code base for an extended period of time during the migration process.
Source code testing
The testing process is one of the key aspects of code migration and language conversion. Testing verifies that the conversion rules and grammar definitions are appropriate for the application being migrated. Once the conversion rules are correct, the output can be rapidly generated by the automated transformation of the input stream.
Application migration to new platform
The G4 Converter generates code with a consistent style, taking across embedded comments. The G4 Analyzer acts as a major aid to documentation of a complex code base. The result of code transformation using the Cornerstone G4 Platform is maintainable code in the target language for the target platform. Code maintenance and development after conversion can thus be carried out on the target platform in the target language without needing access to the original code or platform.