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. 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.
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
A bidirectional program which obeys certain round-trip laws is called a lens.
Examples of implementations
- Boomerang is a programming language which allows to write 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 to process XML data bidirectionally
- XSugar allows to translate from XML to non-XML formats
|This computer programming–related article is a stub. You can help Wikipedia by expanding it.|