Computer Science ›› 2023, Vol. 50 ›› Issue (6A): 220400108-7.doi: 10.11896/jsjkx.220400108

• Software & Interdiscipline • Previous Articles     Next Articles

Formalization of Inverse Matrix Operation Based on Coq

SHEN Nan, CHEN Gang   

  1. College of Computer Science and Technology,Nanjing University of Aeronautics and Astronautics,Nanjing 210000,China
  • Online:2023-06-10 Published:2023-06-12
  • About author:SHEN Nan,born in 1998,postgraduate.His main research interests include formal methods and so on. CHEN Gang,born in 1958,Ph.D,professor,is a distinguished member of China Computer Federation.His main research interests include formal methods and so on.

Abstract: Matrix is a data structure widely used in computer science,and its correctness of operation is of great significance.In matrix formalization,there is no reasonable and practical formalization work.The reason lies in the difficulty in formalizing the two common inverse methods in engineering.The first method is based on the adjoint matrix solution method.The difficulty lies in that the submatrices of n*n matrix cannot be formally expressed,which makes it very difficult to construct the matrix composed of cosubformulas.Therefore,it is difficult to achieve the formalization of adjoint matrix inverse solution.The second method is called Gauss-Jordan elementary transformation method,the difficulty lies in the construction of elementary matrix and its operation function.If Coq is used to design the operation function of inductive structure,that is,the idea of filling two-dimensional table with rows first is adopted,the description information of two-dimensional table from column dimension will be discarded,so that the operation function branches too much and complex inductive structure needs to be designed,which leads to the failure of subsequent formal verification.In this paper,a record-based matrix function construction method is proposed,which describes the matrix in both column and column dimensions,making it possible to construct and prove the elementary matrix.On this basis,the formalization of matrix inversion in Coq system based on gaussian-Jordan elimination method is realized.And we implement the first software matrix inversion function library under formal verification in a way with lower cost and time complexity.

Key words: Formal verification, Formal engineering mathematics, Inverse matrix formalization, Coq, Software security

CLC Number: 

  • TP311
[1]CHEN G,QIU Z Y,SONG X Y,et al.A Report from Head Start:Formalizing Engineering Mathematics[J].Communications of China Computer Society,2017:92-93.
[2]ALMEIDA JB,FRADE M J,PINTO J S,et al.An overview of formal methods tools and techniques[C]//Rigorous Software Development.London:Springer,2011:15-44.
[3]HATEL P H,MOREAU L.Formalizing the safety of Java,the Java virtual machine,and Java card[J].ACM Computing Surveys(CSUR),2001,33(4):15-44.
[4]BERTOT Y,CASTERAN P.Interactive Theorem Proving and Program Development[M]//Interactive theorem proving and program development.Coq’Art:The Calculus of Inductive Constructions.Springer,2004.
[5]LI L M,SHI Z P,GUAN Y,et al.Formalizing the Matrix Inversion Based on the Adjugate Matrix in HOL4[C]//8th International Conference on Intelligent Information Processing(IIP).2014:178-186.
[6]MA Z W,CHEN G.Matrix Formalization Based on Coq Record[J].Computer Science,2019,46(7):139-145.
[7]SHI Z P,LIU Z K,GUAN Y,et al.Formalization of FunctionMatrix Theory in HOL[J].Journal of Applied Mathematics,2014,SI(1):1-10.
[8]KANG X N,SHI Z P,YE S W,et al.Formalization of MatrixTransformation Theory in HOL4[J].Computer Simulation,2014(3):1-16.
[9]YANG X M,GUAN Y,SHI Z P,et al.Higher-order Logic Formalization of Function Matrix and its Calculus[J].Computer Science,2016(11):24-29.
[10]BIHA S O.Finite groups representation theory with Coq[C]//8th International Conference on Mathematical Knowledge Mana-gement.Berlin:Spriger,2009:438-452.
[11]HERAS J,POZA M,DÉNÈS M.Incidence Simplicial Matrices Formalized in Coq/SSReflect[M].Spriner_verlag,2011:30-44.
[12]DENES M,BERTOT Y.Experiments with computable matricesin the Coq system[R].France:INRIA,2011:2-27.
[13]BOLDO S,LELAY C,MELQUIOND G.Coquelicot:A User-Friendly Library of Real Analysis for Coq[J].Mathematics in Computer Science,2015,9(1):41-62.
[14]MA Y Y,MA Z W,CHEN G.Formalization of Operations of Block Matrix Based on Coq[J].Ruan Jian Xue Bao/Journal of Software,2021,32(6):1882-1909.
[1] JIAN Qi-rui, CHEN Ze-mao, WU Xiao-kang. Authentication and Key Agreement Protocol for UAV Communication [J]. Computer Science, 2022, 49(8): 306-313.
[2] CHEN Li-ping, XU Peng, WANG Dan-chen, XU Yang. Study on Formal Verification of EAP-TLS Protocol [J]. Computer Science, 2022, 49(11A): 211100111-5.
[3] WANG Ran-ran, WANG Yong, CAI Yu-tong, JIANG Zheng-tao, DAI Gui-ping. Formal Verification of Yahalom Protocol Based on Process Algebra [J]. Computer Science, 2021, 48(6A): 481-484.
[4] FANG Lei, WU Ze-hui, WEI Qiang. Summary of Binary Code Similarity Detection Techniques [J]. Computer Science, 2021, 48(5): 1-8.
[5] SUN Xiao-xiang, CHEN Zhe. Study on Correctness of Memory Security Dynamic Detection Algorithm Based on Theorem Proving [J]. Computer Science, 2021, 48(1): 268-272.
[6] LI Ling, LI Huang-hua, WANG Sheng-yuan. Experiment on Formal Verification Process of Parser of CompCert Compiler in Trusted Compiler Design [J]. Computer Science, 2020, 47(6): 8-15.
[7] FAN Yong-qian, CHEN Gang, CUI Min. Formalization of Finite Field GF(2n) Based on COQ [J]. Computer Science, 2020, 47(12): 311-318.
[8] MA Zhen-wei,CHEN Gang. Matrix Formalization Based on Coq Record [J]. Computer Science, 2019, 46(7): 139-145.
[9] CHEN Hao, LUO Lei, LI Yun, CHEN Li-rong. Study on Formal Verification of Secure Virtual Machine Monitor [J]. Computer Science, 2019, 46(3): 170-179.
[10] ZHANG Xiong and LI Zhou-jun. Survey of Fuzz Testing Technology [J]. Computer Science, 2016, 43(5): 1-8.
[11] LI Yan-chun, LI Xiao-juan, GUAN Yong, WANG Rui, ZHANG Jie and WEI Hong-xing. xMAS-based Formal Verification of SpaceWire Credit Logic [J]. Computer Science, 2016, 43(2): 113-117.
[12] YANG Xiu-mei, GUAN Yong, SHI Zhi-ping, WU Ai-xuan, ZHANG Qian-ying and ZHANG Jie. Higher-order Logic Formalization of Function Matrix and its Calculus [J]. Computer Science, 2016, 43(11): 24-29.
[13] CHEN Li-rong, LI Yun and LUO Lei. Research on Formal Verification of Embedded Operating System [J]. Computer Science, 2015, 42(8): 203-214.
[14] LIU Yang,YANG Fei,SHI Gang,YAN Xin,WANG Sheng-yuan and DONG Yuan. Brief Overview of Translation Validation Method in Trusted Compiler Construction [J]. Computer Science, 2014, 41(Z6): 334-338.
[15] ZHOU Kuan-jiu,REN Long-tao,WANG Xiao-long,YONG Jia-wei and HOU Gang. Modeling and Formal Verification for Software Designs Based on Hierarchical Timed State Transition Matrix [J]. Computer Science, 2014, 41(8): 42-46.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!