EXHIBIT : Expressive High-Level Languages for Bidirectional Transformations

Lead Research Organisation: University of Bristol
Department Name: Computer Science


In computer systems, copies of data are very often stored in different formats. Bidirectional transformations are programs that synchronise the data pairwise: when one is changed, the appropriate transformation is run to incorporate the changes in the other format. For bidirectional transformations to be considered correct, they are generally expected to satisfy "round-tripping": if A is transformed to B, and then back, it shall give back the same A. This pattern of bidirectional transformations is much more widely applicable than just to data synchronization. They form a fundamental part of modern software engineering, where designs in the form of high-level models are (very often mechanically) transformed into lower-level implementations, and one often needs to reverse engineer a revised high-level model from an updated implementation.

Traditionally, bidirectional transformations are programmed as separate transformations in opposite directions, and then combined together to be made bidirectional. But this is very tricky to get right, because the programmer has to manually guarantee round-tripping, and even trickier to maintain, because changing one requires matching changes in the other. In fact, since the transformations in the opposite directions often follow a similar structure, programming them separately constitutes code duplication, which increases maintenance cost and human error. As a result, there has been increasing interest in special bidirectional languages that allow both transformations to be derived from a single definition, to guarantee round-tripping by construction, and to remove this duplication and the problems it causes. The downside of this is that existing bidirectional languages are typically very difficult to use. While this may be partly due to an inherent increase in complexity as one tries to do more with less code, the designs of the languages also leave a lot to be desired: they tend to focus on guaranteeing round-tripping, which is a challenging task in itself, but overlook the usability aspect, making programming in them a lot harder than it should be.

In the EXHIBIT project, we will design a new generation of bidirectional languages that are easy to use. The central idea is that the new languages will be closely integrated with mainstream general-purpose languages, naturally reusing existing language constructs, libraries, and programming patterns to maximise the usability of the new framework. The work will be based on the project team's recent theoretical breakthroughs that enable the interconversion between bidirectional objects and mainstream programming units, making a close connection between the two types of languages possible. We will implement the proposed languages and evaluate its effectiveness through a case study. We expect that the superior programming utility offered by the language will make bidirectional programming and its benefits more accessible to mainstream programmers, which will ultimately result in higher productivity and quality in software development.

Planned Impact

The knowledge-based nature of the UK's software industry demands innovation via research to remain globally competitive. The specific nature of our main aim will benefit all developers/researchers who are concerned with software that transforms data. This is a large community, and the software that they produce directly and indirectly affects all of society. Bidirectional programming can increase productivity, as it removes duplications, improve quality, as it guarantees correctness, and reduce cost, as it resolves a maintenance issue. But at the moment only a small fraction of software development actually benefits from bidirectional programming, due to the lack of suitable languages. The research proposed here will lower the entry threshold of accessing this new technology, which will both enlarge the community who can use bidirectional programming, and lead to higher productivity of those who use it.

Strategically, the UK currently has a lead in programming language research, with its software industry being a major consumer of the languages created. There is a healthy ecosystem of companies ranging from start-ups to multi-nationals that benefit from and contribute to the development of programming languages. The EXHIBIT project would bring together three world-leading centres of research (Bristol, Oxford, and Edinburgh) as project partners with complementary expertise, which without a doubt would help the UK maintain and develop this lead.

We aim to deliver long-lived impact through human capital. The EXHIBIT will help a new programming language research group to be formally established at Bristol. In addition to the research associates and PhD students who will be directly involved in the research programme, the group is poised to take charge of all programming- and language- related teaching at Bristol. We aim to 'produce' engineers who are not only competent programmers, but have had exposure to the underlying language design that they can carry into and use in future careers.


10 25 50

publication icon
Matsuda K (2020) Sparcl: a language for partially-invertible computation in Proceedings of the ACM on Programming Languages

publication icon
Perera R (2022) Linked visualisations via Galois dependencies in Proceedings of the ACM on Programming Languages

publication icon
Xie N (2022) Staging with class: a specification for typed template Haskell in Proceedings of the ACM on Programming Languages

publication icon
Yamaguchi M (2021) Synbit: synthesizing bidirectional programs using unidirectional sketches in Proceedings of the ACM on Programming Languages

Description Verified Program Synthesis for Refactoring Rust Programs
Amount £100,000 (GBP)
Organisation National Cyber Security Centre 
Sector Public
Country United Kingdom
Start 03/2021 
End 03/2022
Description Linked visualisations via Galois dependencies 
Organisation Alan Turing Institute
Country United Kingdom 
Sector Academic/University 
PI Contribution My research team has used our expertise in bidirectional transformation in the area of data visualisation, making visualisation more explainable to users.
Collaborator Contribution The partner contributed their expertise on data visualisation.
Impact DOI: 10.1145/3498668
Start Year 2021