A Deontic Constraint Satisfaction Problem (CSP) is a computational framework that models normative reasoning as the search for variable assignments that simultaneously satisfy a set of deontic constraints—specifically obligations, permissions, and prohibitions. It translates legal or ethical rules into formal constraints over a finite domain, where a solution represents a compliant state of affairs free from normative conflict.
Glossary
Deontic Constraint Satisfaction Problem (CSP)

What is Deontic Constraint Satisfaction Problem (CSP)?
A formalization of normative reasoning as a set of variables and deontic constraints, solved by finding assignments that satisfy all applicable obligations and prohibitions without conflict.
Unlike classical CSPs that seek any consistent assignment, a deontic CSP must resolve contrary-to-duty (CTD) obligations and prioritize constraints according to a normative hierarchy (e.g., lex superior). The solver identifies whether a compliant configuration exists and, if multiple solutions are possible, selects the optimal assignment that minimizes violation costs according to encoded preference rules.
Core Components of a Deontic CSP
A Deontic Constraint Satisfaction Problem formalizes normative reasoning as a search for variable assignments that satisfy all applicable obligations, permissions, and prohibitions without conflict. The following components constitute its architectural backbone.
Deontic Variables
The atomic units of the problem representing normative propositions or action states that must be assigned a truth value or compliance status. In a legal domain, a variable might represent complies_with_gdpr_art_17 (right to erasure) or data_retention_period_exceeded. Each variable has a finite domain of possible deontic statuses—typically {obligatory, permitted, prohibited, violated, fulfilled}—rather than simple Boolean values. The selection and granularity of these variables directly determines the expressiveness of the normative model and the computational complexity of the solving process.
Deontic Constraints
Formal relations that restrict permissible combinations of variable assignments, encoding the normative force of legal rules. Constraints fall into three primary categories:
- Obligation constraints: If condition A holds, then action B must be assigned
fulfilled - Prohibition constraints: If condition C holds, then action D must not be assigned
performed - Permission constraints: Explicitly carve out exceptions where a generally prohibited action is allowed Constraints are typically expressed as deontic conditionals using operators from Standard Deontic Logic or Input/Output Logic, and may include defeasibility markers indicating which constraints can be overridden by higher-priority norms.
Normative Hierarchy Resolver
The conflict resolution engine that applies meta-constraints to determine precedence when two applicable norms demand incompatible assignments. It implements the classical legal principles:
- Lex superior: Higher authority norms override lower ones (constitution > statute > regulation)
- Lex specialis: More specific rules override general ones
- Lex posterior: Later-enacted norms override earlier ones In a Deontic CSP, the resolver dynamically weights constraints or partitions the constraint graph into ordered layers, ensuring the solver explores compliant assignments in the correct priority sequence before considering defeasible norms.
Contrary-to-Duty (CTD) Handler
A specialized sub-component that manages secondary obligations triggered when a primary duty is violated. CTD structures address Chisholm's Paradox—the classical failure of Standard Deontic Logic to consistently represent remedial norms. The handler maintains a violation state register that tracks which primary obligations have been breached and activates the corresponding compensatory constraint set. For example, if a contract requires delivery by March 1 (primary obligation) and the deadline is missed, the CTD handler activates the penalty clause constraint (secondary obligation to pay liquidated damages). This ensures the CSP remains logically consistent even when modeling non-ideal compliance scenarios.
Solution Space Validator
The verification module that checks whether a candidate assignment constitutes a valid deontic model—a complete, consistent mapping of all variables that satisfies every non-defeated constraint. The validator performs three critical checks:
- Consistency: No variable is simultaneously assigned
obligatoryandprohibited - Completeness: Every triggered obligation has a corresponding fulfillment or violation status
- Closure: All CTD chains are fully resolved with no dangling remedial obligations If the solution space is empty—meaning no assignment satisfies all constraints—the validator identifies the minimal unsatisfiable core, pinpointing the specific conflicting norms that require human legal review or legislative reconciliation.
Deontic Propagation Engine
The inference mechanism that derives implicit normative consequences from explicitly encoded constraints before the solver begins its search. Using techniques adapted from arc consistency algorithms (such as AC-3) and forward chaining, the engine propagates the effects of known assignments through the constraint graph. For instance, if a statute prohibits data processing without consent, and the variable user_consent_obtained is assigned false, the engine propagates prohibited to all processing action variables. This prunes the search space dramatically, reducing the computational complexity of solving large-scale regulatory compliance problems with thousands of interdependent norms.
Frequently Asked Questions
Clear, technical answers to the most common questions about formalizing normative reasoning as constraint satisfaction problems.
A Deontic Constraint Satisfaction Problem (CSP) is a formal computational framework that models normative reasoning—obligations, permissions, and prohibitions—as a set of variables, domains, and constraints that must be simultaneously satisfied. It works by translating a legal or regulatory scenario into a structured problem where each variable represents a normative proposition (e.g., action_permitted, deadline_met), each domain defines the possible deontic states (e.g., {obligatory, permitted, prohibited}), and each constraint encodes a logical rule such as OBLIGATORY(φ) → PERMITTED(φ). A solver then searches for an assignment of values to all variables that satisfies every constraint without conflict. This approach is particularly powerful for detecting normative conflicts—situations where no consistent assignment exists—and for computing the set of compliant actions in complex regulatory environments where multiple, potentially contradictory rules apply simultaneously.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Core formalisms and resolution strategies that underpin the Deontic Constraint Satisfaction Problem, enabling the algorithmic reconciliation of conflicting obligations in normative systems.
Normative Conflict
The fundamental state that a Deontic CSP is designed to resolve. A normative conflict occurs when two or more applicable rules prescribe incompatible actions for the same agent in the same context. For example, a data retention regulation requiring 7-year storage conflicting with a privacy regulation mandating deletion after 2 years. Resolution strategies include lex superior (higher authority prevails), lex specialis (specific rule overrides general), and lex posterior (later rule overrides earlier). In a CSP framework, these resolution strategies are encoded as meta-constraints that dynamically reorder or disable conflicting variables.
Contrary-to-Duty (CTD) Obligation
A conditional obligation that activates precisely when a primary duty has been violated, representing the normative system's fallback rules. CTD structures are the primary source of complexity in Deontic CSPs because they introduce non-monotonic dependencies—constraints that only become active when other constraints are unsatisfied. For instance: 'You ought not park here; but if you do park here, you ought to pay the meter.' The CSP must model this as a conditional constraint activation where the payment obligation variable is gated on the violation of the parking prohibition variable.
Defeasible Deontic Logic
A non-monotonic logical framework that allows normative conclusions to be retracted in the presence of new information, directly modeling how legal rules admit exceptions. In a Deontic CSP, defeasibility is implemented through constraint priority hierarchies where lower-priority constraints are automatically relaxed when they conflict with higher-priority ones. This avoids the rigid brittleness of classical constraint solvers. Key mechanisms include:
- Defeaters: Rules that block a conclusion without establishing the opposite
- Undercutting: Attacking the applicability condition of a norm
- Rebuttal: Directly contradicting the normative conclusion
Normative Hierarchy
The structured ordering of legal norms by authority that provides the conflict resolution backbone for a Deontic CSP. The hierarchy is typically encoded as a partial order over constraint sets using three classical principles:
- Lex superior: Constitutional norms override statutory norms override regulatory norms
- Lex specialis: Specific provisions override general provisions within the same authority level
- Lex posterior: Later-enacted norms override earlier ones when authority and specificity are equal In CSP implementation, this hierarchy is translated into integer weights assigned to each constraint, with the solver maximizing the sum of satisfied constraint weights.
Ought-Implies-Can Principle
The Kantian axiom that an agent can only be obligated to perform an action if it is actually possible for them to do so. In a Deontic CSP, this functions as a domain-pruning constraint that removes impossible actions from the variable domains before the solver runs. For example, if a regulation requires filing a report within 24 hours but the agent lacks system access during that window, the obligation is invalidated. This principle prevents the CSP from generating unsatisfiable obligation sets that would otherwise require the solver to fail or produce irrational outputs.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us