Intrinsic definitional interpreters, definitional interpreters that operate on typing derivations instead of abstract syntax trees, have recently been studied as a promising methodology for defining dynamic semantics of programming languages. A key benefit is that type safety interactively guides and constrains the interpreter's construction. Analogously to typing relations, Hoare logic is widely used to guarantee program correctness. Can intrinsic definitional interpreters be realized to operate over Hoare-logic derivations? We explore this question in depth by developing definitional interpreters in Rocq for (i) a basic Hoare logic, and (ii) a realistic logic featuring heaps, dynamic-frame-based local reasoning, well-founded functions, and behavioral subtyping. Central to our approach is a novel technique we call entry-indexing, which we use to interpret total-correctness derivations and well-founded functions. Our second development yields, to our knowledge, the first formalization of a dynamic-frame-based Hoare logic with well-founded functions, behavioral subtyping, and total correctness, as well as the first fully mechanized Hoare logic with dynamic frames.


翻译:内在定义解释器(intrinsic definitional interpreters)是一种在类型推导而非抽象语法树上操作的定义解释器,近来被研究作为定义编程语言动态语义的一种有前景的方法论。其关键优势在于类型安全性能够交互式地引导并约束解释器的构造。与类型关系类似,霍尔逻辑(Hoare logic)被广泛用于保证程序正确性。能否实现内在定义解释器以在霍尔逻辑推导上运行?我们通过开发面向(i)基本霍尔逻辑,以及(ii)包含堆(heap)、基于动态帧(dynamic frame)的局部推理、良基函数(well-founded functions)和行为子类型(behavioral subtyping)的现实逻辑的Rocq定义解释器,深入探索了这一问题。我们方法的核心是一种名为入口索引(entry-indexing)的新技术,用于解释全正确性推导和良基函数。据我们所知,我们的第二项开发首次形式化了包含良基函数、行为子类型和全正确性的基于动态帧的霍尔逻辑,并实现了首个具有动态帧的完全机械化霍尔逻辑。

0
下载
关闭预览

相关内容

可解释人工智能的基础
专知会员服务
32+阅读 · 2025年10月26日
【NAACL2024】大语言模型时代的可解释性,240页ppt
专知会员服务
45+阅读 · 2024年6月17日
机器学习的可解释性
专知会员服务
69+阅读 · 2020年12月18日
【机器推理可解释性】Machine Reasoning Explainability
专知会员服务
35+阅读 · 2020年9月3日
【哈佛大学商学院课程Fall 2019】机器学习可解释性
专知会员服务
105+阅读 · 2019年10月9日
可解释的机器学习
平均机器
25+阅读 · 2019年2月25日
【干货】深入理解自编码器(附代码实现)
【学界】机器学习模型的“可解释性”到底有多重要?
GAN生成式对抗网络
12+阅读 · 2018年3月3日
国家自然科学基金
1+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
8+阅读 · 2014年12月31日
Arxiv
0+阅读 · 5月14日
VIP会员
最新内容
学习数据的几何:形状空间分析数学综述
专知会员服务
7+阅读 · 6月17日
定向能反无人机系统最新发展动态
专知会员服务
7+阅读 · 6月17日
从燃煤战舰到算法战争:水面指挥的永恒要求
专知会员服务
5+阅读 · 6月17日
相关基金
国家自然科学基金
1+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
8+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员