Logica is an open-source logic programming language that compiles to SQL and runs on DuckDB, SQLite, PostgreSQL, and BigQuery. Unlike classic Datalog, it freely combines recursion and aggregation, concisely expressing algorithms from shortest paths to PageRank. This expressiveness raises semantic challenges: aggregates update by replacement rather than accumulation, evaluation depends on rule scheduling, and programs may converge to meaningful results without reaching a fixpoint, placing them outside traditional fixpoint semantics. We address this with Defendant-Opponent (DO) semantics, a stabilization-based framework for nonmonotonic logic programs. Evaluation is modeled as a rewrite system over derivation states, and a ground atom is true if, from every reachable state, some continuation makes the atom persist in all further derivations. This admits two equivalent characterizations: game-theoretically, truth is what a Defendant can defend against any Opponent in a three-turn game; and modally, truth corresponds to []<>[]t in the derivation graph viewed as a Kripke structure, placing nonmonotonic reasoning within S4. DO semantics coincides with least fixpoint semantics for positive Datalog and is compatible with both Well-Founded and Stable Model Semantics. For programs that converge without a fixpoint, ω-limit interpretations give rigorous meaning to iterative computations such as PageRank.


翻译:Logica是一种开源逻辑编程语言,可编译为SQL并在DuckDB、SQLite、PostgreSQL及BigQuery上运行。与经典Datalog不同,Logica自由结合了递归与聚合,能够简洁地表达从最短路径到PageRank的各类算法。这种表达能力引发了语义层面的挑战:聚合通过替换而非累积进行更新,求值结果依赖于规则调度,程序在没有达到不动点的情况下仍可能收敛至有意义的结果,从而超出传统不动点语义的适用范围。为此,我们提出被告-对手(DO)语义——一种针对非单调逻辑程序的稳定化框架。求值过程被建模为基于推导状态的重写系统,当从所有可达状态出发均存在某个延续方案使得原子命题在所有后续推导中持续成立时,该接地原子被视为真。该定义具有两种等价刻画:在博弈论层面,真即被告在三人博弈中能够针对任意对手捍卫的结论;在模态逻辑层面,真对应于将推导图视为克里普克结构时的[]<>[]t公式,从而将非单调推理纳入S4模态系统。DO语义对正Datalog程序与最小不动点语义完全一致,并与良基语义及稳定模型语义兼容。对于收敛于非不动点的程序,ω-极限解释为PageRank等迭代计算提供了严谨的语义基础。

0
下载
关闭预览

相关内容

基于MySQL Binlog的Elasticsearch数据同步实践
DBAplus社群
15+阅读 · 2019年9月3日
NLP-Progress记录NLP最新数据集、论文和代码: 助你紧跟NLP前沿
中国人工智能学会
12+阅读 · 2018年11月15日
自然语言处理(NLP)知识结构总结
AI100
51+阅读 · 2018年8月17日
最全数据科学学习资源:Python、线性代数、机器学习...
人工智能头条
12+阅读 · 2018年5月14日
R语言之数据分析高级方法「时间序列」
R语言中文社区
17+阅读 · 2018年4月24日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
VIP会员
最新内容
ICML 2026 | 自回归Boltzmann生成器重塑分子采样
专知会员服务
1+阅读 · 6月26日
GNN跨域综述:从消息传递到图基础模型
专知会员服务
0+阅读 · 6月26日
无人机自主控制与人工智能:系统性综述
专知会员服务
11+阅读 · 6月26日
巡飞弹与反无人机系统——现代战场的两大支柱
《打造“黄金舰队”》57页报告
专知会员服务
3+阅读 · 6月26日
《北约数字教官网络发展路径》128页报告
专知会员服务
2+阅读 · 6月26日
ECCV 2026 | MIMFlow:MIM与归一化流统一图像生成
专知会员服务
7+阅读 · 6月25日
网状网络及其在军事领域的运用
专知会员服务
8+阅读 · 6月25日
无美国参与的欧洲战争方式(万字长文)
专知会员服务
8+阅读 · 6月25日
《国防领域敏感性分析白皮书》
专知会员服务
9+阅读 · 6月25日
相关VIP内容
相关基金
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
Top
微信扫码咨询专知VIP会员