Program Transformation

Program-Transformation.Org: The Program Transformation Wiki
(See also ModelTransformation)

A Definition

A program is a structured object with semantics. The structure allows us to transform a program. The semantics gives us the means to compare programs and to reason about the validity of transformations. Semantics includes the extensional and intensional behaviour of a program. A programming language is a collection of programs. This is a rather broad definition that is designed to cover proper programming languages (with an operational interpretation), but also data formats and domain-specific languages.

Programming languages can be clustered into classes with structural and/or semantic similarities. One of the aims of a general framework for program transformation is to define transformations that are reusable accross as wide a range of languages as possible. For example, the notion of variable and variable binding is shared by all programming languages. Transformations dealing with variables such as bound variable renaming, substitution, and unification can be defined in a very generic manner for all languages at once.

Program transformation is the act of changing one program into another. The term program transformation is also used for a formal description of an algorithm that implements program transformation. The language in which the program being transformed and the resulting program are written are called the source and target languages, respectively.

Program transformation is known under many different names

A Taxonomy of Program Transformation

Program transformation is used in many areas of software engineering, including compiler construction, software visualization, documentation generation, and automatic software renovation. In all these applications we can distinguish two main scenarios, i.e., ones where the source and target language are different (translations) from scenarios where they are the same (rephrasings). These main scenarios can be refined into a number of typical sub-scenarios based on their effect on the level of abstraction of a program and to what extent they preserve the semantics of a program. This refinement results in the following TransformationTaxonomy.

Translation

In a translation scenario a program is transformed from a source language into a program in a different target language. Translation scenarios can be distinguished by their effect on the level of abstraction of a program. Although translations aim at preserving the extensional semantics of a program, it is usually not possible to retain all information across a translation. Examples of translation scenarios are synthesis, migration, reverse engineering, and analysis. Their relations are illustrated by the diagram in the following figure:

Relationships

Program Synthesis

ProgramSynthesis is a class of transformations that lower the level of abstraction of a program. In ProgramRefinement an implementation is derived from a high-level specification such that the implementation satisfies the specification. Compilation is a form of synthesis in which a program in a high-level language is transformed to machine code. This translation is usually achieved in several phases in which a high-level language is first translted into an intermediate representation. Instruction selection then translates the intermediate representation into machine instructions. Other examples of synthesis are parser and pretty-printer generation from context-free grammars.

Program Migration

In ProgramMigration a program is transformed to another language at the same level of abstraction. This can be a translation between dialects, for example, transforming a Fortran77 program to an equivalent Fortran90 program or a translation from one language to another, e.g., porting a Pascal program to C.

In some cases you may want to keep programming with the source language (Fortran77 in the example), and migrate your program (to Fortran90) each time you compile. It can be useful when you program in some kind of "old but very powerful source language" that you don't want to throw away, but you don't want to maintain the compiler.

Reverse Engineering

The purpose of ReverseEngineering is to extract from a low-level program a high-level program or specification, or at least some higher-level aspects. Reverse engineering raises the level of abstraction and is the dual of synthesis. Examples of reverse engineering are decompilation in which an object program is translated into a high-level program, architecture extraction in which the design of a program is derived, documentation generation, and software visualization in which some aspect of a program is depicted in an abstract way.

Program Analysis

ProgramAnalysis reduces a program to one aspect such as its control-flow. Analysis can thus be considered a transformation to a sub-language or an aspect language.

Rephrasing

Rephrasings are transformations that transform a program into a different program in the same language, i.e., source and target language are the same. In general, rephrasings try to say the same thing in different words thereby aiming at improving some aspect of the program, which entails that they change the semantics of the program. The main sub-scenarios of rephrasing are normalization, optimization, refactoring, and renovation.

Program Normalization

A normalization reduces a program to a program in a sub-language, with the purpose of decreasing its syntactic complexity. Desugaring is a kind of normalization in which some of the constructs (syntactic sugar) of a language are eliminated by translating them into more fundamental contructs. For example, the Haskell language definition describes for many constructs how they can be desugared to a kernel language. Other examples are module flattening and the definition of EBNF constructs in pure BNF as is done for example in the SDF2 normalizer . Simplification is a more general kind of normalization in which a program is reduced to a normal (standard) form, without necessarily removing simplified constructs. For example, consider canonicalization of intermediate representation and algebraic simplification of expressions. Note that normal form does not necessarily correspond to being a normal form with respect to a set of rewrite rules.

Program Optimization

An optimization is a transformation that improves the run-time and/or space performance of a program. Examples of optimization are fusion, inlining, constant propagation, constant folding, common-subexpression elimination, and dead code elimination.

Program Refactoring

ProgramRefactoring is a transformation that improves the design of a program by restructuring it such that it becomes easier to understand while preserving its functionality. ProgramObfuscation is a transformation that makes a program harder to understand by renaming variables, inserting dead code, etc. Obfuscation is done to hide the business rules embedded in software by making it harder to reverse engineer the program.

Program Reflection?

ProgramReflection? is a transformation that changes a program to compute some aspect of the program itself. For instance, one can transform a program such that, in addition to its usual behaviour, the program also calculates a trace of its own execution. Other uses might include the generation of self-profiling programs.

Software Renovation

In software renovation the extensional behaviour of a program is changed in order to repair an error or to bring it up to date with respect to changed requirements. Examples are repairing a Y2K bug, or converting a program to deal with the Euro.


CategoryTaxonomy | CategoryEntryPoint | CategoryTransformation | CategoryReengineeringPages | -- EelcoVisser - 03 May 2001, 01 Apr 2002 -- TomMens - 9 Apr 2004 -- MalcolmWallace - 07 May 2004

black jack poker psp series world internet black jack poker psp series world online black jack poker psp series world jack black poker psp series world free black jack poker psp series world black jack online poker psp series world play black jack poker psp series world casino poker poker psp series world online casino poker poker psp series world bingo casino gambling online poker poker psp series world casino poker chips poker psp series world internet casino poker poker psp series world poker casino game poker psp series world free poker poker psp series world free online poker poker psp series world free poker game poker psp series world free strip poker poker psp series world free video poker poker psp series world full poker tilt poker psp series world full tilt poker poker psp series world internet poker poker psp series world internet poker game poker psp series world internet casino poker poker psp series world internet poker software poker psp series world internet poker site poker psp series world free internet poker poker psp series world best internet poker poker psp series world play internet poker online poker psp series world internet poker tournament poker psp series world internet poker software developer poker psp series world online casino poker psp series world online casino gambling poker psp series world best online casino poker psp series world free online casino poker psp series world best online casino gambling poker psp series world online casino review poker psp series world online casino game poker psp series world best online casino directory poker psp series world free online casino game poker psp series world 10 best online casino poker psp series world online casino bonus poker psp series world top online casino poker psp series world online casino poker psp series world online casino gambling poker psp series world best online casino poker psp series world free online casino poker psp series world best online casino gambling poker psp series world online casino review poker psp series world online casino game poker psp series world best online casino directory poker psp series world free online casino game poker psp series world 10 best online casino poker psp series world casino casino.com gambling.always online poker psp series world online casino bonus poker psp series world top online casino poker psp series world pacific poker poker psp series world 888 pacific poker poker psp series world pacific poker download poker psp series world pacific poker .com poker psp series world paradise poker poker psp series world paradise poker scam poker psp series world paradise poker bonus code poker psp series world paradise poker net poker psp series world party poker poker psp series world party poker bonus poker psp series world party poker bonus code poker psp series world party poker cheat poker psp series world free party poker poker psp series world poker party supply poker psp series world party poker stats poker psp series world party poker com poker psp series world party poker companion poker psp series world party poker cheat software poker psp series world poker theme party poker psp series world party poker player stats poker psp series world multiplayer sex poker party poker psp series world link online.musicbox1.com party poker poker psp series world poker party model poker psp series world party poker .com poker psp series world play poker poker psp series world play online poker poker psp series world play free poker poker psp series world play free poker online poker psp series world learn how to play poker poker psp series world play video poker poker psp series world play poker for fun poker psp series world play money poker poker psp series world play poker game poker psp series world play poker on line poker psp series world free texas holdem poker play poker psp series world chip poker poker psp series world chip poker set poker psp series world chip clay poker poker psp series world chip custom poker poker psp series world chip poker trick poker psp series world casino chip poker poker psp series world chip personalized poker poker psp series world case chip poker poker psp series world chip fantasy poker poker psp series world chip poker wholesale poker psp series world chip free poker poker psp series world buy chip poker poker psp series world poker game poker psp series world online poker game poker psp series world free poker game poker psp series world free online poker game poker psp series world poker card game poker psp series world video poker game poker psp series world strip poker game poker psp series world free video poker game poker psp series world poker game download poker psp series world poker game rule poker psp series world online video poker game poker psp series world free strip poker game poker psp series world crazy game of poker poker psp series world free online video poker game poker psp series world texas holdem poker game poker psp series world poker hands poker psp series world winning poker hands poker psp series world rank poker hands poker psp series world best poker hands poker psp series world ranking of poker hands poker psp series world texas holdem poker hands poker psp series world poker hands rule poker psp series world poker room poker psp series world online poker rooms poker psp series world online poker room review poker psp series world poker room review poker psp series world free poker rooms poker psp series world poker room software poker psp series world las vegas poker rooms poker psp series world best online poker room poker psp series world poker room .com poker psp series world poker rule poker psp series world holdem poker rule texas poker psp series world game poker rule poker psp series world poker rule tournament poker psp series world em hold poker rule texas poker psp series world play poker rule poker psp series world poker rule stud poker psp series world dealer poker rule poker psp series world omaha poker rule poker psp series world poker software poker psp series world party poker cheat software poker psp series world free poker software poker psp series world online poker software poker psp series world internet poker software poker psp series world poker room software poker psp series world poker software developer poker psp series world internet poker software developer poker psp series world poker software development poker psp series world poker star poker psp series world poker star net poker psp series world poker star .net poker psp series world poker star .com poker psp series world poker star cheat poker psp series world poker star download poker psp series world poker super star poker psp series world poker table poker psp series world poker table supply poker psp series world poker table top poker psp series world how to build a poker table poker psp series world poker table plan poker psp series world poker table for sale poker psp series world folding poker table poker psp series world custom poker table poker psp series world poker table felt poker psp series world cheap poker table poker psp series world texas holdem poker table poker psp series world poker tournament poker psp series world online poker tournament poker psp series world free poker tournament poker psp series world free online poker tournament poker psp series world las vegas poker tournament poker psp series world poker tournament rule poker psp series world atlantic city poker tournament poker psp series world freeroll poker tournament poker psp series world world poker tournament poker psp series world poker superstars invitational tournament poker psp series world strip poker poker psp series world free strip poker poker psp series world video strip poker poker psp series world online strip poker poker psp series world strip poker game poker psp series world free online strip poker poker psp series world free strip poker game poker psp series world community poker strip type poker psp series world live strip poker poker psp series world strip poker story poker psp series world holdem poker texas poker psp series world free holdem poker texas poker psp series world holdem online poker texas poker psp series world holdem poker rule texas poker psp series world game holdem poker texas poker psp series world free game holdem poker texas poker psp series world free holdem online poker texas poker psp series world download free holdem poker texas poker psp series world free holdem play poker texas poker psp series world holdem poker table texas poker psp series world holdem poker strategy texas poker psp series world video poker poker psp series world online video poker poker psp series world free video poker poker psp series world video strip poker poker psp series world poker video poker psp series world video poker game poker psp series world free video poker game poker psp series world free online video poker poker psp series world online video poker game poker psp series world poker series world poker psp series world 2005 poker series world poker psp series world 2005 poker result series world poker psp series world game poker series video world poker psp series world game poker series world poker psp series world 2006 poker series world poker psp series world poker ps2 series world poker psp series world 2005 poker series winner world poker psp series world event main poker series world poker psp series world cheat poker series world poker psp series world poker psp series world