Project

General

Profile

Introduction

This is a cookbook for using FWD to convert applications written in the Progress ABL into semantically identical applications written in Java. By semantically identical, it is meant that from a functional and visual perspective, the user of the application cannot see any difference between the converted application and the original application.

All possible ways of converting Progress ABL code to Java are not covered. This document is specifically focused on guiding the reader through the effective use of the FWD automated conversion technology.

The FWD project represents technology that can be used for two primary purposes:

  • Conversion - convert Progress ABL source code into a functionally equivalent, drop-in replacement written in the Java language.
  • Runtime - run the resulting converted Java application, providing the functions and features of Progress ABL in a compatible manner. More details can be seen in Runtime Architecture.

This book provides guidance on using FWD for conversion purposes.

FWD provides a source-to-source conversion, which means the source code for an application is transformed or converted into the source code for an equivalent application in a different language. In this case, the original (or source) application is written in the Progress 4GL and the target application is written in Java.

The level of equivalence between the source and target applications will depend upon factors such as the conceptual/design differences between the source and target languages, the complexity of the application, the variety of the language features in use and even the approach taken to drive the transformation. For example, a converted Progress 4GL application of medium size and complexity cannot be practically made as a compatible Java application when one uses a manual conversion process. Some tools for "automated" conversion do not deliver compatibility with the original 4GL. Without compatibility the result does not even remotely approach a drop-in replacement for the original application.

The FWD technology is different in this regard. It is designed and engineered to provide a complete drop-in replacement. FWD is a unique solution in this regard. No other known conversion or transformation technology for Progress 4GL can deliver a full drop-in replacement in Java. This is partly due to the high levels of automation provided by FWD. More importantly, an extensive runtime has been developed in Java to provide a compatible replacement for all of the behavior and function of the language which can be utilized by an application in a way that would be detectable or usable by a user. This includes all visual and non-visual portions of the language.

Since the strength of the Progress 4GL was tight integration between the language and database access, the FWD technology and this methodology assumes that a database migration must occur along with the source code conversion. It would be an unusual Progress 4GL application indeed which had no database usage or dependencies. Once converted, the resulting application will have full access to its data without any custom development or data conversion being necessary. The technology and methodology fully provide for this result.

In a source-to-source conversion the resulting target application must (by our definition) be identical to the source application in function and behavior. The user will not be able to tell the difference between the source and target systems. This means that no retraining or business process modifications are required. This greatly reduces the effort, cost and risk of conversion. It also greatly simplifies the methodology and process for conversion since it eliminates customization and re-engineering efforts.

FWD uses a powerful language/facility called Tree Processing Language (TRPL) as the core enabler of the actual conversion process. This language and its supporting tools provides a generic environment for the conversion of any tree structured data into any other tree structured data. Since an Abstract Syntax Tree (AST) is most often the best form of structured representation for source code, TRPL is especially well suited to source-to-source conversion projects.

Built upon the TRPL environment, Progress 4GL and Java specific tools were created to provide the highly automated conversion process. Some of the components include:

  • Progress 4GL compatible preprocessor (converts input files into a syntactically correct Progress 4GL source file)
  • Embedded Progress 4GL (E4GL) preprocessor (converts HTML into input files for the 4GL preprocessor)
  • Progress 4GL language lexer (tokenizes a 4GL program)
  • Progress 4GL language parser (structures a stream of tokens from the lexer into a Progress AST form that is easier to programmatically process than the original source code form)
  • TRPL programs (known as rule-sets) to analyze, cleanup, refactor, and create a Java AST form that is semantically identical to the input AST
  • TRPL programs to anti-parse the Java AST into the source code

From a runtime perspective, FWD includes a fully functional, distributed application environment that provides a directory service, a security manager, a secure synchronous and asynchronous communications protocol, a transaction processing infrastructure, an auditing/logging/tracing facility and other general purpose runtime features. This forms the basis for running a complex enterprise application on the target platform.

More important than the generic infrastructure, FWD provides an extensive compatibility layer that provides essential services to the converted application. This layer duplicates the behavior of the Progress 4GL runtime such that every algorithm, all logic, all expressions/math, all flow control, all transaction processing, each screen, each database update and all other processing operates the same way it did when the application was run in the Progress 4GL runtime environment. Creating this layer is an especially large effort for complex "all-inclusive" environments such as the Progress 4GL. These features were written from scratch, without access to any of the original source language's backing source code. In order for the resulting target application to be semantically identical to the source application, every used language feature must be duplicated to an extreme degree. The FWD runtime does cover a very large portion of the Progress 4GL language, however there are still portions of the 4GL for which no replacement is yet available.

It is also important to note that the organization with the application to be converted must own the copyright in all source code to be converted or the organization must have obtained the equivalent rights to modify, convert and use the source code (and any binary results) through a source licensing agreement. The conversion process creates a derivative work of the original application. The copyright in that work is owned by the same entity that owns the original copyrights.

The rest of this book will provide the details on how to convert 4GL applications using FWD. These other books are useful for understanding:


© 2004-2017 Golden Code Development Corporation. ALL RIGHTS RESERVED.