Bidirectional transformation
Encyclopedia
In computer programming, bidirectional transformations (bx) are programs whose code express a transformation both from input to output and back to the corresponding input (possibly with modifications) in a single piece of code.

Bidirectional model transformations are an important special case in which a model is input to such a program.

Some bidirectional languages are bijective
Bijection
A bijection is a function giving an exact pairing of the elements of two sets. A bijection from the set X to the set Y has an inverse function from Y to X. If X and Y are finite sets, then the existence of a bijection means they have the same number of elements...

. The bijectivity of a language is a restriction of its bidirectionality, and a lot of these languages are actually really bidirectional because there are generally many inputs for the same output and vice versa.

Usage

Bidirectional transformations can be used to:
  • Maintain several sources of information consistent
  • Provide an 'abstract view' to easily manipulate data and write them back to their source

Examples of implementations

  • Boomerang
    Boomerang (programming language)
    Boomerang is a programming language for writing lenses—well-behaved bidirectional transformations —that operate on ad-hoc, textual data formats.Boomerang grew out of the Harmony generic data synchronizer. It was used in open product Unison.-References:...

     is a programming language which allows to write lenses to process text data formats bidirectionally
  • Augeas
    Augeas (software)
    Augeas is an open source configuration management library. It is written in C and released under the LGPL.Augeas uses programs called lenses to map the filesystem to an XML tree which can then be parsed using an XPath syntax, using a bidirectional transformation...

     is a configuration management library whose lens language is inspired by the Boomerang project
  • biXid is a programming language to process XML data bidirectionally
  • XSugar allows to translate from XML to non-XML formats

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK