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会员
最新内容
驱动军事决策变革的顶尖人工智能指挥系统
专知会员服务
6+阅读 · 8月11日
非对称防御中的自组织临界性:俄乌战争
专知会员服务
10+阅读 · 8月10日
《战争中的大语言模型监管》
专知会员服务
12+阅读 · 8月10日
《边缘计算关键技术分析及美军作战实践应用》
边缘计算的军事应用
专知会员服务
12+阅读 · 8月9日
一种考虑资源机动性的武器目标分配混合算法
专知会员服务
13+阅读 · 8月8日
相关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会员