Typestates are a notion of behavioral types that describe a protocol for stateful objects, specifying the available methods for each state. Usually, objects with protocols are either forced to be used in a linear way, which restricts what a programmer can do, or deductive verification is required to verify programs where these objects may be aliased. To evaluate the contributions and limitations of static verification tools in checking the correct use of shared objects with protocol, we present a survey on four tools for Java: VeriFast, VerCors, Plural, and KeY. We describe the implementation of a file reader and linked-list, check for each tool its ability to statically guarantee protocol compliance, as well as protocol completion, even when objects are shared in collections, and evaluate the programmer's effort in making the code acceptable to these tools.
翻译:类型状态是一种行为类型的概念,描述有色物体的规程,具体说明每个州可用的方法。通常,有规程的物体要么被迫以线性方式使用,这限制了程序员可以做什么,要么需要从推论性核查来核查可能用别名核查这些物件的程序。为了评估静态核查工具在检查是否正确使用共有物件时的贡献和限制,我们为爪哇提供了四个工具:Verifast、VerCors、Ploral和Key。我们描述了文件阅读器和链接列表的执行情况,检查每个工具是否有能力静态地保证协议得到遵守,以及协议完成,即使收集的物件被共享,我们还要评估程序员在使代码为这些工具所接受方面所做的努力。