An Automatic Generation Method for Verification Properties of Safety-Critical Software Based on a Large Model
Patent Information
- Application Number
- CN202411348471.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2044-09-26
Smart Images

Figure CN119473842B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of safety-critical technology, specifically a method for automatically generating verification properties of safety-critical software based on a large model. Background Technology
[0002] Safety-critical software refers to software used in safety-critical systems in fields such as aviation, aerospace, transportation, and energy, whose operation may cause the system to be in a dangerous state, resulting in property damage, environmental damage, or personal injury. It has extremely high requirements for functional correctness, real-time performance, and safety.
[0003] The increasing complexity of safety-critical software has increased the difficulty of software development, leading to higher development costs and safety risks. The ambiguity of natural language requirements poses a significant challenge to the development of safety-critical software. To address this challenge, translating natural language requirements into logical formulas is an effective solution.
[0004] Temporal logic is a formal logical system used to describe and reason about time-dependent properties. It extends the expressive power of classical logic, enabling the handling of dynamic characteristics in the time dimension. Temporal logic primarily achieves this extension by introducing temporal operators, which allow for precise modeling and analysis of changes in system states. Common temporal operators include "Always," "Eventually," and "Until," which respectively indicate whether a property holds true at a certain point in time or at a future point in time. Temporal logic has a wide range of applications, including program verification in computer science, the design and verification of automated control systems, and planning and decision support in artificial intelligence. By using temporal logic, researchers and engineers can more systematically analyze the behavior and properties of systems, ensuring their correctness and reliability under various time conditions. The formal nature of this logical system also makes it an important tool in theoretical computer science, helping to solve complex problems involving time factors.
[0005] Translating natural language requirements into logical formulas is crucial in safety-critical software development. Natural language is often ambiguous and vague, while logical formulas are precise and explicit, eliminating ambiguity and ensuring all stakeholders have a consistent understanding of the requirements. Through logical formulas, developers can use formal methods for verification and proof, leveraging mathematical tools to ensure the system meets specific requirements, thereby improving reliability and safety. Furthermore, logical formulas can be processed and analyzed by automated tools, such as model checking tools and automated theorem provers, to help verify the system's correctness. Formal requirement descriptions can also check for contradictions between different requirements, ensuring consistency in system requirements and providing traceability from requirements to implementation, ensuring the implemented system fully meets the initial requirements. In the development of complex systems, logical formulas also serve as a common language between different teams, promoting communication and collaboration. Therefore, transforming natural language requirements into logical formulas can significantly improve the development quality and efficiency of safety-critical software.
[0006] Researchers have proposed many methods for translating English sentences into various target language formulas. Traditional first-stage methods typically follow three steps: 1) preprocessing the given English input by extracting syntactic information, 2) identifying patterns or rules of the TL (Translation Language) through classification, and 3) running an attribute-based parser to derive the target logical format. These methods are only applicable to restricted input natural language. Another class of methods is learning-based. Gopalan et al. at Brown University collected a dataset focused on GLTL (Gross-Language Language Model), where both NL (Neural Language) and GLTL examples are used for navigation of a car in a room. They then trained a Seq2Seq model with an attention mechanism. While achieving high accuracy (93.45%), the GLTLs used are relatively simple, each typically including one to three APs, and the dataset also focuses on a restricted task. Recent methods apply new advancements in natural language processing: large pre-trained language models (LLMs) based on Transformers. Yongchao He et al. at MIT used Chat-GPT3-assisted generative frameworks to train data and fine-tuned the T5 model with this data, outperforming baseline methods on existing public datasets.
[0007] However, in an effort to simplify tasks, these previous works often make strong assumptions to constrain the input text or output formulas, thus limiting flexibility and versatility. Existing methods cannot address the needs of real-world development environments. Therefore, developing a more general tool to translate flexible natural language requirements into temporal logic formulas is of great significance. Summary of the Invention
[0008] Purpose of the invention: To address the problem that existing methods cannot meet the requirements of real-world development environments, this invention proposes an automatic generation method for verification properties of safety-critical software based on a large model. This method translates non-standard natural language requirements into temporal logic formulas, effectively addressing the requirements of real-world development environments while ensuring software security and reliability. This significantly improves software development efficiency and reduces development time and costs.
[0009] Technical solution: A method for automatically generating verification properties of safety-critical software based on a large model, comprising the following steps:
[0010] The requirements text in the development process of safety-critical software is analyzed to obtain the atomic propositions in the requirements text. The subject and predicate are extracted from each atomic proposition. The extracted subject and predicate are merged to obtain the recombined atomic propositions.
[0011] Analyze the requirements text during the development of safety-critical software and define templates for non-standard natural language types;
[0012] Based on the defined non-standard natural language type template, a random algorithm is used to combine the recombined atomic propositions with logical operators to generate signal timing logic formulas.
[0013] The generated signal timing logic formulas are translated into natural language to construct a dataset containing formula-natural language pairs.
[0014] Depending on the situation, choose to use the dataset containing formula-natural language pairs to fine-tune the local large model or the large language model interface to obtain the fine-tuned large model;
[0015] By using prompt word templates, the natural language requirements to be translated are input into the finely tuned large model to obtain the corresponding temporal logic formulas.
[0016] Furthermore, the non-standard natural language type template includes:
[0017] Template 1:
[0018] When a natural language contains: subject verb_1 operator verb_2, it is completed as: subject verb_1 operator subject verb_2; where subject represents the subject, verb_1 represents the verb 1, and operator represents and, imply, equal, or, until, or until[*,**].
[0019] When a natural language contains: subject operator subject verb, it is completed as: subject_1verb operator subject_2verb; where operator means and or;
[0020] Template 2:
[0021] When a natural language expression contains phrase + subject_1 / subject_2 / ... + verb, it is completed as: subject_1verb and / or subject_2verb and / or...; where phrase means all of, one of, or any of.
[0022] Template 3:
[0023] When the natural language sentence is: AP_1equal AP_2.AP_2+sentence, it can be rewritten as: AP_1+sentence; where AP_1 represents atomic proposition 1 and AP_2 represents atomic proposition 2.
[0024] Template 4:
[0025] When the natural language sentence is: AP imply sentence_1, phrase imply sentence_2, it is completed into two sentences: AP imply sentence_1 and negation AP imply sentence_2. Among them, AP represents an atomic proposition, phrase means otherwise, on the other hand, or conversely, sentence_1 represents STL sub-formula 1, and sentence_2 represents STL sub-formula 2.
[0026] Furthermore, the aforementioned method, based on a defined non-standard natural language type template, utilizes a random algorithm to combine the recombined atomic propositions with logical operators to generate signal-time logic formulas, specifically including:
[0027] Define unary operators and binary operators. The unary operators include: negation, global, and final. The binary operators include: AND, OR, until, implication, and equivalence.
[0028] By using a binary tree generation algorithm, the recombined atomic propositions are randomly synthesized with appropriate unary and binary operators to obtain various signal timing logic formulas.
[0029] Furthermore, the aforementioned binary tree generation algorithm randomly synthesizes the recombined atomic propositions with appropriate unary and binary operators to obtain various signal timing logic formulas, specifically including:
[0030] Define the number of randomly generated atomic propositions, AP_num, and the irregular type, irrgular_type;
[0031] Randomly select AP_num recombined atomic propositions to form prop_list;
[0032] When irregular_type = 1, insert a type1_phrase into prop_list to form a new prop_list. Based on the new prop_list, use the generate_from_list algorithm to generate the intermediate sequence signal timing logic formula to obtain the final signal timing logic formula, which is expressed as: generate_from_list(prop_list);
[0033] When irregular_type = 2, insert a type2_phrase into prop_list to form a new prop_list. Based on the new prop_list, use the generate_from_list algorithm to generate the intermediate sequence signal timing logic formula to obtain the final signal timing logic formula, which is expressed as: generate_from_list(prop_list);
[0034] When irregular_type = 3, a recombined atomic proposition outside_ap is randomly sampled, and then a recombined atomic proposition inside_ap is randomly sampled from prop_list. The generate_from_list algorithm is used to generate the intermediate sequence signal timing logic formula. The final signal timing logic formula is generated according to template 3, which is expressed as: outside_ap + "<->" + inside_ap + ";" + generate_from_list(prop_list);
[0035] When irregular_type = 4, a recombined atomic proposition is randomly sampled. Based on this recombined atomic proposition, the generate_from_list algorithm is used to generate one_sentence. Then, two recombined atomic propositions are randomly sampled. Based on these two recombined atomic propositions, the generate_from_list algorithm is used to generate other_sentence. A recombined atomic proposition ap is randomly selected from prop_list, and a random number sign is obtained. If the random number sign = 0, the final signal timing logic formula is generated according to template 4, which is expressed as: ap + "-> " + one_sentence + "; ~ " + ap + "-> " + other_sentence; otherwise, the final signal timing logic formula is generated according to template 4, which is expressed as: ap + "-> " + other_sentence + "; ~ " + ap + "-> " + one_sentence.
[0036] Among them, type1_phrase is a simple sentence dataset type1_phrase generated according to the non-standard type in template 1, which is composed of a combination of recombined atomic propositions;
[0037] Similarly, type2_phrase is a simple sentence dataset type2_phrase generated according to the non-standard type in template 2, which is composed of the combination of recombined atomic propositions.
[0038] Furthermore, the generate_from_list algorithm specifically includes the following operations:
[0039] Randomly divide prop_list into multiple sublists sub_lists;
[0040] For each sub_lists, define num_open_subtree as the length of the sublist; when num_open_subtree > 1, randomly select an operator from the two types of operators and insert it at the beginning of the sublist to obtain the sequential logic formula of the preceding signal; only if the operator is an operator in a binary operator, then num_open_subtree - 1; only if the operator contains time, then fill in a random time.
[0041] Finally, all the sub_lists are concatenated using binary operators to convert them into mid-sequence signal timing logic formulas.
[0042] Furthermore, the prompt word template includes: translation instructions, explicit prompts, example samples, and the natural language requirement to be translated.
[0043] Furthermore, the explicit prompts include:
[0044] The system prompts users to check for non-standard expressions in natural language and provides templates for non-standard natural language types.
[0045] The prompt asks you to correct the non-standard natural language expression according to the non-standard natural language type template, and then translate the corrected natural language expression into a temporal logic formula.
[0046] Beneficial effects: Compared with the prior art, the present invention has the following advantages:
[0047] (1) The present invention uses atomic proposition data in the requirements to generate a logical formula dataset. This dataset is closer to real development than a dataset of randomly generated atomic propositions, which significantly improves the diversity and complexity of the dataset and improves the performance of the model trained by the dataset.
[0048] (2) This invention analyzes and summarizes four types of non-standard requirements and generates data from them. These non-standard requirements supplement the shortcomings of previous natural language data, which were all standard natural language. The generated data trains a more generalized model that is suitable for more flexible natural language requirements.
[0049] (3) This invention utilizes the prompting engineering of a large language model for translation. With the help of the deep learning algorithm of the large language model and the massive training data, the system can achieve efficient and accurate translation between logical formulas and natural language.
[0050] (4) This invention enables more general natural language translation, which greatly improves the security and reliability of safety-critical software development. Attached Figure Description
[0051] Figure 1 This is a diagram illustrating the overall architecture of an automatic translation tool.
[0052] Figure 2 Generate a schematic diagram for the data;
[0053] Figure 3 This is a schematic diagram of fine-tuning the large model;
[0054] Figure 4 This is a schematic diagram for reference. Detailed Implementation
[0055] The technical solution of the present invention will now be further described in conjunction with the accompanying drawings and embodiments.
[0056] like Figure 1As shown, this invention relates to an automatic translation method for converting safety-critical software development requirements into temporal logic formulas based on a large model, also known as an automatic generation method for safety-critical software verification properties. It mainly includes the following steps:
[0057] Step 1: Collect and analyze the requirements texts from the safety-critical software development process. Analyze the atomic propositions in the requirements texts, extract the subjects, predicates, and other terms, and generate a requirements terminology dataset. Simultaneously, analyze the requirements features that cannot be directly converted into logical formulas, summarize and define four non-standard template types. Specific operations include:
[0058] To enhance the realism of the dataset, this invention extracts atomic propositions from safety-critical software development requirements documents, divides them into subjects and predicates, and recombines them into new atomic propositions. This invention extracts subjects and predicates from real data sources, analyzes, extracts, and processes them, and then recombines these subjects and predicates to generate logically consistent atomic propositions. This ensures that the generated atomic propositions accurately reflect the core semantic relationships in the original data, and that the combination of subjects and predicates can be flexibly adjusted according to the needs of different application scenarios to enhance the applicability and accuracy of the atomic propositions.
[0059] Meanwhile, after analyzing the natural language requirements in safety-critical software, four non-standard natural language type templates were defined.
[0060] For ease of description, atomic propositions are divided into subject + verb form, and complete atomic propositions are represented by AP.
[0061] Template 1: Atomic propositions omitted: This type has two subcategories:
[0062] a. subject verb_1 operator verb_2 needs to be completed as subject verb_1 operator subject verb_2, where operator refers to and / imply / equal / or / until / until[*,**]. For example, the natural language atomic proposition "packet data right and stored" needs to be completed as "packet data right and packet data stored".
[0063] b. `subject operator subject verb` needs to be completed as `subject_1verb operatorsubject_2verb`, where `operator` refers to `and / or`. For example, the natural language atomic proposition "check bit and commandword are correct" needs to be completed as "check bit is correct and command word is correct" when translated.
[0064] Template 2: Atomic proposition parallel structure: phrase + subject_1 / subject_2 / … + verb. Here, phrase refers to all of / one of / any of, and in translation, it needs to be completed as subject_1 verb and / or subject_2 verb / or…. For example, the natural language requirement fragment “one of check bit, command word, packet length, synchronization word is correct” should be rewritten as “check bit is correct or command word is correct or packet length is correct or synchronization word is correct” in the translation.
[0065] Template 3: Contextual Synonym Conversion: AP_1equal AP_2.AP_2+sentence needs to be rewritten as AP_1+sentence, such as "Data is valid when pressure altitude is above 1000. If data is valid, call the system initialization function". When translating, it needs to be rewritten as "when the pressure altitude are above 1000, call the system initialization function".
[0066] Template 4: One-to-Many Translation: AP imply sentence_1, negation AP imply sentence_2, which translates a natural language requirement into multiple sequential logic formulas. For example, the sentence "If the data source is selected, stay in state 1, otherwise migrate to state 2" should be translated as two sentences: "If the data source is selected, stay in state 1." and "If the data source is not selected, migrate to state 2."
[0067] Step 2: Combining a random algorithm with four non-standard natural language type templates, the requirement terminology dataset is integrated with logical operators to generate a logical formula dataset. Specific operations include:
[0068] Recombined atomic propositions and non-standard natural language type templates are used as materials to generate logical formula datasets.
[0069] A simple sentence dataset, type1_phrase, is generated based on the non-standard types in template 1, consisting of simple combinations of atomic propositions. Similarly, a simple sentence dataset, type2_phrase, is generated based on the non-standard types in template 2, consisting of simple combinations of atomic propositions. Furthermore, the subject and predicate are recombine to generate the AP dataset.
[0070] The main idea behind randomly generating STL formulas is as follows: Define the number of randomly generated atomic propositions AP_num and the irregular type irrgular_type. Then, randomly obtain AP_num atomic propositions from the atomic proposition library AP to form a prop_list. When irregular_type = 1, insert a type1_phrase into prop_list and generate an STL formula; when irregular_type = 2, insert a type2_phrase into prop_list and generate an STL formula; when irregular_type = 3, randomly sample an atomic proposition outside_ap from the atomic proposition library, and then randomly sample an inside_ap from prop_list, generating a formula according to the template; when irregular_type = 4, randomly sample an atomic proposition to generate one_sentence, and then randomly sample two atomic propositions to generate other_sentence. Randomly obtain an ap from prop_list, and then generate a formula according to the template based on the randomly generated sign.
[0071] The algorithm for randomly generating STL formulas is as follows:
[0072] Input: Maximum number of atomic propositions N
[0073] Output: The synthesized STL formula
[0074] AP_num=random numin range(1,N)
[0075]
[0076] This algorithm generates a Signal-Time Logic (STL) formula. This method, by introducing randomness, can generate diverse STL expressions. Type 0 generates a canonical formula, Type 1 and Type 2 generate formulas by adding non-canonical atomic propositions to candidate APs, while Type 3 and Type 4 require modifications to the formula structure based on a template.
[0077] The generate_from_list algorithm is as follows:
[0078] Input: list of atomic propositions prop_list
[0079] Output: Inorder STL formula
[0080]
[0081]
[0082] First, two types of operators are defined (one_subtree, unary operators, which operate on only one element; two_subtree, binary operators, which operate on two elements). Then, the input list of atomic propositions is randomly divided into several sublists, sub_lists. For each sub_list, num_open_subtree is defined as the length of the sublist. When num_open_subtree > 1, an operator (operation) is randomly selected from the two types of operators and inserted at the beginning of the sublist (because it is a preorder expression): if operation is an operator in two_subtree, then num_open_subtree - 1 (operable elements - 1); if operation contains time, then a random time is filled in. Finally, all sub_lists are concatenated using operators in two_subtree, and then converted into an inorder expression to generate the final STL formula. In this embodiment, unary operators include negation, global, and final; binary operators include AND, OR, until, implication, and equivalence.
[0083] Step 3: Translate the Signal-Time Logic (STL) formulas generated in Step 2 into natural language using a large language model, generating natural language requirements and logic formula data that includes non-standard requirements. Specific operations include:
[0084] GPT-3 is used to attempt to generate original NLs that are semantically close to STLs. LLM GPT-3 (Davinci-003) is applied to help generate multiple NL-STL pairs. Various NL-STL pairs are used as cues, and GPT-3 is asked to automatically generate more NL-STL pairs. Then, human annotators modify the original NLs to make their meaning consistent with the STLs. During this process, NL-STL pairs in the cues are randomly selected to diversify the vocabulary and sentence structure. Figure 2 In each iteration, 20 pairs are randomly selected from the cue pool to form the cue for GPT-3.
[0085] Step 4: Select and fine-tune the local large model or large language model interface as needed; specific operations include:
[0086] In the development of safety-critical software, for situations requiring confidentiality, i.e., when data cannot be leaked, the data generated above is fed into a locally deployed large model, and the model is fine-tuned until the required effect is achieved. The fine-tuned model is then used offline. For situations where confidentiality is not required, the online open fine-tuning API is used directly for fine-tuning.
[0087] Fine-tuning involves further training a pre-trained language model to improve its performance on a specific task or in a particular domain. This process involves additional training the model using a domain-specific dataset to adjust its parameters and better suit the specific application scenario. Through fine-tuning, the model can improve accuracy and performance on specific tasks, particularly when dealing with specific types of data or meeting specific requirements, significantly enhancing its effectiveness.
[0088] like Figure 3 As shown, pre-training refers to training a large model on massive amounts of text before deployment to acquire its capabilities in general natural language processing. During fine-tuning, the model's internal parameters are adjusted based on new training data, using transfer learning to better meet the needs of downstream tasks. In this invention, this means training the model on a dataset to enhance its ability to translate natural language into temporal logic formulas.
[0089] Step 5: Construct prompt word templates to guide the large model in rewriting non-standard requirements into standard requirements, and further translate these standard requirements into time-series logic formulas. Specific operations include:
[0090] Cue engineering is a method that guides large language models to generate expected outputs by designing and optimizing input cues. By precisely crafting cue words, providing examples, or using templates, it helps the model better understand task requirements and generate more relevant and expected results. Cue engineering can improve a model's performance on a specific task without modifying its structure or weights, thereby optimizing the quality and accuracy of the generated content.
[0091] like Figure 4 As shown, this invention designs a prompting engineering template to guide a large model in a two-step translation process. First, it explains the translation instructions and requirements, including the task of translating natural language into signal-timing logic, and the operators required for the translation. Then, it provides explicit prompts, instructing the large model to check for non-standard expressions in the natural language and listing four types of non-standard expressions and correction methods. Next, it provides some example samples, namely, corresponding examples of natural language and STL formulas. Finally, it provides the natural language to be translated, allowing the large model to perform the translation.
Claims
1. A method for automatically generating safety-critical software verification properties based on large models, characterized by: The method comprises the following steps: analyzing the requirement text in the safety-critical software development process to obtain atomic propositions in the requirement text, extracting subjects and predicates from each atomic proposition, merging the extracted subjects and predicates to obtain reorganized atomic propositions; analyzing the requirement text in the safety-critical software development process to define a non-standard natural language type template; combining the reorganized atomic propositions and logical operators according to the defined non-standard natural language type template using a random algorithm to generate signal timing logic formulas; translate the generated signal timing logic formulas into natural language to construct a dataset containing formula-natural language pairs; According to the situation, use the formula-natural language pair dataset to fine-tune the local large model or the large language model interface to obtain a fine-tuned large model; use the prompt word template to input the natural language requirement to be translated into the fine-tuned large model to obtain the corresponding timing logic formula; The non-standard natural language type template comprises: Template one: When the natural language contains: subject verb_1 operator verb_2, it is completed as: subject verb_1 operator subject verb_2; wherein, subject represents the subject, verb_1 represents predicate 1, and operator represents and or imply or equal or or until or until[*,**]; When the natural language contains: subject operator subject verb, it is completed as: subject_1 verb operator subject_2 verb; wherein, operator represents and or or; Template two: When the natural language contains phrase + subject_1 / subject_2 / … + verb, it is completed as: subject_1 verb and / or subject_2 verb and / or …; wherein, phrase represents all of or one of or any of; Template three: When the natural language sentence is: AP_1 equal AP_2. AP_2 + sentence, it is rewritten as: AP_1 + sentence; wherein, AP_1 represents atomic proposition 1, and AP_2 represents atomic proposition 2; Template four: When the natural language phrase is: AP imply sentence_1, phrase imply sentence_2, it is completed as AP imply sentence_1 and negation AP imply sentence_2 two sentences; wherein, AP represents an atomic proposition, phrase is otherwise or on the other hand or conversely, sentence_1 represents STL subformula 1, and sentence_2 represents STL subformula 2; The defined irregular natural language type template utilizes a random algorithm to combine the recombined atomic proposition and a logic operator to generate a signal temporal logic formula, and specifically includes: Defining a unary operator and a binary operator, wherein the unary operator includes negation, global, and final, and the binary operator includes and, or, until, implication, and equivalence; A binary tree generation algorithm is used to randomly combine the recombined atomic proposition with appropriate unary operators and binary operators to obtain various signal temporal logic formulas; The binary tree generation algorithm is used to randomly combine the recombined atomic proposition with appropriate unary operators and binary operators to obtain various signal temporal logic formulas, and specifically includes: Defining a random atomic proposition number AP_num and an irregular type irregular_type; Randomly selecting AP_num recombined atomic propositions to form a prop_list; When irregular_type=1, a type1_phrase is inserted into the prop_list to form a new prop_list, and based on the new prop_list, a generate_from_list algorithm is used to generate an in-order signal temporal logic formula to obtain a final signal temporal logic formula, which is represented as: generate_from_list(prop_list); When irregular_type=2, a type2_phrase is inserted into the prop_list to form a new prop_list, and based on the new prop_list, a generate_from_list algorithm is used to generate an in-order signal temporal logic formula to obtain a final signal temporal logic formula, which is represented as: generate_from_list(prop_list); In irregular_type=3, a recombined atomic proposition outside_ap is randomly sampled, and a recombined atomic proposition inside_ap is randomly sampled in prop_list, and the generate_from_list algorithm is used to generate an in-order signal temporal logic formula, and the final signal temporal logic formula is generated according to template three, and is expressed as: outside_ap + "<-> " + inside_ap + "; " + generate_from_list(prop_list); In irregular_type=4, a recombined atomic proposition is randomly sampled, and based on the recombined atomic proposition, the generate_from_list algorithm is used to generate one_sentence; then two recombined atomic propositions are randomly sampled, and based on the two recombined atomic propositions, the generate_from_list algorithm is used to generate other_sentence, a recombined atomic proposition ap is randomly obtained from prop_list, and a random number sign is obtained, if the random number sign=0, then the final signal temporal logic formula is generated according to template four, and is expressed as: ap + " -> " + one_sentence +"; ~ " + ap + " -> " + other_sentence; otherwise, the final signal temporal logic formula is generated according to template four, and is expressed as: ap + " -> " + other_sentence + "; ~ " + ap + " -> " + one_sentence; Wherein, type1_phrase is a simple sentence data set type1_phrase generated according to the irregular type in template one, which is composed of combinations of recombined atomic propositions. Similarly, type2_phrase is a simple sentence data set type2_phrase generated according to the irregular type in template two, which is composed of combinations of recombined atomic propositions.
2. The method of claim 1, wherein the method is characterized by: The generate_from_list algorithm, the specific operation includes: prop_list is randomly divided into multiple sub-lists sub_lists; For each sub_list, define num_open_subtree as the length of the sub_list; when num_open_subtree>1, randomly select an operator operation from two types of operators and insert it into the front of the sub_list to obtain a pre-order signal temporal logic formula; only when the operator operation is an operator in the binary operator, then num_open_subtree-1; only when operation contains time, then fill in a random time; Finally, all sub_lists are connected with operators in binary operators to convert into an in-order signal temporal logic formula.
3. The method of claim 1, wherein the method further comprises: determining a property of the safety-critical software based on the model; and generating a test case for the safety-critical software based on the property. The prompt word template comprises a translation instruction, an explicit prompt, an example sample and a natural language requirement to be translated.
4. The method of claim 3, wherein the method further comprises: The explicit prompt comprises: The prompt checks whether there is an unstandardized expression in the natural language, and gives an unstandardized natural language type template; The prompt corrects the unstandardized natural language expression according to the unstandardized natural language type template, and translates the corrected natural language expression into a temporal logic formula.