With the growing complexity of software systems, more and more specific programming languages are being used for certain tasks or domains. The development of such languages is not trivial and requires highly specialized skills. In his thesis, Pablo Inostroza Valdera, a PhD student at Centrum Wiskunde & Informatica (CWI), proposes to make this activity less laborious. His main idea is to develop new languages by composing language fragments from software libraries. Inostroza Valdera defends his PhD thesis ‘Structuring Languages as Object-Oriented Libraries’ at the University of Amsterdam on 29 November 2018.
Inostroza Valdera explains: “Imagine we could program in a programming language of which the vocabulary is closer to the field you are working in. In bioengineering you would need keywords for proteins and sequencing, and so on. Developing these domain-specific languages requires effort, but many languages share common aspects that could be reused, instead of being built from scratch”.
In software engineering, reuse of software modules is already common. This is done by encapsulating common functionality in libraries that can be distributed and then imported into new projects. However, unlike traditional software modules, composing languages from fragments poses significant challenges, as languages can grow in two ways: both by increasing their vocabulary and by adding new tools to process programs in the language – but this can often not be done at the same time.
In his thesis, Inostroza Valdera proposes to develop programming languages by composing libraries of these language fragments. He uses Object Algebras ― a technique recently introduced in object-oriented programming — to structure the fragments. Some of the new results answer practical questions that software engineers encounter nowadays. For instance, how to extend a mainstream programming language like Java with new specialized keywords for a specific domain, and how to independently develop languages from scratch. By using object-oriented programming, programmers from industry can easily use these solutions.
The PhD student adds: “My vision is that no matter how complex the languages one wants to develop are, if there is an available ecosystem of language libraries, they can provide off-the-shelf implementations. This drastically reduces the complexity and the cost of the language engineering activity. Ultimately my thesis contributes to programmers being able to focus more on the core of the problems rather than on translating them into lower level programming languages”.
This research has been carried out in the Software Analysis and Transformation (SWAT) research group at CWI. It was partly funded by NWO.
Source: Website CWI, 28 November 2018.