A metadata-driven AADL text generation method
By using a metadata-driven AADL text generation method, combined with graphical modeling and template engine technology, the problem of low modeling efficiency in complex embedded system design is solved, achieving efficient and accurate system architecture description and text generation.
Patent Information
- Application Number
- CN202510188404.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-20
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2045-02-20
AI Technical Summary
Traditional plain text modeling methods are inefficient in the design of complex embedded systems, making it difficult to intuitively represent the relationships between components and the global structure, leading to inconsistencies and omissions of details in the design process.
A metadata-driven AADL text generation method is adopted, which automatically generates AADL text descriptions by defining a metadata model to describe AADL model elements and their relationships, and combining graphical modeling and template engine technology.
It improves modeling efficiency and accuracy, ensures semantic consistency, enhances text scalability, and meets the needs of rapid modeling and precise design of complex embedded systems.
Smart Images

Figure CN120029594B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of software engineering technology, specifically relating to a metadata-driven AADL text generation method. Background Technology
[0002] Embedded systems are widely used in aerospace, automotive electronics, industrial control, and other fields. Their design and development require rigorous system architecture modeling and verification methods to meet the demands for high reliability and high security. AADL (Architecture Analysis and Design Language), as an architecture modeling language, defines the components, connections, and behaviors of a system in detail through textual descriptions, and is an important tool for embedded system development.
[0003] As embedded systems become increasingly complex and large-scale, traditional text-based modeling methods have certain limitations in practical development. For example, text modeling requires a high level of professional expertise from developers and struggles to intuitively represent the relationships between components and the global structure in large systems. This not only increases the difficulty of system architecture design but may also lead to inconsistencies and omissions of details during the design process.
[0004] Graphical modeling methods can intuitively display the overall architecture of a system. Developers can quickly add components and design connections through a graphical interface, significantly improving the efficiency and accuracy of model building. Furthermore, combining graphical modeling with textual supplementation can fully leverage the advantages of both: graphical modeling quickly constructs the overall architectural framework of the system, showcasing a clear system hierarchy; while textual supplementation allows for further refinement of details, such as adding specific attribute configurations, behavioral logic, and performance parameters.
[0005] This invention proposes a metadata-driven AADL text generation method. It utilizes a metadata model to uniformly describe elements and their relationships in graphical modeling, supporting users in building system frameworks within a graphical interface. During this process, an AADL tree structure is generated, and component elements are mapped to metadata instances in real time. Furthermore, through template engine technology, the AADL tree structure and metadata instances are efficiently converted into AADL text descriptions, achieving a seamless transition from visual system architecture construction to textual detail supplementation. This method not only improves modeling efficiency and accuracy but also provides an intuitive and flexible solution for the design of complex embedded systems. Summary of the Invention
[0006] (a) Technical problems to be solved
[0007] The technical problem this invention aims to solve is how to provide a metadata-driven AADL text generation method to address the challenges of rapid modeling and accurate design in complex embedded systems.
[0008] (II) Technical Solution
[0009] To address the aforementioned technical problems, this invention proposes a metadata-driven AADL text generation method, which includes the following steps:
[0010] Step 1: Define the metadata model
[0011] The metadata model is used to describe all elements and their relationships in the AADL model; the definition of the metadata model includes: AADL element types, element attributes, and relationships between elements; each AADL element corresponds to an entity in the metadata model and has corresponding attributes;
[0012] Step 2: Interactive graphical modeling
[0013] Users can create, edit, and delete AADL model elements through a graphical interface; the interface includes a variety of visual elements, and users can build models by dragging and connecting them; the graphical interface displays AADL elements and their relationships.
[0014] Step 3: Instantiate the metadata model
[0015] In the user modeling process, a tree structure representing the AADL hierarchy is constructed, and each graphical element is instantiated as a metadata model object. Each element is mapped to an instance with specific attributes, saving its type, name, port, and relationship information. In this step, the metadata model instance has fully reflected each element and its structure in the graphical design.
[0016] Step 4: Generate AADL text based on the template engine
[0017] After receiving the AADL tree structure and metadata instance, the template engine uses predefined AADL text templates to populate the data and automatically generates AADL text. Through template-based methods, it can efficiently generate AADL text that conforms to the specifications from the graphical model.
[0018] (III) Beneficial Effects
[0019] This invention proposes a metadata-driven AADL text generation method, which has the following main features:
[0020] (1) Improved the efficiency of overall modeling
[0021] Graphical modeling provides an intuitive interface, allowing developers to quickly complete the overall system architecture design through drag-and-drop and connection operations, visually demonstrating the relationships and hierarchies between system components. The generated AADL text provides flexibility for further supplementation and optimization. This approach combines the high efficiency of graphical modeling with the refined capabilities of text design, meeting the dual needs of complex embedded systems for rapid modeling and accurate design.
[0022] (2) It ensures semantic consistency
[0023] By defining a metadata model to uniformly describe AADL elements and their relationships, a consistent semantic foundation is established between graphical modeling and text-based generation. This unified metadata-driven approach effectively reduces inconsistencies between graphical models and text, ensuring the accuracy of model conversion.
[0024] (3) Enhanced text scalability
[0025] Leveraging template engine technology, the instantiated metadata can be automatically generated into AADL text, significantly improving generation efficiency. The high configurability of templates makes the text generation logic easier to maintain and adapt to the personalized needs of different projects, providing a convenient path for subsequent system upgrades and optimizations. Attached Figure Description
[0026] Figure 1 This is a flowchart of the present invention;
[0027] Figure 2 This is a diagram illustrating the specific content of metadata specifications, using Memory as an example.
[0028] Figure 3 This is a schematic diagram of the AADL tree structure;
[0029] Figure 4 This diagram illustrates how to automatically generate AADL text using the Nunjucks template engine technology. Detailed Implementation
[0030] To make the objectives, contents, and advantages of the present invention clearer, the specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples.
[0031] This invention relates to the field of software engineering technology, and in particular to a metadata-driven AADL (Architecture Analysis and Design Language) text generation method. This method is applied in the field of Model-Driven System Design (MBSE) for the efficient and automatic generation of AADL text representations.
[0032] This invention discloses a metadata-driven AADL (Architecture Analysis and Design Language) text generation method. This method helps embedded system designers quickly complete system modeling through a graphical interface and automatically generate text representations. Further details can be quickly added and adjusted as needed, significantly improving the overall efficiency of modeling. The specific method includes the following steps: First, define a metadata model to standardize the description of AADL elements and their relationships; then, create and edit the AADL model through an interactive graphical interface; during the modeling process, construct an AADL tree structure and instantiate graphical elements as metadata model objects; finally, map the AADL tree structure and metadata instances into corresponding text representations using a template engine. This method not only ensures semantic consistency and text conversion accuracy during the design process but also enhances the system's scalability and adaptability to meet the complex needs of embedded system design, providing key technical support for the development of OnModel, a model-based software analysis and verification tool.
[0033] The purpose of this invention is to provide a metadata-driven AADL text generation method. This method effectively extracts information about elements during the AADL graphical modeling process by establishing a metadata model, and generates corresponding text descriptions through template processing. Specific steps are as follows: Figure 1 As shown:
[0034] Step 1: Define the metadata model
[0035] The metadata model describes all elements and their relationships within the AADL model. The definition of the metadata model includes: the types of AADL elements (such as threads, ports, processors, etc.), the attributes of these elements (such as names, attribute types, etc.), and the relationships between them (such as connections, dependencies, etc.). Each AADL element corresponds to an entity in the metadata model and has corresponding attributes.
[0036] Step 2: Interactive graphical modeling
[0037] Users create, edit, and delete AADL model elements through a graphical interface. The interface includes various visual elements, such as threads, ports, and processors, which users construct models through drag-and-drop and connection operations. The graphical interface displays AADL elements and their relationships.
[0038] Step 3: Instantiate the metadata model
[0039] During user modeling, a tree structure capable of representing the AADL hierarchy is constructed, and each graphical element is instantiated as a metadata model object. Each element (such as a thread, port, processor, etc.) is mapped to an instance with specific attributes, storing information such as its type, name, port, and relationship. In this step, the metadata model instance fully reflects each element and its structure in the graphical design.
[0040] Step 4: Generate AADL text based on the template engine
[0041] After receiving the AADL tree structure and metadata instance, the template engine populates the data using predefined AADL text templates and automatically generates AADL text. This template-based approach enables efficient generation of compliant AADL text from the graphical model.
[0042] Example 1:
[0043] The specific implementation of the metadata-driven AADL text generation tool and system is as follows.
[0044] Step 1: Define the metadata model
[0045] First, following the AADL specification, a metadata model is defined using JSON format to ensure that the metadata of all components has a unified format and standard. The metadata model includes the following main parts:
[0046] 1. Components: Describe information about different types of AADL components, including System, Process, Thread, Memory, etc.
[0047] 2. Features: Defines the component's input / output ports, interfaces, and bus access, etc.
[0048] 3. Properties: Defines the properties of a component, such as memory size, execution time, scheduling strategy, etc.
[0049] 4. Modes: Describes the working mode of the component and the rules for switching between modes.
[0050] 5. Flow Specifications: Define the data flow and paths between components.
[0051] Using memory as an example, the specific content of the metadata specification is explained, such as... Figure 2 As shown, it includes information about the Memory component, as well as the Memory's child nodes, Features and Properties.
[0052] Step 2: Interactive graphical modeling
[0053] System architecture modeling is accomplished through a visual and interactive approach. Users create and edit AADL model elements via a graphical interface. Example of the visual modeling process:
[0054] S21. Add Components: Users can add components such as systems, devices, and data to the model by dragging and dropping, and edit the properties of the corresponding elements.
[0055] S22. Define Port: Add input or output ports to the component, specifying the port name and data type.
[0056] S23. Establish connection: Draw connection lines between components to represent the communication path between ports.
[0057] S24. Define flow: Define data flow in the model, representing the path of data transfer between components.
[0058] Step 3: Instantiate the metadata model
[0059] S31. Construct an AADL tree structure
[0060] During the modeling process, an AADL tree structure is constructed to represent the parent-child relationships and dependencies between elements, such as... Figure 3 As shown, each component, when added to the model, becomes a node in the tree, recording its parent node (parent component) and child nodes (child components). Ports and properties are also attached to the corresponding component nodes as leaf nodes of the tree. The hierarchical relationship of the tree structure clearly represents the nesting relationship of components in the system architecture.
[0061] S32, Instantiate the metadata object
[0062] Whenever a user adds or edits a component in the graphical interface, the tool updates the corresponding metadata object in real time. The instantiated metadata object contains all the information about the component, including its type, name, port, and relationships.
[0063] Step 4: Generate AADL text based on the template engine
[0064] The Nunjucks template engine technology is used to automatically generate AADL text, such as... Figure 4As shown. Specifically, firstly, multiple modular template files are defined, divided into AADL main text templates and AADL sub-text models. The main text template can nest multiple sub-text templates, describing the combinations of all sub-templates. The main text templates include: Package template, ComponentType template, Component Implementation template, Property Set template, and Feature Group Type template. The sub-text templates include: Extends template, Prototypes template, Features template, Flows template, Modes template, Properties template, Annex subclauses template, Connections template, Subcomponents template, and Calls template. Based on the AADL tree structure, the keyword information, attribute information, and numerical information of the metadata instances are filled into the corresponding positions in the templates, ultimately generating the AADL text.
[0065] Example 2:
[0066] A metadata-driven AADL text generation method mainly includes the following steps:
[0067] The first step is to define a metadata model, which describes all elements in the AADL model and their relationships, including element types, attributes, and relationships between elements.
[0068] The second step is interactive graphical modeling. Through a graphical modeling interface, the system's various components, ports, connections, and data flows are defined, and the system architecture is established.
[0069] The third step is to construct an AADL tree structure and instantiate the metadata model, instantiating each element in the graphical modeling as a metadata model object and saving its type, name, port, connection and other information.
[0070] The fourth step involves using a template engine to map the AADL tree structure and metadata instances into corresponding text representations, generating AADL text that conforms to the specifications.
[0071] This invention proposes a metadata-driven AADL text generation method, which has the following main features:
[0072] (1) Improved the efficiency of overall modeling
[0073] Graphical modeling provides an intuitive interface, allowing developers to quickly complete the overall system architecture design through drag-and-drop and connection operations, visually demonstrating the relationships and hierarchies between system components. The generated AADL text provides flexibility for further supplementation and optimization. This approach combines the high efficiency of graphical modeling with the refined capabilities of text design, meeting the dual needs of complex embedded systems for rapid modeling and accurate design.
[0074] (2) It ensures semantic consistency
[0075] By defining a metadata model to uniformly describe AADL elements and their relationships, a consistent semantic foundation is established between graphical modeling and text-based generation. This unified metadata-driven approach effectively reduces inconsistencies between graphical models and text, ensuring the accuracy of model conversion.
[0076] (3) Enhanced text scalability
[0077] Leveraging template engine technology, the instantiated metadata can be automatically generated into AADL text, significantly improving generation efficiency. The high configurability of templates makes the text generation logic easier to maintain and adapt to the personalized needs of different projects, providing a convenient path for subsequent system upgrades and optimizations.
[0078] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A metadata-driven AADL text generation method, characterized in that, The method comprises the following steps: First step, defining the metadata model The metadata model is used to describe all elements in the AADL model and their relationships; The definition of the metadata model includes: AADL element types, element attributes, and relationships between elements; each AADL element corresponds to an entity in the metadata model and has corresponding attributes; Second step, interactive graphical modeling Users create, edit, and delete AADL model elements through a graphical interface; the interface includes various visualization elements, and users build models through dragging and connecting operations; the graphical interface displays AADL elements and their associations; Third step, instantiating the metadata model During the user modeling process, a tree structure representing the AADL hierarchy is constructed, and each graphical element is instantiated as a metadata model object; each element is mapped to an instance with specific attributes, saving its type, name, port, and relationship information; in this step, the metadata model instance has fully reflected each element and its structure in the graphical design; Fourth step, generating AADL text according to the template engine After receiving the AADL tree structure and metadata instance, the template engine fills in the data using predefined AADL text templates to automatically generate AADL text; through templating, AADL text that conforms to the specification can be efficiently generated from the graphical model; Wherein, The third step comprises: S31, constructing an AADL tree structure During the modeling process, an AADL tree structure is constructed to represent the parent-child relationship and dependency relationship between elements; each component, when added to the model, becomes a node in the tree and records its parent and child nodes; ports and attributes are also attached to the corresponding component nodes as leaf nodes of the tree; the hierarchical relationship of the tree structure clearly represents the nesting relationship of components in the system architecture; S32, instantiating metadata objects Whenever a user adds or edits a component in the graphical interface, the tool will update the corresponding metadata object in real time; the instantiated metadata object contains all information about the component, including type, name, port, and relationship information; The fourth step comprises: first, define multiple modular template files, divided into AADL main text templates and AADL sub-text models, the main text template can nest multiple sub-text templates, and the text template describes the combination of all sub-templates; according to the AADL tree structure, fill in the corresponding positions of the template with the keyword information, attribute information, and numerical information of the metadata instance to finally generate the AADL text.
2. The metadata-driven AADL text generation method of claim 1, wherein, In the first step, the AADL element types include: threads, ports, and processors; the element attributes include: names, attribute types; and the relationships between elements include: connections, dependencies.
3. The metadata-driven AADL text generation method of claim 1, wherein, The first step comprises: according to the AADL specification, define the metadata model through JSON format to ensure that the metadata of all components has a unified format and specification.
4. The metadata-driven AADL text generation method of claim 3, wherein, The metadata model includes the following parts: Component: describes information about different types of AADL components, including: system, process, thread, and memory; Features: define the input and output ports, interfaces, and bus access of components; Attributes: define the attributes of components, including memory size, execution time and scheduling policy; Modes: describe the working modes of components and the mode switching rules; Flows: define the data flow between components and its path.
5. The metadata-driven AADL text generation method of claim 4, wherein, The second step includes: completing system architecture modeling through visual interaction, users create and edit AADL model elements through graphical interface; the visual modeling process includes: S21, adding components: users add system, device and data components to the model through drag-and-drop operation, and edit the attributes of corresponding elements; S22, defining ports: adding input or output ports to components, and specifying the name and data type of the port; S23, establishing connections: drawing connection lines between components to represent the communication path between ports; S24, defining flows: defining data flow in the model to represent the data transfer path between components.
6. The metadata-driven AADL text generation method of claim 5, wherein, The fourth step includes: using template engine technology Nunjucks to automatically generate AADL text.
7. The metadata-driven AADL text generation method of claim 5, wherein, Main text templates include: Package template, Component Type template, Component Implementation template, Property Set template and Feature Group Type template.
8. The metadata-driven AADL text generation method of claim 5, wherein, Sub-text templates include: Extends template, Prototypes template, Features template, Flows template, Modes template, Properties template, Annex subclauses template, Connections template, Subcomponents template, Calls template.
Citation Information
Patent Citations
Reusable embedded software architecture modeling method and system
CN117492712A
Interface editing method, device and equipment based on Flutter component and storage medium
CN118860392A