The programming language of the future is being developed in Denmark
Two young researchers from the University of Copenhagen and Aarhus University are working together to add so-called effect systems to programming languages, which make it easier to maintain programs and detect vulnerabilities.
On December 9, 2021, businesses and organizations around the world got a serious surprise when a critical vulnerability in the open source logging module Log4J, which is used by millions of applications, was discovered. The security vulnerability could be exploited by hackers to gain access to the underlying systems and networks.
Fortunately, the gap was quickly closed, but system owners and developers worldwide were left with the dilemma of being dependent on logging modules and open source code developed by external companies and developers on the one hand, and having to provide solutions that are both secure and trustworthy.
At Aarhus University and University of Copenhagen, two young researchers, Magnus Madsen and Troels Henriksen, have a potential solution to this dilemma. They will add an extra dimension called effect systems to the programming languages used today. This will make it easier to maintain programs and discover vulnerabilities by keeping track of how code snippets and libraries, which you have not developed yourself, behave.
Denmark is in the lead when it comes to programming languages of the future
We have a long tradition of developing new programming languages, and Danish researchers have developed several of the most used languages. In the 1980s, Bjarne Stroustrup designed the C++ programming language, and Anders Hejlsberg is a core developer on Typescript.
When it comes to the development of the next generation of programming languages that support effects systems, we are once again at the forefront in Denmark with two innovative programming languages. Magnus Madsen and his colleagues from Aarhus University are developers of the programming language Flix, which is a relatively new language. They have developed Flix to combine the best aspects of functional programming and logic programming. The programming language is designed to develop modern applications with a focus on avoiding errors by using a powerful type and effect system.
At the University of Copenhagen, Troels Henriksen and his colleagues have been working on another new programming language called Furthark. The language was originally developed to support complex calculations in the financial sector, where there was a need for computing power that can be provided by graphics card processors. Thus, the language excels in supporting advanced applications that need to be optimized to run in parallel. Furthermore, in Furthark effect systems constitute a key building block.
Focus on speed and user-friendliness
Although both programming languages have overlapping functionalities, they are not direct competitors as they are targeted at different areas of work. Therefore, it was only natural that the two researchers started a collaboration supported by the Digital Research Centre Denmark (DIREC), where they were given the opportunity to improve effect systems.
According to Troels Henriksen and Magnus Madsen, there are two major challenges in the practical use of effect systems:
– One challenge is that it may take a long time for a computer to check that the programs that are written comply with the established rules – and this lowers the programmer’s productivity. We therefore focus on optimizing the speed of the translators (compilers) that check the code.
– The second challenge is user-friendliness. If using effects systems requires too much of the programmer and the error messages are too complicated to understand, people will not use them, no matter how many advantages they have. We are therefore also working on making effect systems more user-friendly.
The collaboration across universities has provided a lot of inspiration and created new relationships. Magnus Madsen explains that he has visited the University of Copenhagen several times to talk to their programming language researchers. Each of them has their own opinion and idea on how to solve specific problems, and it has been extremely valuable to gain new perspectives and build new working relationships, he says.
From niche languages to mainstream
To the question of whether large companies in the future will use Flix and Futhark to develop software for example to the financial sector, both Troels Henriksen and Magnus Madsen respond with a smile.
– It is a long and difficult journey to go from niche languages to mainstream. First, we need to get the hobbyist programmers to adopt the languages, and then the languages need to be spread to their networks and workplaces. The big companies are often conservative in their choice of new programming languages, and they are likely to be the last to adopt new languages.
Now the two researchers are focusing on making it as easy as possible to use Flix and Furthark by developing good documentation, guides and web pages, and we will see what the future brings.
Explore FUTHARK
Read more about the research project Ergonomic and Practical Effect Systems at DIREC's webpage.
What are effect systems?
Effect systems are a way of describing how a function or part of a program interacts with the outside world. That is, what actually happens when you execute the code. In programming languages with effect systems, it is usually mandatory to specify what effects a function can have when it is created. By specifying it, you can also better limit and control how different parts of the program can interact with each other and with the outside world.
In this way, with effect systems, you can better keep track of the behaviour of code snippets and libraries, which you have not developed yourself. At the same time, effect systems can make programs easier to maintain and, in some cases, make them run much faster by identifying code elements that can be run in parallel.
Contact
Troels Henriksen
Tenure Track Assistant Professor
Department of Computer Science, University of Copenhagen
athas@di.ku.dk