Complexity analysis offers assurance of program's runtime behavior, but large classes of programs remain unanalyzable by existing automated techniques.The mwp-flow analysis sidesteps many difficulties shared by existing approaches, and offers interesting features, such as compositionality, multivariate bounds, and applicability to non-terminating programs.It analyzes resource usage and determines if a program's variables growth rates are no more than polynomially related to their inputs sizes.This sound calculus, however, is computationally expensive to manipulate, and provides no feedback if the program does not have polynomial bounds.Those two defaults were addressed in a previous work, and prepared for the tool we present here: pymwp, a static complexity analyzer for C programs based on our improved mwp-flow analysis.
翻译:复杂度分析能够确保程序的运行时行为,但现有自动化技术难以分析大量程序类别。mwp-流分析规避了现有方法面临的诸多困难,并具备组合性、多变量界限及适用于非终止程序等特性。该分析通过检测资源使用情况,判断程序中变量增长率是否与输入规模呈多项式相关。然而,这一严格演算在计算上代价高昂,且当程序无多项式界限时无法提供反馈。先前工作已针对上述两个缺陷进行了改进,并为本工具奠定了基础:pymwp是基于改进型mwp-流分析的C程序静态复杂度分析器。