Multi-Agent collaboration AADL model AGREE verification statement automatic generation and verification method
The AADL model AGREE verification system, which utilizes multi-agent collaboration, addresses the lack of automation in the collaborative application of AADL models and AGREE specifications. It achieves an end-to-end pipeline from natural language requirements to verification results, thereby improving the efficiency and quality of complex embedded system development.
Patent Information
- Application Number
- CN202511828154.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-05
- Publication Date
- 2026-03-20
AI Technical Summary
In existing technologies, the collaborative application of AADL models and AGREE specifications suffers from insufficient automation capabilities in complex systems, resulting in long design iteration cycles, excessive manual intervention, difficulty in achieving closed-loop feedback of modeling-analysis-optimization, and a lack of automated toolchains for multi-role collaboration, which increases the complexity and cost of formal verification.
A multi-agent collaborative AADL model AGREE verification system is constructed. By building a domain knowledge base and integrating AADL and AGREE specifications, a formal verification automated process is built using multi-agent collaboration. This achieves an end-to-end pipeline from natural language requirements to verification results, including steps such as model analysis, requirement decomposition, AGREE generation, and model fusion. RAG technology is used to generate AGREE attachment code and perform iterative verification.
It significantly improves the accuracy and verification efficiency of AGREE specification generation, reduces reliance on domain experts, and achieves full-process automation from natural language requirements to formal verification results, thereby improving the quality and efficiency of complex embedded system development.
Smart Images

Figure CN121706100A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer software development technology, and specifically relates to a method for automatically generating and validating AGREE verification statements in a multi-Agent collaborative AADL model. Background Technology
[0002] As the requirements for safety and reliability of complex industrial systems continue to increase, formal methods have become a core means of ensuring the correctness of system design. AGREE (Assume Guarantee Reasoning Environment), as a formal specification language based on the Architecture Analysis & Design Language (AADL), can accurately describe the functional constraints and behavioral logic of a system. However, its application relies on specialized formal modeling knowledge, resulting in a high barrier to entry for converting natural language requirements into AGREE specifications.
[0003] AADL is a standardized modeling tool for embedded real-time systems. Its core function is to characterize the system's hierarchical architecture, component interaction logic, and resource allocation constraints. With its modular modeling framework and quantifiable analysis capabilities, AADL effectively supports performance evaluation and security attribute verification in the early stages of system development, becoming a key technological support for the development of highly reliable embedded systems.
[0004] AGREE is a formal analysis extension mechanism based on AADL, focusing on the verification of logical constraints and security attributes of component behavior in embedded system design. It transforms the system's functional requirements and security constraints into automatically verifiable logical expressions by embedding contractual specifications into the architectural model. With the support of underlying tools such as theorem provers, AGREE can rigorously verify key attributes such as the consistency of component interactions and the completeness of fault handling mechanisms, providing core technical means for closed-loop verification of high-reliability embedded systems from architectural design to attribute confirmation.
[0005] However, in scenarios where AGREE and AADL are used in tandem, AADL still has significant shortcomings in its ability to automate multi-dimensional constraint collaborative analysis of complex systems. This issue directly affects the implementation efficiency and verification effectiveness of AGREE's formal specifications. For example, in complex scenarios involving hardware resource constraints, multi-task concurrent scheduling, and fault tolerance requirements, current AADL-based analysis processes often require manual decomposition of model metrics and writing of dedicated analysis scripts. This not only fails to effectively link with AGREE's automated verification capabilities but also makes it difficult to achieve a closed-loop feedback of "modeling-analysis-optimization." Specifically, when the AADL model architecture is adjusted, not only do the contractual specifications embedded in AGREE need to be manually re-adapted, but the entire analysis process also needs to be manually reconstructed, resulting in a significant extension of the design iteration cycle and severely restricting the full realization of AGREE's advantages in large-scale, highly dynamic embedded systems.
[0006] Meanwhile, existing technologies lack automated toolchains that support multi-role collaboration. Natural language requirement parsing, AGREE specification generation, AADL model fusion and verification are independent processes requiring manual intervention, further increasing the complexity and cost of formal verification. These issues not only reduce the efficiency of AADL and AGREE in the development of highly reliable systems but also significantly hinder the deep implementation of model-driven systems engineering in key areas. Therefore, building a fully automated technology system that supports automatic requirement transformation, intelligent specification generation, and model fusion verification, achieving efficient collaboration between AADL modeling and AGREE formal verification, has become an urgent need to improve the quality and efficiency of complex embedded system development. Summary of the Invention
[0007] To address the aforementioned shortcomings of existing technologies, this invention provides a method for automatically generating and validating AADL model AGREE verification statements through multi-agent collaboration, achieving fully automated processing from natural language requirements to the AADL+AGREE model. This invention improves efficiency by transforming expert experience into reusable intelligent assets, and uses multi-agent collaboration to construct an automated formal verification process, forming an end-to-end pipeline from natural language requirements to verification results. This effectively reduces expert intervention and promotes the widespread application of high-threshold formal verification technology in the development of complex embedded systems.
[0008] The objective of this invention is achieved through the following technical solution:
[0009] A method for automatically generating and validating AGREE verification statements in a multi-agent collaborative AADL model includes the following steps:
[0010] Step S1: Build a domain knowledge base, integrating the AADL specification, AGREE specification, and manually annotated AGREE examples, to provide core knowledge support for subsequent intelligent parsing and code generation. The specific steps are as follows:
[0011] Step S101: Manually construct the AGREE sample library and annotate its semantics, then vectorize it using a text embedding model and store it in a vector database;
[0012] Step S102: Collect AADL specifications and AGREE syntax rules, encapsulate them in a structured manner, and store them in a relational database;
[0013] Step S103: Integrate the AGREE sample library and the standard definition library, and establish a retrieval index and mapping relationship;
[0014] Step S2: AADL Model Analysis. The agent performs joint analysis of the model description text and the knowledge base, extracts key information, and generates structured results in JSON format. The specific steps are as follows:
[0015] Step S201: AADL Model Analysis Agent loads the AADL model text and starts lexical analysis to identify basic lexical units;
[0016] Step S202: AADL Model Analysis. The Agent parses the model syntax tree by layer and segment according to the AADL syntax.
[0017] Step S203: AADL model analysis Agent traverses the syntax tree to extract component name, type, port name, direction, data type, connection source and target, and key attribute value atomic information units;
[0018] Step S204: Organize atomic information according to a predefined format to generate a JSON structured document;
[0019] Step S3: The requirements analysis agent extracts and breaks down the natural language requirements into indivisible atomic propositions. The specific steps are as follows:
[0020] Step S301: The demand analysis agent receives natural language requirements, identifies core elements, and establishes a mapping with the AADL model object to form a demand-model association table;
[0021] Step S302: The requirements analysis agent breaks down the composite requirements into atomic propositions, stores them in a structured format of "serial number-proposition content-associated model object" and synchronizes them to the database;
[0022] Step S4: The AGREE generator Agent generates AGREE attachment code based on the atomic propositions and model analysis results using RAG technology. The specific steps are as follows:
[0023] Step S401: Based on the RAG mechanism, the AGREE generates an Agent and calls the vector database to retrieve the AGREE syntax specification and examples to determine the sentence pattern and code framework;
[0024] Step S402: AGREE generates an Agent that converts atomic propositions into logical constraint expressions and supplements model parameters to form a complete constraint statement;
[0025] Step S403: AGREE generates optimized expressions for Agent retrieval matching cases, integrates them into complete code blocks according to AGREE syntax, and stores them after pre-validation;
[0026] Step S5: The model fusion agent automatically embeds the AGREE specification into the target AADL component, completing model fusion and storage. The specific steps are as follows:
[0027] Step S501: The model fusion agent reads the AGREE code and AADL parsing results, matches the target component, and temporarily stores them;
[0028] Step S502: Encapsulate the AGREE specification as an attachment fragment, unify indentation and verify to avoid duplication, and generate the complete AADL model text;
[0029] Step S503: The model fusion agent generates a fusion model file according to the standard, stores it in the specified path, and updates the pipeline status;
[0030] Step S6: AADL Verification Agent Iterative Verification and Automatic Repair, integrating LLM verification, dual-path vector knowledge base retrieval, and AADL Inspector tool feedback to build a multi-dimensional verification system. Specific steps are as follows:
[0031] Step S601: AADL verifies Agent retrieval-related knowledge and cases, and performs preliminary verification and correction of the fusion model in conjunction with LLM;
[0032] Step S602: The AADL verification agent calls the AADL Inspector tool to parse the model, extract the test data, and update the status;
[0033] Step S603: AADL verifies the Agent, parses the error report, retrieves the repair case generation solution, automatically corrects the error, and records it;
[0034] Step S604: The AADL verification agent starts an iterative repair loop, which terminates after reaching the maximum number of iterations or passing the verification, generates a qualified model and synchronizes the history.
[0035] Step S7: Perform formal verification of the AADL architecture based on AGREE, and perform logical attribute verification on the syntax compliance model output in Step S6. The specific steps are as follows:
[0036] Step S701: Import the model by calling the OSATE AGREE plugin, trigger verification and generate the original report;
[0037] Step S702: If the verification fails, analyze the report to extract counterexamples and generate a structured verification report;
[0038] Step S703: Adjust the AGREE constraint based on the counterexample and iteratively execute steps S2-S7.
[0039] Compared with the prior art, the present invention has the following advantages:
[0040] 1. This invention constructs a multimodal knowledge base system, transforming the formal verification experience of domain experts into reusable intelligent assets. It innovatively applies RAG technology and adopts a combination of data-driven and knowledge-driven approaches, significantly improving the accuracy of specification generation without the need for large-scale model fine-tuning.
[0041] 2. This invention achieves an innovative integration of formal verification methods and intelligent technologies, effectively solving the core problem of the difficulty in implementing formal verification of the AADL architecture. By introducing the intelligent parsing and generation capabilities of large language models, the conversion process between complex natural language requirements and formal specifications is automated, thereby improving the intelligence level of the verification process.
[0042] 3. This invention achieves deep integration of multi-agent collaborative architecture and large language model, and constructs a highly automated verification process. Through the collaborative work of agents such as model analysis, requirement analysis, specification generation, and model fusion, the originally scattered modeling, specification, and integration links are integrated into a coherent automated pipeline, thereby improving verification efficiency.
[0043] 4. This invention constructs an end-to-end automated verification pipeline from natural language requirements to formal verification results. Through the autonomous collaboration and task connection of agents at each stage, it significantly reduces the reliance on manual intervention by domain experts in the traditional formal verification process, making the application of this high-threshold technology more universal. Attached Figure Description
[0044] Figure 1 This is a flowchart of the automatic generation and verification method of AGREE verification statements for the multi-Agent collaborative AADL model of the present invention;
[0045] Figure 2 This is a diagram of the RAG knowledge base structure;
[0046] Figure 3 This is an example diagram of the model analysis agent's output;
[0047] Figure 4 This is an example diagram of the output from the demand analysis agent;
[0048] Figure 5 This is an example image of the Agent output generated by AGREE;
[0049] Figure 6 This is an example diagram of the model fusion agent output;
[0050] Figure 7 This is an example image of the AADL verification agent output;
[0051] Figure 8 This is an example diagram of formal verification. Detailed Implementation
[0052] The technical solution of the present invention will be further described below with reference to the accompanying drawings, but it is not limited thereto. Any modifications or equivalent substitutions to the technical solution of the present invention that do not depart from the spirit and scope of the technical solution of the present invention should be covered within the protection scope of the present invention.
[0053] This invention provides a method for automatically generating and validating AGREE verification statements in a multi-agent collaborative AADL model, such as... Figure 1 As shown, the method includes the following steps:
[0054] Step S1: Construct a domain knowledge base, integrating the AADL specification, AGREE specification, and manually annotated AGREE examples to provide core knowledge support for subsequent intelligent parsing and code generation. The specific steps are as follows:
[0055] Step S101: Manual Construction and Vectorized Storage of the AGREE Sample Library: A set of high-quality AGREE specification code snippets is created through manual writing and review by domain experts. Each code snippet is manually annotated with its Chinese semantic explanation. Specific annotations include, but are not limited to, the expressed propositional logic, the variable relationships involved, and their contextual meaning within the AADL components. Its module structure is as follows: Figure 2 As shown; subsequently, a text embedding model is used to transform the code snippets and their Chinese explanations into high-dimensional vectors, which are then stored in a vector database, thereby constructing an AGREE specification example knowledge base that supports semantic retrieval, providing accurate references for subsequent retrieval enhancement generation.
[0056] Step S102: Systematic collection and structured encapsulation of AADL specifications and AGREE syntax rules: Extract meta-model definitions of architectural elements such as AADL components, ports, connections, and patterns from official standard documents and authoritative information in the field, and encapsulate the core syntax rules of the AGREE language regarding guarantees, assumptions, lemmas, equations, and non-recursive variable definitions; store the above specifications and rules in a structured form in a relational database to form a standard definition library for parsing and verification.
[0057] Step S103: Final integration and index construction of multi-level knowledge base: The vectorized AGREE sample library and the structured standard definition library are physically or logically integrated to form a complete, multimodal domain knowledge base; and efficient retrieval indexes and mapping relationships are established for each to ensure that it can be accessed and called quickly and accurately by various agents in subsequent analysis stages.
[0058] Step S2: AADL Model Analysis. The agent performs joint analysis of the model description text and the knowledge base, extracts key information, and generates structured results in JSON format. The specific steps are as follows:
[0059] Step S201: AADL Model Analysis Agent starts the model lexical analysis and syntax parsing engine: The AADL model analysis agent loads the AADL model description text submitted by the user, calls the built-in AADL lexical analyzer to scan the text, and identifies and classifies basic lexical units such as keywords, identifiers, and attribute values.
[0060] Step S202: Hierarchical and segmented parsing based on AADL syntax: Using recursive descent or similar parsing strategies, and in accordance with the official AADL syntax specifications, the entire model text is divided into blocks according to the syntactic structure of component declarations (such as system, process, thread), features, connections, and properties, based on the component name, to establish a clear model syntax tree.
[0061] Step S203: Depth-wise traversal of the syntax tree and extraction of atomic information units: Traverse the syntax tree nodes generated in step S202, apply the corresponding information extraction rules for different types of syntax structures, and accurately extract indivisible atomic information such as component name, type, port name, direction, data type, connection source and target, and key attribute values.
[0062] Step S204: Generate a structured result in JSON format: All atomic information units extracted in step S203 are organized and mapped according to the predefined JSON to fully describe the architectural information such as the component composition, interfaces, connections and attributes of the model, and finally output a hierarchical and machine-readable structured data document. Figure 3 This is an example diagram of the model analysis agent's output.
[0063] Step S3: The requirements analysis agent extracts and breaks down the natural language requirements into indivisible atomic propositions. The specific steps are as follows:
[0064] Step S301: The requirement analysis agent receives natural language requirements and identifies core elements such as functional objects, constraints, and operational goals. At the same time, it retrieves the AADL model structured data generated in step S1 and establishes a mapping relationship between the components, ports, and other elements mentioned in the requirements and the specific objects in the model through entity matching, forming a requirement-model association table.
[0065] Step S302: Based on the preset extraction rules, the requirements of the completed model association are logically decomposed, and the composite requirements are broken down into atomic propositions containing only a single judgment logic. After the decomposition is completed, the requirements are structured and stored in the format of "serial number-proposition content-associated model object", and the results are synchronized to the pipeline status database for subsequent AGREE generation. Figure 4 This is an example diagram of the output from the requirements analysis agent.
[0066] Step S4: The AGREE generator Agent generates AGREE attachment code based on the atomic propositions and model analysis results using RAG technology. The specific steps are as follows:
[0067] Step S401: Based on the RAG mechanism, the AGREE Agent calls the vector database constructed in step S1 to retrieve the stored AGREE syntax specifications and typical domain cases. Through semantic similarity matching, it filters out sentence patterns and code frameworks that match the current requirement type, explicitly formalizing the syntax format and structure templates, providing a paradigm reference for subsequent constraint expression generation.
[0068] Step S402: AGREE generates an Agent that performs syntactic mapping on the atomic propositions output in step S3, converting the natural language propositions into logical constraint expressions. Simultaneously, it retrieves the model parsing results generated in step S2, extracts the port identifiers and attribute parameters of related components, and adds them to the expressions to clarify the constraint subject and boundary conditions, forming a complete constraint description that includes component context, port associations, and attribute thresholds, ensuring a precise correspondence between the logical expression and the model structure.
[0069] Step S403: The AGREE agent is generated by calling the vector database to retrieve AGREE syntax rules and similar domain cases that match the current constraint type. Following the retrieval logic of the _augment_prompt method, relevant knowledge is obtained based on semantic similarity matching to optimize the logical constraint expression generated in step S302. Finally, all constraint expressions are integrated according to the annex agree{} syntax structure to form a complete code block containing attachment declarations, constraint group definitions, and termination identifiers. After syntax pre-validation, this block is stored in the pipeline state['agree_code']. Figure 5 This is an example image of the Agent output generated by AGREE.
[0070] Step S5: The model fusion agent automatically embeds the AGREE specification into the target AADL component, completing model fusion and storage. The specific steps are as follows:
[0071] Step S501: The model fusion agent reads the `agree_code` field (the specification code output by the AGREE generator) and the `parsed_aadl_json` field (the AADL model parsing result) through the pipeline state interface. It calls the built-in component matching algorithm to analyze the component ports involved in the constraints of the AGREE specification, and performs association matching with the component instances in the `components` node of the parsing result. Based on the requirement mapping relationship, it infers the target component that needs to be embedded in the AGREE specification and temporarily stores the result in the `target_component` state variable for subsequent steps.
[0072] Step S502: Based on the embedding location determined in step S401, the core logic of the `_merge_spec_into_model` method in the code is called to encapsulate the AGREE specification into an annex agree attachment fragment. The `detect_indentation` utility function is used to parse the indentation rules of the original AADL model text, ensuring that the attachment indentation level is consistent with the original model format. Simultaneously, the `check_duplicate_annex` function checks whether an AGREE attachment already exists in the target component implementation block; if it does, the existing content is replaced to avoid duplicate declarations, ultimately generating the complete AADL model text after embedding the specification.
[0073] Step S503: The file generation logic of the `_merge_spec_into_model` method is invoked to generate a fused model file from the complete model text embedded with the AGREE specification, according to the AADL file format standard. The file is stored to a preset local path according to the configuration rules of `output_file_path`, and the pipeline state variables `state['merged_aadl']` and `state['final_model_path']` are updated simultaneously. Finally, the file path and core content summary are synchronized to the dialogue history using the `conversation.add_message` method for quick reference and recall by the Agent in subsequent verification and repair steps. Figure 6 This is an example diagram of the model fusion agent output.
[0074] Step S6: AADL Verification Agent Iterative Verification and Automatic Repair, integrating LLM verification, dual-path vector knowledge base retrieval, and AADL Inspector tool feedback to construct a multi-dimensional verification system. Specific steps are as follows:
[0075] Step S601: Using the generated fused AADL+AGREE model code as the retrieval query, call the verification vector database to obtain the Top-K relevant AGREE grammar knowledge and error correction cases. Input the fused model text generated in Step S4 into the LLM, call the _llm_grammar_check function to perform preliminary verification in conjunction with the retrieved grammar knowledge, and at the same time call the conversation.get_history() function to retrieve the component parsing results and standardization generation logic output by the previous Agent in the dialogue history, correct errors in a targeted manner, form the preliminary repaired model text, and temporarily store it.
[0076] Step S602: The AADL verification agent calls the `run_aadl_validation_inspection` method in the code to execute the AADL Inspector tool. Taking the model file initially repaired in step S501 as input, the execution statement constructed by `inspector_command` triggers syntax parsing. After the tool runs, it reads the report file generated in `report_dir`, parses and extracts verification data such as model parsing status and specific error information, and synchronously updates the pipeline's `state['inspection_result']` state variable.
[0077] Step S603: The AADL verification agent parses the error reports output in the state['inspection_result']['errors'] list, extracting the error type and location information. It then calls the verification vector database to retrieve matching repair cases from the knowledge base and generates targeted repair solutions. Through the text replacement logic of the _auto_fix_model function in the code, it locates the error position and applies the repair solution, automatically correcting syntax errors and logical conflicts in the model, and synchronously updating the repair record to state['fix_history'].
[0078] Step S604: The AADL verification agent initiates an iterative repair loop (max_iterations=8). In each loop, the `run_aadl_validation_inspection` method is called to perform the comprehensive analysis from step S502. If `state['inspection_result']['status']` is "failed", the automatic repair process in step S503 is triggered. During the loop, the current iteration count is recorded using `state['iteration_count']`. The loop terminates when the maximum number of iterations is reached or the model status changes to "passed". Simultaneously, the error type, repair plan, and results of each repair round are written to the repair log using the `_log_repair_step` method and stored in the file specified by `repair_log_path`. Finally, these are integrated to generate an AADL+AGREE model file that has passed syntax checking, updated to `state['final_validated_model']`, and synchronized to the dialogue history. Figure 7 This is an example output diagram of the AADL verification agent.
[0079] Step S7: Perform formal verification of the AADL architecture based on AGREE, and validate the logical attributes of the syntax-compliant model output in Step S6. The specific steps are as follows:
[0080] Step S701: Manually invoke the OSATE AGREE plugin and import the final verified model file output in step S6. Select the components to be verified to trigger the plugin's formal verification process for the logical constraints in the model, generating an original verification report containing the constraint satisfaction status and counterexamples;
[0081] Step S702: If the formal verification fails, parse the verification report output by the plugin, extract the satisfaction status of each constraint attribute, capture counterexample trajectory data for unsatisfied constraints, and generate a structured formal verification report according to the preset template.
[0082] Step S703: Based on the counterexample trajectories in the verification report, update and adjust the logical constraints of the AGREE specification, perform iterative optimization, and then re-execute steps S2-S7. Figure 8 This is an example diagram of formal verification.
[0083] This invention focuses on the automated fusion and verification of the AADL architecture model and the AGREE formal specification. Based on the principles of model-driven systems engineering, it innovatively constructs a comprehensive technical system covering the entire process from requirement processing to verification implementation. Through multi-agent collaboration, this system can automatically transform natural language requirements into formal specifications early in the design of complex systems, achieving syntactic adaptation and structural fusion between the AGREE specification and the AADL model. Simultaneously, through a two-dimensional verification mechanism, it accurately identifies problems such as model syntax errors, port matching deviations, and inconsistent requirement mappings, proactively avoiding design flaws and effectively improving the development efficiency and reliability of complex systems with extremely high security and stability requirements.
[0084] As can be seen from the detailed description of the above specific implementation methods, this invention effectively overcomes the technical bottlenecks of low efficiency in manual transformation, high cost of syntax verification, and difficulty in forming a verification closed loop in the traditional formal verification process. On the one hand, by leveraging the differentiated design of the dual-path vector knowledge base, the generation knowledge base uses large text blocks to ensure the integrity of the AGREE specification, while the verification knowledge base uses small text blocks to improve the accuracy of error location, providing solid knowledge support for specification generation and error repair. On the other hand, through multi-agent division of labor and information sharing, coupled with an iterative mechanism of LLM preliminary verification, AADL Inspector in-depth analysis, and targeted repair, a complete technical closed loop from requirement capture to verification completion is constructed. During the verification process, lightweight interaction between agents can provide timely feedback on problems and optimize output, fully leveraging the logical rigor of the AGREE formal specification, and significantly reducing the technical threshold of formal verification through an automated toolchain. This addresses the shortcomings of traditional methods in verifying the consistency of requirements in complex systems and ensuring the compliance of model syntax, significantly improving the quality and efficiency of developing high-reliability systems.
[0085] This invention possesses strong adaptability to various scenarios and scalability. At the application level, it can directly serve high-reliability fields such as aerospace, rail transportation, and industrial control, and is particularly suitable for system design verification with complex requirements and numerous model layers. Agent collaboration reduces manual intervention, lowering risks and costs during development. At the technology expansion level, the core idea is not limited to the aforementioned flight control system implementation case: technical personnel in related fields can expand the vector knowledge base training data to incorporate more domain standard documents, optimize the Prompt template generated by the AGREE specification to improve the matching degree between the specification and requirements, adapt to more AADL derivative languages to broaden the model's applicability, or adjust the iterative verification termination conditions to adapt to the verification requirements of different systems. These adjustments all remain within the core design principles of automation, knowledge-driven approaches, closed-loop verification, and agent collaboration, and are all within the scope of protection of this invention.
Claims
1. A method for automatically generating and validating AGREE verification statements in a multi-agent collaborative AADL model, characterized in that... The method includes the following steps: Step S1: Build a domain knowledge base, integrating AADL specifications, AGREE specifications, and manually annotated AGREE examples to provide core knowledge support for subsequent intelligent parsing and code generation; Step S2: AADL Model Analysis Agent performs joint analysis of the model description text and knowledge base, extracts key information, and generates structured results in JSON format; Step S3: Requirements Analysis Agent extracts and breaks down the natural language requirements into indivisible atomic propositions; Step S4: The AGREE generator Agent generates AGREE attachment code based on the atomic propositions and model analysis results using RAG technology; Step S5: The model fusion agent automatically embeds the AGREE specification into the target AADL component to complete model fusion and storage; Step S6: AADL verification agent iterative verification and automatic repair, integrating LLM verification, dual-path vector knowledge base retrieval and AADL Inspector tool feedback to build a multi-dimensional verification system; Step S7: Perform formal verification of the AADL architecture based on AGREE, and perform logical attribute verification on the syntax compliance model output in Step S6.
2. The method for automatically generating and validating AGREE verification statements in a multi-agent collaborative AADL model according to claim 1, characterized in that... The specific steps of step S1 are as follows: Step S101: Manually construct the AGREE sample library and annotate its semantics, then vectorize it using a text embedding model and store it in a vector database; Step S102: Collect AADL specifications and AGREE syntax rules, encapsulate them in a structured manner, and store them in a relational database; Step S103: Integrate the AGREE sample library and the standard definition library to establish a retrieval index and mapping relationship.
3. The method for automatically generating and validating AGREE verification statements in a multi-agent collaborative AADL model according to claim 1, characterized in that... The specific steps of step S2 are as follows: Step S201: AADL Model Analysis Agent loads the AADL model text and starts lexical analysis to identify basic lexical units; Step S202: AADL Model Analysis. The Agent parses the model syntax tree by layer and segment according to the AADL syntax. Step S203: AADL model analysis Agent traverses the syntax tree to extract component name, type, port name, direction, data type, connection source and target, and key attribute value atomic information units; Step S204: Organize atomic information according to a predefined format to generate a JSON structured document.
4. The method for automatically generating and validating AGREE verification statements in a multi-agent collaborative AADL model according to claim 1, characterized in that... The specific steps of step S3 are as follows: Step S301: The demand analysis agent receives natural language requirements, identifies core elements, and establishes a mapping with the AADL model object to form a demand-model association table; Step S302: The requirements analysis agent breaks down the composite requirements into atomic propositions, stores them in a structured format of "serial number-proposition content-associated model object" and synchronizes them to the database.
5. The method for automatically generating and validating AGREE verification statements in a multi-agent collaborative AADL model according to claim 1, characterized in that... The specific steps of step S4 are as follows: Step S401: Based on the RAG mechanism, the AGREE generates an Agent and calls the vector database to retrieve the AGREE syntax specification and examples to determine the sentence pattern and code framework; Step S402: AGREE generates an Agent that converts atomic propositions into logical constraint expressions and supplements model parameters to form a complete constraint statement; Step S403: AGREE generates optimized expressions for Agent retrieval matching cases, integrates them into complete code blocks according to AGREE syntax, and stores them after pre-validation.
6. The method for automatically generating and validating AGREE verification statements in a multi-agent collaborative AADL model according to claim 1, characterized in that... The specific steps of step S5 are as follows: Step S501: The model fusion agent reads the AGREE code and AADL parsing results, matches the target component, and temporarily stores them; Step S502: Encapsulate the AGREE specification as an attachment fragment, unify indentation and verify to avoid duplication, and generate the complete AADL model text; Step S503: The model fusion agent generates a fusion model file according to the standard, stores it in the specified path, and updates the pipeline status.
7. The method for automatically generating and validating AGREE verification statements in a multi-agent collaborative AADL model according to claim 1, characterized in that... The specific steps of step S6 are as follows: Step S601: AADL verifies Agent retrieval-related knowledge and cases, and performs preliminary verification and correction of the fusion model in conjunction with LLM; Step S602: The AADL verification agent calls the AADL Inspector tool to parse the model, extract the test data, and update the status; Step S603: AADL verifies the Agent, parses the error report, retrieves the repair case generation solution, automatically corrects the error, and records it; Step S604: The AADL verification agent starts an iterative repair loop, which terminates after reaching the maximum number of iterations or passing the verification, generates a qualified model, and synchronizes the history.
8. The method for automatically generating and validating AGREE verification statements in a multi-agent collaborative AADL model according to claim 1, characterized in that... The specific steps of step S7 are as follows: Step S701: Import the model by calling the OSATE AGREE plugin, trigger verification and generate the original report; Step S702: If the verification fails, analyze the report to extract counterexamples and generate a structured verification report; Step S703: Adjust the AGREE constraint based on the counterexample and iteratively execute steps S2-S7.
Citation Information
Cited By
Domain large model application method and device based on DSL (Digital Subscriber Line) and format checker
CN121960456A