INTERLOCKING DATA SAFE CONVERSION METHOD FOR FORMAL VERIFICATION AND TRANSLATOR
20240220392 ยท 2024-07-04
Inventors
- Min WEI (Shanghai, CN)
- Yanqin WANG (Shanghai, CN)
- Mingyao ZHANG (Shanghai, CN)
- Shaoxin WANG (Shanghai, CN)
- Fan Yang (Shanghai, CN)
- Xiao LUI (Shanghai, CN)
- Cheng Zhang (Shanghai, CN)
- Wenyan Zhang (Shanghai, CN)
Cpc classification
G06F11/3608
PHYSICS
International classification
Abstract
An interlocking data safe conversion method for formal verification and a translator. Two translators with same functions are developed by adopting different programming methods and programming languages. An input file of each of the translators at least comprises an interlocking information table in interlocking data, a device interface information table, a station yard description data and interlocking Boolean logic data. Consistency of output files of the two translators is compared to realize detection process failure.
Claims
1. A translator, wherein the translator converts an input file into a format file capable of being identified by a formal verification tool.
2. The translator according to claim 1, wherein the translator identifies a header keyword in the input file, and converts a variable type associated with each keyword according to a conversion rule and rearranges the converted data to generate the format file capable of being identified by the formal verification tool.
3. The translator according to claim 2, wherein the conversion rule comprises: with regard to an integer type I, the input data is an integer and a null value or NA, and the translator converts an integer into an integer and converts the null value or the NA into null; with regard to a Boolean type B, the input data is 1, 0, Y, N, a null value or NA, and the translator converts 1 and Y into true, converts 0 and N into false and converts the null value and NA into null; with regard to a text type T, the input data is any character string, null value or NA, and the translator outputs the character string intact to convert the null value and NA into null; and with regard to a form type L, the input data is any character string, and the translator separates data in a form with , and outputs [ ] for an empty form.
4. The translator according to claim 3, wherein the rearrangement method comprises: performing arrangement according to an original sequence of the input data, identifying the null value or the NA in the input data, and rewriting it into null to realize rearrangement.
5. An interlocking data safe conversion method for formal verification, comprising: developing two translators with same functions according to claim 1 by adopting different programming methods and programming languages; providing an input file to each of the translators, wherein the input file of each of the translators comprises an interlocking information table in interlocking data, a device interface information table, a station yard description data, and interlocking Boolean logic data, and comparing consistency of output files of the two translators to realize detection process failure.
6. The interlocking data safe conversion method for formal verification according to claim 5, wherein each of the translators converts the interlocking information table and the device interface information table into an LCF format file.
7. The interlocking data safe conversion method for formal verification according to claim 5, wherein each of the translators converts the station yard description data into the LCF format file.
8. The interlocking data safe conversion method for formal verification according to claim 5, wherein each of the translators converts the interlocking Boolean logic table into an HLL format file.
9. The interlocking data safe conversion method for formal verification according to claim 6, wherein each of the translators converts Chinese/English punctuations, all characters and Chinese characters in the interlocking information table into English punctuations uniformly.
10. The interlocking data safe conversion method for formal verification according to claim 6, wherein each of the translators reads turnout position information in the interlocking information table and differentiates positioning and anti-positioning of a turnout with an independent conversion description in the generated LCF format file; each of the translators reads beyond limit conditions of a section in the interlocking information table and differentiates the beyond limit conditions with an independent conversion description in the generated LCF format file; and each of the translators reads conflicting routes in the interlocking information table and corresponding conflicting route types, and differentiates the conflicting routes and the conflicting route types with an independent conversion description in the generated LCF format file.
11. The interlocking data safe conversion method for formal verification according to claim 7, wherein each of the translators identifies turnout position information of the input data and differentiates positioning and anti-positioning of the turnout and whether the turnout is an inner turnout in a route, a protective turnout and a driven turnout with an independent conversion description in the generated LCF format file; and each of the translator identifies section state information of the input data and differentiates beyond limit conditions of the inner turnout of the route, a beyond limit section outside the route and a conditional beyond limit section in the generated LCF format file.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0027]
[0028]
[0029]
DETAILED DESCRIPTION OF THE EMBODIMENTS
[0030] Further description of the present invention in detail will be made below in combination with drawings and specific embodiments. The advantages and features of the present invention are clearer according to description and claims below. It is to be noted that the drawings in a quite simplified form with an inaccurate ratio are merely used for describing objectives of the embodiments of the present invention in an assistant manner conveniently and clearly.
[0031] Preferred embodiments of the present invention are described specifically below according to
[0032] The interlocking data is a logic set of interlocking relations and function descriptions in the interlocking system. A designer summarizes an interlocking demand design to reflect a restrictive relation among signal devices according to different usage scenes, thereby forming a demand design. Based on the demand design, these restrictive relations are settled to a Boolean BOOL expression, i.e., a universal interlocking rule, with interlocking meaning by using logical operators such as and, or and not. In a specific station, a data manufacturer instantiates the universal interlocking rule (associating n actual device with variables in the universal interlocking rule) to generate specific interlocking data by configuring combination with an interlocking logic generation tool according to a name and an attribute of an actual signal device of the specific station, position relations among the devices and the like.
[0033] The formal verification is a safety demand standard adopting a strict mathematical language definition system, which establishes the object model and the safety demand rule by means of a formal language and traverses the model by using a model detection method to verify that the model fully complies with the safety demand rule. The verification method has the advantages of high degree of automation, high scene coverage and the like. Therefore, performing safety verification on the interlocking data by using the formal method is an effective means to prevent safe escape of the model corresponding to the interlocking data.
[0034] The specific interlocking data is verified, i.e., whether introduction of the specific interlocking data into the actual usage scene leads to harm or not is verified, for example, conditions such as derailing and collision. It is necessary to perform conventional formal verification based on formal development, i.e., formal language development is used at the beginning of the demand design stage. However, with regard to the interlocking data which has been used on site, the cost needed to perform formal development again is very high, and such a wide alteration is prone to causing unknown design defects, which affects the safety of the system.
[0035] A key link for formal verification of the interlocking data is to convert specifically applied interlocking data into a data form capable of being identified by the formal verification software so as to fuse the interlocking data of the specific station into the model of formal verification. As the part of data is safety key data, a mistaken data conversion process will lead to mistaken interlocking data. Therefore, reasonable methods and tools must be used in the data conversion process so as to guarantee correctness, consistency and integrity.
[0036] The present invention provides an interlocking data safe conversion method for formal verification. Two translators with same functions are developed by way of double link development, i.e., by way of different programming methods and programming languages. It aims to detect calculating errors of any translator by comparing the consistency of the output files of the two translators. Under a normal circumstance, outputs of the two translators shall be identical. The translator can convert the interlocking information table, the device interface information table, the station yard description data and the interlocking Boolean logic data in the interlocking data into the format files capable of being identified by the formal verification tool, i.e., the HLL format files and the LCF format files. The process failure is detected by eventually comparing the consistency of the output files of the two translators, thereby guaranteeing safe conversion of the data. After the specific interlocking data is converted into the data format capable of being identified by the formal verification tool, by using the universal interlocking safety demand described by the formal language and the object model cooperatively, parameters in the safety demand are associated with the devices and attributes in the specific interlocking data, so that the instantiation process of the model is completed, and eventually, formal verification of the specific interlocking data is realized.
[0037] In an embodiment of the present invention, the translators are developed by using different programming languages, which are named translator 1 and translator 2. In consideration of differentiation and modularization of the double link software as well as object structure-oriented programming, the translator 1 is developed by using an OCaml programming language and the translator 2 is developed by using a Python programming language. The translator 1 and the translator 2 use the same interlocking data as input, and output the target files respectively by means of independent operations. By identifying the station number of the interlocking data, it is judged that the station numbers in the different input files are consistent, and it starts to convert the format of the interlocking data. Inputs of the translators are files such as interlocking information tables, device interface information tables, station yard description data and interlocking Boolean logic data. These files define templates for filling the station interlocking data, for example, the file header stipulates the type, quantity, names of traffic signal machines and the like. With regard to different stations, in light of specific conditions, specific data (the specific data refers to the interlocking data actually used by a certain station and is data obtained by instantiating the universal interlocking rule in combination with the actual device attribute and device layout of the station) fill the corresponding position of the file according to regulation of the header, and therefore, although the interlocking data of different stations is different, the translators can retrieve corresponding information according to key words of the header in the file so as to achieve a universal effect.
[0038] By compiling a judging condition in the translator, the key words of the header in the input files are identified, so that the corresponding data of the specific data is retrieved, for example, device attribute, device position information and the like. Then this information is rearranged to eventually form the format files (the HLL files and the LCF files) capable of being identified by the formal verification software and output the files.
[0039] Specifically, first of all, the key words of the header in the input files are judged. Each of the key boards is associated with a variable type of this type of data (I: integer type; B: Boolean type; T: text type; L: form type), where with regard to the integer type I, the input data can be an integer and a null value or NA, and the translator converts an integer into an integer and converts the null value or the NA into null; with regard to the Boolean type B, the input data can be 1, 0, Y, N, an null value or NA, and the translator converts 1 and Y into true, converts 0 and N into false and converts the null value and NA into null; with regard to the text type T, the input data can be any character string, null value or NA, and the translator outputs the character string intact to convert the null value and NA into null; and with regard to the form type L, the input data can be any character string, and the translator separates data in a form with , and outputs [ ] for an empty form.
[0040] Arrangement is performed according to an original sequence of the input data, the key words such as the null value or the NA in the input data are identified, and it is rewritten into null to realize rearrangement.
[0041] The software failure in the conversion process is detected by comparing the consistency of the output files of the translator 1 and the translator 2, thereby guaranteeing the safety of conversion.
[0042] As shown in
[0043] Detailed description on the steps in the
[0049] As shown in
[0050] In addition, in the process of converting the station yard description data, the integral station yard topological structural diagram can be generated automatically according to the connecting attribute among the devices in the input files. Virtual traffic signal machine devices in the input files can be identified and are drawn in a layout with dedicated traffic signal machine device graphs; insulation joints can be added automatically in the drawn layout; and check point devices described in the input files can be identified, and corresponding non-continuous route check points, operating direction check points and protective turnout Bool check points are drawn in the layout according to subtype types of the check point devices. In the present invention, the station yard description data is converted into the .lcf format files, and the formal verification tool can directly generate the station yard topological structural diagram by reading the .lcf format files, so that work of drawing the structural diagram manually is canceled. The implementation process thereof is as follows: first of all, the input file station yard description data includes information such as the number, the attribute and the position coordinates of each of the devices, the number of the previous device (pre) and the number of the next device (next); the output .lcf format file includes the name of each of the devices, the corresponding node (node), the edge (edge) between the nodes; the translator reads the position coordinates of the input file to write the node and the numbers of the previous and next devices to write the edge so as to determine the edge and the direction between the devices. Finally, the formal verification tool can draw a station yard diagram by reading the above information.
[0051] Detailed description on the steps in the
[0056] As shown in
[0061] In the embodiment of the present invention, the interlocking information table (excel) and the device interface information table (excel) can be converted into the .lcf format files, the station yard description data can be converted into the .lcf format files, and the interlocking Boolean logic data can be converted into the .HLL format files, or the three conversion processes are operated after being integrated by the software.
[0062] Compared with the prior art, the present invention has the following beneficial effects:
1. High Universality and Wide Application Range
[0063] Specific interlocking data used in different stations can be converted in batched via the technology, and formal verification of the interlocking data is realized in combination with universal formal safety need and object model. It is unnecessary to perform specific formal development for each specific station, so that the technical cost and risk in a repeated development process are avoided.
2. High Safety
[0064] The technology accepting the demand of European Railway Safety Standard EN50128 on T3 tool software is realized by two translators using different programming languages, so that random failure occurring in the operating process of each of the translators can be detected by eventually comparing consistency of output data of the two translators. Meanwhile, formal development of the interlocking rule again is avoided, so that the risk of introducing design defects is reduced.
3. High Compatibility
[0065] The technology can be compatible with interlocking information table files stored in different formats such as .xls or .xlsx and can identify Chinese and English punctuations in the input files to improve the availability of the software for uniform processing.
4. Introduction of LCF Files and HLL Format Files
[0066] The LCF format is a structural data format based on jason and has the characteristic of WYSIWYG and being suitable for search and historical edition comparison. The HLL format is an advanced formal language format which boosts abundant language features and data types.
[0067] Although the content of the present invention has been described in details through the above preferred embodiments, it should be realized that the above description should not be considered as limit to the present invention. Many modifications and variations of the present invention will be apparent to those skilled in the art who have read the above content. Therefore, the scope of the present invention shall be defined by the appended claims.