BiGUL: The Bidirectional Generic Update Language
Putback-based bidirectional programming allows the programmer to write only one putback transformation, from which the unique corresponding forward transformation is derived for free. BiGUL, short for the Bidirectional Generic Update Language, is designed to be a minimalist putback-based bidirectional programming language. Originally developed in the dependently typed programming language Agda, BiGUL’s well-behavedness has been completely formally verified. It has subsequently been ported to Haskell for developing various bidirectional applications.
Generics.BiGUL.Lib.HuStudies (haddock documentation on Hackage) contains some small, illustrative examples of BiGUL programs, and is a good place for getting started quickly.
For more detail, see the following tutorial:
- Zhenjiang Hu and Hsiang-Shang Ko. Principle and Practice of Bidirectional Programming in BiGUL. Draft manuscript for the Oxford Summer School on Bidirectional Transformations. https://bitbucket.org/prl_tokyo/bigul/raw/master/SSBX16/tutorial.pdf.
There is also an earlier paper describing the reification technique used in the Agda formalisation:
- Hsiang-Shang Ko, Tao Zan, and Zhenjiang Hu. BiGUL: A formally verified core language for putback-based bidirectional programming. In Partial Evaluation and Program Manipulation, PEPM’16, pages 61–72. ACM, 2016. https://doi.org/10.1145/2847538.2847544. (The first author’s personal website contains an ACM Author-Izer link for downloading the paper for free.)
This paper uses an outdated version of BiGUL, but the reification technique still underlies the current formalisation.
cabal update cabal install BiGUL
in the command line (i.e., the standard way of installing Haskell packages).
The most recent development version (with changes not yet released to Hackage) is maintained in the
master branch. To install the development version, first clone this git repository, and then invoke
cabal install under the
Haskell/ subdirectory of the local copy of the repository:
git clone https://bitbucket.org/prl_tokyo/BiGUL.git cd BiGUL/Haskell/ cabal update cabal install