XTRAN Examples

The following examples show how you can use XTRAN, our software development meta-tool, to automate virtually any software, data, or text task.

* XTRAN examples by computer language

* XTRAN examples by activity:

* XTRAN examples by area of application:




XTRAN examples by computer language

Click on your language below for examples using XTRAN to automate manipulation of that language:



Examples listed by computer language (indexed above):




Using XTRAN to Analyze Computer Languages

* Assemblers

* HP (Digital, Compaq) MACRO-11 assembler

* HP (Digital, Compaq) VAX MACRO assembler

* HP (Digital, Compaq) VAX MACRO problem operands

* C

* Structure/union member offsets and sizes

* Cyclomatic complexity

* Forensic Analysis of Function Signatures 

* Analyze Straight-line Code Length by Nesting Depth 

* C++

* Markov analysis of statement type transitions

* COBOL

* Symbol usage

* Mine code for Business Rule conditions

* HTML

  • Tag & attribute usage
  • Embedded substitution usage
  • Mine Web pages for keywords 
  • Error check HTML links & generate site map 
  • * Java

    * Colorize code by nesting depth, display as HTML 

    * Highlight expressions, display as HTML 

    * Natural (Software AG)

    * Filter code on statement type, display as HTML

    * PL/I

    * Analyze computer language features used 

    * Constant/expression PROCEDURE arguments

    * Knots (GOTO crossings)

    * Highlight file I/O & display I/O code, display as HTML

    * RPG

    * Tally statement types

    * XML

    * Tag & attribute usage

    * Entity reference usage

    * Module/Function Cross-References

    These examples illustrate the language-independent nature of XTRAN's rules language.  They were all produced using exactly the same set of rules.

    * C, C++, Java, or C#

    * Fortran

    * Pascal

    * PL/I

    * PL/M

    * Interactive query of code mining results 

    * Using XTRAN for Year 2000 (Y2K) Impact Analysis

    * HP (Digital, Compaq) MACRO-11 assembler

    * C, C++, Java, or C#

    * PL/M




    Using XTRAN to Re-Engineer Computer Languages

    * C

    * Restructure to eliminate gotos

    * Add I/O documentation

    * Match & replace expressions

    * Combine C, C++, Java, or C# expression statements

    * Eliminate dead code

    * Impose preprocessor macro on existing code

    * Vertically align DSV data items 

    * C++

    * Restructure to eliminate gotos

    * Match & replace expressions

    * Combine C, C++, Java, or C# expression statements

    * Impose preprocessor macro on existing code

    * Protect included files from multiple inclusion

    * Vertically align DSV data items 

    * C#

    * Restructure to eliminate gotos

    * Combine C, C++, Java, or C# expression statements

    * COBOL

    * Mine code for Business Rule conditions

    * Restructure to eliminate GO TOs 

    * Combine arithmetic statements 

    * Replace arithmetic statements with COMPUTEs 

    * HTML

    * Insert anchors into HTML 

    * Cross Link and Index HTML Documents

    * Java

    * Match & replace expressions

    * Combine C, C++, Java, or C# expression statements

    * PL/I

    * Restructure to eliminate GOTOs

    * Eliminate dead code

    * XML

    * Normalize tags and vocabulary 




    Using XTRAN to Translate Computer Languages

    * Translate assemblers to C

    * HP (Digital, Compaq) MACRO-11 assembler

    * HP (Digital, Compaq) VAX MACRO assembler

    * User function entry macro in HP (Digital, Compaq) VAX MACRO

    * Labeled structures in HP (Digital, Compaq) VAX MACRO

    * Problem operands in HP (Digital, Compaq) VAX MACRO

    * Encore (SEL, Gould) assembler

    * In-line function arguments in Encore (SEL, Gould) assembler

    * Translate Fortran to C

    * COMMONs and EQUIVALENCEs

    * Translate IBM Series/1 EDL to C

    * EDL to C

    * Translate Pascal to C

    * Pascal to C

    * Array subscripts

    * Automatically "unnest" PROCEDUREs & FUNCTIONs

    * String operations

    * Translate PL/I to C

    * PL/I to C

    * PROCEDURE arguments

    * Parameters/arguments as "by value"

    * Translate PL/ix to C++

    * Impose file "includes" 

    * Translate PL/M to C

    * PL/M to C

    * $INCLUDE implies typedef'd data type

    * CALL Statement

    * BASED() attribute, using cast pointers

    * $IF/$ELSEIF/$ELSE Statements




    Using XTRAN to Generate Computer Languages

    * Generate HTML image table

    * Error check HTML links & generate site map 

    * Create script to renumber files 

    * Cross Link and Index HTML Documents




    Using XTRAN to Analyze and Manipulate Data

    * Manipulate dependency trees

    * XTRAN data bases

    * Perform Markov analysis

    * Sum integer field in DSV data 

    * Enable sorting of DSV data 

    * Normalize vocabulary in DSV data 

    * Tally DSV values by field name 

    * Normalize tags and vocabulary in XML 

    * Create script to renumber files 

    * Recursive vs. iterative factorial computation 

    * Interactive query of data mining results 

    * Vertically align DSV data items 




    Using XTRAN to Analyze and Manipulate Text

    * Count words in text 

    * Analyze word phrases in text 

    * Format text items into columns 

    * Interactive query of text mining results 

    * Text input with continuations 

    * Command-driven text processing utility (ProcText

    * Vertically align DSV data items 

    * Compute Fog Index for prose text 




    Combining Multiple XTRAN Capabilities

    The following example combines XTRAN's code analysis, re-engineering, generation, data analysis, and text manipulation capabilities.

    * Cross Link and Index HTML Documents




    Using XTRAN to monitor and remediate code quality

    * Analyze cyclomatic complexity of C, C++, Java, or C#

    * Analyze knots (GOTO crossings) in PL/I

    * Analyze Straight-line Code Length by Nesting Depth 

    * Restructure C, C++, or C# to eliminate gotos

    * Restructure COBOL to eliminate GO TOs 

    * Restructure PL/I to eliminate GOTOs

    * Impose C/C++ preprocessor macro on existing code

    * Combine C, C++, Java, or C# expression statements

    * Combine COBOL arithmetic statements 

    * Colorize code by nesting depth, display as HTML 

    * Eliminate dead code in C, C++, Java, or C#

    * Eliminate dead code in PL/I

    * Vertically align DSV data items 




    Using XTRAN to reverse engineer architecture from code

    * Create module/function cross-reference (language-independent rules):

    * C, C++, Java, or C#

    * PL/I

    * Pascal

    * Fortran

    * PL/M

    * Analyze computer language features used 

    * Mine code for Business Rule conditions

    * Analyze symbol usage in COBOL

    * Analyze structure/union member offsets and sizes in C, C++, Java, or C#

    * Analyze HP (Digital, Compaq) MACRO-11 assembler

    * Analyze HP (Digital, Compaq) VAX MACRO assembler

    * Highlight file I/O & display I/O code in PL/I, display as HTML

    * Link parent statements with ending child statements, using HTML tags 

    * Analyze tag and attribute usage in HTML

    * Analyze embedded substitution usage in HTML

    * Analyze tag and attribute usage in XML

    * Analyze entity reference usage in XML

    * Markov analysis of statement type transitions in C++

    * Filter Natural code on statement type, display as HTML

    * Tally RPG statement types




    Using XTRAN to modernize code

    * Add I/O documentation to C, C++, Java, or C#

    * Mine code for Business Rule conditions

    * Impose C/C++ preprocessor macro on existing code

    * Protect C or C++ included files from multiple inclusion

    * Impose file "includes" on existing PL/ix code

    * Replace COBOL arithmetic statements with COMPUTEs 

    * Cross Link and Index HTML Documents

    * Normalize tags and vocabulary in XML 




    Using XTRAN to migrate code

    * Translate PL/I to C

    * Translate PL/I PROCEDURE arguments to C

    * Analyze PL/I constant/expression PROCEDURE arguments

    * Translate PL/I PROCEDURE parameters/arguments to C as "by value"

    * Translate Pascal to C

    * Translate Pascal array subscripts to C

    * Automatically "unnest" Pascal PROCEDUREs & FUNCTIONs when translating to C

    * Translate Pascal string operations to C

    * Translate Fortran COMMONs and EQUIVALENCEs to C

    * Translate PL/M to C

    * Translate PL/M CALL Statement to C

    * $INCLUDE implies typedef'd data type when translating PL/M to C

    * Translate PL/M BASED() attribute to C using cast pointers

    * Translate PL/M $IF/$ELSEIF/$ELSE Statements to C

    * Translate HP (Digital, Compaq) MACRO-11 assembler to C

    * Translate HP (Digital, Compaq) VAX MACRO assembler to C

    * Translate labeled structures in HP (Digital, Compaq) VAX MACRO to C

    * Analyze HP (Digital, Compaq) VAX MACRO problem operands

    * Translate problem operands in HP (Digital, Compaq) VAX MACRO to C

    * Translate user function entry macro in HP (Digital, Compaq) VAX MACRO to C

    * Translate IBM Series/1 EDL to C

    * Translate Encore (SEL, Gould) assembler to C

    * Translate in-line function arguments in Encore (SEL, Gould) assembler to C

    * Translate HP (Digital, Compaq) Runoff to HTML

    * Translate HP (Digital, Compaq) Runoff to Rich Text Format (RTF)




    Using XTRAN for forensic analysis

    * Forensic Analysis of Function Signatures 

    * Analyze Straight-line Code Length by Nesting Depth 

    * Analyze word phrases in text 

    * Interactive query of forensic analysis results 




    Using XTRAN for code visualization

    * Colorize C, C++, Java, or C# code by nesting depth, display as HTML

    * Highlight file I/O & display I/O code in PL/I, display as HTML

    * Highlight C, C++, Java, or C# expressions, display as HTML 

    * Filter Natural code on statement type, display as HTML




    Using XTRAN to create code utilities

    * Analyze computer language features used 

    * Mine code for Business Rule conditions

    * Analyze structure/union member offsets and sizes in C, C++, Java, or C#

    * Analyze XML tag & attribute usage

    * Analyze XML entity reference usage

    * Match & replace expressions in C, C++, Java, or C#

    * Impose file "includes" on existing PL/ix code

    * Protect C or C++ included files from multiple inclusion

    * Link parent statements with ending child statements, using HTML tags 

    * Normalize tags and vocabulary in XML 

    * Interactive query of code mining results 

    * Vertically align DSV data items 




    Using XTRAN to create Web utilities

    * Mine Web pages for keywords

    * Cross Link and Index HTML Documents

    * Error check HTML links & generate site map 

    * Analyze embedded substitution usage in HTML

    * Analyze tag and attribute usage in HTML

    * Generate HTML image table

    * Insert anchors into HTML 

    * Interactive query of HTML mining results 




    Using XTRAN to create data utilities

    * Manipulate dependency trees

    * Perform Markov analysis

    * Sum integer field in DSV data 

    * Enable sorting of DSV data 

    * Normalize vocabulary in DSV data 

    * Tally DSV values by field name 

    * Normalize tags and vocabulary in XML 

    * Interactive query of data mining results 

    * Vertically align DSV data items 




    Using XTRAN to create text utilities

    * Count words in text 

    * Analyze word phrases in text 

    * Format text items into columns 

    * Interactive query of text mining results 

    * Text input with continuations 

    * Command-driven text processing utility (ProcText

    * Vertically align DSV data items 

    * Compute Fog Index for prose text 




    Using XTRAN to create general utilities

    * Create script to renumber files 

    * Recursive vs. iterative factorial computation 

    * Interactive query of DSV data 




    Using XTRAN for Year 2000 (Y2K) impact analysis

    * Analyze Year 2000 (Y2K) Impact on C, C++, Java, or C#

    * Analyze Year 2000 (Y2k) Impact on HP (Digital, Compaq) MACRO-11 assembler

    * Analyze Year 2000 (Y2K) Impact on PL/M