arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1902.10231cs.PL
收藏

使用类型修饰符和对象功能进行声音不变量检查

Sound Invariant Checking Using Type Modifiers and Object Capabilities

Isaac Oscar Gariano, Marco Servetto, Alex Potanin

摘要:

在本文中,我们使用预先存在的语言支持类型修饰符和对象的能力,使系统的健全的运行时验证的不变量。我们的系统保证类不变量适用于执行中涉及的所有对象。不变量被简单地指定为方法,其执行被静态地保证是确定性的,并且不访问任何外部可变状态。只有当对象被创建或者它们引用的状态可能已经发生变化时,我们才会自动调用这样的不变方法。我们的设计限制了可表达的不变量的范围,但与以前的工作相比,我们的系统的可用性和性能提高。此外,我们完全支持突变、动态分派、异常和非确定性,同时只需要少量的注释。我们提出了一个案例研究表明,我们的系统需要一个较低的注释负担相比,规范#,并执行数量级较少的运行时不变的检查相比,广泛使用的“可见状态语义”协议的D,埃菲尔铁塔。我们还正式我们的方法,并证明这种预先存在的类型修饰符和对象能力的支持是足够的,以确保其健全。

英文摘要:

In this paper we use pre existing language support for type modifiers and object capabilities to enable a system for sound runtime verification of invariants. Our system guarantees that class invariants hold for all objects involved in execution. Invariants are specified simply as methods whose execution is statically guaranteed to be deterministic and not access any externally mutable state. We automatically call such invariant methods only when objects are created or the state they refer to may have been mutated. Our design restricts the range of expressible invariants but improves upon the usability and performance of our system compared to prior work. In addition, we soundly support mutation, dynamic dispatch, exceptions, and non determinism, while requiring only a modest amount of annotation. We present a case study showing that our system requires a lower annotation burden compared to Spec#, and performs orders of magnitude less runtime invariant checks compared to the widely used `visible state semantics' protocols of D, Eiffel. We also formalise our approach and prove that such pre existing type modifier and object capability support is sufficient to ensure its soundness.

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

↑