Datalog is a lightweight logic programming language, based on the logic of Horn clauses. Lean, on the other hand, is a proof assistant system and language based on the Calculus of Inductive Constructions (CIC). Datalog is more constrained and less expressive than Lean but has a long history of established deduction algorithms. Writing definitions and queries in the Datalog fragment of Lean would be more succinct and understandable than writing them in Lean itself. This paper outlines the design and implementation of a shallow embedding of Datalog as a Domain Specific Language (DSL) on top of Lean. Bidirectional interoperability between the Datalog DSL and Lean is a primary goal of this design. In addition to rules and facts, backward chaining queries are automatically translated into theorems with tactic-based proofs. The paper also includes three simple examples of how the DSL can be used.


翻译:Datalog是一种基于Horn子句逻辑的轻量级逻辑编程语言。而Lean则是一种基于归纳构造演算(CIC)的证明助手系统与语言。Datalog虽比Lean更具约束性且表达能力较弱,但拥有悠久的成熟演绎算法历史。在Lean的Datalog片段中编写定义和查询比直接用Lean编写更为简洁易懂。本文概述了在Lean之上将Datalog作为领域特定语言(DSL)进行浅嵌入的设计与实现。Datalog领域特定语言与Lean之间的双向互操作性是本设计的核心目标。除规则和事实外,逆向链接查询会被自动转化为带有策略化证明的定理。文中还包含三个简单示例展示该领域特定语言的使用方法。

0
下载
关闭预览

相关内容

数据科学导论,722页pdf,讲述带R的数据分析与预测算法
专知会员服务
59+阅读 · 2021年9月11日
台湾大学林轩田机器学习书籍《从数据中学习》,216页pdf
【干货】大数据入门指南:Hadoop、Hive、Spark、 Storm等
专知会员服务
98+阅读 · 2019年12月4日
DataFun,就这?!
DataFunTalk
38+阅读 · 2020年9月27日
R语言数据挖掘利器:Rattle包
R语言中文社区
21+阅读 · 2018年11月17日
最全数据科学学习资源:Python、线性代数、机器学习...
人工智能头条
12+阅读 · 2018年5月14日
R语言之数据分析高级方法「时间序列」
R语言中文社区
17+阅读 · 2018年4月24日
讲透RCNN, Fast-RCNN, Faster-RCNN,将CNN用于目标检测
数据挖掘入门与实战
18+阅读 · 2018年4月20日
Deep Learning(深度学习)各种资料网址
数据挖掘入门与实战
11+阅读 · 2017年10月31日
国家自然科学基金
23+阅读 · 2016年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
8+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2014年12月31日
国家自然科学基金
8+阅读 · 2014年12月31日
Arxiv
0+阅读 · 5月15日
VIP会员
最新内容
综述 | 3D场景图:开放挑战与未来方向
专知会员服务
4+阅读 · 6月22日
21世纪的无人机战争
专知会员服务
4+阅读 · 6月22日
《量子技术的军事任务技术适配与利用》
专知会员服务
5+阅读 · 6月22日
美国从乌克兰无人机战争中学习经验
专知会员服务
7+阅读 · 6月21日
ICML 2026 | 面向视觉语言模型的语义鲁棒性认证
专知会员服务
5+阅读 · 6月21日
相关VIP内容
相关资讯
DataFun,就这?!
DataFunTalk
38+阅读 · 2020年9月27日
R语言数据挖掘利器:Rattle包
R语言中文社区
21+阅读 · 2018年11月17日
最全数据科学学习资源:Python、线性代数、机器学习...
人工智能头条
12+阅读 · 2018年5月14日
R语言之数据分析高级方法「时间序列」
R语言中文社区
17+阅读 · 2018年4月24日
讲透RCNN, Fast-RCNN, Faster-RCNN,将CNN用于目标检测
数据挖掘入门与实战
18+阅读 · 2018年4月20日
Deep Learning(深度学习)各种资料网址
数据挖掘入门与实战
11+阅读 · 2017年10月31日
相关基金
国家自然科学基金
23+阅读 · 2016年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
8+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2014年12月31日
国家自然科学基金
8+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员