EXHIBIT : Expressive High-Level Languages for Bidirectional Transformations
Lead Research Organisation:
University of Bristol
Department Name: Computer Science
Abstract
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.
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.
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.
People |
ORCID iD |
Meng Wang (Principal Investigator) | |
Nicolas Wu (Co-Investigator) |
Publications
Goldstein H
(2023)
Reflecting on Random Generation
in Proceedings of the ACM on Programming Languages
Matsuda K
(2023)
Embedding by Unembedding
in Proceedings of the ACM on Programming Languages
Matsuda K
(2020)
Sparcl: a language for partially-invertible computation
in Proceedings of the ACM on Programming Languages
MATSUDA K
(2024)
Sparcl : A language for partially invertible computation
in Journal of Functional Programming
Nguyen M
(2022)
Modular probabilistic models via algebraic effects
in Proceedings of the ACM on Programming Languages
Nguyen M
(2023)
Effect Handlers for Programmable Inference
Perera R
(2022)
Linked visualisations via Galois dependencies
in Proceedings of the ACM on Programming Languages
Description | We have discovered that bidirectional transformation may be used for data visualization. We have discovered that the language implementation techniques can be applied to other domains such as incremental computation. |
Exploitation Route | Language designers now have a new method in their toolbox. |
Sectors | Other |
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 |
Description | Tohoku University -- Embedding by Unebmedding |
Organisation | Tohoku University |
Country | Japan |
Sector | Academic/University |
PI Contribution | My team contributed the expertise in bidirectional transformation that was developed as part of this project. |
Collaborator Contribution | The partner contributed the expertise in unembedding technique. |
Impact | It has led to the following publications 10.1007/s10703-023-00436-9 10.1145/3607830 10.1017/S0956796823000126 |
Start Year | 2022 |
Description | University of Pennsylvania |
Organisation | University of Pennsylvania |
Country | United States |
Sector | Academic/University |
PI Contribution | My team contributed expertise in bidirectional transformation. |
Collaborator Contribution | The partner contributed expertise in property-based testing. |
Impact | publication 10.1145/3607842 |
Start Year | 2022 |
Title | Reproduction Package for Article: Modular Probabilistic Models via Algebraic Effects |
Description | This is the artifact for the probabilistic programming language ProbFX as described in the paper "Modular Probabilistic Models via Algebraic Effects". It contains: 1. A preprint of the paper "Modular Probabilistic Models via Algebraic Effects". 2. A virtual image prepared with an executable script for running and visualising the example programs shown in the paper (and more). 3. The documented source code for the language implementation and example programs. |
Type Of Technology | Software |
Year Produced | 2022 |
Open Source License? | Yes |
URL | https://zenodo.org/record/6573267 |