arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 1103.5055cs.PL
收藏

动态语言的嵌套精化

Nested Refinements for Dynamic Languages

Ravi Chugh, Patrick M. Rondon, Ranjit Jhala

摘要:

用动态语言编写的程序大量使用了运行时类型测试、值索引字典、多态性和高阶函数等特性,这些特性超出了使用纯语法或纯语义推理的类型系统的范围。我们提出了一个核心演算,系统D,这两种模式的推理合并成一个强大的机制嵌套细化类型,其中的类型关系本身是一个谓词的细化逻辑。系统D协调基于SMT的逻辑蕴涵和语法子类型,以自动检查复杂的动态语言程序。通过将嵌套精化与麦卡锡的有限映射理论相结合,系统D可以精确地推理高阶函数、多态性和字典之间的相互作用。向精化逻辑添加类型谓词创建了一个循环,导致元理论中的独特技术挑战,我们用一种新的分层方法来解决这个问题,我们用这种方法来证明系统D的可靠性。

英文摘要:

Programs written in dynamic languages make heavy use of features --- run-time type tests, value-indexed dictionaries, polymorphism, and higher-order functions --- that are beyond the reach of type systems that employ either purely syntactic or purely semantic reasoning. We present a core calculus, System D, that merges these two modes of reasoning into a single powerful mechanism of nested refinement types wherein the typing relation is itself a predicate in the refinement logic. System D coordinates SMT-based logical implication and syntactic subtyping to automatically typecheck sophisticated dynamic language programs. By coupling nested refinements with McCarthy's theory of finite maps, System D can precisely reason about the interaction of higher-order functions, polymorphism, and dictionaries. The addition of type predicates to the refinement logic creates a circularity that leads to unique technical challenges in the metatheory, which we solve with a novel stratification approach that we use to prove the soundness of System D.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑