datalog programming

Writing and structuring Datalog rules and facts (including extensions for probabilistic predicates and correlated transitions) to formally represent policies and agent behaviors and to enable sound composition of per-function facts for verification and vulnerability analysis.

datalogprogramming

12-Month Skill Trend

Momentum and market value over time
Trending
Score
+20 in 12 mo
96
12 mo agoNow
Career
Value
+$12K in 12 mo
$42K/year
12 mo agoNow

Recommended Survey Paper

Quick overview of the field
View more

Must-Read Papers

Most classic and influential ideas
View more

Datalog with First-Class Facts

Nov 01, 2024
TG
Thomas Gilray
🏛️ Washington State University | Syracuse University | University of Illinois at Chicago

Datalog natively supports only flat atomic facts, making it inefficient for modeling and reasoning over recursive hierarchical structures (e.g., ASTs, derivation trees). Existing extensions—such as Datalog± and Soufflé—are either hampered by high-order quantification (compromising implementation simplicity and decidability) or constrained by algebraic data types lacking native indexing and rule-triggering mechanisms. This paper introduces *first-order facts*: a novel paradigm elevating structured facts to first-class entities, uniquely identified by Skolem terms. This preserves Datalog’s decidability while enabling native structural modeling, efficient indexing, and rule evaluation. Technically, the approach integrates Skolemization-based representation, MPI-optimized parallel communication, and custom indexing strategies. Experiments on diverse benchmarks demonstrate order-of-magnitude throughput improvements over state-of-the-art systems—including Nemo, Vlog, RDFox, and Soufflé—and scalable performance up to thousands of threads.

Datalog struggles with tree-structured data handlingDL$^{exists!}$ aims to improve efficiency in parallel reasoningExisting extensions complicate reasoning over recursive data types

This work addresses the challenge of verifying probabilistic safety policies in AI agents, which existing runtime monitoring approaches struggle to handle due to their reliance on deterministic strategies and inability to account for uncertainty and correlations. The paper proposes a novel verification framework based on distributionally robust optimization (DRO), introducing this technique for the first time into Datalog-style probabilistic policy verification. By eschewing assumptions of predicate independence, the method provides rigorous upper bounds on policy violation probabilities. Integrating DRO with probabilistic logical reasoning and Datalog’s formalism, the approach achieves a superior trade-off between safety and utility while maintaining strict guarantees on violation probability bounds. Empirical evaluations on benchmarks involving terminal and tool-calling agents demonstrate significant improvements over state-of-the-art methods.

AI agentsDatalogdistributional robustness

This work addresses the challenge of concisely expressing Datalog-style logical rules and queries within Lean, a highly expressive yet complex proof assistant based on the Calculus of Inductive Constructions (CIC). To this end, the authors propose a shallowly embedded domain-specific language (DSL) that enables, for the first time, a seamless integration of Datalog into Lean. The DSL supports declarative definitions of facts and rules, backward-chaining queries, and—crucially—the automatic translation of Datalog queries into theorems accompanied by proof scripts, thereby establishing bidirectional interoperability with Lean’s native reasoning framework. The effectiveness of the approach is demonstrated through three representative case studies, which collectively illustrate its expressiveness in rule formulation, readability of queries, and capability to support formal verification.

bidirectional interoperabilityDatalogdomain-specific language

Boolean Matrix Logic Programming

Aug 19, 2024
LA
L. Ai
🏛️ Imperial College London

Traditional logic programming relies on CPU-based symbolic computation, limiting scalability for large-scale Datalog inference. Method: This paper introduces Boolean Matrix Logic Programming (BMLP), the first approach to model bottom-up Datalog evaluation as Boolean matrix operations, supporting arbitrary binary recursive rules—including both linear and nonlinear variants. Its core innovation is a composable Boolean matrix inference framework: it defines modular logical operators and establishes a rigorous, semantics-preserving mapping from Datalog programs to sparse Boolean matrix transformations. Optimization of Boolean matrix multiplication and sparse storage further enhances efficiency. Results: On datasets with millions of facts, BMLP achieves 30× speedup over general-purpose systems (e.g., LogicBlox) and 9× over specialized systems (e.g., RDFox), significantly improving both scalability and execution efficiency of logic programming.

Accelerating datalog query evaluation using GPU matrix operationsEnabling efficient bottom-up inference for linear recursive programsScaling logic programming performance on large knowledge graphs

Latest Papers

What's happening recently
View more

This work addresses the challenge of governing AI agents whose runtime behaviors exhibit nondeterminism and path dependence, rendering traditional design-phase governance mechanisms insufficient. It proposes a novel runtime governance framework centered on execution paths, formalizing compliance policies as deterministic functions of agent identity, partial execution history, next action, and organizational state—thereby enabling dynamic oversight of path-dependent behaviors for the first time. The framework subsumes system prompts and static access control as special cases and establishes runtime evaluation as a general governance paradigm. Integrating large language model–driven behavior analysis and policy assessment, it offers AI Act–inspired policy examples and reference implementations while highlighting critical open issues such as risk calibration and the boundaries of enforceable compliance.

AI agentscompliance policiesnon-deterministic execution

Existing specification mining approaches are largely confined to Boolean abstractions of events, making them ill-suited for capturing the rich data-centric behaviors exhibited by modern systems. This work proposes a novel method that extends specification mining to rich data domains by jointly learning data transformations and temporal specifications. The approach integrates syntax-guided synthesis (SyGuS) with TSL$_f$—an extension of LTL$_f$ that supports functional updates—enabling the synthesis of expressive, data-aware temporal rules. Evaluated in OpenAI Gymnasium’s ToyText environments, the method successfully synthesizes reactive programs with dramatically improved sample efficiency—outperforming passive learning baselines by several orders of magnitude—and demonstrates substantially enhanced generalization capabilities.

Boolean abstractionsdata-aware propertiesexecution traces

Existing probabilistic programs lack efficient and scalable deductive verification tools. This work proposes a novel verification framework based on HeyVL, a quantitative intermediate verification language, which enables expressing probabilistic programs, specifications, and proof rules in a programming-language–like syntax. The framework innovatively integrates two complementary backends—SMT solving (via Z3) and probabilistic model checking—to support flexible, composable verification strategies. Built upon the HeyLo real-valued logic and enhanced with improved diagnostic mechanisms, the system incorporates a rich set of proof rules developed over five years of implementation. Empirical evaluation on multiple benchmark suites demonstrates its strong scalability and practical utility.

deductive verificationformal verificationprobabilistic model checking

Existing policy languages struggle to detect conflicts arising from threshold overlaps among rules based on probabilistic machine learning signals—such as embedding similarity—which can lead to erroneous routing or access control decisions. This work proposes a three-tier decidability framework that replaces independent thresholds with temperature-scaled Softmax, partitioning the embedding space into mutually exclusive Voronoi regions to fundamentally prevent concurrent rule triggering without requiring model retraining. We present the first systematic characterization of the decidability hierarchy for policy conflicts under probabilistic ML predicates and implement an efficient conflict detection and prevention mechanism within the Semantic Router domain-specific language. The approach has been successfully applied to LLM inference routing and is extensible to semantic role-based access control (RBAC) and API gateway policies.

conflict detectionembedding conflictspolicy languages

Current AI systems rely heavily on manual auditing and documentation, which hinders scalable governance for automated services. This work proposes Ontological Knowledge Blocks (OKBs), a novel framework that formalizes regulatory obligations as quintuples comprising ontologies, SHACL rules, evidence requirements, and provenance links. By leveraging RDF/OWL modeling, PROV-O for provenance tracking, and an intermediate representation–driven deterministic compiler, the approach enables dynamic switching of governance configurations without modifying service code. Evaluation in an AI-assisted HPC scheduling scenario demonstrates that compliance checks are configuration-sensitive, violations accumulate strictly additively, SHACL validation incurs only 12.6–100.3 milliseconds of latency, and the Combined configuration provides the most comprehensive coverage.

AI governanceautomated verificationcompliance

Hot Scholars

GL

Guoliang Li

Professor, Tsinghua University
DatabaseBig DataCrowdsourcingData Cleaning & Integration
XZ

Xuanhe Zhou

Assistant Professor, Shanghai Jiao Tong University
Data ManagementArtificial Intelligence
SK

Sidharth Kumar

Associate Professor, University of Illinois at Chicago
HPCParallel I/OVisualization
TG

Thomas Gilray

Washington State University
Static AnalysisLanguage DesignAutomated ReasoningCompilers
PK

Paraschos Koutris

Computer Sciences, University of Wisconsin-Madison
data management