计算机科学 > 程序设计语言
[提交于 2022年8月31日]
标题:Python Type Hints are Turing Complete
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:Grigore showed that Java generics are Turing complete by describing a reduction from Turing machines to Java subtyping. We apply Grigore's algorithm to Python type hints and deduce that they are Turing complete. In addition, we present an alternative reduction in which the Turing machines are simulated in real time, resulting in significantly lower compilation times. Our work is accompanied by a Python implementation of both reductions that compiles Turing machines into Python subtyping machines.
提交历史
来自:Ori Roth[v1] 2022年8月31日 星期三 10:11:42 UTC