Bidirectional Transformation
   HOME

TheInfoList



OR:

In computer programming, bidirectional transformations (bx) are programs in which a single piece of code can be run in several ways, such that the same data are sometimes considered as input, and sometimes as output. For example, a bx run in the forward direction might transform input I into output O, while the same bx run backward would take as input versions of I and O and produce a new version of I as its output. Bidirectional model transformations are an important special case in which a model is input to such a program. Some bidirectional languages are ''bijective''. The bijectivity of a language is a severe restriction of its power, because a bijective language is merely relating two different ways to present the very same information. More general is a lens language, in which there is a distinguished forward direction ("get") that takes a concrete input to an abstract output, discarding some information in the process: the concrete state includes all the information that is in the abstract state, and usually some more. The backward direction ("put") takes a concrete state and an abstract state and computes a new concrete state. Lenses are required to obey certain conditions to ensure sensible behaviour. The most general case is that of symmetric bidirectional transformations. Here the two states that are related typically share some information, but each also includes some information that is not included in the other.


Usage

Bidirectional transformations can be used to: * Maintain the consistency of several sources of informationhttp://www.cs.cornell.edu/~jnfoster/papers/grace-report.pdf * Provide an 'abstract view' to easily manipulate data and write them back to their source


Vocabulary

A bidirectional program that obeys certain round-trip laws is called a ''lens''.


Examples of implementations

* Boomerang is a programming language that allows writing lenses to process text data formats bidirectionally * Augeas is a configuration management library whose lens language is inspired by the Boomerang project * ''biXid'' is a programming language for processing XML data bidirectionally * ''XSugar'' allows translation from XML to non-XML formats


See also

*
Bidirectionalization In computer science, bidirectionalization refers to the process of given a source-to-view transformation (automatically) finding a mapping from the original source and an updated view to an updated source. See also * Bidirectional transformation ...
*
Reverse computation Reverse computation is a software application of the concept of reversible computing. Because it offers a possible solution to the heat problem faced by chip manufacturers, reversible computing has been extensively studied in the area of computer a ...
* Transformation language


References


External links

*
Bidirectional Transformations: The Bx Wiki
* Pacheco, Hugo, and Alcino Cunha.
Multifocal: A strategic bidirectional transformation language for XML schemas
" International Conference on Theory and Practice of Model Transformations. Springer, Berlin, Heidelberg, 2012. Mathematical relations {{compu-prog-stub