论文标题

自动生成和验证测试稳定的浮点代码

Automatic generation and verification of test-stable floating-point code

论文作者

Titolo, Laura, Moscato, Mariano, Muñoz, Cesar A.

论文摘要

当程序的控制流与实际算术的理想执行分歧时,浮点程序中的测试不稳定性发生。这种现象是由影响条件陈述中发生的算术表达式评估的圆形误差引起的。不稳定的测试可能会导致依赖数值计算的安全至关重要应用中的重大错误。考虑考虑测试不稳定性的编写程序是一项艰巨的任务,需要在有限的精确计算和四舍五入错误上进行专业知识。本文提出了一个工具链,以自动生成和验证实际算术中功能规范的可证明正确测试稳定的浮点程序。该输入是在原型验证系统(PVS)规范语言中编写的实价程序,输出是用ANSI/ISO C规范语言(ACSL)合同注释的转换的浮点C程序。这些合同将浮点程序程序与其功能规范相关联。转换的程序检测是否可能发生不稳定的测试,在这些情况下,发出警告和终止。提出了一种结合Frama-C分析仪,PRECISA圆形误差估算器的方法,并提出了PVS自动验证生成的程序代码是否正确,从某种意义上说,如果程序终止而没有警告,则它将遵循与其实价值相同的计算路径。

Test instability in a floating-point program occurs when the control flow of the program diverges from its ideal execution assuming real arithmetic. This phenomenon is caused by the presence of round-off errors that affect the evaluation of arithmetic expressions occurring in conditional statements. Unstable tests may lead to significant errors in safety-critical applications that depend on numerical computations. Writing programs that take into consideration test instability is a difficult task that requires expertise on finite precision computations and rounding errors. This paper presents a toolchain to automatically generate and verify a provably correct test-stable floating-point program from a functional specification in real arithmetic. The input is a real-valued program written in the Prototype Verification System (PVS) specification language and the output is a transformed floating-point C program annotated with ANSI/ISO C Specification Language (ACSL) contracts. These contracts relate the floating-point program to its functional specification in real arithmetic. The transformed program detects if unstable tests may occur and, in these cases, issues a warning and terminate. An approach that combines the Frama-C analyzer, the PRECiSA round-off error estimator, and PVS is proposed to automatically verify that the generated program code is correct in the sense that, if the program terminates without a warning, it follows the same computational path as its real-valued functional specification.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源