Mind the Gaps: Logical English, Prolog, and Multi-agent Systems for Autonomous Vehicles
Paper · 2025 · Galileo Sartor, Adam Wyner and Giuseppe Contissa
Summary
The paper tackles how traffic law can be made machine-usable when autonomous vehicles (AVs) and human drivers share urban roads. The authors argue that one high-level, human-readable rule model should govern both kinds of driver. Their reasoning is that AVs at SAE levels 4–5 shift liability toward manufacturers, and this shift should not leave humans worse off. Using a subset of the UK Highway Code about junctions, they build a modular "in silico" system with three parts:
- the rules are written in Logical English, a controlled natural language;
- the rules are translated to and from Prolog;
- Prolog connects through predicates to a NetLogo multi-agent simulation.
In the simulation, monitor agents watch the vehicles and log possible breaches. Validator components then decide whether each breach deserves a penalty or is excused by an exception. A red-light example shows the distinction: an ordinary car is penalised, while an ambulance is not. The work matters because it gives explainable, interrogable compliance checking and treats humans and machines under a single code of conduct.
Key points
- The domain is the UK Highway Code junction rules, with rules 170–183 discussed as characterising the driver's duty of care. Machine learning and perception are out of scope, and sensor input is assumed correct.
- The architecture has three components:
- Logical English for the rules;
- Prolog as the internal representation plus support code;
- NetLogo for agent-based simulation and visualisation.
- Because the system is modular, any module can be swapped out.
- Violations are classified in stages. A Potential Violation is logged by a monitor and then becomes either a Punishable Violation, which implies a reparation, or a Mitigated Violation, where the action was in fact permitted.
- The legal grounding contrasts negligence, which rests on duty of care and human fault, with product liability, which rests on defective design. The authors argue the two converge on an expectation of performance at least as good as a careful human's.
- The paper appeared in ICLP 2024 (EPTCS 416). It was supported by the ERC project "CompuLaw" and builds on Kowalski's Logical English project.
Interesting ideas
- I1. The system separates the observer from the judge: monitors only log raw potential breaches, and a later validator decides whether each is punishable or excused, which keeps detection simple and puts the nuance in one place.
- I2. An excused violation is identified by checking whether the rules actually permit the action for this agent (ambulance at a red light), instead of hard-coding exception flags, which makes defeasibility fall out of the ordinary rule base.
- I3. The validator reasons over a hypothetical scenario that may differ from the vehicle's own scenario (e.g., the goal was entering the junction but the breach was speeding), which separates "what the agent intended" from "what is being judged".
- I4. Rules are written in a controlled English that translates both into and out of Prolog, so the same artefact is readable by humans and executable by machines.
For Mova
How these ideas could serve Mova, our small open language model — its files, stages and tests:
- I1 (world): event extraction could record neutral "rule-relevant facts" in the text's world, with a separate interpretive pass deciding blame or norm-breaking, so each layer stays explainable on its own.
- I2 (answer): QA on fables ("was the fox wrong to…?") could compare the character's action against the permitted actions derived from compiled norms, giving answers that cite the enabling or blocking rule.
- I3 (world): keeping counterfactual or alternate copies of the text world, linked to a character's goal, would help with questions about intentions versus actual outcomes.
- I4 (back): rendering meaning-graph rules and inference chains back into Logical English-style sentences would give users faithful, checkable explanations of each answer.
Institutions
Fields, topics and concepts
📚 Shelves 4The field of science this work belongs to (OpenAlex fields).Computer Science · 16,667 worksArtificial Intelligence · 16,194 worksSocial Sciences · 1,772 worksPolitical Science and International Relations · 182 works
🧭 Topics 1Research subjects and languages the work is about.English · 2,263 works
Cite
Cite as Galileo Sartor, Adam Wyner and Giuseppe Contissa. 2025. Mind the Gaps: Logical English, Prolog, and Multi-agent Systems for Autonomous Vehicles. arXiv:2502.09216 · EPTCS 416, 2025, pp. 111-124.
@misc{sartor2025mind,
title = {{Mind the Gaps: Logical English, Prolog, and Multi-agent Systems for Autonomous Vehicles}},
author = {Galileo Sartor, Adam Wyner and Giuseppe Contissa},
year = {2025},
doi = {10.4204/eptcs.416.9},
eprint = {2502.09216},
archivePrefix = {arXiv},
url = {https://doi.org/10.4204/eptcs.416.9}
}References
- Trevor Bench-Capon, Michał Araszkiewicz, Kevin Ashley, Katie Atkinson, Floris Bex, Filipe Borges, Daniele Bourcier, Paul Bourgine, Jack G. Conrad, Enrico Francesconi, Thomas F. Gordon, Guido Governatori, Jochen L. Leidner, David D. Lewis, Ronald P. Loui, L. Thorne McCarty, Henry Prakken, Frank Schilder, Erich Schweighofer, Paul Thompson, Alex Tyrrell, Bart Verheij, Douglas N. Walton & Adam Z. Wyner (2012): A history of AI and Law in 50 papers: 25 years of the international conference on AI and Law. Artificial Intelligence and Law 20(3), pp. 215–319, doi:10.1007/s10506-012-9131-x. ↗
- Trevor Bench-Capon & Pepijn R. S. Visser (1997): Open Texture and Ontologies in Legal Information Systems. In Roland R. Wagner, editor: Eighth International Workshop on Database and Expert Systems Applications, DEXA, IEEE Computer Society, pp. 192–197, doi:10.1109/DEXA.1997.617268. ↗
- Hanif Bhuiyan, Guido Governatori, Andy Bond & Andry Rakotonirainy (2024): Traffic rules compliance checking of automated vehicle maneuvers. Artif. Intell. Law 32(1), pp. 1–56, doi:10.1007/S10506-022-09340-9. ↗
- Brian H. Bix (2012): Defeasibility and Open Texture. In Jordi Ferrer Beltrán & Giovanni Battista Ratti, editors: The Logic of Legal Requirements: Essays on Defeasibility, Oxford University Press, doi:10.1093/acprof:oso/9780199661640.003.0011. ↗
- Gert Brüggemeier (2006): Common principles of tort law: a pre-statement of law. British Institute of International and Comparative Law. find
- Joe Collenette, Louise A. Dennis & Michael Fisher (2022): Advising Autonomous Cars about the Rules of the Road. In Matt Luckcuck & Marie Farrell, editors: Proceedings Fourth International Workshop on Formal Methods for Autonomous Systems (FMAS), 371, pp. 62–76, doi:10.4204/EPTCS.371.5. ↗
- Giuseppe Contissa, Francesca Lagioia & Giovanni Sartor (2018): Liability and automation: legal issues in autonomous cars. Network Industries Quarterly 20(2), pp. 21–26. find
- Guido Governatori, Trevor Bench-Capon, Bart Verheij, Michal Araszkiewicz, Enrico Fran-cesconi & Matthias Grabmair (2022): Thirty Years of Artificial Intelligence and Law: The First Decade. Artificial Intelligence and Law 30(4), pp. 481–519, doi:10.1007/s10506-022-09329-4. ↗
- Ahmad Hammoud, Azzam Mourad, Hadi Otrok & Zbigniew Dziong (2022): Data-Driven Federated Autonomous Driving. In Irfan Awan, Muhammad Younas & Aneta Poniszewska-Marańda, editors: Mobile Web and Intelligent Information Systems, Lecture Notes in Computer Science, Springer International Publishing, Cham, pp. 79–90, doi:10.1007/978-3-031-14391-5. ↗
- Patrick Irvine, Antonio A. Bruto Da Costa, Xizhe Zhang, Siddartha Khastgir & Paul Jennings (2023): Structured Natural Language for Expressing Rules of the Road for Automated Driving Systems. In: 2023 IEEE Intelligent Vehicles Symposium (IV), pp. 1–8, doi:10.1109/IV55152.2023.10186664. Available at https://ieeexplore.ieee.org/document/10186664. ↗
- Suraj Kothawade, Vinaya Khandelwal, Kinjal Basu, Huaduo Wang & Gopal Gupta (2021): AUTO-DISCERN: Autonomous Driving Using Common Sense Reasoning. In Joaquin Arias, Fabio Aurelio D’Asaro, Abeer Dyoub, Gopal Gupta, Markus Hecher, Emily LeBlanc, Rafael Peñaloza, Elmer Salazar, Ari Saptawijaya, Felix Weitkämper & Jessica Zangari, editors: International Conference on Logic Programming 2021 Workshops, CEUR Workshop Proceedings 2970, CEUR. Available at https://ceur-ws.org/Vol-2970/ #gdepaper7. ↗
- Robert Kowalski, Jacinto Dávila & Miguel Calejo (2021): Logical English for legal applications. Conference: XAIF, Virtual Workshop on XAI in Finance. find
- Francesco Paolo Patti et al. (2019): Autonomous vehicles’ liability: need for change? In: Digital revolution-new challenges for law: data protection, artificial intelligence, smart products, blockchain technology and virtual currencies, CH Beck, pp. 190–213. find
- Henry Prakken (2017): On the problem of making autonomous vehicles conform to traffic law. Artif. Intell. Law 25(3), pp. 341–363, doi:10.1007/s10506-017-9210-0. ↗
- Albert Rizaldi, Jonas Keinholz, Monika Huber, Jochen Feldle, Fabian Immler, Matthias Althoff, Eric Hilgendorf & Tobias Nipkow (2017): Formalising and Monitoring Traffic Rules for Autonomous Vehicles in Isabelle/HOL. In Nadia Polikarpova & Steve Schneider, editors: Integrated Formal Methods, Cham, pp. 50–66, doi:10.1007/978-3-319-66845-1. ↗
- SAE On-Road Automated Vehicle Standards Committee (2021): Taxonomy and definitions for terms related to driving automation systems for on-road motor vehicles. SAE international. ↗
- Hanna Schebesta (2017): Risk Regulation Through Liability Allocation: Transnational Product Liability and the Role of Certification. Air and Space Law 42(2), pp. 107–136, doi:10.54648/AILA2017011. ↗
- Jiawei Wang, Yang Zheng, Qing Xu & Keqiang Li (2022): Data-Driven Predictive Control for Connected and Autonomous Vehicles in Mixed Traffic. In: 2022 American Control Conference (ACC), pp. 4739–4745, doi:10.23919/ACC53348.2022.9867378. ↗
Updated
This page in Markdown → https://md.research.elamur.ai/free/en/papers/sartor-2025-mind-gaps-logical-english-prolog/