Metadata-driven AADL text generation method

Through the metadata-driven AADL text generation method, combined with graphical modeling and template engine technology, the problem of difficult to achieve rapid modeling and precise design of complex embedded systems during the design process is solved, and efficient and accurate system design and text generation are achieved.

CN120029594AActive Publication Date: 2025-05-23BEIJING INST OF COMP TECH & APPL
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202510188404.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-20
Publication Date
2025-05-23
Estimated Expiration
2045-02-20

AI Technical Summary

Technical Problem

It is difficult to achieve rapid and precise design of complex embedded systems during the design process. Traditional plain text modeling methods require high professional background for developers and are difficult to intuitively display the association and global structure between components.

Method used

Using the metadata-driven AADL text generation method, we use the metadata model to describe the elements and their relationships in the AADL model, combined with graphical modeling and template engine technology, we generate the AADL tree structure and automatically generate AADL text.

Benefits of technology

Improves modeling efficiency and accuracy, providing an intuitive and flexible design solution that ensures semantic consistency and text scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120029594A_ABST
    Figure CN120029594A_ABST
Patent Text Reader

Abstract

The invention relates to an AADL text generation method based on metadata driving, and belongs to the technical field of software engineering. The method comprises the following steps: firstly, defining a metadata model for standardly describing AADL elements and relationships thereof; then, an AADL model is created and edited through an interactive graphical interface; an AADL tree structure is constructed in the modeling process, and graphic elements are instantiated into metadata model objects; and finally, mapping the AADL tree structure and the metadata instance into corresponding text representation through a template engine. According to the method, the semantic consistency and the text conversion accuracy in the design process are guaranteed, meanwhile, the expandability and adaptability of the system are enhanced, the complex requirements of embedded system design are met, and a key technical support is provided for research and development of a model-based software analysis and verification tool OnModel.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of software engineering, and in particular relates to an AADL text generation method based on metadata drive. Background Art

[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 requirements of high reliability and high security. AADL (Architecture Analysis and Design Language), as an architecture modeling language, defines the components, connections and behaviors of the system in detail through textual description, and is an important tool for embedded system development.

[0003] As embedded systems become increasingly complex and large-scale, traditional pure text modeling methods have certain limitations in actual development. For example, text modeling requires a high level of professional background from developers, and it is difficult to intuitively reflect the relationship 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] The graphical modeling method can intuitively display the overall architecture of the system. Developers can quickly add components and design connections through the graphical interface, which significantly improves the efficiency and accuracy of model construction. At the same time, by combining graphical modeling with textual supplements, the advantages of both can be fully utilized: graphical modeling quickly builds the overall architecture framework of the system and shows a clear system hierarchy; while textual supplements can make further details on this basis, such as adding specific attribute configurations, behavioral logic and performance parameters.

[0005] The present invention proposes a metadata-driven AADL text generation method, which uses a metadata model to uniformly describe the elements and their relationships in graphical modeling, supports users to build a system framework in a graphical interface, generates an AADL tree structure in the process, and maps component elements to metadata instances in real time. And through the template engine technology, the AADL tree structure and metadata instances are efficiently converted into AADL text descriptions, thereby achieving seamless connection from the visual construction of the system architecture to the textual details supplement. This method not only improves the modeling efficiency and accuracy, but also provides an intuitive and flexible solution for the design of complex embedded systems. Summary of the invention

[0006] 1. Technical issues to be resolved

[0007] The technical problem to be solved by the present invention is how to provide a metadata-driven AADL text generation method to solve the problem of rapid modeling and precise design of complex embedded systems.

[0008] (II) Technical solution

[0009] In order to solve the above technical problems, the present 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 create, edit, and delete AADL model elements through a graphical interface. The interface includes a variety of visual elements, and users build models by dragging and connecting. 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 expressing 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, preserving its type, name, port, and relationship information. In this step, the metadata model instance has completely 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 the predefined AADL text template to fill in the data and automatically generates the AADL text; through the templating method, it can efficiently generate AADL text that conforms to the specification from the graphical model.

[0018] (III) Beneficial effects

[0019] The present invention proposes a metadata-driven AADL text generation method. The present invention proposes a metadata-driven AADL text generation method, which has the following main features:

[0020] (1) Improved overall modeling efficiency

[0021] Graphical modeling provides an intuitive interactive interface. Developers can quickly complete the overall system architecture design by dragging and connecting operations, and intuitively display the relationship and hierarchy between system components. The generated AADL text provides flexibility for further supplementation and optimization. This method combines the high efficiency of graphical modeling with the refinement of text design, meeting the dual needs of fast modeling and precise design of complex embedded systems.

[0022] (2) Ensure semantic consistency

[0023] By defining the metadata model, AADL elements and their relationships are described uniformly, so that graphical modeling and text generation have a consistent semantic basis. This unified metadata-driven approach can effectively reduce the inconsistency between the graphical model and the text, ensuring the accuracy of the model conversion.

[0024] (3) Enhanced text scalability

[0025] With the help of template engine technology, the content of metadata instantiation can automatically generate AADL text, which significantly improves the generation efficiency. The high configurability of the template makes the logic of text generation easier to maintain and adapt to the personalized needs of different projects, providing a convenient way for subsequent upgrades and optimizations of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 is a flow chart of the present invention;

[0027] Figure 2 This is a schematic diagram for explaining the specific contents 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 paper presents a schematic diagram of using the template engine technology Nunjucks to realize the automatic generation of AADL text. DETAILED DESCRIPTION

[0030] In order to make the purpose, content and advantages of the present invention more clear, the specific implementation methods of the present invention are further described in detail below in conjunction with the drawings and examples.

[0031] The present invention relates to the field of software engineering technology, in particular to a metadata-driven AADL (Architecture Analysis and Design Language) text generation method. The method is applied to the field of model-driven system design (MBSE) and is used to efficiently and automatically generate AADL text representations.

[0032] The present invention discloses a metadata-driven AADL (Architecture Analysis and Design Language) text generation method, which can help embedded system designers quickly complete system modeling in a graphical way and automatically generate text representations, and can further quickly supplement and adjust details of the text as needed, thereby greatly improving the overall efficiency of modeling. The specific method includes the following steps: first, define a metadata model for standardizing the description of AADL elements and their relationships; then create and edit the AADL model through an interactive graphical interface; construct an AADL tree structure during the modeling process, and instantiate the graphic elements into metadata model objects; finally, map the AADL tree structure and metadata instances into corresponding text representations through a template engine. This method not only ensures the consistency of semantics and the accuracy of text conversion during the design process, but also enhances the scalability and adaptability of the system to meet the complex needs of embedded system design, and provides key technical support for the development of OnModel, a model-based software analysis and verification tool.

[0033] The purpose of the present invention is to provide a metadata-driven AADL text generation method, which effectively extracts the information of elements in the AADL graphic modeling process by establishing a metadata model, and generates corresponding text descriptions through template processing. The specific steps are as follows Figure 1 As shown:

[0034] Step 1: Define the metadata model

[0035] 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 (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 a variety of visual elements, such as threads, ports, and processors. Users build models by dragging, connecting, and other operations. The graphical interface displays AADL elements and their associations.

[0038] Step 3: Instantiate the metadata model

[0039] During the user modeling process, a tree structure that can express the AADL hierarchy is constructed, and each graphical element is instantiated as a metadata model object. Each element (such as thread, port, processor, etc.) is mapped to an instance with specific attributes, saving its type, name, port, relationship, etc. In this step, the metadata model instance has completely reflected 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 uses the predefined AADL text template to fill in the data and automatically generates the AADL text. Through the templating method, it can efficiently generate AADL text that conforms to the specification from the graphical model.

[0042] Embodiment 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, define the metadata model in JSON format according to the AADL specification to ensure that the metadata of all components has a unified format and specification. The metadata model contains the following main parts:

[0046] 1. Component: describes the information of different types of AADL components, including system, process, thread, memory, etc.

[0047] 2. Features: Define the component's input and output ports, interfaces, and bus access.

[0048] 3. Properties: Define the properties of the component, such as memory size, execution time, scheduling strategy, etc.

[0049] 4. Modes: Describes the working mode of the component and the mode switching rules.

[0050] 5. Flow Specifications: Define the data flow and its path between components.

[0051] Take Memory as an example to explain the specific content of metadata specifications, such as Figure 2 As shown, it includes Memory component information, and Memory's child nodes Features and Properties.

[0052] Step 2: Interactive Graphical Modeling

[0053] The system architecture modeling is completed through visual interaction. Users create and edit AADL model elements through a graphical interface. An 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 port to the component and specify the port name and data type.

[0056] S23. Establish connections: Draw connection lines between components to represent the communication paths between ports.

[0057] S24. Define flow: Define data flow in the model to represent the data transmission path between components.

[0058] Step 3: Instantiate the metadata model

[0059] S31. Construct AADL tree structure

[0060] During the modeling process, an AADL tree structure is constructed to represent the parent-child relationship and dependency relationship between elements, such as Figure 3 As shown in the figure. When each component is added to the model, it will be treated as a node in the tree and record its parent node (superior component) and child node (subordinate component). 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 shows the nested relationship of components in the system architecture.

[0061] S32. Instantiate metadata object

[0062] 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 the information of the component, including type, name, port, relationship, etc.

[0063] Step 4: Generate AADL text based on the template engine

[0064] The template engine technology Nunjucks is used to realize the automatic generation of AADL text, such as Figure 4As shown. Specifically, first define multiple modular template files, which are 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. The main text templates include: Package template, ComponentType template, Component Implementation template, Property Set template, Feature Group Type template. 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. According to the AADL tree structure, the keyword information, attribute information, and numerical information of the metadata instance are filled into the corresponding positions in the template, and finally the AADL text is generated.

[0065] Embodiment 2:

[0066] A metadata-driven AADL text generation method mainly includes the following steps:

[0067] The first step is to define the metadata model, which is used to describe all elements and their relationships in the AADL model, including element types, attributes, and relationships between elements.

[0068] The second step is interactive graphical modeling, which uses a graphical modeling interface to define the system's components, ports, connections, data flows, and other elements, and establish the system architecture.

[0069] The third step is to build the AADL tree structure and instantiate the metadata model. Each element in the graphical modeling is instantiated as a metadata model object, saving its type, name, port, connection and other information.

[0070] The fourth step is to map the AADL tree structure and metadata instances into corresponding text representations through the template engine to generate AADL text that complies with the specification.

[0071] The present invention proposes a metadata-driven AADL text generation method, which has the following main features:

[0072] (1) Improved overall modeling efficiency

[0073] Graphical modeling provides an intuitive interactive interface. Developers can quickly complete the overall system architecture design by dragging and connecting operations, and intuitively display the relationship and hierarchy between system components. The generated AADL text provides flexibility for further supplementation and optimization. This method combines the high efficiency of graphical modeling with the refinement of text design, meeting the dual needs of fast modeling and precise design of complex embedded systems.

[0074] (2) Ensure semantic consistency

[0075] By defining the metadata model, AADL elements and their relationships are described uniformly, so that graphical modeling and text generation have a consistent semantic basis. This unified metadata-driven approach can effectively reduce the inconsistency between the graphical model and the text, ensuring the accuracy of the model conversion.

[0076] (3) Enhanced text scalability

[0077] With the help of template engine technology, the content of metadata instantiation can automatically generate AADL text, which significantly improves the generation efficiency. The high configurability of the template makes the logic of text generation easier to maintain and adapt to the personalized needs of different projects, providing a convenient way for subsequent upgrades and optimizations of the system.

[0078] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as 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: Step 1: Define the metadata model 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 the relationship between elements; each AADL element corresponds to an entity in the metadata model and has corresponding attributes; Step 2: Interactive Graphical Modeling Users create, edit, and delete AADL model elements through a graphical interface. The interface includes a variety of visual elements, and users build models by dragging and connecting. The graphical interface displays AADL elements and their relationships. Step 3: Instantiate the metadata model In the user modeling process, a tree structure expressing 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, preserving its type, name, port, and relationship information. In this step, the metadata model instance has completely reflected each element and its structure in the graphical design. Step 4: Generate AADL text based on the template engine After receiving the AADL tree structure and metadata instance, the template engine uses the predefined AADL text template to fill in the data and automatically generates the AADL text; through the templating method, it can efficiently generate AADL text that conforms to the specification from the graphical model.

2. The metadata-driven AADL text generation method according to claim 1, characterized in that: In the first step, AADL element types include: thread, port and processor, element attributes include: name, attribute type, and relationship between elements include: connection and dependency.

3. The metadata-driven AADL text generation method according to claim 1, characterized in that: The first step includes: defining a metadata model in JSON format according to the AADL specification to ensure that the metadata of all components have a unified format and specification.

4. The metadata-driven AADL text generation method according to claim 3, characterized in that: The metadata model consists of the following parts: Component: Information describing different types of AADL components, including: system, process, thread, and memory; Features: define the input and output ports, interfaces and bus access of the component; Properties: define the properties of the component, including memory size, execution time, and scheduling strategy; Mode: describes the component's working mode and mode switching rules; Flow specification: defines the data flow and its path between components.

5. The metadata-driven AADL text generation method according to claim 4, characterized in that: The second step includes: completing system architecture modeling through a visual interactive method, and the user creates and edits AADL model elements through a graphical interface; the visual modeling process includes: S21. Adding components: Users add systems, devices, and data components to the model by dragging and dropping, and edit the properties of the corresponding elements; S22. Define port: add input or output port to the component and specify the port name and data type; S23, establishing connections: drawing connection lines between components to represent communication paths between ports; S24. Define flow: Define data flow in the model to represent the data transmission path between components.

6. The metadata-driven AADL text generation method according to claim 5, characterized in that: The third step includes: S31. Construct AADL tree structure During the modeling process, an AADL tree structure is constructed to represent the parent-child relationship and dependency relationship between elements. When each component is added to the model, it will be treated as a node in the tree and its parent node and child node will be recorded. Ports and attributes will also be attached to the corresponding component nodes as leaf nodes of the tree. The hierarchical relationship of the tree structure clearly represents the nested relationship of components in the system architecture. S32. Instantiate metadata object 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 the information of the component, including type, name, port, and relationship information.

7. The metadata-driven AADL text generation method according to claim 6, characterized in that: The fourth step includes: using the template engine technology Nunjucks to realize the automatic generation of AADL text.

8. The metadata-driven AADL text generation method according to claim 6, characterized in that: The fourth step includes: First, define multiple modular template files, which are divided into AADL main text template and AADL sub-text model. The main text template can nest multiple sub-text templates. The text template describes the combination of all sub-templates. According to the AADL tree structure, the keyword information, attribute information, and numerical information of the metadata instance are filled into the corresponding positions in the template to finally generate the AADL text.

9. The metadata-driven AADL text generation method according to claim 8, characterized in that: The main text templates include: Package template, ComponentType template, Component Implementation template, Property Set template and Feature Group Type template.

10. The metadata-driven AADL text generation method according to claim 8, characterized in that: 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.

Citation Information

Patent Citations

  • Method and device used for generating data format descriptive language model

    CN105446983A

  • Cockpit display control system software architecture management platform

    CN106201480A

  • Automatic conversion method from non-formal requirement specification template to formal design model

    CN108196827A

  • Architecture design and architecture conversion method based on complex real-time embedded system

    CN115712420A

  • Reusable embedded software architecture modeling method and system

    CN117492712A