Skip to content

Translating law into code – why computer scientists and lawyers must join forces

01 April 2019| doi: 10.5281/zenodo.3086157

GDPR has shown that law and computer science have more in common than one might initially assume. It is therefore even more important to find a common language for the two disciplines. Former associate researcher Sibylle Schupp’s comment stresses the importance of the collaboration between law and computer science. The article was first published in HIIG’s encore 2018.

As academic disciplines, computer science and law are really far apart: one is a mathematical or perhaps engineering discipline, while the other is a social science. From this perspective, there is not much common ground. But in practical terms legal provisions exist that tie the two disciplines, simply by including in the legal text references to IT technologies. A good example is the GDPR, which refers to “the state of the (technological) art” and even directly calls for “appropriate technical” matters. In fields like privacy protection, thus, lawmakers seem to see computer science as an aid. But at the same time it’s obvious that both disciplines need to find a common language – laws have to be translated into formulas, so that technology can deploy them.

For privacy regulations, cryptography and the whole toolbox of privacy-enhancing technologies provide software solutions for individual subtasks – but what about an entire app or a legacy system? On this note, I propose a different kind of support: code checking. By code we mean software code and by checking we mean automated compliance checks. In computer science, automated code checks are very common and have a wide range of applications. Algorithms are used to check whether software can really be trusted to do what it sets out to do, but they can also provide proof that a particular piece of software is sticking to its energy or time budget. Algorithms can also check how well software has been tested or how much it has changed.

So, surely it should be possible to apply these compliance checks to privacy properties and to check (software) code for properties required by (legal) code? Well, it depends. Legal provisions obviously come in English, German or other natural languages and that wording needs to be made more precise before it can be further processed.

Taking again the example of the GDPR, which talks about risks of varying degrees, time of processing and minimal data. All of this leaves open what is measured by risk, how time is defined and on what scale data sets ought to be minimal. From a computer-science point of view, all these terms need to be formally specified – and that requires legal expertise. But this is not the only thing that is needed.

A lawyer certainly agrees that legal interpretations are needed in all these cases, but the crux here is that the algorithmic checker needs to have them in a certain format – as a formula of some kind. For example, they are needed in the form of temporal, deontic or probabilistic logics, which look at truth over time or at truth with respect to ethical or statistical laws. Providing such formulas requires knowledge from computer science. So here we go: legal terms must be cast in a language an automated checker can understand, but the computer scientist lacks the legal knowledge of what to cast, and the legal expert lacks the knowledge what to cast in. What if the two joined forces? What if each key concept of a privacy regulation – time, risk, data minimisation, but also purpose, consent, impact– were scrutinised from both angles, the legal angle as well as the technological angle from computer science? Then, the lawyer would help the computer scientist to build a better compliance checker, and the computer scientist would help to disambiguate a privacy regulation. It is hard to see any disadvantage here

Sibylle Schupp, professor of computer science at Hamburg University of Technology, was a visiting researcher at Alexander von Humboldt Institute for Internet and Society in 2018. In line with her focus on methods for software quality assurance, she deals with legal issues and the missing interdisciplinary exchange.

This post represents the view of the author and does not necessarily represent the view of the institute itself. For more information about the topics of these articles and associated research projects, please contact

Sibylle Schupp, Prof. Dr.

Former Associate researcher: Data, actors, infrastructures

Sign up for HIIG's Monthly Digest

and receive our latest blog articles.

Man sieht in Leuchtschrift das Wort "Ethical"

Digital Ethics

Whether civil society, politics or science – everyone seems to agree that the New Twenties will be characterised by digitalisation. But what about the tension of digital ethics? How do we create a digital transformation involving society as a whole, including people who either do not have the financial means or the necessary know-how to benefit from digitalisation?  And what do these comprehensive changes in our actions mean for democracy? In this dossier we want to address these questions and offer food for thought on how we can use digitalisation for the common good.

Discover all 11 articles

Further articles

Sustainable AI – How environmentally friendly is AI really?

Sustainable AI is becoming increasingly important. But how sustainable are AI models really?

Image shows a visualized human brain with blue light effects

AI as a flying blue brain? How metaphors influence our visions about AI

Why is Artificial Intelligence so commonly depicted as a machine with a human brain? This article shows why one misleading metaphor became so prevalent.

Person in wheelchair taking photos outside

Exploiting potentials: Teaching AI Systems to See Accessibility Barriers

Barriers in our physical environment are still widespread. While AI systems could eventually support detecting them, it first needs open training data. Here we provide a dataset for detecting steps...