We present a Hoare logic that extends program specifications with regular expressions that capture behaviors in terms of sequences of events that arise during the execution. The idea is similar to session types or process-like behavioral contracts, two currently popular research directions. The approach presented here strikes a particular balance between expressiveness and proof automation, notably, it can capture interesting sequential behavior across multiple iterations of loops. The approach is modular and integrates well with autoactive deductive verification tools. We describe and demonstrate our prototype implementation in SecC using two case studies: A matcher for E-Mail addresses and a specification of the game steps in the VerifyThis Casino challenge.
翻译:我们提出了一个Hoare逻辑,将程序规格扩展为常规表达式,从执行期间发生的事件的序列中捕捉到行为。这个概念类似于会话类型或过程相似的行为合同,这是目前两个受欢迎的研究方向。这里介绍的方法在表达性和证据自动化之间取得了特别的平衡,特别是它能够捕捉多个循环迭代的有趣的相继行为。这个方法是模块化的,与自动活性扣减核查工具融为一体。我们用两个案例研究来描述和演示我们在SecC的原型实施:E-Mail地址匹配器和Casino挑战中的游戏步骤说明。