← Latest papers
🤖 AI

Modeling Deontic Modal Logic in ASP

This paper proposes an elegant method for implementing deontic modal logic in Answer Set Programming (ASP) by utilizing default and strong negation alongside global constraints to represent obligations, prohibitions, and permissions, thereby resolving longstanding paradoxes and enabling the modeling of conditional deontic statements.

Original authors: Gopal Gupta, Abhiramon Rajasekharan, Alexis R. Tudor, Elmer Salazar, Joaquín Arias

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

Original authors: Gopal Gupta, Abhiramon Rajasekharan, Alexis R. Tudor, Elmer Salazar, Joaquín Arias

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 the referee of a giant, invisible game of "What If?" happening inside a computer's brain. In the world of logic, there are two main ways to talk about rules. The first is like a strict math equation: "If A is true, then B must be true." This is classical logic, and it's great for facts. But the second way is much more human: "You ought to do B," or "It's forbidden to do A," or "You are allowed to do B." This is called deontic logic (from the Greek word for "duty"). It's the logic of rules, laws, and moral obligations. The tricky part is that real life is messy. Sometimes you are obligated to do something, but you can't. Sometimes you are forbidden to do something, but you do it anyway. For decades, computer scientists and philosophers have struggled to teach computers how to handle these "oughts" and "forbiddens" without getting confused or crashing into logical contradictions known as "paradoxes."

This paper, titled "Modeling Deontic Modal Logic in ASP," tackles that exact problem. The authors, a team of researchers from the US and Spain, propose a clever new way to teach computers how to understand rules and obligations. They use a programming language called Answer Set Programming (ASP), which is already famous for its ability to handle "what if" scenarios and incomplete information. The paper argues that by treating rules not as rigid commands that force facts to happen, but as global constraints (like a referee's whistle that blows if a rule is broken), computers can finally solve old, decades-old puzzles that have stumped logicians. They show that this method elegantly fixes famous logical traps, like the "Contrary-to-Duty" paradox, where a rule seems to contradict itself when a person fails to follow a previous rule.

The Magic of "Ought" and "Must"

To understand what the authors did, we first need to meet the two main characters in their story: Obligation and Permission. In everyday life, we know the difference between "It is necessary that the sun rises" (a fact of nature) and "You ought to return your library book" (a rule you might break). In the world of logic, the first is called alethic (about truth and necessity), and the second is deontic (about duty and norms).

The authors noticed that computers already have two special tools to handle these different types of thinking, but they were being used in the wrong way.

  1. Strong Negation: This is like a hard "No." If a computer says "It is not raining" (strong negation), it means it has proof that it is definitely not raining. It's a fact.
  2. Default Negation (Negation-as-Failure): This is like a "Maybe not." If a computer says "It is not raining" (default negation), it just means it hasn't found any evidence that it is raining. It's a guess based on missing information.

The paper's big idea is to map these two computer tools directly to the two types of logic. They suggest that when we talk about "It is necessary that P" (a fact), we use Strong Negation. But when we talk about "It is not necessary that P" (meaning P might be false, or we just don't know), we use Default Negation. This simple switch allows the computer to distinguish between a hard fact and a rule that can be broken.

The "Referee" Approach

The most creative part of the paper is how they handle obligations. In many old systems, an obligation like "You must return the car" was treated as a command that forces the computer to make the car returned. But what if the car is stolen? The computer would crash because it can't force the car to be returned.

The authors propose a different approach: treat obligations as Global Constraints (or "Denials"). Imagine a referee in a soccer game. The referee doesn't force the players to score; the referee just blows the whistle if a foul happens. In the authors' system, an obligation isn't a command to make something true; it's a rule that says, "If you are in a world where this rule is broken, that world is invalid."

For example, if the rule is "You must wear a seatbelt," the computer doesn't force you to wear it. Instead, it sets up a constraint: "Any world where you are driving without a seatbelt is thrown out." If you are driving and don't have a seatbelt, the computer simply says, "That scenario is impossible under these rules," and looks for a different scenario where you do have a seatbelt. But, crucially, if you have a valid reason not to wear it (like a medical emergency), the computer can "preempt" the rule. It drops the constraint for that specific situation, allowing the scenario to exist without crashing.

Solving the "Chisholm" Puzzle

The paper shines brightest when it solves the Contrary-to-Duty Paradox (also known as Chisholm's Paradox). This is a famous logical headache that goes like this:

  1. You ought to go to the party.
  2. If you go, you ought to tell your mom.
  3. If you don't go, you ought not to tell your mom.
  4. You don't go.

In old logic systems, this creates a mess. The computer tries to figure out if you should tell your mom or not, and it ends up with a contradiction: you both should and shouldn't tell her. It's like a robot getting a headache.

The authors show that their "Referee" method solves this instantly. They set up the rules as constraints:

  • Constraint 1: If you don't go, you can't tell your mom.
  • Constraint 2: If you go, you must tell your mom.

When the computer sees that you didn't go (Fact 4), it checks the constraints. It sees that Constraint 2 (the "If you go" rule) doesn't apply because the condition wasn't met. It then looks at Constraint 1. Since you didn't go, the rule says "Don't tell." The computer easily finds a valid world where you didn't go and didn't tell your mom. No contradiction, no headache. The "paradox" disappears because the rules are treated as flexible constraints that only apply when their conditions are met, rather than rigid commands that fight each other.

Why This Matters

The authors don't just solve one puzzle; they show that this method works for a whole family of logical problems, including "Forrester's paradox" and "Sartre's dilemma." They demonstrate that by using Answer Set Programming with its built-in ability to handle "what if" scenarios and "exceptions," we can model complex ethical and legal systems much more naturally than before.

They also show how this handles "secondary obligations." Imagine you borrow a friend's car. You have a main rule: "Return the car." But there are secondary rules: "Return it before noon" and "Return it with a full battery." If you crash the car (a violation of the main rule), the secondary rules might change or disappear. The authors show how their system can "preempt" these rules automatically. If the car is wrecked, the constraint "Return before noon" is dropped because the condition (having a car to return) is gone. The computer doesn't get confused; it just updates the list of valid worlds.

The Bottom Line

This paper doesn't claim to have solved every problem in ethics or law. Instead, it offers a clean, elegant toolkit for building systems that understand rules. It proves that by treating "oughts" as constraints on possible worlds rather than commands to change reality, we can build computers that reason about rules the way humans do: flexibly, with exceptions, and without getting stuck in logical loops. The authors suggest that this approach is simpler and more direct than previous methods, which often required complex new math or "sanctions" (punishments) to make the logic work. By using the tools already available in Answer Set Programming, they've shown that the path to understanding human-like rules might be shorter and straighter than we thought.

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 →