The invention belongs to the design technology of the flight control system, and relates to a method for testing the gain coverage rate in the flight control software. The invention includes the constant gain coverage test (i.e. traversing the gain file and the constant file in the source code, comparing the two, and recording the constant matching results); the variable gain structure body analysis (i.e., the analysis gain structure body definition file, classifies the respective features of the 4 kinds of gain structures to generate init.txt The source code inserts the pile (i.e., replacing the gain calculation function with the variable gain interpolation function in the source code, recording the information required for the coverage of the use case running when running the use case, generating the print.txt file); the gain coverage analysis (that is, to read the matching results of the constant gain and the result of the gain coverage. \ The statistical results of structure type constants are used to generate statistics and generate coverage test reports. The invention fills in the blank of the gain coverage test.
【技术实现步骤摘要】
一种飞行控制软件中增益覆盖率测试的方法
本专利技术属于飞行控制系统设计技术,涉及一种飞行控制软件中增益覆盖率测试的方法。
技术介绍
飞行控制律应用软件属安全关键软件,其运行状况与飞机的飞行安全息息相关,因此,对该软件的覆盖率测试非常必要。然而,目前对飞行控制律应用软件的覆盖率测试只局限于逻辑语句的覆盖率测试,控制律增益覆盖率的测试还是一片空白。控制律增益模块是飞行控制软件的重要组成。该模块在飞机研制的初始阶段规模较小,实现了逻辑语句的覆盖率测试就能基本满足研制需求,加上测试方法和工具的限制,不做增益覆盖率测试也无可厚非。但是随着型号的发展,控制律增益的复杂度日渐提高,代码规模也日益增大。在数量庞大,结构复杂,支路繁多的增益中,控制律增益的覆盖率测试已经成为验证增益完备性的重要保证和项目研制的迫切需求。
技术实现思路
本专利技术的目的是:提供一种飞行控制软件中增益覆盖率测试的方法。本专利技术的技术方案是:一种飞行控制软件中增益覆盖率测试的方法,包括:a)常量增益覆盖率测试:遍历增益文件和源代码中常量所在文件,将二者进行比较,记录常量匹配结果;b)变量增益结构体分析:分析增益结构体定义文件,通过4种增益结构体的各自特征进行分类记录,生成init.txt文件,分别记录下覆盖率所需信息;c)源代码插桩:在源代码中用变量增益插桩函数替换增益计算函数,在运行用例时,记录下用例运行的覆盖率所需信息,生成print.txt文件;d)增益覆盖率结果分析:读取常量增益的匹配结果和结构体类型常量的统计结果做出统计,生成增益覆盖率测试报告。本专利技术的有益效果是:本专利技术目前可运用 ...
【技术保护点】
一种飞行控制软件中增益覆盖率测试的方法,其特征为所述方法包括:a)常量增益覆盖率测试:遍历增益文件和源代码中常量所在文件,将二者进行比较,记录常量匹配结果;b)变量增益结构体分析:分析增益结构体定义文件,通过4种增益结构体的各自特征进行分类记录,生成init.txt文件,分别记录下覆盖率所需信息;c)源代码插桩:在源代码中用变量增益插桩函数替换增益计算函数,在运行用例时,记录下用例运行的覆盖率所需信息,生成print.txt文件;d)增益覆盖率结果分析:读取常量增益的匹配结果和结构体类型常量的统计结果做出统计,生成增益覆盖率测试报告。
【技术特征摘要】
1.一种飞行控制软件中增益覆盖率测试的方法,其特征为所述方法包括:a)常量增益覆盖率测试:遍历增益文件和源代码中常量所在文件,将二者进行比较,记录常量匹配结果;b)变量增益结构体分析:分析增益结构体定义文件,通过4种增益结构体的各自特征进行分类记录,生成init.txt文...
【专利技术属性】
技术研发人员:许海静,孙绍山,杨伟,严增锐,饶晓,
申请(专利权)人:中国航空工业集团公司成都飞机设计研究所,
类型:发明
国别省市:四川,51
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。