Pennington— The Name in Software Engineering Automation

XTRAN Menu



* What is XTRAN?

XTRAN is a software engineering meta-tool we have developed that marries compiler and expert system technologies to provide the rule-driven automation of software engineering tasks involving a wide variety of computer languages (see list below).   Through manipulation of XTRAN's Internal Representation (XIR) of these languages, specified via its powerful rules language, XTRAN allows you to automate:

By meta-tool, we mean a system for creating software engineering automation toolsXTRAN's powerful rules language, which we call meta-code, provides an extremely productive environment in which to develop such tools.  In this tool development environment, minor software engineering tasks can be automated in minutes or hours, significant tasks in days, and major tasks in weeks.

XTRAN's rules language is not a "black art"; it can be learned and used by any competent senior software engineer, and multiplies the engineer's skills and talents, to accomplish much more for the effort expended.

We have already used XTRAN to create a number of such tools for analyzing, re-engineering, translating, and generating computer languages.  Your senior software engineers can, after training, quickly create additional software engineering automation tools using XTRAN's rules language.

Computer languages XTRAN can manipulate include:

XTRAN was invented, designed, implemented, and documented by our President and founder, Stephen F. Heffner.  Click here for his résumé, and here for his Curriculum Vitæ.



* What Can You Do with XTRAN?

XTRAN is capable of automating any software engineering task that can be described in its powerful rules language.  We divide such tasks into several broad categories:  Analysis, re-engineering, translation and code generation, and text processing.

Analysis

For analysis, we configure XTRAN with one or more input language parsers but no output language renderers.  XTRAN's rules language provides sophisticated analysis of any language supported by an XTRAN parser.  This powerful analysis capability can also produce documentation and program descriptive information suitable for input into CASE and modeling systems.  In fact, XTRAN's analysis capability, specified through its rules language, allows you to extract any information that is present in the code, at any level of detail or abstraction, and in any form that's required.

XTRAN is usually run on a single module at a time.  However, its ability to persist information across runs allows the collection and reporting of system-wide information.  This is a frequently used approach to global analysis of a software system using XTRAN.  We often write XTRAN analysis rules that append information from each module to a file, then digest and report the accumulated information.

Analysis with XTRAN can be either production analysis, as part of the normal software engineering cycle, or ad hoc analysis needed to address specific issues.

XTRAN analysis is especially useful in assessing a body of code in terms of:

Such an assessment is an important prerequisite to any migration or re-engineering project.  In addition, ongoing assessment of code provides to programming management the information it needs to keep software development on the right track.

Click here for examples of using XTRAN for analysis.

Re-Engineering

For re-engineering and code standardization, we configure XTRAN with a parser and a renderer for the same language.  You can then use XTRAN's powerful rules language to apply, across a body of code, any set of systematic changes that can be specified using rules.  A few examples include:

Since XTRAN makes the changes to the code's XIR, which it then renders on output, the changed code is automatically restyled in terms of indentation, curly braces, line breaking, comment tabbing, etc.  Since styling parameters are under user control, you can use XTRAN to restyle code as desired.

Click here for examples of using XTRAN for re-engineering.

Translation, Code Generation

For translation or code generation, we configure XTRAN with one or more input language parsers and one or more output language renderers.  (You can also use XTRAN's powerful re-engineering capabilities in conjunction with translation; see below for examples.)

Translation combinations we have implemented with XTRAN include:

We have in development, or are planning, additional translation combinations of assemblers, 3GLs (including C, C++, COBOL, BASIC, Fortran, RPG, Pascal, PL/I, PL/M, Ada, and Java), 4GLs, markup languages (including HTML), and meta-data languages (including XML).  Please contact us for more information.

With each XTRAN translation license, we deliver a standard set of translation rules for the appropriate language combination.  After appropriate training, you can enhance or override those rules as needed to address issues specific to the code being translated.

Click here for examples of using XTRAN for translation.

Note:  We have developed the IBM Series/1 EDL and Series/1 assembler to C versions of XTRAN in cooperation with Migration Solutions Incorporated (MSI) of Scottsdale, Arizona.  MSI have developed EFL (EDL Function Library), a runtime library that supports the C code produced by XTRAN translation from EDL.  MSI are also experts in the use of XTRAN to translate EDL and Series/1 assembler.  In addition to supporting translation of EDL and assembler applications, MSI also offer an EDX emulator that can provide a quick and relatively painless way to move such applications off the Series/1 hardware.

Text Processing

For text processing, we configure XTRAN with only a meta-code parser, and no language renderers.  You can then use the powerful text manipulation capabilities of XTRAN's rules language.  The rules language allows you to read and write text files as desired.

XTRAN's regular expression and delimited list manipulation capabilities, along with the other capabilities of its rules language, make it an extremely powerful text processor.

Click here for examples of using XTRAN for text processing.

Combining XTRAN's Capabilities

Automating a complex software engineering task often requires a combination of XTRAN's analysis, re-engineering, translation, code generation, and text processing capabilities.

Click here for examples of combining XTRAN's capabilities.

XTRAN and Legacy Modernization

Many existing legacy software systems represent major investments that must be modernized in order to provide the agility required to remain competitive:

The best modernization strategy will likely involve one or more of the following alternatives:

When it comes time to modernize your legacy applications, XTRAN can play a vital role in automating virtually every aspect of the modernization process.  Achieving a high level of software engineering automation is critical to the success of the project, to reduce the number of bugs introduced by the modernization process, and ultimately, to reduce the risk of failure.

XTRAN and Forensic Code Analysis

In legal proceedings involving computer code, it is sometimes necessary to analyze that code to determine its implications for the legal case.  XTRAN's powerful analysis capabilities are ideal for this, and can be "tuned" to specific requirements using XTRAN's rules language.

Forensic code analysis may involve:

One problem commonly encountered with such analysis is the sheer bulk of code that must be analyzed, often within a limited amount of timeXTRAN provides the automation to reduce this problem to manageable proportions, saving both time and money.

Additional XTRAN Applications

XTRAN's capabilities are applicable to a wide variety of additional problems, including Euro, code dialect translations, CASE tool interfaces, verification and enforcement of coding standards and styles, programming training and tutoring, and other rule-driven manipulation of computer languages and text data.

Ultimately, the only limit to the ways you can use XTRAN is your imagination.



* What Computer Languages Does XTRAN Handle?

XTRAN currently accommodates a wide variety of computer languages, including:

XTRAN's modular and language-independent architecture, including its automated language parsing and rendering technologies, makes it easy to add new languages.   We have additional languages in development, including Java.  If you don't see your language, please contact us.



* XTRAN Examples:  Code Analysis, Translation, Re-Engineering, Generation; Text Processingupdated!



* XTRAN's Architecture

XTRAN consists of:

Here's a graphical look at XTRAN's code and data architecture:

XTRAN Code and Data Architecture

The left side represents XTRAN's code, and reflects the sequence of phases XTRAN executes when it runs.  The right side represents the data that XTRAN keeps in memory as it runs.  The arrows indicate the production and consumption of XIR by XTRAN's various execution phases.

The dark blue parts of the code (language parsers and renderers) are language-specific; the remainder of the code, and XTRAN's rules language, are language-independent.

This unique architecture means that a new language (or language combination) requires only the development of a parser and/or renderer, plus a set of rules, in order to apply the power of XTRAN to a new language manipulation problem.

All of the XIR in XTRAN is organized into code treesXTRAN has many built-in code trees; you can also create and use your own.

Internally, XTRAN is highly object-oriented.  "Computer language" is a data class, as are "parser" and "renderer".  XTRAN can be configured with multiple parsers and/or renderers as needed, to handle a mixture of input and/or output languages.  (XTRAN is always configured with at least a parser for its own rules language.)



* XTRAN's Rules Language

XTRAN's powerful rules language (which we call meta-language or meta-code) is an evaluated, interpretive language.  Its syntax is like C, but its semantics are more like Lisp.  It includes meta-statements, meta-expressions, meta-variables, meta-functions, and meta-comments.

Interpretive evaluation of meta-code is so fast that it allows processing of very large amounts of code in reasonable time.  For example, we recently performed substantial re-engineering and analysis, involving intensive XTRAN rules evaluation, on more than 600,000 code lines of PL/I in just over four hours on a laptop computer.

The many capabilities offered by XTRAN through its rules language include:

We have used XTRAN as a meta-tool to create many XTRAN rule sets that automate a wide variety of analysis, re-engineering, and translation tasks.  We provide these rules, as appropriate, with each XTRAN license.  And, of course, after appropriate training, you can create additional rules to automate both production and ad hoc software engineering tasks.

Note that XTRAN's rules language is proprietary to Pennington; access to it requires an XTRAN license or a Nondisclosure Agreement.  Please contact us for more information.



* XTRAN's Pattern Matching and Replacement Facilities

XTRAN provides, via its rules language, an extremely powerful suite of pattern matching and replacement facilities you can apply to XIR at both the statement and expression levels:



* XTRAN's Language Parsers and Renderers; XBNF

An XTRAN language parser has the job of reading a computer language's text source code and creating the XTRAN Internal Representation (XIR) that represents that code.  XTRAN's parsing engine allows construction of a parser in XTRAN's rules language (meta-code) by describing the grammar to be parsed, using a modified form of Backus-Naur Form (BNF) that we call XTRAN BNF (XBNF)XBNF, as used for parsing, references a small number of hard-coded parsing primitives, and allows recursive productions.  You can construct additional parsing primitives in meta-code using XBNF.

Similarly, an XTRAN language renderer has the job of rendering a computer language's XIR as source code text and putting it out, including all of the code styling issues that implies.  XTRAN's language rendering engine allows construction of a renderer in meta-code by describing the grammar to be output, using a rendering version of XBNFXBNF, as used for rendering, references a small number of hard-coded output primitives, and allows recursive productions.  You can construct additional output primitives in meta-code using XBNF.

XBNF includes facilities for parsing and rendering nonpositional (free-format) languages, such as C and PL/I; positional (column-oriented) languages, such as RPG, job control languages, and some assemblers; and languages that are a mixture of positional and nonpositional, such as COBOL.

XTRAN's XBNF-driven parsing and rendering capabilities include fully integrated dialect control, allowing a parser or renderer to be conditioned on the language dialect being parsed.  This dialect control is dynamic, allowing you to switch dialects during parsing or rendering if needed.

Unlike "compiler compilers", which generate parsers as their output, XTRAN effectively executes XBNF dynamically at language parsing or rendering time, including a "fastback" parsing feature.  XTRAN provides an XBNF trace facility to help debug XBNF.

XBNF is integrated with meta-code, so a language parser or renderer can be written to be "tuned" with additional rules, dynamically if appropriate.

XTRAN's XBNF facilities are fairly recent, so for historical reasons, XTRAN's older language parsers and renderers are hard-coded.  However, they can be enhanced and/or overridden using parsing or rendering XBNF.



* @DBG:  XTRAN's Meta-Debugger

XTRAN includes a powerful, full-featured, interactive meta-debugger, called @DBG, which allows you to control XTRAN's execution and debug your meta-code@DBG's many features include:

Many of these features are also accessible via XTRAN's command line flags or built-in meta-functions.



* XTRAN Documentation

When we license and deliver XTRAN, we provide with it a variant of the XTRAN User Manual appropriate to the licensed activity and computer languages.  The XTRAN User Manual comprises about 50,000 lines of HTML, organized into more than 60 chapters.  It provides a thorough reference to XTRAN, with many usage examples.

Since HTML is one of the computer languages XTRAN can analyze, re-engineer, translate, and generate, we use XTRAN to cross link and index its own XTRAN User Manual, and to produce variants that match licensed XTRAN activities.  Click here for a description and example of that process.

We also provide, with XTRAN, a large number of stand-alone examples appropriate to licensed XTRAN activities, including actual XTRAN rules, input, and output.

Note that the XTRAN User Manual and XTRAN examples are proprietary to Pennington; access to them requires an XTRAN license or a Nondisclosure Agreement.  Please contact us for more information.



* Where did XTRAN Come From?

In 1983, we needed to port one of our products, XFORM, from the Digital VAX computer to the PC.  XFORM was originally written in Digital PDP-11 assembler, but we had previously translated it to VAX assembler, creating our CONPAX translation tool to automate the process.  (CONPAX was so successful at this that we brought it to market, and it helped over forty licensees translate millions of lines of assembler code.)  So the requirement was to translate the VAX assembler into C.

Our Founder and President, Stephen F. Heffner, hand-translated the VAX assembler to C.  He observed that this process was very tedious and mechanical.  However, at the same time, it required significant judgment and the application of sophisticated rules.  Since we had already created one tool for automatic translation, he began to think about how this more demanding type of translation could be automated.

In 1984, one of our large multinational clients had a problem:  A large body of Digital PDP-11 assembly code needed to be ported to a more modern computer.  However, the code had been worked on by many programmers over a long period of time, and was not very well documented, either internally or externally.

They decided that, before they could port the code, they needed to fully understand what it did; in other words, they needed to create an accurate functional specification for it.  The problem was that they had very few PDP-11 assembly programmers left by then, and the few they had were heavily committed.  So they thought that, if they could somehow get the PDP-11 assembly code into C with equivalent functionality, they could put some of their C programmers to work figuring out and documenting the code.

Since they were using our XFORM product, and had already used our CONPAX translation tool to port some of their other PDP-11 assembly code to VAX assembler, they thought of us, and came to us with a question:  Did we think it would be possible to automate the translation of PDP-11 assembly code to C?  Because of our experience with CONPAX, and our recent experience in translating assembler to C by hand, our answer was yes — we thought that was feasible.

Our client then issued an RFP for a feasibility study to us and four other firms, primarily compiler vendors.  We and two other vendors responded with bids, and our client funded all three of us.

Our two competitors submitted papers discussing how they would approach the problem.  Instead of a paper, we submitted a prototype of XTRAN, as a proof of concept, and successfully demonstrated the automation of assembler translation to C using a rules-based approach.

Our client then funded us to create a full production version of XTRAN.  They got an unlimited license to it, but we kept full ownership of the product.  With help from us, they then used XTRAN to translate their PDP-11 assembly code to C.  Although their original purpose was to use the translation as a reverse engineering tool, the resulting C code was good enough that they actually used it for the port.

Since that time, XTRAN has grown tremendously in both language coverage and overall capabilities.  It now comprises almost half a million code lines of extremely high quality, extremely sophisticated, and highly portable C code.  However, as a testament to the robustness of XTRAN's original design and XTRAN Internal Representation (XIR), they both survive to this day, essentially in their original form.



* Questions?  Comments?

If you have questions or comments about XTRAN, Pennington, or this Web site, please contact us.



COPYRIGHT 2012; reproduction prohibited without permission.  Revised 2010-02-17

XTRAN, XIR, XBNF, and @DBG are trademarks of Pennington Systems Incorporated; PDP, VAX, MACRO-11, VAX MACRO, and VMS of Hewlett-Packard; EDL, Series/1, PL.8, PL.9, and PL/ix of IBM; NPL of Norsk Data Systems.

  Pennington Systems Incorporated
2820 N. Pinal Avenue, Suite 12
Casa Grande, Arizona 85122-7927
USA


  Phone:  +1(480)626-5503
Fax:  +1(480)626-7618
Email:  Info@Pennington.com
Web:  http://WWW.Pennington.com