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
下载
关闭预览

相关内容

人们为了让计算机解决各种棘手的问题,使用编程语言 编写程序代码并通过计算机运算得到最终结果的过程。
《软件定义网络元素与机器代码的形式化验证》
专知会员服务
14+阅读 · 2025年11月18日
【ETZH博士论文】语言模型编程
专知会员服务
25+阅读 · 2025年6月14日
自动编程:大型语言模型及其他
专知会员服务
36+阅读 · 2024年5月12日
专知会员服务
48+阅读 · 2021年7月2日
自然语言处理(NLP)知识结构总结
AI100
51+阅读 · 2018年8月17日
【干货】深入理解自编码器(附代码实现)
【学界】机器学习模型的“可解释性”到底有多重要?
GAN生成式对抗网络
12+阅读 · 2018年3月3日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
ICML 2026 | CFPO:用反事实策略优化提升多模态推理
专知会员服务
1+阅读 · 今天14:45
综述 | 世界动作模型:少做梦,多行动
专知会员服务
1+阅读 · 今天14:43
美以伊冲突:无人机与人工智能的运用
专知会员服务
3+阅读 · 今天14:31
《特种部队在透明战场中的生存力》最新报告
专知会员服务
2+阅读 · 今天14:11
《人工智能生成的零日漏洞:对未来作战的影响》
综述 | 3D场景图:开放挑战与未来方向
专知会员服务
8+阅读 · 6月22日
21世纪的无人机战争
专知会员服务
4+阅读 · 6月22日
《量子技术的军事任务技术适配与利用》
专知会员服务
5+阅读 · 6月22日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员