Skip to main content
QUICK REVIEW

[论文解读] A decorated proof system for exceptions

Jean‐Guillaume Dumas, Dominique Duval|arXiv (Cornell University)|Sep 27, 2013
Logic, programming, and type systems参考文献 5被引用 1
一句话总结

本文提出了一种面向面向对象语言中异常的装饰化证明系统,结合了效果系统的语法相似性与专门的等式,以分离依赖效果的推理与通用推理。通过全局状态与异常效果之间的对偶性实现可靠性,从而通过双重化的通用证明与异常特异性规则实现模块化验证。

ABSTRACT

In this paper, we first provide a careful description of the denotational semantics of exceptions in an object-oriented setting. Then we define a proof system for exceptions which is sound with respect to this denotational semantics. Our proof system is close to the syntax, as in effect systems, in the sense that the exceptions do not appear explicitly in the type of expressions which may raise them, much like compiler qualifiers or specifiers. But our system also involves different kind of equations, in order to separate the verification of properties that are true only up to effects from the verification of generic properties. Thanks to a duality between the global state effect and the core part of the exception effect, the proofs are in two parts: the first part is generic and can be directly dualized from the proofs on global states, while the second part uses specific rules. These specific rules are related to the encapsulation of the core part into some control for the conditional raising and handling of exceptions.

研究动机与目标

  • 正式定义面向对象上下文中异常的指称语义。
  • 设计一个与该语义一致的证明系统,避免在表达式类型中显式引入异常类型。
  • 通过不同的等式类型,将通用属性的验证与依赖异常的属性验证相分离。
  • 利用全局状态与异常效果之间的对偶性,重用通用证明结构。
  • 提供异常特异性规则,以封装异常抛出与处理的控制流。

提出的方法

  • 为面向对象程序中的异常定义指称语义,精确捕捉其行为。
  • 构建一个与语法相似的证明系统,类似于效果系统,但不将异常嵌入表达式类型中。
  • 引入两类等式:一类用于通用属性,另一类用于效果敏感属性。
  • 利用全局状态与异常效果之间的对偶性,将基于状态的推理双重化为通用证明。
  • 设计特定规则,将核心异常效果封装为异常抛出与处理的条件控制流。
  • 通过将证明系统与所定义的指称语义对齐,确保其可靠性。

实验结果

研究问题

  • RQ1如何在面向对象环境中使用指称语义正式建模异常?
  • RQ2能否设计一个在语法上接近代码但保持可靠性的异常证明系统?
  • RQ3如何将关于程序行为的通用推理与依赖异常效果的推理相分离?
  • RQ4全局状态与异常效果之间存在何种对偶性,使得证明可以重用?
  • RQ5如何在证明系统中正式封装异常控制流——包括异常的抛出与处理?

主要发现

  • 该证明系统相对于面向对象程序中异常的定义指称语义是可靠的。
  • 该系统避免在表达式类型中显式引入异常类型,其语法类似于效果系统。
  • 使用两类等式使得通用属性与效果依赖属性之间的分离更加清晰。
  • 全局状态与异常效果之间的对偶性使得通用证明可直接从基于状态的证明中双重化而来。
  • 异常特异性规则成功地将异常抛出与处理的控制流封装在证明系统内部。
  • 该方法通过将异常特异性推理与一般程序行为推理相隔离,支持模块化验证。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。