CN107301128A - System emulation verification method based on Petri net model - Google Patents
System emulation verification method based on Petri net model Download PDFInfo
- Publication number
- CN107301128A CN107301128A CN201710486867.6A CN201710486867A CN107301128A CN 107301128 A CN107301128 A CN 107301128A CN 201710486867 A CN201710486867 A CN 201710486867A CN 107301128 A CN107301128 A CN 107301128A
- Authority
- CN
- China
- Prior art keywords
- petri
- net model
- mark
- node
- petri net
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3604—Software analysis for verifying properties of programs
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/20—Design optimisation, verification or simulation
- G06F30/22—Design optimisation, verification or simulation using Petri net models
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Quality & Reliability (AREA)
- Evolutionary Computation (AREA)
- Geometry (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The present invention relates to a kind of system emulation verification method based on Petri net model, belong to system engineering modeling technique field.The present invention proposes a kind of model transformation mechanism, it will be difficult to directly verify that SysML model conversions realizing, being described with the language of half formalization are a kind of Formal Language Description model for being easy to checking by model checker, that is Petri net model, the simulating, verifying of model is carried out to the model after conversion again, system engineering mo dels simulation efficiency is improved.
Description
Technical field
The present invention relates to system engineering modeling technique field, and in particular to a kind of system emulation based on Petri net model
Verification method.
Background technology
Now, it is increasing with the scale of software development in software development process, complexity more and more higher, one
Very important theme is to ensure that the reliability and security of software.It is used as the important method in system engineering field, SysML
Have a wide range of applications.It as system engineering Modeling language, it would be preferable to support the detailed description of various complication systems, point
Analysis, design, checking and confirmation.SysML inherits UML2 partial view, UML2 partial view is have modified as needed, together
When add demand figure and Parameter Map again.
SysML is a kind of language Description standard of half formalization, i.e., without clearly semantic, easy-to-understand while,
Also so that SysML is difficult to find that reliable checking means.Under the increasing background of scale of model, including SysML's is main
Including behavior model activity diagram, tested using conventional artificial model, efficiency can become very low.Meanwhile, if on upper strata
The defect or mistake of Software for Design are found that in implementation process, substantial amounts of time loss and repeated work will be caused, for example, examined
Design and again realization etc..
The content of the invention
(1) technical problem to be solved
The technical problem to be solved in the present invention is:How system engineering mo dels simulation efficiency is improved.(2) technical scheme
In order to solve the above-mentioned technical problem, the invention provides a kind of system emulation authentication based on Petri net model
Method, comprises the following steps:
Step 1: in the movable graph models of SysML, the transformation rule of element is set up, so that the movable graph models of SysML be existed
It is semantic it is constant on the premise of be transformed into Petri net model, the element include controlling stream, action, start node, end node,
Node of divergence, with reference to node and decision node;
Step 2: being emulated using PIPE instruments to Petri net model;
Step 3: using the boundedness of the simulation results show Petri net model of step 2, security, activity with without dead
Lock property, verify it is obstructed it is out-of-date Petri net model is modified as needed, verified again again after modification, until determination
Untill the correctness of Petri net model.
Preferably, the transformation rule of the controlling stream is:Controlling stream in the movable graph models of SysML is corresponded into Petri
Directed arc in net;
The transformation rule of the action is:Action in the movable graph models of SysML is corresponded to the transition in Petri network, together
When Petri network in a place record system through it is described action change after state value;
The transformation rule of the start node is:Start node in the movable graph models of SysML is corresponded in Petri network
A place, its value is the initial state value of system;
The transformation rule of the end node is:End node in the movable graph models of SysML is corresponded in Petri network
A place, while the state change at the end of being indicated entry into the transition in Petri network;
The transformation rule of the node of divergence is:The directed arc for being denoted as inlet flow is changed with one in Petri network
Bifurcated state is entered, while recording the state after bifurcated with multiple places;
The transformation rule of the combination node is:Being denoted as the multiple of inlet flow with a transition in Petri network has
Bonding state is entered to arc, while with a place, the state after record combination;
The transformation rule of the decision node is:Judgement state is indicated entry into a transition in Petri network, while with
The state of system after a place record judges, the place derives multiple directed arcs, with the different controlling stream of correspondence.
Preferably, Petri net model is emulated using covering tree algorithm using PIPE instruments.
Preferably, it is described using covering tree algorithm Petri net model is emulated the step of be specially:
2.1st, initial marking is assigned as root node, and labeled as new;Place in mark correspondence Petri network, the value of mark
Represent the state value of system;
2.2nd, the tagged mark of institute for judging whether tree is not new, and the tagged mark of institute of if tree is not
Newly, then algorithm terminates, output result;New mark is labeled as if existing, next step is performed;
2.3rd, any one is selected to be labeled as new mark;
2.4th, the like-identified of same root is determined whether, if being labeled as having phase on the path of new mark from root node to this
With mark, then by this labeled as new mark labeled as old, then take other to be labeled as new mark;Otherwise next step is performed;
It is can trigger if the 2.5, identifying without migration, can be by the mark labeled as terminating, while being transferred to step 2.2;If should
There is triggerable migration in mark, then perform step 2.6 to each migration;
2.6th, the successor marking in the case of migration triggering mark is determined, introduce successor marking as overlay tree one is new
Node, and the directed arc that successor marking is identified to from this is marked with migration, while also by successor marking labeled as new, return to step
2.2。
Preferably, the boundedness of checking Petri net model is specially in step 3:Check whether each value is equal in mark
Less than constant, the constant is the capacity of place, if, then it is assumed that Petri net model now is bounded, is verified obstructed
Cross, otherwise it is assumed that Petri net model is unbounded.
Preferably, the security of checking Petri net model is specially in step 3:If mark in overlay tree is each
Individual value is be smaller than or equal to 1, then it is assumed that Petri net model is safe, otherwise it is assumed that Petri net model is dangerous
, checking does not pass through.
Preferably, the activity of checking Petri net model is specially with deadlock free in step 3:If sent out in overlay tree
Now all changes, which are moved the capital to another place in one sequence, occurs, then it is assumed that deadlock is not present in Petri net model, otherwise it is assumed that existing dead
Lock, checking does not pass through.
(3) beneficial effect
The present invention proposes a kind of model transformation mechanism, it may be difficult to directly by model checker verify it is realizing, use half shape
The SysML model conversions of the language description of formula are a kind of Formal Language Description model for being easy to checking, i.e. Petri network mould
Type, then the simulating, verifying of model is carried out to the model after conversion, improve system engineering mo dels simulation efficiency.
Brief description of the drawings
Fig. 1 is flow chart of the method for the present invention;
Fig. 2 is converted into the regular schematic diagram of Petri network for SysML activity diagram controlling streams in the inventive method;
Fig. 3 is that the action of SysML activity diagrams in the inventive method is converted into the regular schematic diagram of Petri network;
Fig. 4 is that the start node of SysML activity diagrams in the inventive method is converted into the regular schematic diagram of Petri network;
Fig. 5 is that the end node of SysML activity diagrams in the inventive method is converted into the regular schematic diagram of Petri network;
Fig. 6 is that the node of divergence of SysML activity diagrams in the inventive method is converted into the regular schematic diagram of Petri network;
Fig. 7 is that the combination node of SysML activity diagrams in the inventive method is converted into the regular schematic diagram of Petri network;
Fig. 8 is that the decision node of SysML activity diagrams in the inventive method is converted into the regular schematic diagram of Petri network;
Fig. 9 is overlay tree algorithm performs flow chart in the inventive method.
Embodiment
To make the purpose of the present invention, content and advantage clearer, with reference to the accompanying drawings and examples, to the present invention's
Embodiment is described in further detail.
As shown in figure 1, the invention provides a kind of system emulation verification method based on Petri net model, including it is following
Step:
Step 1: based on the movable graph model of the SysML that has had built up, set up the transformation rule of element, so that by SysML
Movable graph model is transformed into Petri net model on the premise of semanteme is constant, described to carry out follow-up checking simulation work
Element include controlling stream, action, start node, end node, node of divergence, with reference to node and decision node;
Controlling stream is a kind of constraint in SysML activity diagrams, and the control that activity is performed implicitly is expressed.So
And, the state that this constraint will not allow in activity changes, and itself is not also a kind of state, for table during its presence
Show the flowing of resource.The These characteristics of combined control stream, the transformation rule for designing the controlling stream is:By the movable artworks of SysML
Controlling stream in type corresponds to the directed arc in Petri network, as shown in Figure 2.
Action in SysML activity diagrams is a kind of a kind of state either action of atomicity for representing operation execution.
In activity diagram, action can change the state of system, and information can be also extracted from the implementation procedure of system.Because action can
The state of change system, therefore the transformation rule of the design action is:By the action correspondence in the movable graph models of SysML
Transition in Petri network, while the state value after being changed with a place record system in Petri network through the action,
As shown in Figure 3.
Start node in SysML activity diagrams is used to indicate that a kind of control section performed when the activity occurs from where
Point, the node contains initial state value simultaneously.With reference to the characteristics of start node, the transformation rule of the start node is designed
For:Start node in the movable graph models of SysML is corresponded to a place in Petri network, its value is the initial shape of system
State value, as shown in Figure 4.
End node in SysML activity diagrams is used to indicate that a kind of control section that the movable execution terminates from where
Point, the node contains the state value of most end simultaneously.Different from start node, end node contains one kind and enters done state
Change.So, the transformation rule for designing the end node is:End node in the movable graph models of SysML is corresponded to
A place in Petri network, while the state change at the end of being indicated entry into the transition in Petri network, as shown in Figure 5.
Node of divergence in SysML activity diagrams refers to a kind of node of single input and multi-output, and this node can increase
Concurrent token during execution.In Petri network, due to the presence of activity diagram bifurcated state, therefore the node of divergence is designed
Transformation rule is:Changed with one in Petri network and be denoted as the directed arc of inlet flow and enter bifurcated state, while with many
State after individual place record bifurcated, as shown in Figure 6.
Combination node in SysML activity diagrams refers to a kind of node of multiple input single output, and this node can be reduced
Concurrent token during execution.In Petri network, because there is bonding state in activity diagram, therefore the design combination node
Transformation rule is:The multiple directed arcs for being denoted as inlet flow with a transition in Petri network enter bonding state, simultaneously
With a place, the state after record combination, as shown in Figure 7.
Decision node in SysML activity diagrams controls the different flow directions of related streams.Because decision node represents one in itself
Individual state, therefore the transformation rule of the design decision node is:Judgement shape is indicated entry into a transition in Petri network
State, while the state for system after a place record judgement, the place derives multiple directed arcs, different with correspondence
Controlling stream, as shown in Figure 8.
Step 2: using PIPE instruments to being emulated using covering tree algorithm Petri net model;The use overlay tree
The step of algorithm is emulated to Petri net model, as shown in figure 9, being specially:
2.1st, initial marking is assigned as root node, and labeled as new;Place in mark correspondence Petri network, the value of mark
The state value of system is represented, identifies and is constituted by a string for 0 or 1 character;
2.2nd, the tagged mark of institute for judging whether tree is not new, and the tagged mark of institute of if tree is not
Newly, then algorithm terminates, output result;New mark is labeled as if existing, next step is performed;
2.3rd, any one is selected to be labeled as new mark;
2.4th, the like-identified of same root is determined whether, if being labeled as having phase on the path of new mark from root node to this
With mark, then by this labeled as new mark labeled as old, then take other to be labeled as new mark;Otherwise next step is performed;
It is can trigger if the 2.5, identifying without migration, can be by the mark labeled as terminating, while being transferred to step 2.2;If should
There is triggerable migration in mark, then perform step 2.6 to each migration;
2.6th, the successor marking in the case of migration triggering mark is determined, introduce successor marking as overlay tree one is new
Node, and the directed arc that successor marking is identified to from this is marked with migration, while also by successor marking labeled as new, return to step
2.2。
Step 3: using the boundedness of the simulation results show Petri net model of step 2, security, activity with without dead
Lock property, verify it is obstructed it is out-of-date Petri net model is modified as needed, verified again again after modification, until determination
Untill the correctness of Petri net model.
The boundedness of checking Petri net model is specially in step 3:All marks are checked, if each value is in mark
No to be respectively less than constant, the constant is the capacity of place, if, then it is assumed that Petri net model now is bounded, and checking is not
Pass through, otherwise it is assumed that Petri net model is unbounded.
Security is that any one value during requirement is each identified is 0 or 1.Petri net model is verified in step 3
Security be specially:If in all marks in overlay tree, each value is smaller than or equal to 1, then it is assumed that Petri
Pessimistic concurrency control is safe, otherwise it is assumed that Petri net model is unsafe, checking does not pass through.
The activity of checking Petri net model is specially with deadlock free in step 3:If found in overlay tree all
Change, which is moved the capital to another place in one sequence, to be occurred, then it is assumed that deadlock is not present in Petri net model, otherwise it is assumed that there is deadlock, is verified
Do not pass through.
Described above is only the preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art
For member, without departing from the technical principles of the invention, some improvement and deformation can also be made, these improve and deformed
Also it should be regarded as protection scope of the present invention.
Claims (7)
1. a kind of system emulation verification method based on Petri net model, it is characterised in that comprise the following steps:
Step 1: in the movable graph models of SysML, the transformation rule of element is set up, so that by the movable graph models of SysML in semanteme
Petri net model is transformed on the premise of constant, the element includes controlling stream, action, start node, end node, bifurcated
Node, with reference to node and decision node;
Step 2: being emulated using PIPE instruments to Petri net model;
Step 3: boundedness, security, activity and the deadlock free of the simulation results show Petri net model using step 2,
Verify it is obstructed it is out-of-date Petri net model is modified as needed, verified again again after modification, until determination Petri
Untill the correctness of pessimistic concurrency control.
2. the method as described in claim 1, it is characterised in that the transformation rule of the controlling stream is:By the movable artworks of SysML
Controlling stream in type corresponds to the directed arc in Petri network;
The transformation rule of the action is:By the transition in the action correspondence Petri network in the movable graph models of SysML, while with
State value of the place record system after the action change in Petri network;
The transformation rule of the start node is:Start node in the movable graph models of SysML is corresponded to one in Petri network
Individual place, its value is the initial state value of system;
The transformation rule of the end node is:End node in the movable graph models of SysML is corresponded to one in Petri network
Individual place, while the state change at the end of being indicated entry into the transition in Petri network;
The transformation rule of the node of divergence is:The directed arc entrance for being denoted as inlet flow is changed with one in Petri network
Bifurcated state, while recording the state after bifurcated with multiple places;
The transformation rule of the combination node is:The multiple directed arcs for being denoted as inlet flow are changed with one in Petri network
Bonding state is entered, while with a place, the state after record combination;
The transformation rule of the decision node is:Judgement state is indicated entry into a transition in Petri network, while for one
The state of system after individual place record judges, the place derives multiple directed arcs, with the different controlling stream of correspondence.
3. the method as described in claim 1, it is characterised in that using PIPE instruments using covering tree algorithm to Petri network mould
Type is emulated.
4. the method as described in claim 1, it is characterised in that described to be imitated using covering tree algorithm Petri net model
Really step is specially:
2.1st, initial marking is assigned as root node, and labeled as new;Place in mark correspondence Petri network, the value of mark is represented
The state value of system;
2.2nd, the tagged mark of institute for judging whether tree be it is not new, the tagged mark of institute of if tree be not it is new, then
Algorithm terminates, output result;New mark is labeled as if existing, next step is performed;
2.3, select any one be labeled as new mark;
2.4th, the like-identified of same root is determined whether, if being labeled as having identical on the path of new mark from root node to this
Mark, then by this labeled as new mark labeled as old, then take other to be labeled as new mark;Otherwise next step is performed;
It is can trigger if the 2.5, identifying without migration, can be by the mark labeled as terminating, while being transferred to step 2.2;If the mark
In the presence of triggerable migration, then step 2.6 is performed to each migration;
2.6th, the successor marking in the case of migration triggering mark is determined, successor marking is introduced and is newly saved as one of overlay tree
Point, and the directed arc that successor marking is identified to from this is marked with migration, while also by successor marking labeled as new, return to step
2.2。
5. the method as described in claim 1, it is characterised in that the boundedness of checking Petri net model is specially in step 3:
All marks are checked, if whether each value is respectively less than constant in mark, the constant is the capacity of place, if, then it is assumed that
Petri net model now is bounded, and checking does not pass through, otherwise it is assumed that Petri net model is unbounded.
6. the method as described in claim 1, it is characterised in that the security of checking Petri net model is specially in step 3:
If in overlay tree each tagged value be smaller than or equal to 1, then it is assumed that Petri net model be it is safe,
Otherwise it is assumed that Petri net model is unsafe, checking does not pass through.
7. the method as described in claim 1, it is characterised in that the activity and deadlock freedom of Petri net model are verified in step 3
Property is specially:If finding that all changes are moved the capital to another place in one sequence and occurred in overlay tree, then it is assumed that in Petri net model not
There is deadlock, otherwise it is assumed that there is deadlock, checking does not pass through.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710486867.6A CN107301128A (en) | 2017-06-23 | 2017-06-23 | System emulation verification method based on Petri net model |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710486867.6A CN107301128A (en) | 2017-06-23 | 2017-06-23 | System emulation verification method based on Petri net model |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107301128A true CN107301128A (en) | 2017-10-27 |
Family
ID=60135922
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710486867.6A Pending CN107301128A (en) | 2017-06-23 | 2017-06-23 | System emulation verification method based on Petri net model |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107301128A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109583026A (en) * | 2018-10-30 | 2019-04-05 | 中国电力科学研究院有限公司 | A kind of relay protection business modeling method and system based on Petri network occurrence sequence |
CN110321580A (en) * | 2019-03-13 | 2019-10-11 | 北京宇航系统工程研究所 | A kind of verifying of top layer system design scheme, optimization and appraisal procedure based on MBSE |
CN112464445A (en) * | 2020-11-10 | 2021-03-09 | 中冶赛迪工程技术股份有限公司 | Automatic simulation and optimization system for railway transportation of molten iron |
CN112613200A (en) * | 2020-09-12 | 2021-04-06 | 山东科技大学 | FPGA-based Petri network simulation platform |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080066046A1 (en) * | 2006-09-11 | 2008-03-13 | The Mathworks, Inc. | Hardware definition language generation for frame-based processing |
CN104461871A (en) * | 2014-11-18 | 2015-03-25 | 合肥康捷信息科技有限公司 | Deadlock detection method based on petri net |
CN105787141A (en) * | 2014-12-25 | 2016-07-20 | 北京仿真中心 | Collaborative simulation method and system for complex weapon system operation process |
-
2017
- 2017-06-23 CN CN201710486867.6A patent/CN107301128A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080066046A1 (en) * | 2006-09-11 | 2008-03-13 | The Mathworks, Inc. | Hardware definition language generation for frame-based processing |
CN104461871A (en) * | 2014-11-18 | 2015-03-25 | 合肥康捷信息科技有限公司 | Deadlock detection method based on petri net |
CN105787141A (en) * | 2014-12-25 | 2016-07-20 | 北京仿真中心 | Collaborative simulation method and system for complex weapon system operation process |
Non-Patent Citations (2)
Title |
---|
柯文俊 等: ""基于Petri网模型的系统仿真验证方法"", 《系统工程与电子技术》 * |
王松锋 等: ""基于Petri网的SysML活动图的分析与验证"", 《计算机科学》 * |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109583026A (en) * | 2018-10-30 | 2019-04-05 | 中国电力科学研究院有限公司 | A kind of relay protection business modeling method and system based on Petri network occurrence sequence |
CN109583026B (en) * | 2018-10-30 | 2024-04-09 | 中国电力科学研究院有限公司 | Relay protection service modeling method and system based on Petri network appearance sequence |
CN110321580A (en) * | 2019-03-13 | 2019-10-11 | 北京宇航系统工程研究所 | A kind of verifying of top layer system design scheme, optimization and appraisal procedure based on MBSE |
CN112613200A (en) * | 2020-09-12 | 2021-04-06 | 山东科技大学 | FPGA-based Petri network simulation platform |
CN112464445A (en) * | 2020-11-10 | 2021-03-09 | 中冶赛迪工程技术股份有限公司 | Automatic simulation and optimization system for railway transportation of molten iron |
CN112464445B (en) * | 2020-11-10 | 2022-08-12 | 中冶赛迪工程技术股份有限公司 | Automatic simulation and optimization system for railway transportation of molten iron |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107301128A (en) | System emulation verification method based on Petri net model | |
US8020153B2 (en) | Source code checker, source code checking method, program for causing execution of the method, and storage medium for storing the program | |
CN109634600B (en) | Code generation method based on security extension SysML and AADL models | |
CN108509336A (en) | A kind of operating system canonical form chemical examination card and test method | |
CN107783758B (en) | A kind of intelligence contract engineering method | |
BR102016018127A2 (en) | design method based on critical security software model | |
CN105302719B (en) | A kind of mutation testing method and device | |
CN101833499A (en) | Software testing validating method based on reachability tree | |
CN104050087A (en) | Software architecture correctness verification method based on UML model | |
WO2004104824A1 (en) | User interface application development deice and development method | |
CN111274142A (en) | Software communication system architecture conformance test modeling method based on extended finite-state machine | |
CN110162297A (en) | A kind of source code fragment natural language description automatic generation method and system | |
Ren et al. | Model information checking to support interoperable BIM usage in structural analysis | |
CN101008915A (en) | Automatic verification method of network chip | |
Bouquet et al. | Requirements traceability in automated test generation: application to smart card software validation | |
CN111679964B (en) | Formal verification method of microkernel operating system interface based on boundary model detection technology | |
CN116341428B (en) | Method for constructing reference model, chip verification method and system | |
CN102799517B (en) | Rapid circulating expansion detection method | |
del Mar Gallardo et al. | αSPIN: Extending SPIN with abstraction | |
Machado et al. | Automatic test-case generation | |
Pinel et al. | Improving tests infrastructure through a model-based approach | |
Samkari et al. | A Petri net based method for the early verification & validation of a simulation study in construction management | |
Liu et al. | Generating test cases via model-based simulation | |
CN108255718A (en) | A kind of method for being multiplexed software use-case | |
Jin et al. | Papyrus SysML-based model validation extension |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20171027 |