Contract-based verification of MATLAB-style matrix programs

被引:1
作者
Wiik, Jonatan [1 ]
Bostrom, Pontus [1 ]
机构
[1] Abo Akad Univ, Fac Sci & Engn, Domkyrkotorget 3, SF-20500 Turku, Finland
基金
芬兰科学院;
关键词
MATLAB; Numerical computing; Automated verification; SMT solving; INFERENCE; SPECIFICATION;
D O I
10.1007/s00165-015-0353-z
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
MATLAB/Simulink is a popular toolset for developing embedded software. The main target of the toolset is numerical computing applications and the tools offer a rich language for manipulating matrices. This paper presents an approach to automatic, modular, contract-based verification of programs written in a subset of the MATLAB programming language. We focus on efficient handling of the built-in matrix manipulation functions commonly used in MATLAB. We restrict ourselves to the subset of MATLAB suitable for code generation, which means matrix types and shapes can be determined statically. We present an approach to static type and shape inference for matrices that is more strict than MATLAB, but aids verification. The type and shape information is then used in the verification. From the programs and contracts we generate verification conditions that are discharged with an off-the-shelf SMT solver. We discuss two approaches to encode matrix functions and evaluate them on a number of examples. We also investigate the use of k-induction to decrease the need for user annotations. We found our approach to be efficient for programs that manipulate relatively small matrices, which are common in embedded applications.
引用
收藏
页码:79 / 107
页数:29
相关论文
共 33 条
  • [1] MaJIC:: Compiling MATLAB for speed and responsiveness
    Almási, G
    Padua, D
    [J]. ACM SIGPLAN NOTICES, 2002, 37 (05) : 294 - 303
  • [2] Amin Nada, 2014, Tests and Proofs. 8th International Conference (TAP 2014). Held as Part of STAF 2014. Proceedings: LNCS 8570, P20, DOI 10.1007/978-3-319-09099-3_2
  • [3] [Anonymous], 2014, TECHNICAL REPORT
  • [4] Barnett M, 2006, LECT NOTES COMPUT SC, V4111, P364
  • [5] Specification and Verification: The Spec# Experience
    Barnett, Mike
    Faehndrich, Manuel
    Leino, K. Rustan M.
    Mueller, Peter
    Schulte, Wolfram
    Venter, Herman
    [J]. COMMUNICATIONS OF THE ACM, 2011, 54 (06) : 81 - 91
  • [6] Contract-based verification of discrete-time multi-rate Simulink models
    Bostrom, Pontus
    Wiik, Jonatan
    [J]. SOFTWARE AND SYSTEMS MODELING, 2016, 15 (04) : 1141 - 1161
  • [7] Boström P, 2011, LECT NOTES COMPUT SC, V6991, P291, DOI 10.1007/978-3-642-24559-6_21
  • [8] Chalin P, 2006, LECT NOTES COMPUT SC, V4111, P342
  • [9] Proving Program Termination
    Cook, Byron
    Podelski, Andreas
    Rybalchenko, Andrey
    [J]. COMMUNICATIONS OF THE ACM, 2011, 54 (05) : 88 - 98
  • [10] Cuoq P., 2012, P INT C SOFTW ENG FO, P233