Formal verification system based on SysML model
Through a formal verification system based on SysML model, combined with EMF technology and Uppaal model, the problems of low efficiency and high cost of existing tools are solved, efficient formal verification is achieved, the reliability and security of the software are improved, and the reliability and security of the software are reduced. Test cost.
Patent Information
- Application Number
- CN202411021762.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2024-11-19
AI Technical Summary
In the prior art, formal verification tools are inefficient, costly, and difficult to meet the needs of specific projects, poor performance and poor ease of use.
A formal verification system based on SysML model was designed, including model management module, property management module, mapping configuration module and model verification module. The metamodel of SysML activity diagram and Uppaal was constructed through EMF technology to realize model transformation and formal properties. When writing the regulations, use LTL, CTL, and TCTL to define formal properties templates, and call the model inspector to verify whether the software needs are met.
It significantly improves the reliability and security of the software, reduces testing costs, and provides a powerful verification framework that enables system designers to detect and correct design problems early and ensures the reliability and effectiveness of system design.
Smart Images

Figure CN118981428A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of software engineering, and in particular to a formal verification system based on a SysML model. Background Art
[0002] SysML is a modeling language used to define complex systems, in which activity diagrams are a way to describe the interactions between system components. SysML activity diagrams are mainly used to depict message interactions between objects or participants in a system, which are represented as a sequence of messages arranged in chronological order. Activity diagrams are particularly suitable for representing business processes, operational logic, and communication patterns in a system. They provide an intuitive perspective for understanding system behavior. In formal verification systems, SysML activity diagrams can be further analyzed by combining them with Uppaal models. Uppaal is a tool for verifying real-time systems. It supports the modeling of timed automata, a formal framework for expressing time-dependent behaviors. By converting SysML activity diagrams into timed automata models that Uppaal can accept, we can use Uppaal's model checking capabilities to verify whether the system behavior complies with time constraints and logical specifications.
[0003] Now, by combining the formal verification system of SysML model activity diagrams with Uppaal models and model checking technology, a powerful verification framework can be built, enabling system designers to discover and correct potential design problems in the early stages of system development. However, formal verification requires a lot of human resources, including training team members, building and maintaining formal models, and performing verification and debugging. These labor costs may occupy a significant proportion of the software development process, leading to increased development costs. At the same time, although there are some formal verification tools available, not all tools can meet the needs of specific projects. Sometimes, it is necessary to develop or customize the tools yourself. In addition, some tools may have problems such as poor performance and poor usability, which affect verification efficiency.
[0004] To this end, we have developed a new formal verification system based on SysML models. Summary of the invention
[0005] 1. Technical issues to be resolved
[0006] In view of the deficiencies in the prior art, the present invention provides a formal verification system based on the SysML model, which solves the problems of low efficiency and high cost of formal verification in the existing model-driven software development method.
[0007] (II) Technical solution
[0008] To achieve the above objectives, the present invention is implemented through the following technical solutions: a formal verification system based on SysML model, including a model management module, a property management module, a mapping configuration module and a model verification module;
[0009] The model management module is used to manage the input SysML activity diagram model;
[0010] The property management module is used to manage the input formal property specifications;
[0011] The mapping configuration module is used to map variables of the SysML activity diagram to atomic propositions in the formal property specification;
[0012] The model verification module is used to call the model solver according to the mapping between SysML activity diagram variables and formal property specification atomic propositions, verify the Uppaal model, and return the verification result.
[0013] Preferably, the model management module further comprises constructing a metamodel of SysML activity diagram and Uppaal based on EMF technology, and based on the correspondence between SysML activity diagram elements and Uppaal model elements, the transformation of SysML activity diagram to Uppaal timed automaton model is realized with the help of the metamodel.
[0014] Preferably, the formal property specification is written by constructing a SysML activity diagram and an Uppaal metamodel based on the EMF technology, and the Uppaal timed automaton is verified to confirm that the SysML activity diagram meets the conditions of the property specification.
[0015] Preferably, the said constructing SysML activity diagram and Uppaal metamodel based on EMF technology comprises:
[0016] Based on the definition of key elements in SysML activity diagram and its XML source file details, Ecore is used to build SysML activity diagram as metamodel;
[0017] According to the key element definitions in Uppaal timed automaton and its XML source file details, Uppaal timed automaton is established as a metamodel using Ecore.
[0018] Preferably, based on the correspondence between SysML activity diagram elements and Uppaal model elements, the conversion from SysML activity diagram to Uppaal timed automaton model is realized with the help of metamodel, including:
[0019] Map the combined fragment CombinedFragment in the SysML activity diagram to the template Template in Uppaal;
[0020] Map the event Event in the SysML activity diagram to the node state Location in Uppaal;
[0021] Map the message Message in the SysML activity diagram to the state transition Transition in Uppaal;
[0022] Map the synchronous message in the SysML activity diagram to the synchronization between templates in the Uppaal model;
[0023] Map the guard in the SysML activity diagram, that is, the logical control condition in the combined fragment, to the guard in Uaappl, that is, the conditional expression that controls the state transfer;
[0024] Map the variables in the SysML activity diagram directly to the variables in the Uppaal model.
[0025] Preferably, the process of writing a formal property specification based on EMF technology, constructing a SysML activity diagram and an Uppaal metamodel, and verifying the Uppaal time automaton to confirm that the SysML activity diagram satisfies the conditions of the property specification includes:
[0026] Define formal property specification templates based on LTL, CTL, and TCTL;
[0027] According to the actual software requirements, fill the properties that need to be met into the property specification template to form a formal property specification;
[0028] According to the defined formal property specification, the Uppaal timed automaton is verified, and according to the result returned by the model checker, it is determined whether the SysML activity diagram meets the conditions of the property specification, that is, whether it meets the conditions of the software requirements.
[0029] (III) Beneficial effects
[0030] The present invention provides a formal verification system based on SysML model, which has the following beneficial effects:
[0031] 1. This SysML-based formal verification system first models both the SysML model activity diagram and the Uppaal timed automaton as EMF metamodels. After that, the mapping relationship between the model elements of the SysML model activity diagram and the constituent elements of the Uppaal timed automaton is defined, and the conversion between the two is realized based on the EMF metamodel. Next, the system provides a formal specification property template based on LTL, CTL and TCTL, allowing users to convert software requirements into formal property specifications based on this template;
[0032] Finally, according to the formal property specifications, the model checker is called to verify whether the Uppaal timed automaton satisfies the specifications, and then it is explained whether the SysML model activity diagram representing the software structure satisfies the formal specifications, that is, the software requirements. This system fills the problem of the lack of available formal verification tools in the current model-based software development field, significantly improves the reliability and security of the software, and reduces the testing cost of the software.
[0033] 2. This SysML model-based formal verification system can build a powerful verification framework by combining the SysML model activity diagram formal verification system with the Uppaal model and model checking technology, enabling system designers to discover and correct potential design problems in the early stages of system development. The behavior and logical flow of the system are described by SysML activity diagrams, and Uppaal is used for formal model building and analysis. Finally, model checking is used to verify whether the system model meets specific performance and safety requirements, thereby ensuring the reliability and effectiveness of the system design. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 A flowchart of the working procedure of a formal verification system based on a SysML model of the present invention;
[0035] Figure 2 A schematic diagram of the structure of a formal verification system based on SysML model of the present invention;
[0036] Figure 3 A schematic diagram of modeling a formal verification system metamodel based on a SysML model according to the present invention;
[0037] Figure 4 The figure is a schematic diagram of an electronic device of a formal verification system based on a SysML model of the present invention. DETAILED DESCRIPTION
[0038] 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.
[0039] Example:
[0040] like Figure 1-4 As shown, an embodiment of the present invention provides a formal verification system based on SysML model, including a model management module, a property management module, a mapping configuration module and a model verification module;
[0041] Model management module, used to manage the input SysML activity diagram model;
[0042] Property management module, used to manage the formal property specifications of input;
[0043] Mapping configuration module, used to map variables of SysML activity diagram to atomic propositions in formal property specification;
[0044] The model verification module is used to call the model solver according to the mapping of SysML activity diagram variables and formal property specification atomic propositions, verify the Uppaal model, and return the verification result.
[0045] Furthermore, the model management module also includes building a metamodel of SysML activity diagram and Uppaal based on EMF technology, and based on the correspondence between SysML activity diagram elements and Uppaal model elements, using the metamodel, realizing the conversion of SysML activity diagram to Uppaal timed automaton model;
[0046] Furthermore, based on EMF technology, SysML activity diagrams and Uppaal metamodels are constructed to write formal property specifications. By verifying Uppaal time automata, it is confirmed that the SysML activity diagrams meet the conditions of the property specifications.
[0047] Furthermore, based on EMF technology, the metamodel of SysML activity diagram and Uppaal is constructed, including:
[0048] Based on the definition of key elements in SysML activity diagram and its XML source file details, Ecore is used to build SysML activity diagram as metamodel;
[0049] Based on the key element definitions in Uppaal timed automaton and the details of its XML source file, Uppaal timed automaton is established as a metamodel using Ecore.
[0050] Furthermore, based on the correspondence between SysML activity diagram elements and Uppaal model elements, the transformation from SysML activity diagram to Uppaal timed automaton model is realized with the help of metamodel, including:
[0051] Map the combined fragment CombinedFragment in the SysML activity diagram to the template Template in Uppaal;
[0052] Map the event Event in the SysML activity diagram to the node state Location in Uppaal;
[0053] Map the message Message in the SysML activity diagram to the state transition Transition in Uppaal;
[0054] Map the synchronous message in the SysML activity diagram to the synchronization between templates in the Uppaal model;
[0055] Map the guard in the SysML activity diagram, that is, the logical control condition in the combined fragment, to the guard in Uaappl, that is, the conditional expression that controls the state transfer;
[0056] Map the variables in the SysML activity diagram directly to the variables in the Uppaal model;
[0057] Furthermore, based on EMF technology, SysML activity diagrams and Uppaal metamodels are constructed to write formal property specifications. By verifying the Uppaal time automaton, it is confirmed that the SysML activity diagrams meet the conditions of the property specifications, including:
[0058] Define formal property specification templates based on LTL, CTL, and TCTL;
[0059] According to the actual software requirements, fill the properties that need to be met into the property specification template to form a formal property specification;
[0060] According to the defined formal property specification, the Uppaal timed automaton is verified, and according to the result returned by the model checker, it is determined whether the SysML activity diagram meets the conditions of the property specification, that is, whether it meets the conditions of the software requirements;
[0061] The program engineering process of the formal verification system based on the SysML model of the present invention is as follows:
[0062] S101. Construct SysML activity diagram and Uppaal metamodel based on EMF technology;
[0063] S102, based on the correspondence between SysML activity diagram elements and Uppaal model elements, with the help of metamodel, realize the conversion from SysML activity diagram to Uppaal timed automaton model;
[0064] S103. Based on formal verification technology, write formal property specifications, verify them by Uppaal timed automata, and then confirm whether the SysML activity diagram satisfies the property specifications.
[0065] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A formal verification system based on SysML model, characterized by: It includes model management module, property management module, mapping configuration module and model verification module; The model management module is used to manage the input SysML activity diagram model; The property management module is used to manage the input formal property specifications; The mapping configuration module is used to map variables of the SysML activity diagram to atomic propositions in the formal property specification; The model verification module is used to call the model solver according to the mapping between SysML activity diagram variables and formal property specification atomic propositions, verify the Uppaal model, and return the verification result.
2. A SysML model-based formal verification system according to claim 1, characterized in that: The model management module also includes building a SysML activity diagram and an Uppaal metamodel based on EMF technology. Based on the correspondence between SysML activity diagram elements and Uppaal model elements, the transformation from SysML activity diagram to Uppaal timed automaton model is realized with the help of the metamodel.
3. A SysML model-based formal verification system according to claim 2, characterized in that: The method is based on EMF technology, constructs SysML activity diagram and Uppaal metamodel to write formal property specifications, and verifies Uppaal time automaton to confirm that the SysML activity diagram meets the conditions of the property specifications.
4. A SysML model-based formal verification system according to claim 2, characterized in that: The metamodel for building SysML activity diagram and Uppaal based on EMF technology includes: Based on the definition of key elements in SysML activity diagram and its XML source file details, Ecore is used to build SysML activity diagram as metamodel; According to the key element definitions in Uppaal timed automaton and its XML source file details, Uppaal timed automaton is established as a metamodel using Ecore.
5. The SysML model-based formal verification system according to claim 2, characterized in that: The conversion from SysML activity diagram to Uppaal timed automaton model is realized based on the correspondence between SysML activity diagram elements and Uppaal model elements by using metamodel, including: Map the combined fragment CombinedFragment in the SysML activity diagram to the template Template in Uppaal; Map the event Event in the SysML activity diagram to the node state Location in Uppaal; Map the message Message in the SysML activity diagram to the state transition Transition in Uppaal; Map the synchronous message in the SysML activity diagram to the synchronization between templates in the Uppaal model; Map the guard in the SysML activity diagram, that is, the logical control condition in the combined fragment, to the guard in Uaappl, that is, the conditional expression that controls the state transfer; Map the variables in the SysML activity diagram directly to the variables in the Uppaal model.
6. A SysML model-based formal verification system according to claim 3, characterized in that: The method of writing formal property specifications based on EMF technology, building SysML activity diagrams and Uppaal metamodels, and verifying Uppaal time automata to confirm that the SysML activity diagrams meet the conditions of the property specifications includes: Define formal property specification templates based on LTL, CTL, and TCTL; According to the actual software requirements, fill the properties that need to be met into the property specification template to form a formal property specification; According to the defined formal property specification, the Uppaal timed automaton is verified, and according to the result returned by the model checker, it is determined whether the SysML activity diagram meets the conditions of the property specification, that is, whether it meets the conditions of the software requirements.
