Trusted development and verification method and device for safety-critical systems

Through the collaborative analysis of STPA and Event-B methods, the problem of refining step organization in the design of complex safety-critical systems is solved, the safety and reliability of the system are improved, and security is ensured throughout the entire life cycle and adapted to changes in requirements.

CN118445816BActive Publication Date: 2024-09-13HUAQIAO UNIVERSITY +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410902984.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-08
Publication Date
2024-09-13
Estimated Expiration
2044-07-08

AI Technical Summary

Technical Problem

When designing complex safety-critical systems, the lack of effective guidelines makes it difficult to effectively organize refinement steps, affecting the safety and reliability of the system.

Method used

Collaborative analysis using STPA and Event-B methods, through a gradual iteration and refinement process, determines system-level security constraints, and ensures that the system meets security requirements through formal modeling and verification, achieving trusted development and verification of the system.

Benefits of technology

It improves the security and reliability of the system, ensures security throughout the entire system life cycle, and adapts to demand changes and system evolution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118445816B
    Figure CN118445816B
Patent Text Reader

Abstract

The present invention discloses a trusted development and verification method and device for safety-critical systems, which relates to the field of system safety analysis. The method adopts STPA and Event‑B methods for collaborative analysis, and combines a step-by-step iterative process. First, the system tasks and safety constraints are established. In the initial stage, an initial STAMP model is constructed according to the initial functional requirements. The initial control structure in the initial STAMP model is subjected to STPA analysis to identify safety constraints, and the Event‑B method is used for verification to ensure that the safety-critical system complies with the safety constraints. The steps of each subsequent iterative stage gradually introduce more new functional requirements and specific contents to ensure compatibility with existing safety-critical systems and follow system-level safety constraints, so as to solve the problem that the existing Event‑B method is difficult to effectively organize the refinement steps due to the lack of guidelines.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of system security analysis, and in particular to a trusted development and verification method and device for a safety-critical system. Background Art

[0002] Safety is an important attribute of safety-critical systems. Many safety-critical systems implement powerful functions through software, which has become an important component of such systems. In the past decade, the number of accidents and losses related to software defects has continued to increase, and the need to improve the reliability and safety of software has increased.

[0003] To ensure the safety of the system, it is critical to adhere to the established system-level safety constraints. This includes using various safety analysis methods to formulate safety requirements and verifying that these safety requirements are sufficient to meet system-level safety goals. To this end, a formal modeling language that can perform expressive system-level modeling, analysis, and verification is required. The Event-B method ensures system correctness through mathematical proofs. The Event-B method uses a flexible refinement mechanism, supports iterative and incremental development methods, and provides verification feedback. This helps ensure that the developed system meets safety requirements and helps detect missing or contradictory safety requirements. However, when using Event-B to model complex systems, designers and developers may find it difficult to effectively organize the refinement steps due to the lack of guidelines. Summary of the invention

[0004] The purpose of this application is to propose a trusted development and verification method and device for safety-critical systems in response to the above-mentioned technical problems.

[0005] In a first aspect, the present invention provides a trusted development and verification method for a safety-critical system, comprising the following steps:

[0006] Determine the functional requirements, system-level accidents, system-level hazards and system-level safety constraints of the safety-critical system. The functional requirements include initial functional requirements and new functional requirements. The system-level hazards are associated with system-level accidents, and the system-level safety constraints are associated with system-level hazards.

[0007] In the initial stage, the initial STAMP model is constructed according to the initial functional requirements. The initial task model is constructed based on the initial STAMP model using the Event-B formal method. The initial safety constraints are obtained by STPA analysis based on the initial STAMP model. The initial safety model is constructed based on the initial safety constraints using the Event-B formal method. The initial task model and the initial safety model constitute the initial Event-B model. The initial Event-B model is formally verified. If the verification is successful, the iteration stage is entered. If the verification fails, the initial STAMP model is adjusted. The steps of the initial stage are repeated until the verification is successful, and the initial STAMP model after successful verification is obtained.

[0008] In the iteration stage, based on the initial STAMP model after successful verification or the STAMP model determined in the previous iteration, the STAMP model of the current iteration is constructed in combination with the newly added functional requirements. Based on the STAMP model of the current iteration, the task model of the current iteration is constructed using the Event-B formal method. According to the STAMP model of the current iteration, the safety constraints of the current iteration are obtained by STPA analysis. Based on the safety constraints of the current iteration, the safety model of the current iteration is constructed using the Event-B formal method. The task model of the current iteration and the safety model of the current iteration constitute the Event-B model of the current iteration. The Event-B model of the current iteration is formally verified. If the verification is successful, additional newly added functional requirements are added and the next iteration is carried out until the system-level safety constraints of all functional requirements are met and the product design of the safety-critical system is completed. If the verification fails, the STAMP model of the current iteration is adjusted to repeat the steps of the iteration stage until the verification is successful.

[0009] Preferably, the initial STAMP model includes an initial control structure and its corresponding initial process model, the initial control structure includes the components in the initial functional requirements and the control actions and feedback mechanisms representing the interaction behaviors between the components, the initial process model includes the variables of the initial process model and their corresponding values, and the initial task model includes the events represented by the variables of the initial process model and their corresponding values.

[0010] Preferably, an initial security model is constructed based on the initial security constraints using the Event-B formal method. The initial task model and the initial security model constitute an initial Event-B model. The initial Event-B model is formally verified, specifically including:

[0011] The initial safety constraints are converted into invariants in the Event-B formal method and integrated into the initial task model to obtain the initial Event-B model and verify the correctness of the initial Event-B model.

[0012] Preferably, the current iterative STAMP model includes an iterative control structure and its corresponding iterative process model, the iterative control structure includes each component in the initial functional requirements and the newly added functional requirements, and the control actions and feedback mechanisms representing the interaction behaviors between each component, the iterative process model includes the variables of the iterative process model and their corresponding values, and the iterative task model includes the events represented by the variables of the iterative process model and their corresponding values.

[0013] Preferably, the security model of the current iteration is constructed using the Event-B formal method based on the security constraints of the current iteration. The task model of the current iteration and the security model of the current iteration constitute the Event-B model of the current iteration. The Event-B model of the current iteration is formally verified, specifically including:

[0014] The safety constraints of the current iteration are converted into invariants in the Event-B formal method and integrated into the task model of the current iteration to obtain the Event-B model of the current iteration and verify the correctness of the Event-B model of the current iteration.

[0015] As a preferred method, the STPA analysis process is as follows:

[0016] Based on the combination of the control behavior and the values ​​of the variables of the initial process model or the iterative process model, the system-level hazards that may occur when the control behavior is provided and when the control behavior is not provided are discovered and the associated system-level safety constraints are refined to obtain the initial safety constraints or the safety constraints of the current iteration. The situations of providing control behavior include providing wrong control behavior, providing control behavior too early, and providing control behavior too late.

[0017] Preferably, the safety critical system comprises a computer interlocking system of the train.

[0018] In a second aspect, the present invention provides a trusted development and verification device for a safety-critical system, comprising:

[0019] A parameter determination module is configured to determine functional requirements, system-level accidents, system-level hazards, and system-level safety constraints of a safety-critical system, wherein the functional requirements include initial functional requirements and newly added functional requirements, the system-level hazards are associated with system-level accidents, and the system-level safety constraints are associated with system-level hazards;

[0020] The initial module is configured to build an initial STAMP model according to the initial functional requirements in the initial stage, build an initial task model based on the initial STAMP model using the Event-B formal method, obtain initial safety constraints based on the initial STAMP model using STPA analysis, build an initial safety model based on the initial safety constraints using the Event-B formal method, the initial task model and the initial safety model constitute an initial Event-B model, and formally verify the initial Event-B model. If the verification is successful, enter the iteration stage. If the verification fails, adjust the initial STAMP model, repeat the steps of the initial stage until the verification is successful, and obtain the initial STAMP model after successful verification.

[0021] The iteration module is configured to, during the iteration phase, build a STAMP model of the current iteration based on the initial STAMP model after successful verification or the STAMP model determined in the previous iteration in combination with the newly added functional requirements, build a task model of the current iteration based on the STAMP model of the current iteration using the Event-B formal method, obtain the safety constraints of the current iteration based on the STAMP model of the current iteration using STPA analysis, build the safety model of the current iteration based on the safety constraints of the current iteration using the Event-B formal method, the task model of the current iteration and the safety model of the current iteration constitute the Event-B model of the current iteration, formal verification is performed on the Event-B model of the current iteration, if the verification is successful, additional newly added functional requirements are added and the next iteration is performed until the system-level safety constraints of all functional requirements are met and the product design of the safety-critical system is completed, if the verification fails, adjust the STAMP model of the current iteration and repeat the steps of the iteration phase until the verification is successful.

[0022] In a third aspect, the present invention provides an electronic device comprising one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner in the first aspect.

[0023] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any implementation manner in the first aspect.

[0024] In a fifth aspect, the present invention provides a computer program product, comprising a computer program, which, when executed by a processor, implements the method described in any implementation manner in the first aspect.

[0025] Compared with the prior art, the present invention has the following beneficial effects:

[0026] (1) The trusted development and verification method for safety-critical systems proposed in this invention is based on the Event-B method for formal modeling. The Event-B method supports an iterative and incremental development process, which can continuously refine and improve system specifications and properties during the development process, thereby better adapting to demand changes and system evolution.

[0027] (2) The trusted development and verification method for safety-critical systems proposed in this invention uses STPA safety analysis. STPA not only focuses on individual components or events of the system, but also considers the system level and analyzes the structure, function and interaction of the entire system, thereby more comprehensively evaluating the safety of the system.

[0028] (3) The trusted development and verification method for safety-critical systems proposed in this invention combines STPA safety analysis with Event-B formal development. The analysis process is characterized by gradual iteration and refinement, ensuring that safety is not an afterthought but a guiding principle throughout the entire life cycle of the system. By continuously using the Event-B method to verify the safety constraints derived from the STPA analysis, the reliability and safety of the system are further improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments 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 creative work.

[0030] Figure 1 A flowchart of a trusted development and verification method for a safety-critical system according to an embodiment of the present application;

[0031] Figure 2 A flowchart of a trusted development and verification method for a safety-critical system according to an embodiment of the present application;

[0032] Figure 3 A train track network topology diagram of a trusted development and verification method for a safety-critical system according to an embodiment of the present application;

[0033] Figure 4 A turnout position diagram of a trusted development and verification method for a safety-critical system according to an embodiment of the present application;

[0034] Figure 5 A schematic diagram of a trusted development and verification method for a safety-critical system according to an embodiment of the present application;

[0035] Figure 6A schematic diagram of the sequential release of a trusted development and verification method for a safety-critical system according to an embodiment of the present application;

[0036] Figure 7 A schematic diagram of an initial control structure of a computer interlocking system for a trusted development and verification method for a safety-critical system according to an embodiment of the present application;

[0037] Figure 8 A schematic diagram of a dual-entity model calculation process for a trusted development and verification method for a safety-critical system according to an embodiment of the present application;

[0038] Fig. 9 A schematic diagram of a trusted development and verification device for a safety-critical system according to an embodiment of the present application;

[0039] Fig.10 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0040] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all 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.

[0041] Figure 1 A trusted development and verification method for a safety-critical system provided by an embodiment of the present application is shown, comprising the following steps:

[0042] S1. Determine the functional requirements, system-level accidents, system-level hazards and system-level safety constraints of the safety-critical system. The functional requirements include initial functional requirements and new functional requirements. The system-level hazards are associated with system-level accidents, and the system-level safety constraints are associated with system-level hazards.

[0043] In a specific embodiment, the safety critical system includes a computer interlocking system of a train.

[0044] Specifically, the embodiment of the present application provides a kind of STPA and Event-B collaborative analysis process, to ensure the correctness and safety of safety-critical systems.The safety-critical systems studied in the embodiment of the present application include but are not limited to computer interlocking systems, and computer interlocking systems are mainly used in railway signal systems, responsible for automatically controlling signal machines and turnouts in railway networks, and their main goal is to ensure the safe operation of trains by preventing collisions or derailment. Considering the key role of computer interlocking systems in railway transportation, its design needs to meet the highest safety integrity level (SIL4) defined by CENELEC 50128 standards.Therefore, the embodiment of the present application selects computer interlocking systems as examples for research.

[0045] refer to Figure 2 , first enter the preparation phase, which plays a key role in the STPA and Event-B collaborative analysis process for two main reasons. First, it lays the necessary foundation for the subsequent STPA analysis. Second, the system-level safety constraints determined in this phase are used as safety properties that the computer interlocking system needs to meet. This phase involves the following key steps:

[0046] 1. Define system-level requirements. Analyze the safety-critical system to obtain a description of the system-level requirements. In the computer interlocking system of the embodiment of the present application, the train route is only allowed to be set when the train's path does not conflict with the currently reserved route and the positions of all switches along the line are locked in the required positions to ensure the safety of train operation. For ease of explanation, consider a track network topology with 8 track segments and two switches, where the track segments are represented by the letter "B", the switches are represented by the letter "P", and the signal lights are represented by the letter "SG", such as Figure 3 shown.

[0047] The railway network topology constitutes the environmental requirements of the computer interlocking system, which consists of various interconnected elements that work together to enable the safe and efficient operation of trains. Understanding these components is essential for designing a safe and operating computer interlocking system. Below, the embodiments of the present application will provide a description of these components and their related environmental requirements.

[0048] Track Segment: The railway network topology consists of a fixed number of track segments which serve as the unit of the physical path for trains. These track segments include various elements such as linear segments, switches, and crossing switches. Each track segment is equipped with track circuits that can detect whether there is a train on the track segment. Therefore, a track segment can be in one of two different states: unoccupied (no train on it) or occupied (a train on it). Following are the requirements related to track segments:

[0049] Requirement 1: The railway network topology consists of a predetermined number of fixed track sections.

[0050] Requirement 2: Track sections can be occupied or unoccupied depending on the presence or absence of trains

[0051] Turnout: Each track section is a linear section or a turnout. As a key device, the turnout enables a track section to establish a connection with other track sections. By configuring these connections, the turnout can effectively determine the path and direction of train travel. The turnout can be in a fixed or reverse state, such as Figure 4 , indicating the direction of the connection it establishes. In addition, each turnout is equipped with a locking mechanism designed to secure the device in a specified position, ensuring that it remains fixed and cannot change its position until it is unlocked. The following are the requirements related to turnouts:

[0052] Requirement 3: The track section can be a linear section or a switch section.

[0053] Requirement 4: A turnout has two positions: positive or negative, which are used to indicate the direction of the connection it establishes.

[0054] Requirement 5: The turnout must be equipped with a locking device to maintain its position, allowing locking and unlocking as needed.

[0055] Path: A path is a physical entity consisting of a series of interconnected track segments in the railway network topology. In order to correctly establish a path, all switches along the path must be converted and locked to the required position. The following are the requirements related to the path:

[0056] Requirement 6: The path is characterized by a series of interconnected track segments.

[0057] Requirement 7: A path is characterized by the locations of switches in the track sections that comprise it.

[0058] Signal: A signal is an entity that conveys information to trains. Each signal is associated with a specific route in a specific direction. A signal can be in one of two states: red or green. By default, signals are set to red. Trains are expected to follow the instructions of signals, especially to stop when the signal is red. The following are signal-related requirements:

[0059] Requirement 8: The signal can be red or green. The train must stop at a red signal.

[0060] Requirement 9: The signal is set to red by default. This means that when the signal shows red, the train must stop and wait until the signal turns green before continuing.

[0061] Computer interlocking systems play a key role in ensuring safe and efficient train operations. They reserve and release resources in a safe and efficient manner using routes designed for specific network topologies. In railway signaling terminology, reserving a route means allocating resources such as track sections, turnouts, and signals to the path corresponding to the route, and opening the route specifically for a train after the resources are allocated. On the other hand, releasing a route means releasing the resources allocated to the route, which can be released after being used by a train or cancelled by the requester. Typically, a route is associated with a signal and a path. For example, Figure 5 Shows from Figure 3 The left part shows the derived railway layout. It contains two approaches, which are listed in Table 1, including their route numbers, signals, and the track sections and switch locations of the associated paths.

[0062] Table 1 Access routes and related equipment;

[0063]

[0064] In actual applications, when a train enters a railway network, the Automatic Train Supervision (ATS) system communicates with the computer interlocking system to specify the required route. The computer interlocking system then activates the appropriate route controller to reserve the specified route. If necessary, the controller of the automatic train monitoring system can issue a route message to revoke the previously requested route. While ensuring safety, the computer interlocking system activates the relevant route controller to release the specified route. Taking into account the potential dangers that other moving trains in the railway network may pose. The goal of the computer interlocking system is to enable a large number of trains to coexist in the railway network at the same time without affecting safety. In order to achieve this goal, the track section in the reserved route will be released in time when the train is no longer occupied. Therefore, the route controller in the computer interlocking system needs to implement three control processes: route reservation, route cancellation, and route sequential release. Therefore, the task requirements of the computer interlocking system of the embodiment of the present application are as follows:

[0065] Route Reservation: The route reservation process consists of three phases: The first phase is the segment reservation, in which each segment on the route's associated path is reserved. The second phase involves switching the relevant switches on the path to the required position. Once set, these switches are locked to maintain the integrity of the path and prevent any unexpected changes. The third phase is signal activation, in which the signals protecting the path are activated. The signal is adjusted to green, indicating that the route reservation is successful and the train is authorized to proceed. By following these three phases, the route reservation process ensures the correct allocation of resources corresponding to the route. For example, in Figure 5In the example, when the ATS reserves route R1, the route controller of R1 reserves track sections B3 and B2. Then, it switches and locks the position of turnout P1 to the reverse position, which is consistent with the required position of R1. Finally, the signal light SG2 associated with R1 is adjusted to green, indicating that route R1 is available for use. The following are the requirements related to route reservation:

[0066] Requirement 10: The computer interlocking system should instruct the route controller to reserve a path for the train based on the route reservation request sent by the ATS.

[0067] Requirement 11: The computer interlocking system should not respond to the route reservation request sent by the ATS when the same route reservation request has already been received.

[0068] Requirement 12: The route controller should reserve all track sections belonging to the path corresponding to the route.

[0069] Requirement 13: The route controller should switch the switches on the path corresponding to the route to the required position and lock them safely.

[0070] Requirement 14: Once the path corresponding to the approach is available, the approach controller should adjust the signal protecting the approach to green.

[0071] Route Cancellation: The process of cancelling a reserved route includes four stages: The first stage is signal activation, in this stage, the signal lights protecting the route are adjusted to red, indicating that the route is unavailable. The second stage is unlocking the switches, which involves unlocking the relevant switches on the route. Once unlocked, the positions of these switches can be switched again. The third stage is canceling the section, in this stage, the reservation of the track section associated with the route is canceled. The fourth stage is reservation request availability, in this stage, when all the track sections on the route corresponding to the route are unreserved, the route can be reserved by the ATS. For example, in Figure 5 In the example, if route controller R1 receives a request from the ATS to cancel reserved route R1, it takes the following actions: First, it adjusts signal SG2 to red, indicating that the route is no longer passable. Next, it unlocks turnout P1 so that it can move freely. Finally, it releases track sections B3 and B2. The following are the requirements related to canceling a route:

[0072] Requirement 15: The computer interlocking system should respond to the ATS's cancellation request and instruct the route controller to cancel the route.

[0073] Requirement 16: When the route is cancelled, the route controller should adjust the signal light protecting the route to red.

[0074] Requirement 17: When the route is canceled, the route controller should unlock the switch of the path corresponding to the route.

[0075] Requirement 18: When a route is canceled, the route controller should cancel all track sections on the path corresponding to the route.

[0076] Requirement 19: Once the path associated with the route controller no longer reserves any track segments, the route reservation should be canceled so that the ATS system can request the route again.

[0077] Sequential release of routes: The process of releasing a reserved segment involves five stages to release the route of the segment: The first stage is signal conversion. When a train enters the route of the reserved segment, the route controller immediately activates a signal change, adjusting the signal light to red. This change clearly indicates that the segment is occupied, preventing other trains from entering. The second stage is track segment occupancy check. As the train advances along the track segment and passes through each track segment, the route controller carefully checks whether each track segment is clear to ensure that the train is no longer occupying it. The third stage is unlocking the switch. If the track segment is associated with a switch, the route controller unlocks the switch. The fourth stage is track segment release. After unlocking the switch, the route controller releases the track segment. The fifth stage is availability. In this stage, when all track segments along the initial route have been released, the track segment becomes available for ATS request. By following these five stages in sequence, the route controller ensures that the reserved segments are released step by step.

[0078] For example, refer to Figure 6 , route R2 is reserved for the train on the left. When the train enters route R2, the entry signal SG1 turns red, indicating that the section is no longer accessible. The train gradually occupies track segments B2, B3, and B4 of route R2. As the train moves forward, the route controller gradually releases track segments B2, B3, and B4. Before releasing track segment B3, the relevant switch P1 will be unlocked after the train passes and leaves track segment B3. When the train passes track segment B4, all track segments in the initial route are released and the route is completely released. At this point, route R1 becomes available for ATS requests. The benefit of sequential release is the efficient use of shared track segments. In the given example, when route R2 releases track segments B2 and B3, the R1 route no longer conflicts with the R2 route. This allows route R1 to reserve these segments in a timely manner and optimize resource utilization, rather than adopting the traditional method of releasing the entire track segment at once. The following are requirements related to the sequential release of segments:

[0079] Requirement 20: When a train passes through a track section and no longer occupies the track section, the route controller should release the track sections in the route in sequence.

[0080] Requirement 21: When a train enters the approach, the approach controller should adjust the protection signal to red, indicating that the approach is occupied.

[0081] Requirement 22: Once a train passes through a track section, the approach controller should unlock the switches associated with it.

[0082] Requirement 23: Once the train passes through the track section, the route controller should release the track section.

[0083] Requirement 24: Once a route associated with a route controller no longer reserves any track segments, the route should be released so that the ATS system can request the route again.

[0084] 2. Define system-level incidents: This step involves defining the various unsafe and unplanned events that can occur within the system, leading to serious consequences or damage. By understanding the potential system-level incidents, analysis can focus on reducing the likelihood of their occurrence. Specifically, system-level incidents are denoted by (A-), system-level hazards are denoted by (H-), and system-level safety constraints are denoted by (SSC-). These identifiers provide a systematic way to reference and track incidents, hazards, and safety constraints throughout the development process.

[0085] Table 2 provides an overview of the types of potential system-level accidents within the considered computer interlocking system. These system-level accidents are divided into the following categories: collisions occur due to (A-1) the following train fails to maintain a safe distance, resulting in a rear-end collision with the preceding train; (A-2) a head-on collision between two trains traveling towards each other on the same track section; or (A-3) a side collision between two trains on intersecting tracks. In addition, (A-4) derailment refers to a train leaving the track, which may cause damage to the train, infrastructure, or nearby objects. Accidents A-1 to A-3 involve collisions between trains, while A-4 represents situations where trains derail, usually due to unexpected switch operations.

[0086] Table 2 Interlocking system level accidents;

[0087]

[0088] 3. Define system-level hazards: In this step, the system is thoroughly examined to identify potential system-level hazards. Hazard analysis is essential to identify and understand the inherent risks of the system. By identifying and evaluating these hazards, appropriate safety measures can be implemented to mitigate their potential impact. Table 3 lists the system-level hazards identified from the incidents A-1 to A-4 recorded in Table 2 and establishes the inter-relationships between them. System-level incidents that may lead to rear-end collisions (A-1) include trains entering a track section that is already occupied by another train traveling in the same direction, which may be caused by system-level hazards H-1 to H-5. For head-on collisions (A-2), when a train enters a track section that is already occupied by another train from the opposite direction, this may be caused by system-level hazards H-2 to H-5. In addition, if a train enters a track section that has been reserved for another train, this may result in a side collision (A-3), which may be the result of system-level hazards H-2, H-3, H-4, and H-5. Finally, a derailment (A-4) can be caused by a train passing while a switch is being changed or is in an incorrect position, which is caused by system-level hazards H-3, H-4, and H-5.

[0089] Table 3 Interlocking system level hazards;

[0090]

[0091] 4. Determine system-level safety constraints: The identified system-level hazards lead to the establishment of system-level safety constraints, as shown in Table 4. One of them is SSC-1, which ensures that a train will never enter a segment route that is already occupied by other trains, thereby solving the system-level hazard H-1 of multiple trains trying to enter the same segment route. The system-level hazard H-2 involving multiple segment controllers reserving conflicting routes at the same time leads to the establishment of SSC-2, which prevents segment controllers from reserving routes that conflict with any reserved routes. System-level hazards H-3 and H-4 are combined into safety constraint SSC-3, which stipulates that when a route is reserved for a train, all switches on the route must be locked in the correct position. SSC-4, which stems from system-level hazard H-5, stipulates that a route that has been occupied by a train cannot be revoked. This safety constraint is generated when a train enters a track segment and does not leave it, and then attempts to cancel the track segment.

[0092] Table 4 Interlocking system level safety constraints;

[0093]

[0094] S2. In the initial stage, an initial STAMP model is constructed according to the initial functional requirements. Based on the initial STAMP model, the initial task model is constructed using the Event-B formal method. Based on the initial STAMP model, STPA analysis is used to obtain the initial safety constraints. Based on the initial safety constraints, the initial safety model is constructed using the Event-B formal method. The initial task model and the initial safety model constitute the initial Event-B model. The initial Event-B model is formally verified. If the verification is successful, the iteration stage is entered. If the verification fails, the initial STAMP model is adjusted. The steps of the initial stage are repeated until the verification is successful, and the initial STAMP model after successful verification is obtained.

[0095] In a specific embodiment, the initial STAMP model includes an initial control structure and its corresponding initial process model. The initial control structure includes the various components in the initial functional requirements and the control actions and feedback mechanisms that represent the interaction behaviors between the various components. The initial process model includes the variables of the initial process model and their corresponding values. The initial task model includes the events represented by the variables of the initial process model and their corresponding values.

[0096] In a specific embodiment, an initial security model is constructed based on the initial security constraints using the Event-B formal method. The initial task model and the initial security model constitute an initial Event-B model. The initial Event-B model is formally verified, specifically including:

[0097] The initial safety constraints are converted into invariants in the Event-B formal method and integrated into the initial task model to obtain the initial Event-B model and verify the correctness of the initial Event-B model.

[0098] Specifically, in the initial stage, a strict process will be followed to ensure that the initial STAMP model meets the necessary safety properties. First, an initial STAMP model at an abstract level is constructed according to the initial functional requirements. The initial STAMP model consists of an initial control structure and initial process model variables. The control structure between the components will be derived based on the interaction behavior between the components in the initial functional requirements. The variables of the initial process model are the information of the interaction between them. Secondly, based on this control structure, Event-B variables are formulated according to the components in the control structure, and the initial task model is described through the association relationship in Event-B. Then, STPA analysis is performed on the control structure to identify safety constraints. Finally, the initial Event-B model is constructed and the correctness of the initial Event-B model is verified. This is achieved through the following steps:

[0099] Get initial functional requirements: In the initial STAMP model, only the initial functional requirements need to be considered. The main goal of the first step is to create an initial STAMP model at an abstract level as the basis for the subsequent steps of Event-B specification and STPA analysis. It provides an overview and structure for the system. In the initial STAMP model, only part of the system requirements are considered. For example, in the initial computer interlocking system, only requirements 10, 14, and 21 in the functional requirements of the previously described safety-critical system are considered. It is worth noting that the initial functional requirements considered by the initial computer interlocking system are not unique. It is only necessary to ensure that the final designed computer interlocking system after iteration takes into account all functional requirements.

[0100] Constructing the initial STAMP model: The initial STAMP model includes the initial control structure and its corresponding initial process model. The control structure serves as a conceptual framework for a safety-critical system, outlining the interactions between the various components and control elements. This is a key blueprint that guides all subsequent development and analysis activities. The components of this initial control structure include the interlocking controller, the automatic train monitoring system, the paths corresponding to the trains and routes. These components interact through control actions, represented by solid arrows, and feedback mechanisms, represented by dashed arrows. The initial control structure of the computer interlocking system is shown in Figure 1. Figure 7 shown.

[0101] At this stage, the initial control structure provides a basic functional representation that clearly outlines the controls and responsibilities of each component involved in achieving the specified requirements. The roles and responsibilities of each component can be summarized as follows:

[0102] Automatic Train Monitoring System: ATS is responsible for sending route request messages to the computer interlocking system when the train approaches the railway network. If necessary, it can also send a route cancellation message to cancel the previously requested route.

[0103] Interlocking controller: The route controller is responsible for processing route reservation and cancellation requests initiated by the ATS controller. To meet these requests, the route controller performs control actions to reserve and cancel reserved paths accordingly. In addition, as the train moves along the track, the route controller gradually releases the route paths associated with the occupied route.

[0104] Trains: Trains are authorized to enter the paths of reserved routes specifically assigned to them. They proceed along the paths of their respective reserved routes and eventually leave these paths.

[0105] Table 5 details the initial process model in the initial computer interlocking system, including relevant variables and their values. The variable Route Mode is set to Request when the ATS sends a route reservation request to the route controller, Cancel when the ATS requests to cancel a reserved route, and Free when the route controller does not receive any request. For the Path Mode variable, the value Free indicates that the path has not been reserved by the route controller, while Reserve indicates that the path has been reserved. The Path State variable is marked as Free before the train passes through the path, marked as Occupy when the train is on the path, and marked as Unoccupy once the train leaves the path. For the variable No Conflicting Paths Res Others, it is assigned a value of Yes if no conflicting paths have been reserved by other route controllers, and a value of No if there are conflicting reservations.

[0106] Table 5 Variables and values ​​of the initial process model;

[0107]

[0108] Construct the initial task model: Based on the abstract initial control structure and its corresponding initial process model, the initial task model is constructed using the Event-B formal method. Event-B provides a mathematical framework that can introduce some variables for modeling system behavior. For example, in the initial task model of the computer interlocking system, it is necessary to introduce the process model variable "Route Mode" to represent the route, the variable "Path Mode" to represent the path, the "Path State" to represent the path state, and the variable "PathConflict" to represent whether there is a conflict between paths. The initial Event-B event is constructed through these variables. Variables and events constitute the Event-B task model. For example, when the "Route Mode" variable takes the value of Request, the Request event is triggered; when the value is Cancel, the Cancel event is triggered; and when the value is Free, no event is triggered.

[0109] For example, the "Route Mode" variable can take the value of Request, Cancel or Free. When the value is Request, the Request event is executed. When the value is Cancel, the Cancel event is executed. When the value is Free, the event is not executed.

[0110] Perform STPA analysis to obtain safety constraints: The STPA (System-Theoretic Processing Analysis) method stands out for its effectiveness in analyzing complex, software-intensive systems because it effectively handles the complexity and interdependencies inherent in such environments. It can be implemented early in the design phase and used iteratively during system development to enhance safety analysis. As system requirements evolve, the STPA analysis can be gradually refined to ensure that the system meets safety constraints during the refinement process. Apply STPA to control structures and their corresponding process models. STPA believes that providing incorrect control actions, providing control actions too early, providing control actions too late, and not providing control actions will lead to the occurrence of dangerous situations. According to the combination of the values ​​of the variables of the control actions and the corresponding initial process models, dangerous situations that may occur when control actions are provided and when control actions are not provided are found. The analysis results are shown in the following table (Occ indicates that the variable value is "Occupy"):

[0111] Table 6 Analysis of unsafe control behaviors of the initial model

[0112]

[0113] Among them, the variable values ​​marked with "*" are considered irrelevant, and the control behaviors marked with "×" are considered inapplicable. The analysis results show that reserving two conflicting paths will lead to the occurrence of hazard H2, canceling the occupied path will lead to the occurrence of hazard H5, and releasing the occupied path will lead to the occurrence of hazard H5. The safety constraints (SC) are as follows:

[0114] SC-1: If a reserved path conflicts with an already reserved path [No Conflict Paths ResOthers = No], control behavior for the reserved path cannot be provided.

[0115] SC-2: If the path corresponding to the access route is in the occupied state [PathState = Occupy], the control behavior of canceling the path cannot be provided.

[0116] SC-3: If the path corresponding to the access route is in the occupied state [PathState = Occupy], the control behavior for releasing the path cannot be provided.

[0117] Establish an initial safety model and verify: The safety constraints identified in the previous step will be precisely defined and formally verified using Event-B. This involves creating an initial task model of these safety requirements and mathematically proving that they hold under all specified conditions, that is, the initial task model and the initial safety model constitute the initial Event-B model. This step is critical to verifying that the safety constraints will effectively mitigate the identified hazards and confirm that the system design is consistent with the desired safety properties. For example, the safety constraint of a computer interlocking system is: If [Conflict Paths Res Others = Yes], the control behavior of the reserved path cannot be provided. The embodiment of the present application integrates it into the Event-B reserved path event of the initial task model, indicating that the conflicting path cannot be reserved, as shown below:

[0118] ;

[0119] By ensuring that the corresponding operations can be performed only when the safety constraints are met, the safety constraints are ensured to be met. The task model can be understood as the system can achieve these basic functions, but it cannot guarantee safety. The safety model means that the system can not only achieve functions but also guarantee safety. Therefore, the initial Event-B model is formally verified. If the verification is successful, the corresponding initial STAMP model can be obtained. If the verification is recognized, the initial STAMP model is adjusted, that is, the initial control structure or its corresponding initial process model is modified until the verification is successful and the corresponding initial STAMP model is obtained.

[0120] S2. In the iteration phase, based on the initial STAMP model after successful verification or the STAMP model determined in the previous iteration, the STAMP model of the current iteration is constructed in combination with the newly added functional requirements. Based on the STAMP model of the current iteration, the task model of the current iteration is constructed using the Event-B formal method. According to the STAMP model of the current iteration, the safety constraints of the current iteration are obtained by STPA analysis. Based on the safety constraints of the current iteration, the safety model of the current iteration is constructed using the Event-B formal method. The task model of the current iteration and the safety model of the current iteration constitute the Event-B model of the current iteration. The Event-B model of the current iteration is formally verified. If the verification is successful, additional newly added functional requirements are added and the next iteration is carried out until the system-level safety constraints of all functional requirements are met and the product design of the safety-critical system is completed. If the verification fails, the STAMP model of the current iteration is adjusted to repeat the steps of the iteration phase until the verification is successful.

[0121] In a specific embodiment, the current iterative STAMP model includes an iterative control structure and its corresponding iterative process model. The iterative control structure includes various components in the initial functional requirements and the newly added functional requirements, as well as control actions and feedback mechanisms that represent the interaction behaviors between the various components. The iterative process model includes the variables of the iterative process model and their corresponding values. The iterative task model includes the events represented by the variables of the iterative process model and their corresponding values.

[0122] In a specific embodiment, the security model of the current iteration is constructed using the Event-B formal method based on the security constraints of the current iteration. The task model of the current iteration and the security model of the current iteration constitute the Event-B model of the current iteration. The Event-B model of the current iteration is formally verified, specifically including:

[0123] The safety constraints of the current iteration are converted into invariants in the Event-B formal method and integrated into the task model of the current iteration to obtain the Event-B model of the current iteration and verify the correctness of the Event-B model of the current iteration.

[0124] In a specific embodiment, the process of STPA analysis is as follows:

[0125] Based on the combination of the control behavior and the values ​​of the variables of the initial process model or the iterative process model, the system-level hazards that may occur when the control behavior is provided and when the control behavior is not provided are discovered and the associated system-level safety constraints are refined to obtain the initial safety constraints or the safety constraints of the current iteration. The situations of providing control behavior include providing wrong control behavior, providing control behavior too early, and providing control behavior too late.

[0126] Specifically, once the initial STAMP model of the computer interlocking system is determined and verified to be consistent with the expected system-level safety properties, the development process enters the iteration phase. The iteration phase is to supplement and improve the initial STAMP model and conduct a more detailed safety analysis of the system. The iteration phase includes several key steps:

[0127] New functional requirements: In the iterative process of the computer interlocking system, the embodiment of the present application adds requirements 1, 2 and 6 as well as requirements 2, 18 and 22, which are used to indicate the introduction of track sections. It should be noted that the requirements introduced iteratively are not unique, and it is only necessary to ensure that the final system contains all the required requirements.

[0128] Formulate the control structure of the current iteration and its corresponding iterative process model: This control structure of the current iteration takes into account new functional requirements, interactions or changes. For example, in the computer interlocking system, the functional requirements of the track section are introduced, and the initial control structure is refined to obtain the control structure of the current iteration, such as Figure 7 shown.

[0129] During the iteration process, the control structure has changed. Therefore, the modification of the control structure requires adjusting the roles and responsibilities of the approach controller to match the newly introduced functions.

[0130] When reserving a route, the control action "Reserve Path" has been refined into two actions. "Reserve Segment" is responsible for reserving a single track segment, while "Reserve Path" reserves each track segment that makes up the route by utilizing segment reservations.

[0131] Likewise, when cancelling a reserved path, the control action "Cancel Path" has been refined into two actions. "Cancel Segment" is responsible for releasing a single track segment, while "Cancel Path" ensures the cancellation of the entire path by using "Cancel Segment" to cancel each track segment that makes up the path.

[0132] Furthermore, for the sequential release of the approach path, the control action "Release Path" has been refined into two actions. "Release Segments" is responsible for releasing individual track segments in the order that trains have passed and are no longer occupied. On the other hand, "Release Path" enables the release of the entire path by using "Release Segments" to release each track segment that constitutes the path.

[0133] The existing variable "Path State" has been improved to take into account "None of Track Blocks Are Occupied". If none of the track segments that make up the path are occupied by a train, the value of "Path State" is "Free"; otherwise, the value is "Occupied". In addition, the improvement from "No Conflicting Paths Res Others" to "None ofTrack Blocks Are Reserved Others" indicates that there are conflicts between routes if the track segments in the route are conflicting.

[0134] The concept of track segments was introduced in the iteration phase. The newly introduced variable "Track Block Mode" is set to "Res" when the route controller reserves a track segment; if there is no reservation, its value defaults to "Free". Another newly added variable "Track Block State" is assigned the value of "Free" when the train has not passed the track segment, "Occupied" when the track segment is currently occupied by a train, and "Unoccupied" when the track segment is neither free nor occupied. In addition, the value of the variable "All Blocks Are Reserved" will be set to "Yes" when each track segment that constitutes the path is reserved by the route controller; if the situation is not met, the value is "No". The corresponding variables in the task model of the current iteration are shown in the following table:

[0135] Table 7 Iteration model variables and values;

[0136]

[0137] Refine the task model of the current iteration: For example, in the task model of the current iteration of the computer interlocking system, it is necessary to introduce the variable "None of Track Blocks Are Occupied" of the iteration process model to indicate that no track block in the path is occupied, the variable "None of Track Blocks Are Reserved Other" indicates that the track block in the path is not reserved for other paths, "All Blocks Are Reserved Oneself" indicates that all track blocks in the path can be reserved, "Track Block Mode" indicates the mode of the track block in the path, and "Track Block State" indicates the state of the track block in the path. The task model of the current iteration is refined through these variables. For example, refine from "NoConflicting Paths Res Others" to "None of Track Blocks Are Reserved Others", and modify the logic of the corresponding task model of the current iteration, "Conflicts between routes" is refined to "Conflicts between track blocks in routes".

[0138] Perform STPA analysis to obtain safety constraints: In the iteration phase, the control structure and process model variables will be re-analyzed by STPA in the embodiment of the present application. The embodiment of the present application analyzes various combinations of variable values ​​associated with each updated control action in the iterative process model to determine whether they may cause system-level hazards. The analysis results are as follows (where Res indicates that the variable value is Reserve, and Occ indicates that the variable value is Occupy):

[0139] Table 8 Analysis of unsafe control behaviors of iterative model

[0140]

[0141] Based on the identification of dangerous control actions and the specific conditions listed in Table 8, the safety constraints are as follows:

[0142] SC-4: If a track block in a path has been reserved by another path [Track Block Mode = Reserve], control behavior for the reserved block cannot be provided.

[0143] SC-5: If a track block in a path has been reserved by another path or the track block is occupied [TrackBlock Mode = Reserve; Track Block State = Occupy], the control behavior for canceling the segment cannot be provided.

[0144] SC-6: If a track block in a path is already reserved by another path or the track block is already occupied [TrackBlock Mode = Reserve; Track Block State = Occupy], the control behavior for releasing the block cannot be provided.

[0145] SC-7: If a track segment in a path has been reserved by another path or has been released [Track BlockMode = Reserve; Track Block State = Free], the control behavior for releasing the segment cannot be provided.

[0146] SC-8: If a track block in a path is already reserved by another path [None of Track Blocks AreReserved Others = No], control behavior for the reserved path cannot be provided.

[0147] SC-9: If there is a track segment in the path that cannot be reserved [All Blocks Are ResOneself = No], the control behavior of reserving the path cannot be provided.

[0148] SC-10: Failed to provide control behavior for canceling a route if the track blocks in the route are occupied [None of Track Blocks AreOccupied = No].

[0149] SC-11: Failed to provide control behavior for releasing a path if the track blocks in the path are occupied [None of Track Blocks AreOccupied = No].

[0150] Refine the safety model of the current iteration: According to the safety constraints obtained in the previous step, for example, SC-4: If the track segment in the reserved path has been reserved by another path [Track Block Mode = Reserve], the control behavior of the reserved segment cannot be provided. The embodiment of the present application integrates it into the Event-B reserved segment event of the task model of the current iteration, indicating that the segment that has been reserved by another path cannot be reserved, as shown in the following formula:

[0151] .

[0152] The current iteration's safety model and the current iteration's task model constitute the current iteration's Event-B model. The current iteration's Event-B model is formally verified. If the verification succeeds, the current iteration's STAMP model can be used as the product design result of the safety-critical system to complete the product design of the safety-critical system. If the verification fails, the next iteration's STAMP model is readjusted and the steps of the iteration phase are repeated until the verification succeeds.

[0153] Through continuous iteration, a complete system is built, and the complete system needs to include all requirements. During the iteration process, the main goal is to maintain the integrity, security and correctness of the overall system design. Each iteration builds on the previous iteration and enhances the specifications of the safety-critical system while retaining the basic safety principles established in the previous stage.

[0154] This method uses STPA and Event-B methods for collaborative analysis, combined with a step-by-step iterative process. First, the system tasks and safety constraints are established, and then the Event-B method is used to verify that the system meets the safety constraints. Each subsequent iteration gradually introduces more details and specific content to ensure compatibility with existing systems and follow system-level safety constraints. This collaborative analysis method provides a systematic and comprehensive safety assurance framework for the development of safety-critical systems, which helps to timely verify the safety of the current design system and improve the safety and reliability of the system.

[0155] Further references Fig. 9As an implementation of the methods shown in the above figures, the present application provides an embodiment of a trusted development and verification device for a safety-critical system. Figure 1 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0156] The embodiment of the present application provides a trusted development and verification device for a safety-critical system, including:

[0157] A parameter determination module 1 is configured to determine functional requirements, system-level accidents, system-level hazards and system-level safety constraints of the safety-critical system, wherein the functional requirements include initial functional requirements and newly added functional requirements, the system-level hazards are associated with the system-level accidents, and the system-level safety constraints are associated with the system-level hazards;

[0158] Initial module 2 is configured to build an initial STAMP model according to the initial functional requirements in the initial stage, build an initial task model based on the initial STAMP model using the Event-B formal method, obtain initial safety constraints based on the initial STAMP model using STPA analysis, build an initial safety model based on the initial safety constraints using the Event-B formal method, the initial task model and the initial safety model constitute an initial Event-B model, formally verify the initial Event-B model, enter the iteration stage if the verification is successful, adjust the initial STAMP model if the verification fails, repeat the steps of the initial stage until the verification is successful, and obtain the initial STAMP model after successful verification;

[0159] Iteration module 3 is configured to, during the iteration phase, construct a STAMP model of the current iteration based on the initial STAMP model after successful verification or the STAMP model determined in the previous iteration in combination with the newly added functional requirements, construct a task model of the current iteration based on the STAMP model of the current iteration using the Event-B formal method, obtain the safety constraints of the current iteration based on the STAMP model of the current iteration using STPA analysis, construct the safety model of the current iteration based on the safety constraints of the current iteration using the Event-B formal method, the task model of the current iteration and the safety model of the current iteration constitute the Event-B model of the current iteration, formal verification is performed on the Event-B model of the current iteration, if the verification is successful, additional newly added functional requirements are added and the next iteration is performed until the system-level safety constraints of all functional requirements are met and the product design of the safety-critical system is completed, if the verification fails, adjust the STAMP model of the current iteration and repeat the steps of the iteration phase until the verification is successful.

[0160] Fig.10 Schematic diagram of the hardware structure of the electronic device provided by the embodiment of the present invention. Fig.10 As shown, the electronic device of this embodiment includes: a processor 1001 and a memory 1002; wherein the memory 1002 is used to store computer-executable instructions; the processor 1001 is used to execute the computer-executable instructions stored in the memory to implement the various steps performed by the electronic device in the above embodiment. For details, please refer to the relevant description in the above method embodiment.

[0161] Optionally, the memory 1002 may be independent or integrated with the processor 1001 .

[0162] When the memory 1002 is independently provided, the electronic device further includes a bus 1003 for connecting the memory 1002 and the processor 1001 .

[0163] An embodiment of the present invention further provides a computer storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the above method is implemented.

[0164] An embodiment of the present invention further provides a computer program product, including a computer program. When the computer program is executed by the processor 1001, the above method is implemented.

[0165] In the embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. Another point, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.

[0166] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to implement the solution of this embodiment.

[0167] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, or each module may exist physically separately, or two or more modules may be integrated into one unit. The above-mentioned module-composed unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0168] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the methods of various embodiments of the present application.

[0169] It should be understood that the processor 1001 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or the processor 1001 may be any conventional processor 1001, etc. The steps of the method disclosed in the invention may be directly embodied in the hardware processor 1001 for execution, or may be executed by a combination of hardware and software modules in the processor 1001.

[0170] The memory 1002 may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk, or an optical disk.

[0171] The bus 1003 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus 1003 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus 1003 in the drawings of the present application is not limited to only one bus 1003 or one type of bus 1003.

[0172] The above storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.

[0173] An exemplary storage medium is coupled to the processor 1001, so that the processor 1001 can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor 1001. The processor 1001 and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor 1001 and the storage medium can also exist as discrete components in an electronic device or a main control device.

[0174] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.

[0175] 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 replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A trusted development and verification method for safety-critical systems, characterized in that: The following steps are involved: Determining functional requirements, system-level accidents, system-level hazards, and system-level safety constraints of a safety-critical system, wherein the functional requirements include initial functional requirements and newly added functional requirements, the system-level hazards are associated with the system-level accidents, and the system-level safety constraints are associated with the system-level hazards; In the initial stage, an initial STAMP model is constructed according to the initial functional requirements, the initial STAMP model includes an initial control structure and its corresponding initial process model, the initial control structure includes various components in the initial functional requirements and control actions and feedback mechanisms representing the interaction behaviors between various components, the initial process model includes variables of the initial process model and their corresponding values, an initial task model is constructed based on the initial STAMP model using the Event-B formalization method, the initial task model includes events represented by variables of the initial process model and their corresponding values, an initial safety constraint is obtained by STPA analysis based on the initial STAMP model, an initial safety model is constructed based on the initial safety constraint using the Event-B formalization method, the initial task model and the initial safety model constitute an initial Event-B model, the initial Event-B model is formally verified, if the verification is successful, the iteration stage is entered, if the verification fails, the initial STAMP model is adjusted, the steps of the initial stage are repeated until the verification is successful, and the initial STAMP model after successful verification is obtained; In the iteration phase, the STAMP model of the current iteration is constructed based on the initial STAMP model after successful verification or the STAMP model determined in the previous iteration in combination with the newly added functional requirements. The STAMP model of the current iteration includes an iteration control structure and its corresponding iteration process model. The iteration control structure includes each component in the initial functional requirements and the newly added functional requirements, and the control actions and feedback mechanisms representing the interaction behaviors between each component. The iteration process model includes the variables of the iteration process model and their corresponding values. Based on the STAMP model of the current iteration, the Event-B formalization method is used to construct the task model of the current iteration. The task model of the current iteration includes the variables of the iteration process model. and the events represented by their corresponding values, and according to the STAMP model of the current iteration, the STPA analysis is used to obtain the safety constraints of the current iteration, and based on the safety constraints of the current iteration, the Event-B formal method is used to construct the safety model of the current iteration, and the task model of the current iteration and the safety model of the current iteration constitute the Event-B model of the current iteration. The Event-B model of the current iteration is formally verified. If the verification is successful, additional new functional requirements are added and the next iteration is carried out until the system-level safety constraints of all functional requirements are met, and the product design of the safety-critical system is completed. If the verification fails, the STAMP model of the current iteration is adjusted to repeat the steps of the iterative stage until the verification is successful.

2. The trusted development and verification method for safety-critical systems according to claim 1, characterized in that: The initial security model is constructed based on the initial security constraints using the Event-B formal method. The initial task model and the initial security model constitute an initial Event-B model. The initial Event-B model is formally verified, specifically including: The initial safety constraints are converted into invariants in the Event-B formalization method and integrated into the initial task model to obtain an initial Event-B model, and the correctness of the initial Event-B model is verified.

3. The trusted development and verification method for safety-critical systems according to claim 1, characterized in that: The security constraint of the current iteration is based on the Event-B formal method to construct the security model of the current iteration, the task model of the current iteration and the security model of the current iteration constitute the Event-B model of the current iteration, and the Event-B model of the current iteration is formally verified, specifically including: The security constraints of the current iteration are converted into invariants in the Event-B formalization method and integrated into the task model of the current iteration to obtain the Event-B model of the current iteration, and the correctness of the Event-B model of the current iteration is verified.

4. The trusted development and verification method for safety-critical systems according to claim 1, characterized in that: The process of STPA analysis is as follows: The control behavior is combined with the values ​​of the variables of the initial process model or the iterative process model to discover possible system-level hazards that may occur when the control behavior is provided and when the control behavior is not provided, and refine the associated system-level safety constraints to obtain the initial safety constraints or the safety constraints of the current iteration. The situations of providing the control behavior include providing erroneous control behavior, providing the control behavior too early, and providing the control behavior too late.

5. The trusted development and verification method for safety-critical systems according to claim 1, characterized in that: The safety-critical systems include the train's computer interlocking system.

6. A trusted development and verification device for safety-critical systems, characterized in that: include: a parameter determination module configured to determine a functional requirement of a safety-critical system, a system-level accident, a system-level hazard, and a system-level safety constraint, wherein the functional requirement includes an initial functional requirement and a newly added functional requirement, the system-level hazard is associated with the system-level accident, and the system-level safety constraint is associated with the system-level hazard; An initial module is configured to construct an initial STAMP model according to initial functional requirements in an initial stage, wherein the initial STAMP model includes an initial control structure and a corresponding initial process model thereof, wherein the initial control structure includes various components in the initial functional requirements and control actions and feedback mechanisms representing the interaction behaviors between various components, wherein the initial process model includes variables of the initial process model and corresponding values ​​thereof, and an initial task model is constructed based on the initial STAMP model using the Event-B formalization method, wherein the initial task model includes events represented by variables of the initial process model and corresponding values ​​thereof, and an initial safety constraint is obtained by using STPA analysis according to the initial STAMP model, and an initial safety model is constructed based on the initial safety constraint using the Event-B formalization method, wherein the initial task model and the initial safety model constitute an initial Event-B model, and the initial Event-B model is formally verified, and if the verification is successful, the iteration stage is entered, and if the verification fails, the initial STAMP model is adjusted, and the steps of the initial stage are repeated until the verification is successful, thereby obtaining an initial STAMP model after successful verification; The iteration module is configured to construct the STAMP model of the current iteration in the iteration phase based on the initial STAMP model after the successful verification or the STAMP model determined in the previous iteration in combination with the newly added functional requirements. The STAMP model of the current iteration includes an iteration control structure and its corresponding iteration process model. The iteration control structure includes each component in the initial functional requirements and the newly added functional requirements, and the control actions and feedback mechanisms representing the interaction behaviors between each component. The iteration process model includes the variables of the iteration process model and their corresponding values. The task model of the current iteration is constructed based on the STAMP model of the current iteration using the Event-B formalization method. The task model of the current iteration includes an iteration process model. The event represented by the variable of the type and its corresponding value is obtained by adopting STPA analysis according to the STAMP model of the current iteration to obtain the safety constraints of the current iteration. The safety model of the current iteration is constructed based on the safety constraints of the current iteration using the Event-B formal method. The task model of the current iteration and the safety model of the current iteration constitute the Event-B model of the current iteration. The Event-B model of the current iteration is formally verified. If the verification is successful, additional new functional requirements are added and the next iteration is carried out until the system-level safety constraints of all functional requirements are met and the product design of the safety-critical system is completed. If the verification fails, the STAMP model of the current iteration is adjusted to repeat the steps of the iterative stage until the verification is successful.

7. An electronic device comprising: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • A Formal Modeling And Verification Method For A Microkernel Operating System Inter-Process Communication Mechanism Based on the Event-B Method

    AU2020102903A4

  • Task assignment modeling method for cooperative development of trusted flight control system

    CN107229478A

  • STPA-based formalization development method and system for safety-critical system and storage medium

    CN113469521A

  • High-speed railway interlocking system safety analysis method, system, equipment and medium

    CN117670630A

  • Method and device for analyzing hazard, and computer-readable recording medium

    WO2018074647A1