A verification method and plug-in for Ptolemy synchronous response model translation

By translating the Ptolemy synchronous response model into NuSMV model and verifying it using the NuSMV model detection tool, the problem of lack of formal verification in the verification of Ptolemy synchronous response model is solved, and support for complex models and hierarchical roles is achieved, reducing verification costs and Improved verification efficiency.

CN113987983BActive Publication Date: 2024-11-08CAPITAL NORMAL UNIVERSITY
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111360217.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-17
Publication Date
2024-11-08
Estimated Expiration
2041-11-17

AI Technical Summary

Technical Problem

The Ptolemy synchronous response model lacks formal verification capabilities during the verification process. The existing translation methods can only handle FSM roles, cannot handle complex models and hierarchical roles, and cannot handle the interaction of roles in the model.

Method used

By translating the Ptolemy synchronous response model into a NuSMV model, and using the NuSMV model detection tool to verify the CTL formula, generate a verification interface, add the NuSMV model detection tool call option, realize the nature verification of the Ptolemy synchronous response model, and support hierarchical role translation Interact with multiple characters.

Benefits of technology

Automatic formal verification of Ptolemy's synchronous response model is realized, which reduces work costs, avoids state space explosions, and supports verification of properties such as security, accessibility and deadlock.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113987983B_ABST
    Figure CN113987983B_ABST
Patent Text Reader

Abstract

The invention discloses a verification method and a plug-in for translating a Ptolemy synchronous response model. The invention provides a verification method for translating a Ptolemy synchronous response model. The method adopts an automated translation method to translate various roles and then compose a NuSMV model, thereby retaining the hierarchical characteristics of the Ptolemy model and avoiding state space explosion. The method translates by querying a unified mapping table and using fixed translation rules, thereby unifying the translated NuSMV model and avoiding problems other than the model itself that may occur during the manual translation process. In the invention, the user does not even need to master the specific use method of the model detection tool NuSMV, thereby greatly reducing the work cost of formal verification. The method can perform black box analysis of security and reachability, thereby realizing verification of the security, reachability, deadlock and other properties of the Ptolemy synchronous response model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer simulation and modeling, and in particular to a verification method and a plug-in for translating a Ptolemy synchronous response model. Background Art

[0002] Ptolemy is an open source, role-oriented integrated environment with powerful modeling and simulation capabilities. Developers often build models under Ptolemy before conducting actual equipment development to verify the feasibility of the solution and save R&D costs.

[0003] Modeling is a complex and error-prone process. An incorrect model will lead to an incorrect implementation, and it is very costly to correct the error after the system is running. In Ptolemy, multiple domains are divided, such as synchronous response domain, discrete event domain, data flow domain, continuous time domain, etc. Different models can be built in different domains to reduce the probability of incorrect model implementation. However, even so, the existing technology still has a high probability of model error, so it is necessary to verify the built model.

[0004] However, Ptolemy does not have the ability to formally verify the model. There is a lot of practical data to prove that formal verification of the model is crucial. In the prior art, Edward Lee proposed a method in his paper that can translate the FSM role in the Ptolemy synchronous response model into the NuSMV model, but this method has the following defects:

[0005] 1. The only role that can be translated is FSM Actor, which is far from meeting the verification requirements; 2. Hierarchical roles are often used frequently for highly complex models, but this method does not propose a translation method for hierarchical roles; 3. This method does not provide a corresponding processing mode for the interaction between various roles in the model. Summary of the invention

[0006] The present invention provides a verification method and plug-in for Ptolemy synchronous response model translation, which are used to overcome at least one technical problem existing in the prior art.

[0007] In a first aspect, the present invention provides a verification method for Ptolemy synchronous response model translation, comprising:

[0008] Get the Ptolemy synchronous response model;

[0009] Translating the Ptolemy synchronous response model into the NuSMV model;

[0010] The Ptolemy synchronous response model is composed of multiple roles, and the NuSMV model is composed of multiple functional modules, each of which corresponds to a role in the Ptolemy synchronous response model;

[0011] Analyze the dangerous situations and characteristic information in the NuSMV model and abstract them into CTL formulas;

[0012] Generate Ptolemy synchronous response model verification interface;

[0013] Adding a NuSMV model detection tool call option in the Ptolemy synchronous response model verification interface;

[0014] In the Ptolemy synchronous response model verification interface, select the NuSMV model detection tool call option to call the NuSMV model detection tool to verify the CTL formula and complete the property verification of the Ptolemy synchronous response model.

[0015] Optionally, obtaining the Ptolemy synchronization response model includes:

[0016] Get an XML file representing a Ptolemy synchronous response model from the Ptolemy integration environment;

[0017] Read the XML file to obtain a Ptolemy synchronous response model;

[0018] The Ptolemy synchronous response model is constructed by selecting SR Director in the Ptolemy integrated environment.

[0019] Optionally, translating the Ptolemy synchronous response model into a NuSMV model includes:

[0020] Parse the Ptolemy synchronous response model to obtain the role information of each role;

[0021] For each role in the Ptolemy synchronous response model, according to the role information of the role, the role is translated into a corresponding module in NuSMV to obtain the module of each role in NuSMV;

[0022] The various modules are combined to form a NuSMV model.

[0023] Optionally, after obtaining the role information of each role, the Ptolemy synchronous response model translation verification method further includes:

[0024] The role information of each role is stored in a predefined role container.

[0025] Optionally, for each role in the Ptolemy synchronous response model, according to the role information of the role, translating the role into a corresponding module in NuSMV, and obtaining the module of each role in NuSMV includes:

[0026] Query the preset mapping rule library to determine the mapping rules corresponding to each role function type;

[0027] Traverse each role container, translate the role corresponding to the same function type into a NuSMV module according to the mapping rule corresponding to the same function type, and obtain the module of each role in NuSMV.

[0028] Optionally, adding a NuSMV model detection tool call option in the Ptolemy synchronous response model verification interface includes:

[0029] In the Ptolemy synchronous response model verification interface, a verification tool component, a verification method component, a verification property component and a verification result component are added to verify the NuSMV model respectively.

[0030] Optionally, in the Ptolemy synchronous response model verification interface, selecting the NuSMV model detection tool call option to call the NuSMV model detection tool to verify the CTL formula, and completing the property verification of the Ptolemy synchronous response model includes:

[0031] In the Ptolemy synchronous response model verification interface, select the verification tool component, verification method component, verification property component and verification result component in turn to call the application interface of the NuSMV model detection tool to verify the CTL formula and complete the property verification of the Ptolemy synchronous response model.

[0032] Optionally, in the Ptolemy synchronous response model verification interface, select the verification tool component, the verification method component, the verification property component, and the verification result component in sequence to call the application interface of the NuSMV model detection tool to verify the CTL formula, and complete the property verification of the Ptolemy synchronous response model, including:

[0033] After selecting the verification tool component, a NuSMV detection tool for detecting the NuSMV model is generated;

[0034] Select the verification method component, generate an smv file that can be formally verified in the NuSMV detection tool, and generate a temporary smv file that can be formally verified in the NuSMV detection tool;

[0035] Selecting the verification property component to call the NuSMV detection tool to read the temporary smv file and perform formal verification of the smv file to verify the CTL formula;

[0036] A verification result component is selected to return an error case generated when the CTL formula does not meet the verification condition, thereby completing the property verification of the Ptolemy synchronous response model.

[0037] Among them, multiple roles are divided into result display roles, functional roles and hierarchical roles according to their function types.

[0038] In a second aspect, the present invention provides a verification plug-in for Ptolemy synchronous response model translation, wherein the plug-in stores a computer program, and when the computer program is executed by a processor, the steps of the verification method for Ptolemy synchronous response model translation described in any one of the first aspects are implemented.

[0039] The innovative features of the embodiments of the present invention include:

[0040] 1. A verification method for translating a Ptolemy synchronous response model of the present invention translates the Ptolemy synchronous response model into a NuSMV model. The NuSMV detection tool can be used to simulate and analyze the NuSMV model. At the same time, a black box analysis of security and accessibility can be performed. This is one of the innovative points of the embodiments of the present invention.

[0041] 2. The verification method of translating the Ptolemy synchronous response model of the present invention, by translating each role and then forming a NuSMV model, retains the hierarchical characteristics of the Ptolemy model and avoids the state space explosion, which is one of the innovations of the embodiment of the present invention.

[0042] 3. The verification method of translating the Ptolemy synchronous response model of the present invention uses an automated translation method to translate the Ptolemy synchronous response model into a NuSMV model. The user does not even need to master the specific usage of the model detection tool NuSMV, which greatly reduces the work cost of formal verification. This is one of the innovative points of the embodiment of the present invention.

[0043] 4. A verification method for translating a Ptolemy synchronous response model of the present invention queries a unified mapping table for translation, and uses fixed translation rules to unify the translated NuSMV model, thereby avoiding problems other than the model itself that may arise during the manual translation process. This is one of the innovative features of the embodiments of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0045] Figure 1 A schematic diagram of a processing flow of a verification method for translating a Ptolemy synchronous response model provided by an embodiment of the present invention;

[0046] Figure 2 A schematic diagram of the processing flow in step S1 provided in an embodiment of the present invention;

[0047] Figure 3 A schematic diagram of the processing flow of the neutron step S3 provided in an embodiment of the present invention;

[0048] Figure 4 A schematic diagram of the processing flow of step S32 provided in an embodiment of the present invention;

[0049] Figure 5 A schematic diagram of the structure of each program module in the verification method for implementing the Ptolemy synchronous response model translation provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0050] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0051] It should be noted that the terms "including" and "having" and any variations thereof in the embodiments of the present invention and the accompanying drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.

[0052] The embodiment of the present invention discloses a verification method and a plug-in for translating a Ptolemy synchronous response model, which are described in detail below.

[0053] The present invention proposes a verification method for translating the Ptolemy synchronous response model, referring to Figure 1 , Figure 1A process flow diagram of a verification method for translating the Ptolemy synchronous response model. Figure 1 As shown, a verification method for Ptolemy synchronous response model translation includes the following steps:

[0054] S1: Obtain the Ptolemy synchronous response model;

[0055] S2: Translation of the Ptolemy synchronous response model into the NuSMV model;

[0056] The Ptolemy synchronous response model is composed of multiple roles, and the NuSMV model is composed of multiple functional modules, each of which corresponds to a role in the Ptolemy synchronous response model.

[0057] It is worth noting that the Ptolemy model is composed of multiple roles. The Ptolemy synchronous response model is translated into a formal model suitable for model verification, namely the NuSMV model. In this way, each role corresponds to a module translated into NuSMV, and the modules are combined to form a NuSMV model.

[0058] S3: Analyze the dangerous situations and characteristic information in the NuSMV model and abstract them into CTL formulas;

[0059] S4: Generate the Ptolemy synchronous response model verification interface;

[0060] It is worth noting that the Ptolemy synchronous response model can be generated in the Ptolemy environment. Since the Ptolemy synchronous response model is generated by reading a file or creating a new one, the verification of the model is completed in this environment.

[0061] S5: Add the option to call the NuSMV model detection tool in the Ptolemy synchronous response model verification interface;

[0062] S6: In the Ptolemy synchronous response model verification interface, select the NuSMV model detection tool call option to call the NuSMV model detection tool to verify the CTL formula and complete the property verification of the Ptolemy synchronous response model.

[0063] The present invention provides a verification method for translating a Ptolemy synchronous response model. The method uses an automated translation method to translate each role and then compose a NuSMV model, thereby retaining the hierarchical characteristics of the Ptolemy model and avoiding state space explosion. The method translates by querying a unified mapping table and using fixed translation rules to unify the translated NuSMV model, thereby avoiding problems other than the model itself that may occur during the manual translation process. Furthermore, the user does not even need to master the specific usage of the model detection tool NuSMV, thereby greatly reducing the work cost of formal verification. The NuSMV detection tool is used to simulate and analyze the NuSMV model, and at the same time, the security and accessibility analysis can be performed in a black box, thereby realizing the verification of the security, accessibility, deadlock and other properties of the Ptolemy synchronous response model.

[0064] In one embodiment, if Figure 2 As shown, obtaining the Ptolemy synchronous response model includes:

[0065] S21: Obtain an XML file representing a Ptolemy synchronization response model from the Ptolemy integration environment;

[0066] S22: reading the XML file to obtain the Ptolemy synchronous response model;

[0067] Among them, the Ptolemy synchronous response model is constructed by selecting SR Director in the Ptolemy integrated environment.

[0068] It is meant that the present invention can build a new model or read an existing model in the Ptolemy integrated environment; the process is to select SR Director in the Ptolemy integrated environment to build a new Ptolemy synchronous response model; or read an xml file of a Ptolemy synchronous response model in the Ptolemy integrated environment.

[0069] In one embodiment, if Figure 3 As shown, the translation of the Ptolemy synchronous response model into the NuSMV model includes:

[0070] S31: parsing the Ptolemy synchronous response model to obtain role information of each role;

[0071] In this step, after obtaining the role information of each role, the role information may be stored in a predefined role container.

[0072] Among them, multiple roles are divided into result display roles, functional roles and hierarchical roles according to their function types.

[0073] S32: for each role in the Ptolemy synchronous response model, according to the role information of the role, translate the role into a corresponding module in NuSMV, and obtain the module of each role in NuSMV;

[0074] S33: Combine the modules to form a NuSMV model.

[0075] It is worth noting that: in this embodiment, the obtained Ptolemy synchronization response model can be used as input, and the obtained Ptolemy synchronization response model can be parsed to select each role in the model and store it in a defined role container.

[0076] Translate each role in the Ptolemy synchronous response model into the corresponding NuSMV module. Specifically, take the role container as input, traverse the roles in the container, select the defined mapping rule according to the role type, and then translate the role into a NuSMV module and store it in the module container. This process includes the translation of the result display role, the translation of the functional role, and the translation of the hierarchical role:

[0077] Translation of result display roles: Roles such as Display that are only used to display the results of the Ptolemy synchronous response model and have nothing to do with the actual logical execution of the model can be ignored without translation.

[0078] In one embodiment, if Figure 4 As shown, for each role in the Ptolemy synchronous response model, the role is translated into the corresponding module in NuSMV according to the role information of the role, and the modules of each role in NuSMV include:

[0079] S41: querying a preset mapping rule library to determine a mapping rule corresponding to each role function type;

[0080] S42: traverse each role container, and translate the role corresponding to the same function type into a NuSMV module according to the mapping rule corresponding to the same function type, and obtain the module of each role in NuSMV.

[0081] It is worth noting that compared with other roles, the translation of functional roles is: according to the type of role, the corresponding mapping rule is selected in the mapping rule library, and then the role is translated into a NuSMV module according to the selected mapping rule. The functional roles in the synchronous response model can be divided into two categories: AtomicActor and FSMActor, and the corresponding translation rules are Figure 5 Template of AtomicActor and Template of FSMActor under Translation Rules in the tutorial.

[0082] Template of AtomicActor: AtomicActor is the smallest and indivisible modeling unit in the Ptolemy modeling tool. Its functions are fixed by developers. According to its functions, the present invention translates the commonly used AtomicActor in the modeling process and permanently stores it in the specified path to form the NuSMV module library ( Figure 5 When translating AtomicActor, the Template of AtomicActor rule will obtain the corresponding module from the NuSMV module library based on the corresponding information of AtomicActor (such as class name, parameters, input and output port communication status), through class name matching, and update the corresponding parameters in the target module according to the AtomicActor parameter information, and finally store them in the module container.

[0083] The core function of the AtomicActor template (outputting an arithmetic progression in the range of 0-100) is manually translated and stored in the NuSMV module library. The parameters (initial value: initvalue, tolerance: step) are obtained and updated when the program is actually running. In addition to the specific output value (output), the output also includes an output value default flag, which is a Boolean variable that indicates whether the output value of the role is default (in the synchronous response domain, the default value is also a legal data type).

[0084]

[0085] Template of FSMActor: FSMActor is different from AtomicActor. Its functions are customized by users based on the fixed templates of developers. When translating FSMActor, Template ofFSMActor will traverse the states and migration paths in FSMActor. All states will be translated into a state variable in NuSMV, which is an enumeration type. The conditional expression on the migration path is translated into the precondition of the state variable state migration in NuSMV. The target state is assigned to the state variable as a new value. Other variables in FSMActor are translated in the same way as state variables.

[0086] The following code is a FSMActor template, which contains an enumeration type state variable, whose value is State or State2, and whose parameters are the input port parameter input and its default value flag. The state variable migration is given in the form of "precondition: target value" (code line 5-10).

[0087]

[0088] Translation of hierarchical roles: There are two types of hierarchical roles in the synchronous response model: CompositeActor and ModalModel. The corresponding translation rules are Figure 5 The translation logic is to translate the hierarchical roles and their internal roles into modules in NuSMV one by one, and use the module instances corresponding to these internal roles as variables of the hierarchical role module to achieve the translation from the hierarchical roles in Ptolemy to NuSMV.

[0089] Template of CompositeActor: CompositeActor COM as shown in the following code,

[0090]

[0091] It contains two roles, A3 and A4. When translating, A3 and A4 are first translated into separate modules (MODULE), and then the instances of A3 and A4 are used as variables of the hierarchical role COM (A3_instance, A4_instance). The output variables are output and output1, and their values ​​are from the internal role A4, representing the specific output value and the output value default flag respectively. Hierarchical internal roles support both functional roles and hierarchical roles.

[0092] Template of ModalModel: ModalModel is equivalent to a hierarchical FSMActor. In Ptolemy, the state under ModalModel allows users to add refinements, and users can further formulate more detailed functions in refinements. ModalModel interacts with the refinements of the lower layer through state parameters, that is, the refinement will be triggered only when ModalModel is in a state that contains the refinement. As shown in the following code, ModalModelModalModel2 has a refinement defined under its state state, and a FSMActor is defined in the refinement. Compared with a single FSMAc, the FSMActor under the refinement will additionally require a state parameter UpperState from the upper ModalModel to determine whether the FSMActor in the refinement should be appropriately triggered.

[0093]

[0094] According to the above rules, each role in the synchronous response model is translated into a corresponding NuSMV module and stored in a special module container. Then, all the modules in the container are traversed and these modules are combined into a complete NuSMV model according to the NuSMV syntax rules.

[0095] In one embodiment, adding a NuSMV model detection tool call option in the Ptolemy synchronous response model verification interface includes:

[0096] In the Ptolemy synchronous response model verification interface, a verification tool component, a verification method component, a verification property component, and a verification result component are added to verify the NuSMV model respectively.

[0097] It is worth noting that: in the Ptolemy model verification interface, the NuSMV model detection tool call and related supporting options are added, including the selection of verification tools, the selection of verification methods, the addition of verification properties and the return of verification results. This verification interface implements the call of the NuSMV model application interface. The present invention can implement the verification function by adding a setting option button through the component.

[0098] In one embodiment, in the Ptolemy synchronous response model verification interface, the NuSMV model detection tool call option is selected to call the NuSMV model detection tool to verify the CTL formula, and the property verification of the Ptolemy synchronous response model includes:

[0099] In the Ptolemy synchronous response model verification interface, select the verification tool component, verification method component, verification property component, and verification result component in turn to call the application interface of the NuSMV model detection tool to verify the CTL formula and complete the property verification of the Ptolemy synchronous response model.

[0100] It is worth mentioning that the CTL formula can be used to verify the security, reachability, and deadlock of the NuSMV model.

[0101] In one embodiment, in the Ptolemy synchronous response model verification interface, the verification tool component, the verification method component, the verification property component, and the verification result component are selected in sequence to call the application interface of the NuSMV model detection tool to verify the CTL formula. Completing the property verification of the Ptolemy synchronous response model includes:

[0102] S61: After selecting the verification tool component, a NuSMV detection tool for detecting the NuSMV model is generated;

[0103] S62: Select a verification method component, generate an smv file that can be formally verified in the NuSMV detection tool, and generate a temporary smv file that can be formally verified in the NuSMV detection tool;

[0104] S63: Select the verification property component to call the NuSMV detection tool to read the temporary smv file and the smv file for formal verification to verify the CTL formula;

[0105] S64: Select the verification result component to return the error case generated when the CTL formula does not meet the verification condition, and complete the property verification of the Ptolemy synchronous response model.

[0106] Selection of verification method: (1) After the automatic translation process is completed, an smv file that can be formally verified in NuSMV is generated at the specified location, but the verification process is not performed; (2) After the automatic translation process is completed, a temporary smv file that can be formally verified in NuSMV is generated, and the NuSMV tool is called to read the temporary file and the input verification properties, perform verification, and automatically delete the temporary file after returning the verification result.

[0107] Verification properties: Verification was performed after abstracting the CTL formula based on the characteristics of the Ptolemy synchronous response model.

[0108] Return of verification results: When you choose to directly call the NuSMV detection tool for verification, the verification status of the input verification property will be returned: satisfied or not satisfied. If not satisfied, the corresponding error case will be given.

[0109] The present invention provides a plug-in, in which a computer program is stored, and when the computer program is executed, the steps of the verification method for translating the Ptolemy synchronous response model described in any one of the claims above are implemented.

[0110] It is worth noting that the present invention can provide a plug-in, which is based on the open source Ptolemy modeling simulation integrated environment and is implemented using Eclipse plug-in development technology. Users can use the plug-in in the Ptolemy integrated environment to complete the steps of the verification method of the above-mentioned Ptolemy synchronous response model translation, and realize the verification of the properties such as security, reachability, and deadlock of the Ptolemy synchronous response model. In order to facilitate engineers to write CTL verification formulas, the processing method of property formulas is improved, and the model verification cost is greatly reduced by automated model translation, black box model checker and visual CTL formula writing.

[0111] Those skilled in the art can understand that the accompanying drawings are only schematic diagrams of an embodiment, and the modules or processes in the accompanying drawings are not necessarily required to implement the present invention.

[0112] Those skilled in the art can understand that the modules in the plug-in in the embodiment can be distributed in the plug-in in the embodiment according to the description of the embodiment, or can be changed accordingly and located in one or more plug-ins different from the embodiment. The modules in the above embodiment can be combined into one module, or can be further divided into multiple sub-modules.

[0113] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A verification method for Ptolemy synchronous response model translation, characterized in that: include: Get the Ptolemy synchronous response model; Translating the Ptolemy synchronous response model into the NuSMV model; The Ptolemy synchronous response model is composed of multiple roles, and the NuSMV model is composed of multiple functional modules, each of which corresponds to a role in the Ptolemy synchronous response model; Analyze the dangerous situations and characteristic information in the NuSMV model and abstract them into CTL formulas; Generate Ptolemy synchronous response model verification interface; Adding a NuSMV model detection tool call option in the Ptolemy synchronous response model verification interface; In the Ptolemy synchronous response model verification interface, select the NuSMV model detection tool call option to call the NuSMV model detection tool to verify the CTL formula and complete the property verification of the Ptolemy synchronous response model.

2. The verification method for Ptolemy synchronous response model translation according to claim 1, characterized in that: The obtaining of the Ptolemy synchronous response model comprises: Get an XML file representing a Ptolemy synchronous response model from the Ptolemy integration environment; Read the XML file to obtain a Ptolemy synchronous response model; The Ptolemy synchronous response model is constructed by selecting SRDirector in the Ptolemy integrated environment.

3. The verification method for Ptolemy synchronous response model translation according to claim 1, characterized in that: The translating the Ptolemy synchronous response model into the NuSMV model comprises: Parse the Ptolemy synchronous response model to obtain the role information of each role; For each role in the Ptolemy synchronous response model, according to the role information of the role, the role is translated into a corresponding module in NuSMV to obtain the module of each role in NuSMV; The various modules are combined to form a NuSMV model.

4. The verification method for Ptolemy synchronous response model translation according to claim 3, characterized in that: After obtaining the role information of each role, the Ptolemy synchronous response model translation verification method further includes: The role information of each role is stored in a predefined role container.

5. The verification method for Ptolemy synchronous response model translation according to claim 4, characterized in that: For each role in the Ptolemy synchronous response model, according to the role information of the role, the role is translated into a corresponding module in NuSMV, and obtaining the module of each role in NuSMV includes: Query the preset mapping rule library to determine the mapping rules corresponding to each role function type; Traverse each role container, translate the role corresponding to the same function type into a NuSMV module according to the mapping rule corresponding to the same function type, and obtain the module of each role in NuSMV.

6. The verification method for Ptolemy synchronous response model translation according to claim 1, characterized in that: Add NuSMV model checking tool call options in the Ptolemy synchronous response model verification interface including: In the Ptolemy synchronous response model verification interface, a verification tool component, a verification method component, a verification property component and a verification result component are added to verify the NuSMV model respectively.

7. The verification method for Ptolemy synchronous response model translation according to claim 6, characterized in that: In the Ptolemy synchronous response model verification interface, select the NuSMV model detection tool call option to call the NuSMV model detection tool to verify the CTL formula, and complete the property verification of the Ptolemy synchronous response model, including: In the Ptolemy synchronous response model verification interface, select the verification tool component, verification method component, verification property component and verification result component in turn to call the application interface of the NuSMV model detection tool to verify the CTL formula and complete the property verification of the Ptolemy synchronous response model.

8. The verification method for Ptolemy synchronous response model translation according to claim 7, characterized in that: In the Ptolemy synchronous response model verification interface, select the verification tool component, the verification method component, the verification property component and the verification result component in turn to call the application interface of the NuSMV model detection tool to verify the CTL formula. Completing the property verification of the Ptolemy synchronous response model includes: After selecting the verification tool component, a NuSMV detection tool for detecting the NuSMV model is generated; Select the verification method component, generate an smv file that can be formally verified in the NuSMV detection tool, and generate a temporary smv file that can be formally verified in the NuSMV detection tool; Selecting the verification property component to call the NuSMV detection tool to read the temporary smv file and perform formal verification of the smv file to verify the CTL formula; A verification result component is selected to return an error case generated when the CTL formula does not meet the verification condition, thereby completing the property verification of the Ptolemy synchronous response model.

9. The verification method for Ptolemy synchronous response model translation according to claim 1, characterized in that: Multiple roles are divided into result display roles, functional roles and hierarchical roles according to their function types.

10. A verification plug-in for Ptolemy synchronous response model translation, characterized in that: The plug-in stores a computer program, which, when executed by a processor, implements the steps of the verification method for translating the Ptolemy synchronous response model as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Obfuscating execution traces of computer program code

    CN101689232A

  • Ptolemy discrete event model formal verification method based on model translation

    CN112163343A

  • Unified web service URI builder and verification

    US20120246334A1