[go: up one dir, main page]

CN103036739B - A Formal Method for Verification and Performance Analysis of Highly Reliable Communication Systems - Google Patents

A Formal Method for Verification and Performance Analysis of Highly Reliable Communication Systems Download PDF

Info

Publication number
CN103036739B
CN103036739B CN201210533633.XA CN201210533633A CN103036739B CN 103036739 B CN103036739 B CN 103036739B CN 201210533633 A CN201210533633 A CN 201210533633A CN 103036739 B CN103036739 B CN 103036739B
Authority
CN
China
Prior art keywords
verification
model
modules
formal
verify
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201210533633.XA
Other languages
Chinese (zh)
Other versions
CN103036739A (en
Inventor
李晓娟
关永
施智平
王瑞
张�杰
赵春娜
华伟
董玲玲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Capital Normal University
Original Assignee
Capital Normal University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Capital Normal University filed Critical Capital Normal University
Priority to CN201210533633.XA priority Critical patent/CN103036739B/en
Publication of CN103036739A publication Critical patent/CN103036739A/en
Priority to AU2013263777A priority patent/AU2013263777A1/en
Application granted granted Critical
Publication of CN103036739B publication Critical patent/CN103036739B/en
Priority to AU2018201721A priority patent/AU2018201721A1/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Maintenance And Management Of Digital Transmission (AREA)

Abstract

一种用于高可靠通信系统验证与性能分析的形式化方法,该方法有五大步骤。本发明是一种基于模型检验和定理证明相结合的通信系统形式化验证与分析的方法。拟基于假设保证的方法,建立环境状态机,对网络通信系统的设计进行层次化建模,对关键属性进行形式化验证,对协议的传输过程、属性的高阶逻辑形式化建模方法、设计实现随机变量统计特征的高阶逻辑形式化,并基于在HOL4所建立的高阶逻辑模型和相关定理,实现自动验证和基于形式模型的量化动态性能分析。它在形式化验证工程应用技术领域里具有较好的实用价值和广阔的应用前景。

A formalized method for verification and performance analysis of high-reliability communication systems, comprising five major steps. This method is a method for formal verification and analysis of communication systems based on a combination of model checking and theorem proving. Based on a hypothesis-based approach, it proposes to establish an environmental state machine, perform hierarchical modeling of the design of network communication systems, formally verify key attributes, formalize high-order logic modeling of protocol transmission processes and attributes, and design and implement high-order logic formalization of the statistical characteristics of random variables. Based on the high-order logic model and related theorems established in HOL4, it implements automatic verification and quantitative dynamic performance analysis based on the formal model. This method has considerable practical value and broad application prospects in the field of formal verification engineering application technology.

Description

一种用于高可靠通信系统验证与性能分析的形式化方法A Formal Method for Verification and Performance Analysis of Highly Reliable Communication Systems

技术领域 technical field

本发明涉及一种用于高可靠通信系统验证与性能分析的形式化方法,它是嵌入式系统通信的可靠性验证(Reliability,Maintainability and Supportability,简称RMS)与性能分析的一体化实现方法,特别是基于形式化方法的验证与系统量化性能分析一体化流程构建方法,属于形式化验证工程应用技术领域。The present invention relates to a formalized method for verification and performance analysis of highly reliable communication systems, which is an integrated implementation method of reliability verification (Reliability, Maintainability and Supportability, RMS for short) and performance analysis of embedded system communication, especially It is an integrated process construction method based on formal method verification and system quantitative performance analysis, and belongs to the technical field of formal verification engineering application.

背景技术 Background technique

许多关键应用的片上系统中通信系统通常具有极高的功能可靠性、严格的实时性等要求。关键应用的片上系统失效导致生命与财产重大损失的例子枚不胜举;片上系统传统的检验方法是测试或故障模拟,其主要局限性在于对给定数据集通过了测试,但不能保证在实际运行中对其它输入不发生错误;并且难以发现系统潜在的不合理设计或隐含错误。如何保证系统同时满足给定的功能和非功能需求一直是高可靠片上计算领域中研究的关键问题之一。基于形式化的方法对通信系统正确性进行验证和性能分析将对保证片上通信系统正确性与可靠性具有重要意义。面向片上系统实现数据传输或并发、分布式过程的广泛应用,而这些应用的功能属性的形式化验证通常都采用模型检验的方法,但是由于模型检验方法抽象层次较低,只能进行定性检验,如果抽象不当或协议较复杂,很容易导致状态过多,甚至状态爆炸的问题。目前对网络通信系统的形式化方法只验证其正确性,要是实现量化分析,则通过建立模拟模型进行。The communication system in the system-on-chip of many key applications usually has extremely high functional reliability, strict real-time and other requirements. There are countless examples of system-on-chip failures in critical applications resulting in significant loss of life and property; the traditional verification method for system-on-chip is testing or fault simulation, the main limitation of which is that it passes the test for a given data set, but it cannot be guaranteed in actual operation There are no errors in other inputs; and it is difficult to find potential unreasonable design or hidden errors of the system. How to ensure that the system satisfies the given functional and non-functional requirements has always been one of the key issues in the field of high-reliability on-chip computing. It is of great significance to verify the correctness and performance analysis of the communication system based on the formal method to ensure the correctness and reliability of the on-chip communication system. For the wide application of data transmission or concurrent and distributed processes in system-on-chip, the formal verification of the functional attributes of these applications usually adopts the method of model checking, but due to the low level of abstraction of the model checking method, only qualitative testing can be performed. If the abstraction is improper or the protocol is complex, it is easy to cause too many states, or even state explosion. At present, the formal method of network communication system only verifies its correctness, and if quantitative analysis is realized, it is carried out by establishing a simulation model.

发明内容 Contents of the invention

1、目的:本发明的目的是提供一种用于高可靠通信系统验证与性能分析的形式化方法,它是一种基于模型检验和定理证明相结合的通信系统形式化验证与分析的方法。拟基于假设保证的方法,建立环境状态机,对网络通信系统的设计进行层次化建模,对关键属性进行形式化验证,对协议的传输过程、属性的高阶逻辑形式化建模方法、设计实现随机变量统计特征的高阶逻辑形式化,并基于在HOL4所建立的高阶逻辑模型和相关定理,实现自动验证和基于形式模型的量化动态性能分析。1. Purpose: the purpose of this invention is to provide a kind of formalized method for verification and performance analysis of highly reliable communication systems, which is a method for formalized verification and analysis of communication systems based on model checking and theorem proof. Based on the method of hypothesis guarantee, the environment state machine is established, the design of the network communication system is modeled hierarchically, the key attributes are formally verified, and the transmission process of the protocol, the high-order logic formal modeling method of attributes, and the design Realize the formalization of high-order logic of statistical characteristics of random variables, and based on the high-order logic model and related theorems established in HOL4, realize automatic verification and quantitative dynamic performance analysis based on formal models.

2、技术方案:为了实现上述目的,本发明一种用于高可靠通信系统验证与性能分析的形式化方法,该方法具体步骤如下:2. Technical solution: In order to achieve the above purpose, the present invention provides a formalized method for verification and performance analysis of a highly reliable communication system. The specific steps of the method are as follows:

步骤一:分析通信系统SOC功能实现结构,并提取关键的功能模块;进行验证模块分解、建模。将高阶逻辑定理证明和符号模型检验相结合,进行组合形式化验证。Step 1: Analyze the SOC function realization structure of the communication system, and extract the key functional modules; decompose and model the verification modules. Combining high-order logic theorem proving with symbolic model checking for combined formal verification.

步骤二:对模块之间的接口属性、I/O口及物理层功能实现,用模型检验的方法进行形式化验证,基于符号化模型检验平台,分层次地用模型检验方法验证模块之间的接口属性、I/O口及物理层功能实现。Step 2: Realize the interface attributes, I/O ports and physical layer functions between modules, and use the method of model inspection to perform formal verification. Based on the symbolic model inspection platform, use the model inspection method to verify the relationship between modules hierarchically Realization of interface attributes, I/O ports and physical layer functions.

步骤三:针对复杂功能模块可能导致状态过多的问题,进行层次化抽象,基于假设-保证理论,建立环境状态机模型,进行组合验证策略。Step 3: Aiming at the problem that complex functional modules may cause too many states, carry out hierarchical abstraction, based on the hypothesis-guarantee theory, establish an environmental state machine model, and carry out combined verification strategies.

步骤四:用定理证明的方法对数据通信协议、并行应用进程进行逻辑、功能实现的验证。基于高阶逻辑对片上系统时态属性和随机行为进行形式化表达;Step 4: Use the method of theorem proof to verify the logic and function realization of the data communication protocol and parallel application process. Formal expression of temporal properties and stochastic behavior of SoCs based on high-level logic;

步骤五:在系统的逻辑分析表达式分析中,提取系统进程统计性质的数学逻辑形式表达函数,实现验证对象过程的动态量化性能分析。Step 5: In the logical analysis expression analysis of the system, extract the mathematical logic form expression function of the statistical nature of the system process, and realize the dynamic quantitative performance analysis of the verification object process.

其中,步骤一中所述的“提取关键的功能模块;进行验证模块分解、建模;将高阶逻辑定理证明和符号模型检查相结合,进行组合形式化验证;”其具体实现过程如下:对通信系统中的发送、接收、链路管理、差错控制、流量控制等模块进行提取,进行验证模块的划分,对照协议设计规范,提取出验证的目标和子目标。功能较为独立的模块抽象为单独验证组件,再将低耦合模块间接口进行抽象建模及状态描述;建立发送/接收控制器的状态机模型,形成系统设计的形式化模型,采用模型检验的方法进行验证。对数据传输协议及并行的分布式组件等过程在HOL4平台上,建立高阶逻辑模型,采用定理证明的方法进行验证。Among them, the "extracting key functional modules; performing verification module decomposition and modeling; combining high-order logic theorem proof and symbolic model checking to perform combined formal verification" described in step 1 is as follows: The modules of sending, receiving, link management, error control, and flow control in the communication system are extracted, and the verification modules are divided. Compared with the protocol design specifications, the verification goals and sub-goals are extracted. The modules with relatively independent functions are abstracted into separate verification components, and then the interface between low-coupling modules is abstracted into modeling and state description; the state machine model of the sending/receiving controller is established to form a formal model of system design, and the method of model checking is adopted authenticating. For the data transmission protocol and parallel distributed components and other processes, a high-level logic model is established on the HOL4 platform, and the method of theorem proof is used for verification.

其中,步骤三中所述的“进行层次化抽象,基于假设-保证理论,建立环境状态机模型,进行组合验证策略;”其具体实现过程如下:对于多个模块级联耦合成的复杂功能属性进行验证时所产生的状态过多的问题,采用假设保证推理的方法,抽象环境状态机,对整个系统进行分层次的验证。假设保证推理过程如下:Among them, the specific implementation process of the "hierarchical abstraction, based on the hypothesis-guarantee theory, the establishment of the environment state machine model, and the combined verification strategy" described in step three is as follows: For the problem of too many states generated during verification, the hypothesis-guaranteed reasoning method is used to abstract the environment state machine to verify the entire system in layers. Assume that the inference process is guaranteed as follows:

如果两个子系统S1、S2具有属性:(1)S1满足性质P1(2)当S2的环境满足性质P1时,S2满足性质P2。那么子系统S1和S2的组合S1||S2满足性质P2。用这种方法进行验证的优点在于:不用对S1和S2的组合建立状态机进行验证,只需用S2验证P1,然后把假设P1抽象为S2的环境来验证P2。假设P1和S1相比,状态空间少了很多,有利于处理大规模的电路系统。本发明通过以上步骤,给出了一种将模型检验和定理证明两种形式化方法相结合的通信系统形式化验证与性能分析的方法,同时给出较为通用的通信系统形式化验证所对应的流程方法。If two subsystems S1, S2 have properties: (1) S1 satisfies property P1 (2) when the environment of S2 satisfies property P1, S2 satisfies property P2. Then the combination S1||S2 of subsystems S1 and S2 satisfies property P2. The advantage of using this method for verification is that it is not necessary to verify the state machine established by the combination of S1 and S2, but only use S2 to verify P1, and then abstract P1 as the environment of S2 to verify P2. Assuming that P1 has much less state space than S1, it is beneficial to deal with large-scale circuit systems. Through the above steps, the present invention provides a method for formal verification and performance analysis of a communication system that combines two formal methods of model checking and theorem proving, and at the same time provides a method corresponding to a more general formal verification of a communication system process method.

3、优点及功效:本发明的主要优点是:提供一种SOC的通信系统在不同抽象级别下层次化的形式化验证方法,并实现系统并发属性的性能分析。实现较为通用的SOC的通信系统功能正确性和可靠性分析的自动验证技术,便于SOC的设计者能在早期发现系统设计阶段的漏洞或逻辑错误。3. Advantages and effects: The main advantage of the present invention is that it provides a formalized verification method for SOC communication systems at different levels of abstraction, and realizes performance analysis of system concurrency attributes. Realize the automatic verification technology of the correctness and reliability analysis of the communication system function of the more general SOC, so that the designer of the SOC can find the loopholes or logic errors in the system design stage at an early stage.

附图说明 Description of drawings

图1基于模型检验和定理证明相结合的通信系统形式化验证与分析的方法实现整体图Figure 1 The overall diagram of the implementation of the formal verification and analysis method of the communication system based on the combination of model checking and theorem proving

图2为本发明的流程框图Fig. 2 is a flow chart diagram of the present invention

图3为典型SOC系统模型检验验证实施流程模板Figure 3 is a typical SOC system model verification and verification implementation process template

图4为典型SOC系统的高阶逻辑定理证明的流程模板Figure 4 is the process template for proving the high-order logic theorem of a typical SOC system

图5为发送控制模块状态转移图Figure 5 is a state transition diagram of the sending control module

具体实施方式 Detailed ways

为使本发明的特征及优点得到更清楚的了解,以下结合附图,作详细说明如下:图1描述了本发明实现的整体架构。In order to get a clearer understanding of the features and advantages of the present invention, a detailed description is given below in conjunction with the accompanying drawings: FIG. 1 depicts the overall architecture of the present invention.

SOC设计人员对所设计或实现的片上通信系统进行行为、功能正确性验证时,本发明的一种形式化验证方法可以实现系统在不同抽象层次的属性验证并基于所建立的形式化模型,进行性能分析:When SOC designers verify the behavior and function correctness of the designed or implemented on-chip communication system, a formal verification method of the present invention can realize the attribute verification of the system at different levels of abstraction and based on the established formal model, carry out Performance analysis:

见图2,本发明一种用于高可靠通信系统性能检验与分析的形式化验证方法,其具体实施步骤是:See Fig. 2, a kind of formalized verification method that is used for high reliable communication system performance inspection and analysis of the present invention, its specific implementation steps are:

步骤一:分析系统设计,进行验证分解。如图2所示,根据系统功能、实现特点,进行验证任务的分解。Step 1: Analyze the system design and perform verification decomposition. As shown in Figure 2, the verification tasks are decomposed according to system functions and implementation characteristics.

(1)详细分析各关键模块或进程的属性、功能描述及其实现,提取出验证的目标和子目标,(1) Analyze the attributes, function descriptions and realization of each key module or process in detail, extract the verification goals and sub-goals,

(2)进行系统功能模块的划分及其验证属性的抽象,将功能较为独立的模块抽象为单独验证组件,再将低耦合模块间接口进行抽象建模及状态描述,建立抽象状态机。(2) Carry out the division of system function modules and the abstraction of verification attributes, abstract the modules with relatively independent functions into separate verification components, and then carry out abstract modeling and state description of the interface between low-coupling modules, and establish an abstract state machine.

(3)对数据传输协议及并行的分布式组件等过程建立高阶逻辑模型,采用定理证明的方法进行验证,(3) Establish high-level logic models for processes such as data transmission protocols and parallel distributed components, and use the method of theorem proof to verify,

(4)对于功能较为独立的组件和低耦合模块间接口,本项目拟采用模型检验的方法进行验证。(4) For components with relatively independent functions and interfaces between low-coupling modules, this project intends to use the method of model checking for verification.

步骤二:对模块之间的接口属性、I/O口及物理层功能实现,用模型检验的方法进行形式化验证,基于符号模型检验平台,分层次地用模型检验方法验证模块之间的接口属性、I/O口及物理层功能实现。模型检验的过程包括建模、性质的描述和自动验证三个过程,如图3所示,对验证对象模块的系统实现进行抽象和形式化表达,使用5元组的Kripke结构表示系统的有限状态空间;用计算树时态逻辑(CTL)描述系统期望的属性,这个过程需要描述准确、避免二义性。利用符号模型检验工具SMV(Symbolic Modeling Verifier)自动穷举证明期望的属性是否在状态空间上成立,如果成立,则说明设计实现满足期望的属性。如果不成立,则输出反例,可以再根据仿真测试,定位错误。这可以是一个验证→报错→错误信息分析和模型修改→再验证的循环过程。例如图5中,发送器在重置状态下处于等待状态,(1)如果来自主机系统的Tick_IN(请求发送时间码)信号为高,并且已经发送了ESC信号(即ESC_Gone_internal信号为高),则发送器会到达锁定时间码状态(在此状态下Provide_TimeCode置为1,传送给发送寄存器子模块),然后无条件的到达发送时间码状态.(2)如果Send_FCT(来自控制模块)为1并且EightMore=1(说明接收器有多于8个的空间来存储数据)并且ESC_Gone_internal=0(如果ESC_Gone_internal=1,则ESC+FCT为一个空字符),那么发送器会到达锁定流控制标志状态(在此状态下Provide_FCT置为1,传送给发送寄存器子模块),然后无条件的到达发送常字符状态。(3)如果Send_NULL(来自控制模块)=1并且ESC_Gone_internal=1,那么发送器会到达锁定流控制标志状态(在此状态下Provide_FCT置为1,传送给发送寄存器子模块)。(4)如果Send_All(来自控制模块)=1并且NoCredit=0,那么发送器会到达锁定流控制标志状态,(在此状态下Provide_ESC置为1,传送给发送寄存器子模块)。(5)如果Send_EEP=1,那么发送器会到达锁定错误包结束标志状态,(在此状态下Provide_EEP置为1,传送给发送寄存器子模块)。(6)如果Send_EOP=1,那么发送器会到达锁定正确包结束标志状态,(在此状态下Provide_EOP置为1,传送给发送寄存器子模块)。(7)如果Send_NChar_Flag=1,那么发送器会到达锁定常字符状态,(在此状态下Provide_NChar置为1,传送给发送寄存器子模块)。Step 2: Realize the interface properties, I/O ports, and physical layer functions between modules, and use the model inspection method to perform formal verification. Based on the symbolic model inspection platform, use the model inspection method to verify the interfaces between modules in layers Realization of attributes, I/O ports and physical layer functions. The process of model verification includes three processes of modeling, property description and automatic verification. As shown in Figure 3, the system realization of the verification object module is abstracted and formally expressed, and the finite state of the system is represented by the Kripke structure of 5-tuple Space; use computational tree temporal logic (CTL) to describe the expected attributes of the system. This process requires accurate description and avoids ambiguity. Use the symbolic model verification tool SMV (Symbolic Modeling Verifier) to automatically exhaustively prove whether the expected properties are established in the state space, and if it is established, it means that the design and implementation meet the expected properties. If not, output a counterexample, and then locate the error based on the simulation test. This can be a cyclical process of verification→error reporting→error message analysis and model modification→revalidation. For example, in Figure 5, the transmitter is in the waiting state in the reset state, (1) If the Tick_IN (request to send timecode) signal from the host system is high, and the ESC signal has been sent (that is, the ESC_Gone_internal signal is high), then The transmitter will reach the locked time code state (in this state, Provide_TimeCode is set to 1 and sent to the send register sub-module), and then unconditionally arrives at the send time code state. (2) If Send_FCT (from the control module) is 1 and EightMore= 1 (indicating that the receiver has more than 8 spaces to store data) and ESC_Gone_internal=0 (if ESC_Gone_internal=1, then ESC+FCT is a null character), then the transmitter will reach the lock flow control flag state (in this state Set Provide_FCT to 1 and send it to the sending register submodule), and then unconditionally reach the state of sending constant characters. (3) If Send_NULL (from the control module) = 1 and ESC_Gone_internal = 1, then the transmitter will reach the lock flow control flag state (in this state, Provide_FCT is set to 1 and sent to the transmit register submodule). (4) If Send_All (from the control module) = 1 and NoCredit = 0, then the transmitter will reach the lock flow control flag state (in this state, Provide_ESC is set to 1 and sent to the send register sub-module). (5) If Send_EEP=1, then the transmitter will reach the state of locking the end of the error packet (in this state, Provide_EEP is set to 1 and sent to the sending register sub-module). (6) If Send_EOP=1, then the transmitter will reach the state of locking the correct packet end flag (in this state, Provide_EOP is set to 1 and sent to the sending register sub-module). (7) If Send_NChar_Flag=1, then the transmitter will reach the locked constant character state (in this state, Provide_NChar is set to 1 and sent to the send register submodule).

图中一些主要输入变量的含义:The meaning of some of the main input variables in the figure:

1协议规范必须满足互斥性,因为存在优先级的问题,所以时间码,常字符和流控制标志不可能同时发送。1 The protocol specification must meet mutual exclusion, because there is a problem of priority, so it is impossible to send time code, constant character and flow control flag at the same time.

Property 1:assert G~(!TX_Reset&Provide_TimeCode&Provide_NChar&Provide_FCT);Property 1: assert G~(!TX_Reset&Provide_TimeCode&Provide_NChar&Provide_FCT);

2发送的字符之间存在有优先级的关系,所以必须对优先级的问题进行验证,性质2表示当同时要发送时间码和FCT时,优先发送时间码。2 There is a priority relationship between the characters sent, so the issue of priority must be verified. Property 2 means that when the time code and FCT are to be sent at the same time, the time code is sent first.

Property2:SPEC AG(!TX_Reset&TX_ClockEnable&(Tick_IN&ESC_Gone_internal)&(Send_FCT&EightMore&!ESC_Gone_internal)->AF Provide_TimeCode);Property2:SPEC AG(!TX_Reset&TX_ClockEnable&(Tick_IN&ESC_Gone_internal)&(Send_FCT&EightMore&!ESC_Gone_internal)->AF Provide_TimeCode);

3根据协议规范,要验证的性质主要涉及状态转移中的各个状态在条件满足后是否能够进入相应的状态以及在相应状态下输出信号是否符合协议规范要求,根据需求一共提取出7条分支时态逻辑公式性质。3 According to the protocol specification, the nature to be verified mainly involves whether each state in the state transition can enter the corresponding state after the conditions are met and whether the output signal in the corresponding state meets the requirements of the protocol specification. A total of 7 branch tenses are extracted according to the requirements The nature of logical formulas.

Property3:SPEC AG(AG Send_NChar_Flag->AF present_state=1&AF present_state=2&AF Provide_NChar&AF NCharOnTrip&AF DCReg_Read);Property3:SPEC AG(AG Send_NChar_Flag->AF present_state=1&AF present_state=2&AF Provide_NChar&AF NCharOnTrip&AF DCReg_Read);

Property4:SPEC AG(AG ESC_Gone_internal->AF present_state=3&AF present_state=4&AF Provide_TimeCode);Property4:SPEC AG(AG ESC_Gone_internal->AF present_state=3&AF present_state=4&AF Provide_TimeCode);

Property5:SPEC AG(AG Send_FCT->AF present_state=5&AF present_state=9&AFpresent_state=10&AF Provide_FCT);Property5:SPEC AG(AG Send_FCT->AF present_state=5&AF present_state=9&AFpresent_state=10&AF Provide_FCT);

Property6:SPEC AG (AG Send_EOP->AF present_state=6&AF present_state=9&AFpresent_state=10&AF Provide_EOP&AF DCReg_Read&AF NCharOnTrip);Property6:SPEC AG (AG Send_EOP->AF present_state=6&AF present_state=9&AFpresent_state=10&AF Provide_EOP&AF DCReg_Read&AF NCharOnTrip);

Property7:SPEC AG(AG Send_EEP->AF present_state=7&AF present_state=9&AFpresent_state=10&AF Provide_EOP&AF DCReg_Read&AF NCharOnTrip);Property7:SPEC AG(AG Send_EEP->AF present_state=7&AF present_state=9&AFpresent_state=10&AF Provide_EOP&AF DCReg_Read&AF NCharOnTrip);

Property8:SPEC AG (AG Send_NULL->AF_present_state=8&AF present_state=9&AFpresent_state=10&AF Provide_ESC);Property8: SPEC AG (AG Send_NULL->AF_present_state=8&AF present_state=9&AFpresent_state=10&AF Provide_ESC);

以上部分的公式Property3到Property8主要验证当发送请求进入发送控制模块后,控制模块是否能否进入相应的状态并在该状态下输出对应的发送控制信号,以及进入这些状态后是否能够再回到重置复位的初始状态。The formulas Property3 to Property8 in the above part mainly verify whether the control module can enter the corresponding state and output the corresponding sending control signal in this state after the sending request enters the sending control module, and whether it can return to the reset state after entering these states. Reset the initial state.

Property9:SPEC AG(AG(!ESC_Gone_internal&Send_FCT&EightMore&present_state=5)->AF EightMoreAcknowledge);Property9:SPEC AG(AG(!ESC_Gone_internal&Send_FCT&EightMore&present_state=5)->AF EightMoreAcknowledge);

分支时态逻辑公式Property9表达了主机A的接收缓冲还有空间接收数据,请求发送一个流控制符FCT给发送端的主机B,这时A端主机的发送控制模块就会产生一个可以接收多余八个常字符的确认控制码送给发送器的寄存器,最终给主机发送一个FCT标识符。The branch temporal logic formula Property9 expresses that the receiving buffer of host A still has space to receive data, and requests to send a flow control character FCT to host B at the sending end, and the sending control module of host A at the end of A will generate a flow control character that can receive more than eight The confirmation control code of the constant character is sent to the register of the transmitter, and finally sends an FCT identifier to the host.

步骤三:对各个模块的局部属性分别验证后,要对模块间组合的全局属性进行检验。对于多个模块级联耦合成的复杂功能属性进行验证时,会出现状态过多等问题,采用基于假设保证推理方法,进行抽象,建立环境状态机,并使验证对象与环境状态机进行通信。例如,将发送/接收器缓存抽象成数据字符的内存接口等。在连接状态下,发送器输出的数据和滤波信号应该符合DS编码。如果数据信号连续两个比特的值相同,滤波信号的状态在传输后一个比特时改变,否则滤波信号在这两个比特时间里保持不变。这个性质成立的前提是流量控制信号Provide_FCT为真,这是由控制器来控制的,因此,增加一个有关环境的假设P1,在连接状态,链路保活和流量控制标签必须有一个为真,这样才能保证在此状态下Provide_FCT为真。通过验证,控制器N满足性质P1,然后把发送器模块嵌入在满足上述假设的环境中,就可以用模型验证的方法来检测该性质的正确性。并避免状态过多的问题。Step 3: After verifying the local attributes of each module separately, it is necessary to check the global attributes of the combination of modules. When verifying the complex functional attributes formed by cascade coupling of multiple modules, there will be problems such as too many states. The reasoning method based on hypothesis guarantee is used to abstract, establish the environment state machine, and make the verification object communicate with the environment state machine. For example, the sender/receiver buffer is abstracted into a memory interface for data characters, etc. In the connected state, the data and filtered signals output by the transmitter should conform to the DS code. If the value of two consecutive bits of the data signal is the same, the state of the filtered signal changes when the next bit is transmitted, otherwise the filtered signal remains unchanged during the two bit times. The premise of this property is that the flow control signal Provide_FCT is true, which is controlled by the controller. Therefore, an assumption about the environment P1 is added. In the connection state, one of the link keep-alive and flow control labels must be true. Only in this way can Provide_FCT be true in this state. Through verification, the controller N satisfies the property P1, and then the transmitter module is embedded in the environment satisfying the above assumptions, and the correctness of the property can be checked by the method of model verification. And avoid the problem of too much state.

步骤四:定理证明是基于形式逻辑系统的公理推导出系统所具有的性质。它可以依赖结构化归纳技术在无限域上进行证明,可以直接处理无限的状态空间,这样就可以极大减少一个模型检查器需要分析的状态数。高阶逻辑定理证明器HOL4具有表达能力强、类型多态性特点并且已经有相当的嵌入ML函数的基本定理库,利用HOL4可对上述第一步中所划分模块的属性进行验证,其基本过程如图4所示,待验证的形式化模型以目标形式输入HOL中,该模型在HOL中可交互式地进行子目标的任务划分,HOL4的证明检查系统会自动检查每个子任务的证明过程的正确性,在此过程我们将需要用到的新的定理和描述都要先建立形式化模型并添加到HOL4中,被添进去的定理是可重用的,这样很方便与验证工具中定理的可重用性和模块化的形式化验证。本项目拟对离散随机变量的方差等统计属性进行形式化描述,先建立形式化模型并添加到HOL4中;对后续随机属性定量描述和性能分析所需要的方差属性完成证明,作为定理加入HOL4中。Step 4: Theorem proving is to deduce the properties of the system based on the axioms of the formal logic system. It can rely on structured induction techniques to prove on infinite fields, and can directly deal with infinite state spaces, which can greatly reduce the number of states that a model checker needs to analyze. The high-order logic theorem prover HOL4 has the characteristics of strong expression ability and type polymorphism, and already has a considerable basic theorem library embedded in ML functions. Using HOL4 can verify the attributes of the modules divided in the first step above. The basic process As shown in Figure 4, the formalized model to be verified is input into HOL in the form of a goal, and the model can be divided into sub-goals interactively in HOL. The proof checking system of HOL4 will automatically check the proof process of each sub-task. Correctness. In this process, the new theorems and descriptions we need to use must first be established as formal models and added to HOL4. The added theorems are reusable, which is very convenient. Formal verification for reusability and modularity. This project intends to formally describe the variance and other statistical properties of discrete random variables, first establish a formal model and add it to HOL4; complete the proof of the variance properties required for the subsequent quantitative description of random properties and performance analysis, and add it to HOL4 as a theorem .

在HOL4中建立传输协议逻辑模型,并进行推理验证:Establish the logical model of the transmission protocol in HOL4, and conduct reasoning verification:

1)在HOL4中为传输数据信息、控制信息、传输时间、包个数分别定义数据类型;1) In HOL4, define data types for transmission data information, control information, transmission time, and number of packets;

2)分别为信道及通信双方的发送、接收进程建立高阶逻辑谓词(函数)表达式;2) Establish high-order logical predicate (function) expressions for the sending and receiving processes of the channel and the communication parties respectively;

步骤五:在HOL4中形式化表达协议初始条件和约束条件,并与第四步中的谓词函数表示成析取表达式。传输协议是通过用发送数据包到收到确认信息的时间是否在预期的范围内,判断数据是否正确传输,并采用出错加重传机制进行纠错。若出错的概率是p,信道重传的次数是指数级分布,则数据传输时延可表示为:Step 5: Formally express the initial conditions and constraints of the protocol in HOL4, and express them as disjunctive expressions with the predicate function in the fourth step. The transmission protocol judges whether the data is transmitted correctly by using whether the time from sending the data packet to receiving the confirmation message is within the expected range, and uses the error plus retransmission mechanism for error correction. If the probability of error is p, and the number of channel retransmissions is exponentially distributed, the data transmission delay can be expressed as:

D=tr+dtran+dprog+(tr+ttimer)(G(1p)-1)D=t r +d tran +d prog +(t r +t timer )(G (1p) -1)

tr:重新发送数据时间,t r : resend data time,

ttimer:发送方从数据包发送完到超时的时间,t timer : the time from when the sender finishes sending the data packet to the timeout,

dtran:数据包发送所需时间d tran : the time required for data packet transmission

dprog:信号在节点间传播时延d prog : signal propagation delay between nodes

若上式中Gx服从高斯分布随机变量成功发送的概率为x.If G x in the above formula obeys the Gaussian distribution random variable, the probability of successful transmission is x.

则传输一个数据包的时延均值可表示为:Then the average delay of transmitting a data packet can be expressed as:

((tr+ttimer)p/(1-p))+tr+dtran+dprog:利用HOL4中随机变量及其统计属性定理对协议时延进行表达和函数提取,并实现性能分析。((t r +t timer )p/(1-p))+t r +d tran +d prog : Use the random variable and its statistical attribute theorem in HOL4 to express and extract the protocol delay, and realize the performance analysis .

Claims (1)

1.一种用于高可靠通信系统验证与性能分析的形式化方法,其特征在于:该方法具体步骤如下:1. A formalized method for verification and performance analysis of a highly reliable communication system, characterized in that: the specific steps of the method are as follows: 步骤一:分析通信系统SOC功能实现结构,并提取关键的功能模块,进行验证模块分解、建模,将高阶逻辑定理证明和符号模型检验相结合,进行组合形式化验证;Step 1: Analyze the SOC function realization structure of the communication system, extract key functional modules, decompose and model the verification modules, combine high-order logic theorem proofs with symbolic model verification, and perform combined formal verification; 步骤二:对模块之间的接口属性、I/O口及物理层功能实现,用模型检验的方法进行形式化验证,基于符号化模型检验平台,分层次地用模型检验方法验证模块之间的接口属性、I/O口及物理层功能实现;Step 2: Realize the interface attributes, I/O ports and physical layer functions between modules, and use the method of model inspection to perform formal verification. Based on the symbolic model inspection platform, use the model inspection method to verify the relationship between modules hierarchically Realization of interface attributes, I/O ports and physical layer functions; 步骤三:针对复杂功能模块可能导致状态过多的问题,进行层次化抽象,基于假设-保证理论,建立环境状态机模型,进行组合验证策略;Step 3: In view of the problem that complex function modules may cause too many states, perform hierarchical abstraction, based on the assumption-guarantee theory, establish an environmental state machine model, and carry out combined verification strategies; 步骤四:用定理证明的方法对数据通信协议、并行应用进程进行逻辑、功能实现的验证;基于高阶逻辑对片上系统时态属性和随机行为进行形式化表达;Step 4: Use the method of theorem proof to verify the logic and function realization of the data communication protocol and parallel application process; formally express the temporal properties and random behavior of the system on chip based on high-order logic; 步骤五:在系统的逻辑分析表达式分析中,提取系统进程统计性质的数学逻辑形式表达函数,实现验证对象过程的动态量化性能分析;Step 5: In the logical analysis expression analysis of the system, extract the mathematical logic form expression function of the statistical nature of the system process, and realize the dynamic quantitative performance analysis of the verification object process; 其中,步骤一中所述的“提取关键的功能模块,进行验证模块分解、建模,将高阶逻辑定理证明和符号模型检查相结合,进行组合形式化验证;”其具体实现过程如下:对通信系统中的发送、接收、链路管理、差错控制、流量控制模块进行提取,进行验证模块的划分,对照协议设计规范,提取出验证的目标和子目标;功能较为独立的模块抽象为单独验证组件,再将低耦合模块间接口进行抽象建模及状态描述;建立发送/接收控制器的状态机模型,形成系统设计的形式化模型,采用模型检验的方法进行验证;对数据传输协议及并行的分布式组件过程在HOL4平台上,建立高阶逻辑模型,采用定理证明的方法进行验证;Among them, in step 1, "extract key functional modules, perform verification module decomposition and modeling, combine high-order logic theorem proof and symbolic model inspection, and perform combined formal verification;" the specific implementation process is as follows: Extract the sending, receiving, link management, error control, and flow control modules in the communication system, divide the verification modules, and extract the verification goals and sub-goals according to the protocol design specifications; the modules with relatively independent functions are abstracted into separate verification components , and then carry out abstract modeling and state description of the interface between low-coupling modules; establish the state machine model of the sending/receiving controller, form a formal model of system design, and use the method of model checking to verify; the data transmission protocol and parallel The distributed component process is built on the HOL4 platform to establish a high-level logic model, which is verified by the method of theorem proof; 其中,步骤三中所述的“进行层次化抽象,基于假设-保证理论,建立环境状态机模型,进行组合验证策略;”其具体实现过程如下:对于多个模块级联耦合成的复杂功能属性进行验证时所产生的状态过多的问题,采用假设保证推理的方法,抽象环境状态机,对整个系统进行分层次的验证;假设保证推理过程如下:如果两个子系统S1、S2具有属性:(1)S1满足性质P1;(2)当S2的环境满足性质P1时,S2满足性质P2;那么子系统S1和S2的组合S1||S2满足性质P2;用这种方法进行验证的优点在于:不用对S1和S2的组合建立状态机进行验证,只需用S2验证P1,然后把假设P1抽象为S2的环境来验证P2;假设P1和S1相比,状态空间少了很多,有利于处理大规模的电路系统。Among them, the specific implementation process of the "hierarchical abstraction, based on the hypothesis-guarantee theory, the establishment of the environment state machine model, and the combined verification strategy" described in step three is as follows: For the problem of too many states generated during verification, adopt the method of hypothesis-guaranteed reasoning, abstract the environment state machine, and verify the whole system in layers; the process of hypothesis-guaranteed reasoning is as follows: If two subsystems S1 and S2 have attributes: ( 1) S1 satisfies property P1; (2) when the environment of S2 satisfies property P1, S2 satisfies property P2; then the combination of subsystems S1 and S2 S1||S2 satisfies property P2; the advantages of using this method for verification are: It is not necessary to verify the combination of S1 and S2 to establish a state machine, just use S2 to verify P1, and then abstract the assumption that P1 is the environment of S2 to verify P2; assuming that P1 has a much smaller state space than S1, it is beneficial to deal with large Scale circuit system.
CN201210533633.XA 2012-12-11 2012-12-11 A Formal Method for Verification and Performance Analysis of Highly Reliable Communication Systems Expired - Fee Related CN103036739B (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN201210533633.XA CN103036739B (en) 2012-12-11 2012-12-11 A Formal Method for Verification and Performance Analysis of Highly Reliable Communication Systems
AU2013263777A AU2013263777A1 (en) 2012-12-11 2013-11-28 A formal method of verification and performance analysis for highly reliable communication system
AU2018201721A AU2018201721A1 (en) 2012-12-11 2018-03-09 A formal method of verification and performance analysis for highly reliable communication system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210533633.XA CN103036739B (en) 2012-12-11 2012-12-11 A Formal Method for Verification and Performance Analysis of Highly Reliable Communication Systems

Publications (2)

Publication Number Publication Date
CN103036739A CN103036739A (en) 2013-04-10
CN103036739B true CN103036739B (en) 2015-06-17

Family

ID=48023249

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210533633.XA Expired - Fee Related CN103036739B (en) 2012-12-11 2012-12-11 A Formal Method for Verification and Performance Analysis of Highly Reliable Communication Systems

Country Status (2)

Country Link
CN (1) CN103036739B (en)
AU (2) AU2013263777A1 (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103281160B (en) * 2013-05-31 2016-01-20 南京大学 A kind of controller local area network frame transmission verification method
CN106126940B (en) * 2016-06-28 2020-01-03 云南大学 Formalized verification method for stability of robot fractional order PID controller
CN106802863A (en) * 2016-12-16 2017-06-06 华东师范大学 Interprocess communication security formalization analysis checking system based on micro-kernel prototype
CN108563613A (en) * 2018-04-26 2018-09-21 山东科技大学 A kind of Mathematical Modeling Methods using computer hyperspace
CN108763925A (en) * 2018-05-16 2018-11-06 首都师范大学 A kind of sensor attack detection method measured based on fusion interval and history
CN109918054B (en) * 2019-01-24 2022-07-26 华东师范大学 A Design Method of Service Bus Microkernel Framework Based on Formal Specification
CN111211945B (en) * 2020-01-09 2024-08-06 全球能源互联网研究院有限公司 Method and system for verifying security communication protocol of embedded device considering information aging
CN111240302B (en) * 2020-01-14 2022-03-08 吉利汽车研究院(宁波)有限公司 Signal verification method and device, electronic equipment and storage medium
CN111858338A (en) * 2020-07-21 2020-10-30 卡斯柯信号(北京)有限公司 Test case design method and device
CN115460297B (en) * 2022-09-06 2023-06-30 中国科学技术大学 An Automatic Formal Verification Method for Network Security Protocol

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101404045A (en) * 2007-07-02 2009-04-08 韵律设计系统公司 Method, system, and computer program product for generating automated assumption for compositional verification
US7653520B2 (en) * 2002-07-19 2010-01-26 Sri International Method for combining decision procedures with satisfiability solvers
CN102065083A (en) * 2010-12-03 2011-05-18 中国科学院软件研究所 Formal verification method for security protocol
CN102136047A (en) * 2011-02-25 2011-07-27 天津大学 Software trustworthiness engineering method based on formalized and unified software model

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8156559B2 (en) * 2006-11-30 2012-04-10 Microsoft Corporation Systematic approach to uncover GUI logic flaws

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7653520B2 (en) * 2002-07-19 2010-01-26 Sri International Method for combining decision procedures with satisfiability solvers
CN101404045A (en) * 2007-07-02 2009-04-08 韵律设计系统公司 Method, system, and computer program product for generating automated assumption for compositional verification
CN102065083A (en) * 2010-12-03 2011-05-18 中国科学院软件研究所 Formal verification method for security protocol
CN102136047A (en) * 2011-02-25 2011-07-27 天津大学 Software trustworthiness engineering method based on formalized and unified software model

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Hybrid verification integrating HOL theorem proving with MDG model checking;Tahar, S;《Microelectronics Journal》;20061130;第37卷(第11期);摘要、正文第1页第1栏-第2页第2栏、第4页第2栏-第8页第1栏 *
Model checking PSL using HOL and SMV;Tuerk, Thomas;《2nd International Haifia Verification Conference》;20061026;全文 *

Also Published As

Publication number Publication date
AU2013263777A1 (en) 2014-06-26
CN103036739A (en) 2013-04-10
AU2018201721A1 (en) 2018-04-05

Similar Documents

Publication Publication Date Title
CN103036739B (en) A Formal Method for Verification and Performance Analysis of Highly Reliable Communication Systems
CN104657610B (en) A kind of information physical emerging system sequential logic robustness appraisal procedure
Azadmanesh et al. New hybrid fault models for asynchronous approximate agreement
CN103885864B (en) A kind of verification method of the information physical system based on controller local area network
CN103699762B (en) A kind of CPS attribute verification method based on statistical model detection
Wijayasekara et al. Equivalence verification for NULL Convention Logic (NCL) circuits
Romijn A timed verification of the IEEE 1394 leader election protocol
Manohar et al. Timed signalling processes
CN113542285B (en) Multi-stage automatic formal verification method for Terdermint consensus protocol
Chen et al. Performance analysis and verification of safety communication protocol in train control system
CN107291435B (en) A Quantitative Analysis Method of Hybrid AADL Model in Uncertain Environment
CN107579871A (en) Method and System for Generating Distributed Test Script Based on Model Checking
Zhou et al. A formal verification method for the SOPC software
CN108052768A (en) A kind of concurrent real-time system reliability estimation method based on quantitative verification method
KR101125365B1 (en) Integrated design method of communication protocols with sdl-opnet co-simmulation technique
CN114297063A (en) Method and system for automated formal modeling and verification of source code
Zhai et al. HOME: Heard-Of based Formal Modeling and Verification Environment for Consensus Protocols
Oddos et al. Synthorus: Highly efficient automatic synthesis from psl to hdl
Renya et al. AADL-based reliability modeling method of cyber-physical systems
Panaro Transaction-Level Ethernet PHY modelling in SystemC
Chen et al. An enhanced flow analysis technique for detecting unreachability faults in concurrent systems
Hany et al. Approach for a unified functional verification flow
Tarrillo et al. Designing and analyzing a SpaceWire router IP for soft errors detection
Liu Multi-clocked ASIC exploration of verification strategy
Li et al. A framework for off-line conformance testing of timed connectors

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20150617