Continuity Analysis of Programs

被引:0
作者
Chaudhuri, Swarat [1 ]
Gulwani, Sumit
Lublinerman, Roberto [1 ]
机构
[1] Penn State Univ, University Pk, PA 16802 USA
关键词
Theory; Verification; Continuity; Program Analysis; Uncertainty; Robustness; Perturbations; Proof Rules;
D O I
暂无
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We present an analysis to automatically determine if a program represents a continuous function, or equivalently, if infinitesimal changes to its inputs can only cause infinitesimal changes to its outputs. The analysis can be used to verify the robustness of programs whose inputs can have small amounts of error and uncertainty-e.g., embedded controllers processing slightly unreliable sensor data, or handheld devices using slightly stale satellite data. Continuity is a fundamental notion in mathematics. However, it is difficult to apply continuity proofs from real analysis to functions that are coded as imperative programs, especially when they use diverse data types and features such as assignments, branches, and loops. We associate data types with metric spaces as opposed to just sets of values, and continuity of typed programs is phrased in terms of these spaces. Our analysis reduces questions about continuity to verification conditions that do not refer to infinitesimal changes and can be discharged using off-the-shelf SMT solvers. Challenges arise in proving continuity of programs with branches and loops, as a small perturbation in the value of a variable often leads to divergent control-flow that can lead to large changes in values of variables. Our proof rules identify appropriate "synchronization points" between executions and their perturbed counterparts, and establish that values of certain variables converge back to the original results in spite of temporary divergence. We prove our analysis sound with respect to the traditional epsilon-delta definition of continuity. We demonstrate the precision of our analysis by applying it to a range of classic algorithms, including algorithms for array sorting, shortest paths in graphs, minimum spanning trees, and combinatorial optimization. A prototype implementation based on the Z3 SMT-solver is also presented.
引用
收藏
页码:56 / 68
页数:13
相关论文
共 23 条
[1]  
ALUR R, 1992, HYBRID SYSTEMS
[2]  
[Anonymous], 1990, Introduction to Algorithms
[3]  
Cousot P, 2005, LECT NOTES COMPUT SC, V3444, P21
[4]  
Goubault E, 2001, LECT NOTES COMPUT SC, V2126, P234
[5]  
Halpern Joseph Y., 2003, Reasoning about Uncertainty, DOI DOI 10.7551/MITPRESS/10951.001.0001
[6]   Deviation analysis: A new use of model checking [J].
Heimdahl M.P.E. ;
Choi Y. ;
Whalen M.W. .
Automated Software Engineering, 2005, 12 (3) :321-347
[7]  
Kayton M., 1997, Avionics Navigation Systems
[8]  
Lee EA, 2008, ISORC 2008: 11TH IEEE SYMPOSIUM ON OBJECT/COMPONENT/SERVICE-ORIENTED REAL-TIME DISTRIBUTED COMPUTING - PROCEEDINGS, P363, DOI 10.1109/ISORC.2008.25
[9]  
Miné A, 2004, LECT NOTES COMPUT SC, V2986, P3
[10]  
Parkinson B. W., 1996, GLOBAL POSITIONING S, VII