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

非良类型程序不求值

Ill-Typed Programs Don't Evaluate

Steven Ramsay, Charlie Walpole

AI总结:

提出双向类型系统,通过相继式演算支持类型假设推理与反驳,保证非良类型程序不求值,适用于高阶程序验证中的不正确性推理。

摘要:

我们引入了双向类型系统,这是一种用于类型公式的相继式演算。双向类型系统允许对复合程序表达式的类型进行假设推理,并支持对类型公式的反驳。通过引入一个包含所有值的类型,这些类型系统支持更精细的良类型与非良类型概念,既保证良类型程序不会出错,也保证非良类型程序不求值,即不会达到值状态。这使得双向类型系统适用于高阶程序验证中的不正确性推理,我们通过在一种包含构造子和模式匹配的语言中应用精确的数据流类型来加以说明。最后,我们研究了系统中元层面否定的内化,将其作为类型上的补运算。这促使了类型判断的一种替代语义,该语义保证非良类型程序不求值,但良类型程序仍可能出错。

英文摘要:

We introduce two-sided type systems, which are sequent calculi for typing formulas. Two-sided type systems allow for hypothetical reasoning over the typing of compound program expressions, and the refutation of typing formulas. By incorporating a type of all values, these type systems support more refined notions of well-typing and ill-typing, guaranteeing both that well-typed programs don't go wrong and that ill-typed programs don't evaluate - that is, reach a value. This makes two-sided type systems suitable for incorrectness reasoning in higher-order program verification, which we illustrate through an application to precise data-flow typing in a language with constructors and pattern matching. Finally, we investigate the internalisation of the meta-level negation in the system as a complement operator on types. This motivates an alternative semantics for the typing judgement, which guarantees that ill-typed programs don't evaluate, but in which well-typed programs may yet go wrong.

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

↑