“A programme has to work"

code

Coding: Coccinelle simplifies the work of anyone who needs to change their programming or algorithms in C languages. Photo: Joshua Aragon/Unsplash


Programmes should be useful for users: That's why computer scientist Dr Julia Lawall has been working on programming languages and systems code at the Institut national de recherche en science et technologies du numeriques (Inria) since 2011. She holds a doctorate from Indiana University, has taught at the University of Copenhagen and is also involved as a programme chair for numerous conferences. For 2023, she is currently planning the USENIX ATC in Boston, a conference on state-of-the-art operating systems. Lawall just spent a week at the Leibniz-Rechenzentrum (LRZ) to initiate joint projects together with LRZ researcher Michele Martone. In al lecture she also presented current research results concerning Coccinelle, a programming language that makes it easier to change and optimise code written in C. In the interview, she talks about her work and her interests.

What did you have planned for your stay at the LRZ? Dr. Julia Lawall: Together with Michele Martone we are trying to extend Coccinelle to handle C++ code. Coccinelle is a tool for rewriting C code that has been extensively used in maintaining the Linux kernel.  We have previously used it on an HPC code base, but we would like to extend it to C++, so that it can be more usable in the HPC community. During my week at the LRZ, we are working together on technical questions and workflows, preparing a proposal, and planning common research projects that will involve Coccinelle.

In your lecture at LRZ you talked about Coccinelle, what’s interesting about this tool? Lawall: Coccinelle provides a language that lets you describe the changes you want to make in your code. During programming, one often makes some poor design decisions and would like to change them later.  But changing a single design decision may require many repetitive changes across the code base.  The goal of Coccinelle is to help solve this problem, by automating such systematic changes, at a large scale.  For example, if you decide you want to organise your data structures in a different way, then you have to go to all of the places in the code that use these data structures and update them. We try to automate that in Coccinelle, allowing users to specify the changes in a very user-friendly way. Users should be able to write patterns and decide what they want to remove or add.

Normally you work at Inria in Paris, what are your tasks there? Lawall: I’m the leader of a research group exploring systems code. The group is quite small, we’re basically two permanent researchers and some students. We are interested in all aspects of systems code, for example improving maintainability or performance, mostly in the Linux Kernel, and we are exploring some forms of formal verification.

Programming languages is your main interest, which ones are particulary exciting for your work? Lawall: My work at the moment targets the C language, because we target the Linux kernel, which is written in C. When I do development code myself, I used the language OCaml. It’s a functional language, well suited for writing compilers and, more generally, for writing tools that process other programmes. One language, which is very interesting for people who are interested in the reliability of code is Rust. I hope that I will soon be able to look into Rust more intensively.

Where does your interest in programming languages come from? Lawall: In general I am interested in languages and modes of operation of hardware and software. A programme has to work, for that you develop code in a programming language, the compiler has to figure out how it’s going to be running later on and – for the actual execution – it has to generate some kind of lower-level code. Then the code runs on the operating system and the whole system is going to interact with the hardware. It’s this kind of chain, that I am interested in – or formulated as questions: How do we programme, how we can programme better? Or how we get code that is more efficient.

Do you work on projects in this area? Lawall: My current project is related to source-code verification for systems software: There’s code and you want to check whether it is correct. This raises many questions: What does “correct” mean? What do-you really want to prove? The code? The functions? The workflow? What are the properties we want to prove? And how can we prove these properties in the most automated way possible? These are the questions we explore. There are various tools for doing proofs automatically today, but humans have to help the machines in different degrees. Consequently, we are also thinking about the use of programming languages and the development of code in a way that will make the code easier to verify.

Automated checks – sounds like artificial intelligence: Can these methods change programming languages? Lawall: In the context of software engineering research, there's been a lot of work on using various AI inspired techniques to understand code. Maybe you want explore changes that people have made over time, then you can use AI to analyse the comments about these changes, to try to understand, for example, if the change is fixing a bug or if it’s an evolution or a new feature. So the goal is to understand the change at a higher level in an automated way. But in programming languages itself, I think people have not used AI very much yet. Maybe, in the future, it could be interesting to somehow use AI in that context.

Do-you think that we will see more programming languages in future because of artificial intelligence? Lawall: There are new kinds of programming languages emerging that are called probabilistic programming languages. These are useful for artificial intelligence because it is all about probabilities. In ordinary, deterministic programming, one may calculate the exact value of three plus four plus five. In probabilistic programming, you have some figures and you want to estimate a property of their sum. Bigger than a million with a certain probability, something like that. There is thus now a new area of work, which is about designing of programming languages that are good for expressing the kinds of computations people want to do in AI. That's one direction, and then in terms of actually writing code, there's a tool by GitHub (Microsoft), named Copilot. It searches the Internet for code examples of code and, based on that, it uses AI-based methods to generate code relevant to your specific problem.

How did you get into computer science and why do you like to working on programming languages? Lawall: By studying how the programming language works, I get to understand better how programmes and software work. Computer science, in general, involves automating things. If you want to automate something, you have to better understand how it works. (Interview: vs)


julia


Dr. Julia Lawall, Inria