arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2211.15261cs.LOcs.PLcs.SE
收藏

灵活的正确性构造编程

Flexible Correct-by-Construction Programming

Tobias Runge, Tabea Bordis, Alex Potanin, Thomas Thüm, Ina Schaefer

AI总结:

比较经典CbC、CbC-Block和TraitCbC三种正确性构造方法,提出编程指南并证明TraitCbC可靠性,评估其构造、工具支持与可用性以适配不同任务。

摘要:

正确性构造是一种增量程序构造过程,用于构造功能正确的程序。程序沿着固有保证满足的规范逐步构造。由于需要一组固定粒度的预定义细化规则(这些规则是编程语言之上的附加规则),缺乏专门工具支持时CbC使用复杂。每个细化规则引入特定的编程语句,开发者不能偏离这些规则构造程序。CbC允许以结构化和增量方式开发软件以确保正确性,但灵活性有限是其劣势。。两种方法CbC-Block和TraitCbC都与CbC相关,但具有实现更灵活软件构造方法的新语言构造。我们为两种方法提供编程指南,,类似于CbC,,能引导出结构良好的程序。CbC-Block通过添加插入任意语句块的细化规则扩展CbC,因此,我们将CbC-Block作为CbC的扩展。TraitCbC在具有指定方法的traits基础上实现正确性构造。我们形式化引入TraitCbC并证明构造策略的可靠性。三种开发方法在编程构造、工具支持和可用性方面进行定性比较,,以评估哪种最适合特定任务和开发者。

英文摘要:

Correctness-by-Construction (CbC) is an incremental program construction process to construct functionally correct programs. The programs are constructed stepwise along with a specification that is inherently guaranteed to be satisfied. CbC is complex to use without specialized tool support, since it needs a set of predefined refinement rules of fixed granularity which are additional rules on top of the programming language. Each refinement rule introduces a specific programming statement and developers cannot depart from these rules to construct programs. CbC allows to develop software in a structured and incremental way to ensure correctness, but the limited flexibility is a disadvantage of CbC. In this work, we compare classic CbC with CbC-Block and TraitCbC. Both approaches CbC-Block and TraitCbC, are related to CbC, but they have new language constructs that enable a more flexible software construction approach. We provide for both approaches a programming guideline, which similar to CbC, leads to well-structured programs. CbC-Block extends CbC by adding a refinement rule to insert any block of statements. Therefore, we introduce CbC-Block as an extension of CbC. TraitCbC implements correctness-by-construction on the basis of traits with specified methods. We formally introduce TraitCbC and prove soundness of the construction strategy. All three development approaches are qualitatively compared regarding their programming constructs, tool support, and usability to assess which is best suited for certain tasks and developers.

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

↑