We study when a programming language can emulate programs written in that same language without delegating the guest program back to the host evaluator or compiler. We call this property emulation-completeness. The central observation is that Turing-completeness by itself is not enough: a self-emulator must not only compute the guest program's result, but must also account for the guest-visible state on which realistic programs depend, including control flow, exceptions, callbacks, timing, memory usage, and runtime metadata such as stack traces or line numbers. This paper is a systematization paper. Its contribution is not a new emulator implementation, but a precise vocabulary and a structured taxonomy for reasoning about self-emulation. We distinguish source-level evaluation from compiled-code emulation, define syntactic and compiled-code emulation-completeness, and separate weak from strong emulation-completeness according to how much observable runtime behavior must be preserved. We then organize the requirements into two classes: language-side requirements, which determine whether the guest semantics can be represented explicitly inside the language, and emulator-side requirements, which determine whether the resulting emulator can faithfully mask or reproduce relevant observations. The discussion is grounded by concrete examples, including publicly documented details from Erlang, where argument limits, bitstring pattern matching, and message reception expose subtle mismatches between direct execution and self-emulation. The resulting framework is intended as guidance for language designers, implementers of evaluators and emulators, and researchers interested in secure sandboxing, decompilation, and reflective execution.


翻译:我们研究编程语言是否能够在不将客程序委派给宿主求值器或编译器的情况下,模拟用同一种语言编写的程序。我们将这一性质称为自模拟完备性。核心发现是:图灵完备性本身并不足够——自模拟器不仅需要计算出客程序的结果,还必须处理现实程序所依赖的客可见状态,包括控制流、异常、回调、时序、内存使用以及运行时元数据(如栈追踪或行号)。本文是一篇系统化论文,其贡献并非实现新的模拟器,而是提供一套精确的术语和结构化的分类法,用以推理自模拟问题。我们将源代码级求值与编译代码模拟区分开来,定义了语法层自模拟完备性和编译代码自模拟完备性,并根据需保留的运行时可观测行为程度,将弱自模拟完备性与强自模拟完备性加以区分。随后,我们将需求组织为两类:语言侧需求(决定客语义能否在语言内部显式表达)和模拟器侧需求(决定所得模拟器能否忠实地掩盖或复现相关观测现象)。讨论以具体示例为支撑,包括Erlang语言中公开记录的技术细节——参数限制、位串模式匹配以及消息接收揭示了直接执行与自模拟之间的微妙不匹配。由此形成的框架旨在为语言设计者、求值器与模拟器实现者,以及对安全沙箱、反编译和反射执行感兴趣的研究人员提供指导。

0
下载
关闭预览

相关内容

人们为了让计算机解决各种棘手的问题,使用编程语言 编写程序代码并通过计算机运算得到最终结果的过程。
【ETZH博士论文】语言模型编程
专知会员服务
22+阅读 · 1月8日
稀疏自编码器综述:解释大语言模型的内部机制
专知会员服务
17+阅读 · 2025年12月27日
《软件定义网络元素与机器代码的形式化验证》
专知会员服务
14+阅读 · 2025年11月18日
《基于大型语言模型的软件工程自动化研究》最新264页
专知会员服务
39+阅读 · 2025年7月14日
自动编程:大型语言模型及其他
专知会员服务
36+阅读 · 2024年5月12日
专知会员服务
37+阅读 · 2021年10月16日
概述自动机器学习(AutoML)
人工智能学家
19+阅读 · 2019年8月11日
自然语言处理中的语言模型预训练方法
PaperWeekly
14+阅读 · 2018年10月21日
自然语言处理(NLP)知识结构总结
AI100
51+阅读 · 2018年8月17日
NLP通用模型诞生?一个模型搞定十大自然语言常见任务
人工智能头条
10+阅读 · 2018年6月29日
【干货】深入理解自编码器(附代码实现)
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Arxiv
0+阅读 · 4月29日
VIP会员
最新内容
综述 | 世界动作模型:少做梦,多行动
专知会员服务
3+阅读 · 6月23日
美以伊冲突:无人机与人工智能的运用
专知会员服务
5+阅读 · 6月23日
《特种部队在透明战场中的生存力》最新报告
专知会员服务
4+阅读 · 6月23日
综述 | 3D场景图:开放挑战与未来方向
专知会员服务
8+阅读 · 6月22日
21世纪的无人机战争
专知会员服务
4+阅读 · 6月22日
《量子技术的军事任务技术适配与利用》
专知会员服务
5+阅读 · 6月22日
相关VIP内容
相关资讯
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员