Code generation method for embedded operating system platforms based on the AADL model
By using an automated AADL model code generation method, the problems of human error and platform adaptation in the process of converting AADL models into target platform code are solved, achieving efficient and reliable code generation that is suitable for safety-critical fields.
Patent Information
- Application Number
- CN202411498655.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2044-10-25
AI Technical Summary
In existing technologies, the process of converting AADL models into executable code on the target platform relies on manual operations, which is prone to human error and is difficult to adapt to different platforms, resulting in long development times and insufficient code security.
By designing an automatic code generation method based on the AADL model, including the traversal acquisition, parsing and mapping rule design of the AADL model, the method automatically converts the AADL model into platform-independent intermediate code, and then into embedded operating system platform code, reducing manual intervention and improving the accuracy and efficiency of code generation.
It significantly reduces manual coding workload, improves the accuracy and consistency of code generation, and ensures code reliability and portability, making it suitable for safety-critical fields such as avionics mission systems and medical devices.
Smart Images

Figure CN119440514B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of automatic code generation, specifically relating to a method for generating code related to an embedded operating system platform based on the AADL model. Background Technology
[0002] In recent years, with the rapid advancement of my country's aerospace field and major national engineering projects, the scale and complexity of software in key areas such as aerospace are growing exponentially. These fields have extremely high requirements for the high reliability and strict execution semantics of software. Currently, software development in these fields is still mainly based on manual coding, but when faced with such large and complex systems, this often leads to problems such as excessively long development times and insufficient code security. With the introduction of new concepts such as Model Based Systems Engineering (MBSE), compared to traditional software systems engineering, the MBSE concept is more in line with the current trend of software development, and traditional software development methods are gradually being replaced by model-based development methods.
[0003] However, despite the significant advantages of AADL in system design and verification, translating AADL models into executable code for target platforms remains a challenging task. Current code generation processes typically require manual intervention, are prone to introducing errors, and increase development time and costs. Furthermore, differences between platforms further complicate code generation. To address these challenges, an automated, AADL-based code generation method is needed that can effectively reduce manual intervention, improve the accuracy and efficiency of code generation, and ensure the portability and consistency of the generated code.
[0004] The model-based automatic code generation method of this invention mainly includes several key steps: modeling the system using AADL, obtaining and parsing the AADL model, mapping the AADL model to intermediate platform-independent code, and then mapping the platform-independent code to the (Tianyi) embedded operating system platform code. In the system design phase, the system is first visualized using an AADL-based modeling tool. After modeling, a parsing tool is used to extract necessary system architecture information from the AADL model, identifying the system's components, interfaces, connection methods, and their dependencies. To achieve cross-platform compatibility, the structure and behavior in the AADL model are first mapped to platform-independent intermediate code. This code describes the system's logical functions without depending on the hardware or operating system of a specific platform, such as... Figure 1As shown, it can be mapped to different platforms such as JVM, seL4, or Tyche; after generating platform-independent code, the abstract components in the code are mapped to specific modules in the (Tianyi) embedded operating system, such as task scheduling, memory management, and communication interfaces; finally, the generated code is integrated into the overall framework of the (Tianyi) embedded operating system to ensure compatibility and collaboration with other system modules. Summary of the Invention
[0005] (a) Technical problems to be solved
[0006] The technical problem to be solved by this invention is how to provide a method for generating embedded operating system platform-related code based on the AADL model, so as to solve the problems of existing code generation processes relying on manual operation, being prone to human error, and being difficult to adapt to different platforms.
[0007] (II) Technical Solution
[0008] To address the aforementioned technical problems, this invention proposes a method for generating embedded operating system platform-related code based on the AADL model. This method includes the following steps:
[0009] The first step is to traverse and parse the AADL model.
[0010] Automatically traverse and retrieve all components of the AADL model, including a comprehensive scan and extraction of the AADL model's components, interfaces, runtime performance attributes, and inter-component connections. This traversal ensures that all key information is correctly identified and extracted, and then this information is analyzed and processed in depth. The parsing process includes identifying and classifying the AADL model's components, interfaces, performance attributes, and inter-component connection information.
[0011] The second step is to design the mapping rules from the AADL model to the embedded operating system code.
[0012] Design a set of mapping rules from AADL models to embedded operating system code, including: mapping from components to modules, mapping from interfaces to communication interfaces, mapping from performance attributes to configuration parameters, and mapping between components to data flow or control flow; these rules define how to map the model to the corresponding modules in the embedded operating system, ensuring that the abstract concepts in the model can be accurately translated into concrete implementation code;
[0013] Step 3: Automatically convert to embedded operating system platform code
[0014] Based on the above mapping rules, the components, interfaces, performance attributes, and inter-component connection information in the AADL model are automatically converted into embedded operating system platform code. This process first converts the AADL model into intermediate platform-independent code, then converts the intermediate platform-independent code into the specific implementation code of the embedded operating system, and finally, the generated code can run directly on the embedded operating system platform.
[0015] (III) Beneficial Effects
[0016] This invention proposes a method for generating embedded operating system platform-related code based on the AADL model, and also proposes an automatic code generation technology based on the AADL model, which has the following main features:
[0017] (1) By automatically converting the AADL model into platform-independent code and the final (Tianyi) embedded operating system platform code, this technology significantly reduces the amount of manual coding work and instead relies on automated tools to generate high-quality code, thus shortening the development cycle.
[0018] (2) During the automatic code generation process, the execution semantics defined in the AADL model are strictly maintained to ensure that the generated code fully conforms to the design requirements of the model in terms of behavior, and to guarantee the reliability and security of the code in critical systems, especially in applications involving security and security-critical areas.
[0019] (3) By first mapping the AADL model to platform-independent intermediate code, this technique enables support for multiple target platforms. This design allows the same model to be mapped to different operating systems or hardware platforms, enhancing the system's flexibility and portability. When generating platform-specific code, the system can be optimized according to the characteristics of the target platform (such as the (Tianyi) embedded operating system) to ensure optimal performance on that platform.
[0020] (4) Due to the strict execution semantics and automatic verification functions of this technology, the generated code is particularly suitable for applications requiring high reliability and security, such as medical devices and avionics mission systems. These applications have very low tolerance for system errors, therefore reliable code generation technology is crucial. Attached Figure Description
[0021] Figure 1 Example diagram of the platform supporting the code generation chain;
[0022] Figure 2 Generate toolchain architecture diagrams for code;
[0023] Figure 3 A text representation diagram of AADL for port-based thread component types;
[0024] Figure 4 Modeling views for AADL software systems;
[0025] Figure 5 A flowchart of the code generation chain workflow. Detailed Implementation
[0026] 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.
[0027] AADL (Automatic Architecture and Design) has been widely used in system design and verification. It can standardize the description of system hardware and software components, interconnections, and non-functional attributes, providing strong support for performance evaluation and verification in the early design phase. However, the current process of converting AADL models into executable code on target platforms still faces many challenges. Addressing the problems of existing code generation processes relying on manual operation, being prone to human error, and struggling to adapt to different platforms, this invention proposes a method for generating embedded operating system platform-related code based on AADL models. This method uses an algorithm to traverse and parse the AADL model, designs mapping rules from the AADL model to (Tianyi) embedded operating system code, and automatically converts the components, interfaces, performance attributes, and inter-component connection information described in the model into (Tianyi) embedded operating system platform code. This method not only automatically generates code, reducing the complexity and uncertainty of manual coding, but also improves code reliability and platform adaptability, providing a powerful tool for the development of embedded systems in the aerospace field.
[0028] The purpose of this invention is to realize a model-based automatic code generation method, achieving the mapping from AADL models to (Tianyi) embedded operating system platform code. This method parses the AADL model, extracts key information, and maps it to the corresponding operating system platform code to generate highly reliable software. This method guarantees strict execution semantics and is suitable for application development in security and security-critical areas.
[0029] The first step is to traverse and parse the AADL model.
[0030] This invention designs and implements an algorithm for automatically traversing and acquiring the various components of an AADL model. This includes a comprehensive scan and extraction of the AADL model's components, interfaces, runtime performance attributes, and inter-component connections. This traversal ensures that all key information is correctly identified and extracted, and then this information is analyzed and processed in depth. The parsing process includes identifying and classifying the various components, interfaces, performance attributes, and inter-component connections of the AADL model. This process ensures that all elements in the AADL model are accurately understood and ready for subsequent code generation steps.
[0031] The second step is to design the mapping rules from the AADL model to the (Tianyi) embedded operating system code.
[0032] Based on a thorough analysis of the AADL model, this invention designs a set of mapping rules from the AADL model to the (Tianyi) embedded operating system code, including: mapping from components to modules, mapping from interfaces to communication interfaces, mapping from performance attributes to configuration parameters, and mapping between components to data flow or control flow. These rules define how to map the model to the corresponding modules in the (Tianyi) embedded operating system, ensuring that the abstract concepts in the model can be accurately transformed into concrete implementation code.
[0033] Step 3: Automatically convert to (Tianyi) embedded operating system platform code.
[0034] Based on the above mapping rules, this invention realizes a technology for automatically converting the components, interfaces, performance attributes, and inter-component connection information in the AADL model into the (Tianyi) embedded operating system platform code. This process is fully automated, significantly reducing the workload of manual coding and avoiding potential errors during manual conversion. The process first converts the AADL model into intermediate platform-independent code, and then converts the intermediate platform-independent code into the specific implementation code of the (Tianyi) embedded operating system. Ultimately, the generated code can run directly on the (Tianyi) embedded operating system platform, ensuring that the system's functionality and performance fully conform to the original AADL model design.
[0035] Example 1:
[0036] Figure 2 The code generation toolchain architecture diagram shown illustrates high-level concepts in a model-based automated code generation approach. The AADL model in the diagram is a simple temperature control system built from different types of components. For automated code generation, the most important component type is the thread component, such as... Figure 3 As shown, this corresponds to a real-time task in a real-time system. The specific implementation steps are as follows:
[0037] The first step is to traverse, obtain, and parse the AADL model.
[0038] Use modeling tools to perform AADL modeling on the system to be built, such as Figure 4 As shown. A parsing tool is used to scan the AADL model file, identifying and extracting components, interfaces, performance attributes, and inter-component connection information. Components include processors, threads, processes, etc.; interfaces include data ports, event ports, etc.; performance attributes include latency, priority, etc.; and inter-component connection information includes data flow, control flow, etc.
[0039] The extracted model information is categorized and stored, and analyzed according to function, such as the execution semantics of processing components and the communication requirements of interfaces, ensuring comprehensive coverage of all key information in the AADL model and providing complete data support for subsequent mapping. The main algorithms are shown below:
[0040] S11. Create an iterator to traverse the entire AADL model, identify and extract components, interfaces, performance attributes and connection information between components in the model.
[0041]
[0042] Among them, transformComponent() is a method in Walker used to transform various attributes of model information, including: Mutexes, Semaphores, Dataports, Provides, etc. The format of each attribute involves updating from the old format or state to the new uniform format, while standardizing, cleaning and enhancing to ensure that the system can correctly process and use these resources.
[0043] S12. Construct a classifier mapping, classify and store the extracted model information, establish a mapping relationship between the classifier name and the model information itself, and store it in airClassifierMap;
[0044]
[0045] The code snippet above uses a data component as an example. It iterates through the data components in AADL and establishes a mapping relationship between the classifier name of the data component and the component itself, storing it in airClassifierMap.
[0046] S13, Analyzing the AADL Model
[0047] In the AADL model parsing step, data components and other parts of the model are parsed separately. The main reason for this is to address different concerns and requirements. Data component parsing focuses on data definition and classification, while other parts, such as components and connections, focus on handling system structure and behavior. Separate parsing helps simplify the processing of complex models and ensures the correctness and consistency of each part of the model.
[0048] The following code snippet parses data components in an AADL model. It first processes the data type and passes in parameters, then initializes an empty mapping to store the mapping relationship from the classifier name of the AADL data component to the corresponding AadlType object. Then, it iterates through all data components in the model, processing and updating the type mapping.
[0049]
[0050]
[0051] The following code snippet parses other parts of the AADL model. First, it resets all appendix accessors, then builds the symbol table. If there are errors, it returns the built symbol table; otherwise, it processes the appendix libraries in the model, initializes and populates the appendix sub-clause information mapping, updates this information along with the appendix library information to the symbol table, and finally returns the symbol table containing all the processing results.
[0052]
[0053]
[0054] The second step is to design the mapping rules from the AADL model to the (Tianyi) embedded operating system code.
[0055] One of the key innovations of this invention is the design of a set of mapping rules from the AADL model to the (Tianyi) embedded operating system code. These rules specify how to transform the abstract concepts in the AADL model into concrete implementation code, including mappings from components to modules, interfaces to communication interfaces, performance attributes to configuration parameters, and connections between components to data flow or control flow. This code generation toolchain focuses on AADL model components, particularly thread components and port-based communication between threads.
[0056] 1. Component-to-module mapping
[0057] Define mapping rules that map components in the AADL model to specific modules in the (Tianyi) operating system, such as task management modules and device driver modules. For each component, generate a code framework for the application. Developers use a conventional development environment to supplement the generated code framework with specific application logic to complete the component implementation.
[0058] 2. Mapping from interface to communication interface
[0059] The design maps interfaces in the AADL model to communication or device interfaces in the (Tianyi) operating system. For each port, an API is generated for communication via that port. Application code accesses the automatically generated API to communicate with other components through the component's port. For each port connection, infrastructure code is generated for the communication path between the source and destination ports to move data / events between the output port of the sending component and the input port of the receiving component.
[0060] 3. Mapping performance attributes to configuration parameters
[0061] Performance attributes are mapped to parameter settings in the system's configuration files to ensure execution efficiency on the (Tianyi) operating system. For scheduling protocol attributes, the code generation toolchain customizes the structure of the thread's computation entry point based on the scheduling protocol thread attributes specified in the AADL model.
[0062] Based on the transformation rules corresponding to different parts of the AADL model, some key transformation rules are shown in Table 1. In the AADL model, software components (processes, threads, etc.) are mapped to the (Tianyi) embedded operating system, and task creation and startup are achieved by calling the tyche_task_creat() or tyche_task_start() functions; input / output ports for events or data are mapped to the (Tianyi) embedded operating system, and event reception and sending are achieved by calling the tyche_event_receive(), tyche_event_send() or tyche_message_queue_receive(), tyche_message_queue_send() functions; attributes periodic or sporadic are mapped to the (Tianyi) embedded operating system, and periodic tasks are managed by calling tyche_timer_create(), and sporadic events are handled by using tyche_event_trigger().
[0063] Table 1 Key Conversion Rules
[0064]
[0065]
[0066] Step 3: Automatically convert to (Tianyi) embedded operating system platform code.
[0067] Based on the mapping rules designed in the second step, this invention achieves automatic conversion from the AADL model to the (Tianyi) embedded operating system platform code. This process first converts the AADL model into intermediate platform-independent code, and then converts the intermediate code into the specific implementation code of the (Tianyi) operating system.
[0068] 1. Intermediate code generation
[0069] First, an algorithm was designed and implemented to convert the abstract concepts in the AADL model into platform-independent intermediate code. This code is platform-independent and can be adapted to different embedded operating systems. The algorithm primarily generates an application code framework for each thread component of the AADL model, and facilitates communication between ports through automatically generated APIs.
[0070] In this algorithm, processes or threads in the AADL model are converted into object forms using the structure `process / thread_name{}` to clearly represent their attributes and behaviors. Notification events or data in the AADL model are converted into API call forms, specifically `api.get_port_name()` and `api.put_port_name()`, to clearly represent data acquisition and sending operations. Periodic elements in the AADL model are converted into function definitions, specifically `deftimedTriggered(:):Unit={}`, to explicitly represent their triggering mechanism and time-based behavior. Sporadic elements in the AADL model are converted into function definitions, specifically `defhandle_port_name(:):Unit={}`, to clearly represent their processing mechanism and calling method. The specific conversion relationships are shown in Table 2.
[0071] Table 2 Conversion Relationship Table
[0072]
[0073] Taking the fan assembly of a temperature control system as an example, the following shows a portion of the intermediate code:
[0074]
[0075] 2. Platform code generation
[0076] The intermediate code's basic structure is compiled into the specific code of the (Tianyi) operating system, generating executable code that can run directly on the (Tianyi) embedded operating system platform. The main function of this compilation is to statically convert the intermediate code into standard C code conforming to the (Tianyi) embedded operating system, including:
[0077] (1) Parse the intermediate source code and map its language structure and features to the C language, while maintaining the logic and structure of the original program;
[0078] (2) Handle the conversion of intermediate source code language types to C types to ensure consistency and correctness during the conversion process;
[0079] (3) Convert the control flow structure (such as loops, conditional judgments, etc.) of the intermediate source code into the corresponding structure in C language;
[0080] (4) The generated C code uses static memory allocation. Due to the length of this part of the code, only a portion of the module conversion is shown.
[0081] The following describes the transformation of a do-while statement. This process involves initializing the position, saving the old statements, clearing the statement list, translating the body statements of the do-while loop sequentially, obtaining the conditional expression, and finally combining the translated statements with the old statements to form the final do-while structure. This process ensures that the original logic is preserved while adapting to the syntax requirements of the target language.
[0082]
[0083]
[0084] This step ensures that the code conforms to the architecture and performance requirements of the (Tianyi) operating system. Taking the fan component of the temperature control system as an example, the following shows a portion of the specific code from the (Tianyi) operating system:
[0085]
[0086]
[0087] The final workflow diagram of the model-based automatic code generation method is as follows: Figure 5 As shown.
[0088] Example 2:
[0089] This invention provides a method for generating embedded operating system platform-related code based on the AADL model, which mainly includes the following steps:
[0090] (1) Formulate mapping rules between the AADL model and the relevant code of the (Tianyi) embedded operating system platform;
[0091] (2) Obtain the AADL model, including components, interfaces, runtime performance attributes, and connections between components;
[0092] (3) Parse the AADL model and extract components, interfaces, performance attributes and connection information between components;
[0093] (4) Create application programming interfaces to support model checking and automatic verification;
[0094] (5) Based on the mapping rules established in (1), the components, interfaces, performance attributes and inter-component connection information are mapped to the (Tianyi) embedded operating system platform to generate platform-related code.
[0095] The steps for obtaining the AADL model include capturing the architecture model from AADL.
[0096] The mapping step involves mapping components in the AADL model to corresponding modules in the (Tianyi) embedded operating system.
[0097] The mapping step includes mapping the interface in the AADL model to the communication interface in the (Tianyi) embedded operating system.
[0098] The mapping step involves mapping performance attributes in the AADL model to configuration parameters in the (Tianyi) embedded operating system.
[0099] The mapping step involves mapping the inter-component connections in the AADL model to the data flow or control flow in the (Tianyi) embedded operating system.
[0100] Technical advantages and effects:
[0101] This invention proposes an automatic code generation technology based on the AADL model, which has the following main features:
[0102] (1) By automatically converting the AADL model into platform-independent code and the final (Tianyi) embedded operating system platform code, this technology significantly reduces the workload of manual coding and instead relies on automated tools to generate high-quality code, thus shortening the development cycle.
[0103] (2) During the automatic code generation process, the execution semantics defined in the AADL model are strictly maintained to ensure that the generated code fully conforms to the design requirements of the model in terms of behavior, and to guarantee the reliability and security of the code in critical systems, especially in applications involving security and security-critical areas.
[0104] (3) By first mapping the AADL model to platform-independent intermediate code, this technique enables support for multiple target platforms. This design allows the same model to be mapped to different operating systems or hardware platforms, enhancing the system's flexibility and portability. When generating platform-specific code, the system can be optimized according to the characteristics of the target platform (such as the (Tianyi) embedded operating system) to ensure optimal performance on that platform.
[0105] (4) Due to the strict execution semantics and automatic verification functions of this technology, the generated code is particularly suitable for applications requiring high reliability and security, such as medical devices and avionics mission systems. These applications have very low tolerance for system errors, therefore reliable code generation technology is crucial.
[0106] 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 method for generating AADL model-based embedded operating system platform-related code, characterized in that, The method comprises the following steps: First, traverse the AADL model to obtain and analyze Automatically traverse and obtain each component in the AADL model, including a comprehensive scan and extraction of the components, interfaces, runtime performance attributes and connection relationships between components of the AADL model; through this traversal and acquisition, it is ensured that all key information can be correctly identified and extracted, and then the information is deeply analyzed and processed; the analysis process includes identifying and classifying each component, interface, performance attribute and connection information between components of the AADL model; Second, design the mapping rules from the AADL model to the embedded operating system code Design a set of mapping rules from the AADL model to the embedded operating system code, including: component to module mapping, interface to communication interface mapping, performance attribute to configuration parameter mapping, and component connection to data flow or control flow mapping; these rules define how to map the model to the corresponding module in the embedded operating system, ensuring that the abstract concepts in the model can be accurately translated into specific implementation code; Third, automatically convert to embedded operating system platform code Based on the above mapping rules, the components, interfaces, performance attributes and component connection information in the AADL model are automatically converted to embedded operating system platform code, this process first converts the AADL model to intermediate platform-independent code, then converts the intermediate platform-independent code to specific implementation code of the embedded operating system, finally, the generated code can be directly run on the embedded operating system platform; Among them, The third step specifically includes: intermediate code generation and platform code generation; Intermediate code generation includes: First, design and implement an algorithm to convert the abstract concepts in the AADL model to platform-independent intermediate code, these codes are platform-independent; the algorithm generates an application code framework for each AADL model thread component, and communicates between ports through automatically generated APIs; In this algorithm, the process or thread in the AADL model is converted into an object form, using the structure of process / thread_name{}, to clearly represent its attributes and behaviors; the notification event or data in the AADL model is converted into an API call form, specifically api.get_port_name() and api.put_port_name(), to clearly represent the data acquisition and sending operations; the periodic element in the AADL model is converted into a function definition form, specifically def timedTriggered(:):Unit={}, to clearly represent its trigger mechanism and time behavior; the occasional element in the AADL model is converted into a function definition form, specifically def handle_port_name(:):Unit={}, to clearly represent its processing mechanism and calling method; Platform code generation includes: statically converting intermediate code into standard C code on the embedded operating system, specifically including: (1) Analyzing the intermediate source code, mapping its language structure and characteristics to C language, while keeping the original program's logic and structure; (2) Processing the conversion of intermediate source code language type to C type, ensuring consistency and correctness during the conversion process; (3) Converting the control flow structure of the intermediate source code into the corresponding structure of C language; (4) The generated C code uses static memory allocation.
2. The AADL model based embedded operating system platform related code generation method of claim 1, wherein, The first step specifically includes the following steps: S11, create a walker to traverse the entire AADL model, identify and extract component, interface, performance attribute and component connection information in the model; S12, build a classifier map to store the classified model information; establish a mapping relationship between the classifier name and the model information itself, and store it in airClassifierMap; S13, parse the AADL model, separate the data components and other parts of the model, and parse the data components focusing on data definition and classification, while the other parts focus on system structure and behavior processing.
3. The AADL model based embedded operating system platform related code generation method of claim 2, wherein, In S11, the transformComponent() method in Walker is used to convert various properties of model information, and the format of each property involves updating from the old format or state to the new unified format, as well as standardization, cleaning and enhancement.
4. The AADL model based embedded operating system platform related code generation method of claim 2, wherein, In S13, for data components, first process the data type and pass in the parameters, initialize an empty map to store the mapping relationship from the classifier name of the AADL data component to the corresponding AadlType object, then loop through all data components in the model, process and update the type map.
5. The AADL model based embedded operating system platform related code generation method of claim 2, wherein, In S13, for other parts, first reset all additional file visitors, then build a symbol table; if there is an error, return the built symbol table; otherwise, process the additional libraries in the model, initialize and fill the additional sub-clause information map, and update these information to the symbol table together with the additional library information, finally return the symbol table containing all processing results.
6. The method of claim 1-5, wherein, In the second step, the mapping of components to modules includes: defining the mapping rules for mapping components in the AADL model to specific modules in the operating system, for each component, generating a code framework for the application, and developers using a conventional development environment to supplement the specific application logic of the generated code framework to complete the component implementation.
7. The AADL model based embedded operating system platform related code generation method of claim 6, wherein, In the second step, the mapping of interfaces to communication interfaces includes: designing rules for mapping interfaces in the AADL model to communication interfaces or device interfaces in the operating system; for each port, generating an API for communication through the port, and application code accessing the automatically generated API to communicate with other components through the port of the component; for each port connection, generating infrastructure code for the communication path between the source port and the target port to move data / events between the output port of the sending component and the input port of the receiving component.
8. The AADL model based embedded operating system platform related code generation method of claim 7, wherein, The mapping of the performance attributes to the configuration parameters in the second step includes: mapping the performance attributes to the parameter settings in the configuration file of the system to ensure the execution efficiency on the operating system; and for the scheduling protocol attributes, customizing the structure of the computing entry point of the thread according to the scheduling protocol thread attributes specified in the AADL model.
9. The AADL model based embedded operating system platform related code generation method of claim 8, wherein, According to the transformation rules corresponding to different parts in the AADL model, the key transformation rule is defined as follows: in the AADL model, the software component is mapped to the embedded operating system, the creation and start of the task are realized by calling the tyche_task_creat() or tyche_task_start() function; the input and output ports of the event or data are mapped to the embedded operating system, the receiving and sending of the event are realized by calling the tyche_event_receive(), tyche_event_send() or tyche_message_queue_receive(), tyche_message_queue_send() function; the attributes periodic or sporadic are mapped to the embedded operating system, the periodic task is managed by calling the tyche_timer_create(), and the sporadic event is processed by using the tyche_event_trigger().
Citation Information
Patent Citations
Automatic generation method for security code of integrated avionics system facing horizon operating system
CN116048518A