We present a novel and well automatable approach to formal verification of programs with underspecified semantics, i.e., a language semantics that leaves open the order of certain evaluations. First, we reduce this problem to non-determinism of distributed systems, automatically extracting a distributed Active Object model from underspecified, sequential C code. This translation process provides a fully formal semantics for the considered C subset. In the extracted model every non-deterministic choice corresponds to one possible evaluation order. This step also automatically translates specifications in the ANSI/ISO C Specification Language (ACSL) into method contracts and object invariants for Active Objects. We then perform verification on the specified Active Objects model. For this we have implemented a theorem prover Crowbar based on the Behavioral Program Logic (BPL), which verifies the extracted model with respect to the translated specification and ensures the original property of the C code for all possible evaluation orders. By using model extraction, we can use standard tools, without designing a new complex program logic to deal with underspecification. The case study used is highly underspecified and cannot be verified with existing tools for C.
翻译:我们提出了一种新颖的、完全自动化的方法来正式核查语义描述不足的程序,即一种语言语义,允许某些评价的顺序。首先,我们将这一问题降低到分布系统的非确定性,从未指定、顺序的C代码中自动提取一个分布式主动对象模型。这一翻译过程为考虑的C子集提供了一个完全正式的语义。在所选的模型中,每个非确定性选择都对应一个可能的评价命令。这一步骤还将ANSI/ISO C 特定语言(ACSL)中的规格自动转化为方法合同和用于活动对象的变量。我们随后对指定的活动对象模型进行核查。为此,我们实施了基于行为逻辑程序(BPL)的理论验证Crowbar,该理论验证了所提取的模式,并确保了C代码的原始属性用于所有可能的评价命令。通过模型提取,我们可以使用标准工具,而无需设计新的复杂程序逻辑来处理不精确的具体化问题。我们使用的案例研究非常低,无法与现有的C工具进行核实。