← Latest papers
🤖 AI

Animation, Verification and Visualisation of Prolog Transition Systems with ProB

This paper presents recent extensions to ProB's Prolog animation mode, including enhanced simulation, trace replay, user input, and visualization features, which are applied to case studies like Connect Four to support strategy evaluation, Event-B proof verification, and educational demonstrations.

Original authors: Jan Gruteser, Michael Leuschel, Katharina Engels, Fabian Vu

Published 2026-07-24
📖 7 min read🧠 Deep dive

Original authors: Jan Gruteser, Michael Leuschel, Katharina Engels, Fabian Vu

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are a detective trying to solve a mystery, but instead of a crime scene, your "crime" is a piece of computer code that might be hiding a bug. In the world of computer science, this is called formal verification. It's like building a perfect, mathematical map of how a program should behave, and then checking every single step to make sure the program doesn't get lost or crash. Usually, this involves complex math that only experts can read. But what if you could turn that dry math into a living, breathing video game? That's the magic of Prolog, a programming language that thinks in logic puzzles rather than standard instructions. When you combine Prolog with a tool called PROB, you get a "model checker"—a super-smart robot that can watch your logic puzzle play out, spot mistakes, and even let you step through the story one move at a time to see exactly where things go wrong.

This paper is about giving that robot a major upgrade. The authors, a team from Heinrich Heine University Düsseldorf, have taken an existing tool called PROB (which already speaks Prolog) and added a whole new set of superpowers. Think of it as turning a black-and-white sketchbook into a high-definition, interactive movie studio. They've made it easier to visualize what's happening, added a way to simulate thousands of games in seconds to test strategies, and even created a system where you can pause the action, give the computer a specific instruction, and watch it react. They tested these new features by turning the classic game Connect Four into a logic puzzle, pitting different computer "brains" against each other to see who wins. The result is a toolkit that makes checking complex computer logic feel more like playing a game and less like doing homework.

The Magic of the "Living" Logic Map

At its heart, the paper describes how to take a set of rules written in Prolog (a language that looks like a list of "if this, then that" statements) and turn them into a transition system. Imagine a board game where every square is a "state" (like "Pedestrian Light is Red") and every move is a "transition" (like "Switch to Green"). In the old days, PROB could load these rules and let you click a button to move from one square to the next, showing you the path. But it was a bit clunky.

The authors have polished this experience significantly. First, they've made the visuals much better. Before, you might just see a list of text saying "State: Red." Now, they've integrated tools that can draw actual pictures. If you are modeling a traffic light, the tool can now show you a real, glowing red circle on your screen. If you are modeling a chess game, it can display the chessboard with the pieces in their exact spots. Even cooler, they added interactive visualizations: you can right-click on a piece in the picture, and the tool will show you all the legal moves you can make, just like a real video game. They also created a feature to export these visual stories as HTML files, so you can share your "movie" of the logic puzzle with anyone, even if they don't have the special software installed.

The "Pause and Ask" Feature

One of the most exciting new tricks is something they call symbolic transitions. Imagine you are playing a game against a computer, but the computer gets stuck because it doesn't know what move you want to make next. In the past, the computer might just guess or stop. Now, the tool can pause and say, "Hey, I need a human to decide this part!" It waits for you to type in a specific value (like "Move the knight to F3") and then continues the story. This is huge for testing complex logic, like proving a mathematical theorem, where a human might need to make a choice that a computer can't predict on its own.

They also improved trace replay. Think of this as a "Save Game" feature. If you find a perfect sequence of moves that solves a problem, you can save it. Later, you can load that save file, and the tool will replay the exact same moves step-by-step. This is crucial for making sure that if you fix a bug today, you haven't accidentally broken it tomorrow. The new version saves these replays in a smart format (JSON) that remembers exactly which state you were in, so the replay is perfect every time.

The "Million-Game" Simulator

Perhaps the most powerful addition is the ability to run Monte Carlo simulations. This is a fancy way of saying "let's play the game a million times to see what happens." The authors connected PROB to a simulator called SIMB. Instead of just watching one game, you can tell the computer to play Connect Four 10,000 times in a row, letting different strategies fight against each other.

They used this to test three different "brains" for Connect Four:

  1. Random: A player who just picks a move without thinking.
  2. Minimax: A classic AI that looks a few moves ahead to find the best path.
  3. MCTS (Monte Carlo Tree Search): A smarter AI that simulates many possible futures to make its decision.

The results were fascinating. When the Random player fought against Minimax, the Random player won about 55.7% of the time if they went first, but that number dropped to 7.3% when Minimax went first. However, when Minimax fought against MCTS, the MCTS player crushed it, winning about 99% of the games. The authors noted that their Minimax player was a bit weak because it only looked two moves ahead (a shallow search), which explains why it lost so badly to the more advanced MCTS.

They also measured how long these games took. The Random and Minimax players were fast, finishing 10,000 games in less than 20 minutes. But the MCTS player was a bit slower, taking several hours to run the same number of games because it was doing so much heavy thinking. Interestingly, they found that the MCTS player needed only an average of 9.7 moves to beat the Random player, while Minimax needed 18.0 moves.

Why This Matters

This isn't just about playing games. The authors show that these tools are perfect for teaching. Imagine a student learning to write code; instead of just staring at a screen of text, they can watch their code come to life as a visual animation. If they make a mistake, they can see the "traffic light" turn red or the "chess piece" disappear, making it much easier to understand what went wrong.

The paper also highlights that this system is great for building interpreters. An interpreter is like a translator that lets one programming language talk to another. By using PROB's new features, students and researchers can easily build translators for other languages (like Java or WebAssembly) and immediately test them by watching them run in the visualizer.

In the end, the authors aren't claiming to have solved all of computer science. They are suggesting that by making these logical tools more visual, interactive, and capable of running massive simulations, we can catch bugs earlier, teach students better, and understand complex systems more deeply. They even hint at a future where these tools could be used to train AI agents using reinforcement learning, letting the computer learn to play games (or solve logic puzzles) by trial and error, just like a human would. But for now, the main victory is turning the dry, abstract world of logic proofs into a playground where you can see, touch, and play with the rules.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →