Method for converting IAML model to SLIM model based on ATL
The IAML model is converted into SLIM model through the ATL engine, which solves the problem of insufficient complex analysis of civil aviation avionics systems, realizes more comprehensive safety analysis support, and fills the gap in safety assessment in the existing technology.
Patent Information
- Application Number
- CN202411082358.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-08
- Publication Date
- 2024-12-20
AI Technical Summary
The existing technology is difficult to conduct a comprehensive and complete safety analysis of complex civil aviation and avionics systems, resulting in insufficient system safety assessment.
Through the conversion method of IAML model to SLIM model based on ATL, IAML metamodel and SLIM metamodel are constructed, model element conversion rules are designed, and the ATL conversion engine is used to realize the conversion of IAML model to SLIM model to generate SLIM model that complies with SLIM syntax specifications. document.
It provides more comprehensive and complete model support for the functional accuracy, safety analysis and reliability analysis of civil aircraft and avionics systems, narrowing the gap between model-based security analysis and system architecture design.
Smart Images

Figure CN119166161A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of civil aircraft avionics technology, and in particular relates to a method for converting an IAML model to a SLIM model based on ATL. Background Art
[0002] ATL Transformation Language (ATLAS Transformation Language) is a domain-specific language proposed by the ATLAS research group and is specifically used to perform model transformation tasks. It plays an increasingly important role in establishing transformations between models and narrowing the language differences between models. ATL is a hybrid transformation language that contains declarative and imperative structures. ATL's transformation is one-way. It runs on the source model and generates the target model by defining the metamodel of the source model and the metamodel of the target model.
[0003] SysML is a relatively general graphical modeling language, which is reused and extended based on the UML2.0 subset. It is mainly used in the analysis and architecture design of complex systems in the fields of aircraft manufacturing, automotive engineering, etc. SysML models include BDD diagrams, IBD diagrams, state machine diagrams, parameter diagrams, use case diagrams, requirement diagrams, etc. Generally speaking, in the modeling process, BDD diagrams are used to represent the hierarchical relationship and functional decomposition of the system, IBD diagrams are used to represent the internal components of the system and the relationship between the components, and state machine diagrams are used to describe the state nodes and the dynamic behavior of the system.
[0004] The IAML model language is an MBSE language that is expanded and deeply customized based on the SysML language for the current civil aircraft avionics field. It can well support the architectural design of civil aircraft avionics systems. It is mainly used in the civil aircraft architecture design modeling work in the current civil aircraft research and development industry, and can clearly express the architecture and composition design of the avionics system.
[0005] As a subset of the AADL language, the SLIM model language inherits some of the features of AADL, but is more focused on certain specific modeling and analysis requirements and has formalized model semantics. Therefore, it has been widely used in safety-critical fields such as aerospace. The SLIM language refers to software (such as threads or thread groups) and hardware (such as processors or buses) as first-level objects. It describes complex systems by introducing a hierarchy of components and communicates through ports on the components. The SLIM model establishes the system architecture by describing components and the connections between them. Fault models can be injected into the established nominal model. The above features combined with formalization enable SLIM to support the functional correctness analysis of the system even when the hardware operation is degraded. At the same time, it can also study and analyze the system's security, diagnosability, and executability.
[0006] With the increasing complexity and scale of civil aircraft avionics systems, how to conduct a comprehensive and complete evaluation of such complex systems is a research difficulty today. Model-Based Safety Assessment (MBSA) is a system modeling and safety analysis method proposed in the field of safety-critical systems in recent years. It can conduct a complete analysis of the system and improve the safety of the system. The IAML model is a model language mainly used for system architecture design in the current civil aircraft avionics field. It can accurately describe the architecture and dynamic behavior of the system, but does not have formal syntax and semantics. The SLIM model is a high-level modeling language with formal semantics that supports MBSA, and there are many safety analysis technologies based on this model. The safety analysis of the system is mainly based on formal models. Therefore, a conversion method from the IAML model to the SLIM model based on ATL is proposed to narrow the gap between MBSE and MBSA, so that a more comprehensive and complete safety analysis of the avionics system architecture model can be conducted based on the SLIM model. Summary of the invention
[0007] The technical problem to be solved by the present invention is to provide an ATL-based IAML model to SLIM model conversion method in view of the deficiencies of the above-mentioned prior art, which can convert the IAML architecture model into a SLIM model and provide model support for the next step of the system's functional correctness analysis, security analysis, reliability analysis and other model verification work.
[0008] In order to achieve the above technical objectives, the technical solution adopted by the present invention is:
[0009] A method for converting an IAML model to a SLIM model based on ATL, comprising:
[0010] Step 1, construct IAML metamodel and SLIM metamodel;
[0011] Step 2: Design the model element conversion rules from IAML model to SLIM model, and write the corresponding ATL conversion rules;
[0012] Step 3, construct an IAML civil aircraft avionics architecture model and export and preprocess it to obtain an IAML source model;
[0013] Step 4, using the ATL transformation engine, through the metamodel and the transformation rules, to achieve the transformation from the IAML source model to the SLIM model, and obtain a SLIM file in XML format;
[0014] Step 5: Process and adjust the SLIM file in XML format to generate a SLIM model file that complies with the SLIM syntax specification.
[0015] To optimize the above technical solutions, the specific measures taken also include:
[0016] In the above step 1, the IAML metamodel and the SLIM metamodel are constructed through the Eclipse metamodel construction plug-in. The construction of the IAML metamodel refers to the SysML official document and the civil aircraft avionics system architecture design work guide. The construction of the SLIM metamodel is carried out by defining the syntax through the BNF paradigm and referring to the SLIM official syntax specification file.
[0017] The top-level model element of the above IAML metamodel is LogicalItem, which represents the avionics system or the logical component of avionics. This element includes StateMachine, LogicalItem, LogicFlow, and LogicPort elements. The StateMachine element represents the state machine and describes the behavior and state information of the system. The StateMachine element includes StateVertex and Transition elements. StateVertex describes the state node information, and the Transition element describes the conversion state information. The Transition element contains three subclasses, namely Trigger element, Guard element, and Effect element. Trigger represents the trigger condition, and Guard represents the guard. The state transition will only occur when the condition is triggered and the current guard expression is true. Effect represents the impact of the state transition. The LogicalItem element records the internal composition of the logical component. The LogicFlow element describes the logical interaction relationship, representing the flow of logical parameters from one logical component to another. It includes inPort and outPort, which represent the input port and output port respectively. The LogicPort element describes the logical interaction interface to realize communication and parameter transfer.
[0018] The above-mentioned SLIM metamodel defines the System class and the SystemImpl class, which represent the component declaration and the component implementation interface respectively; the System class contains the Port class, which describes the port information; the SystemImpl class contains the SubComponent class, the Connection class and the StateMachine class, which respectively describe the internal components of the component, the port connection information and the state transition; the StateMachine class can store the states in SLIM and the state transition information to correspond to the IAML metamodel; the StateMachine class includes the subclasses state class and transition class, the state class represents the component state information, the transition class represents the component dynamic behavior transition information, the subclasses guard, trigger and effect under the transition class all have corresponding element classes in the IAML model, which respectively represent the guard expression, the trigger event and the resulting impact.
[0019] The model element conversion rules from the IAML model to the SLIM model designed in step 2 above include:
[0020] Rule 1: Module conversion: In the IAML model, LogicalItemClass represents a system or subsystem, and the three views are integrated into the IAML metamodel. Each module includes internal attributes, internal components, and dynamic behavior functions. LogicalItemClass is converted to System and SystemImpl in the SLIM model, and its different elements also correspond to different internal structures;
[0021] Rule 2: Subcomponent conversion: In the IAML model, the internal components of a system are represented by LogicalItem instances. In the SLIM model, the internal structure is expressed by SubComponent, and LogicalItem is converted to SubComponent.
[0022] Rule 3: Port conversion: In the IAML model, the interactive interface is described by LogicPort, which also includes the attributes of direction, dataType, and initial. Direction indicates whether it is an input port or an output port. DataType indicates the type of data transmitted by the data port. Initial indicates whether there is an initial value. In the SLIM model, there is a Port element corresponding to it.
[0023] Rule 4: Connection conversion: In the IAML model, the connection is represented by the LogicFlow element, which includes subclasses inPort and outPort to represent the input port information and output port information. In the SLIM model, the Connection element represents the connection, which includes elements start and end to describe the data transmission direction of a section of information flow. Therefore, the IAML model corresponds to the elements representing the connection in the SLIM model;
[0024] Rule 5: Transformation of system dynamic behavior: The IAML model inherits the state machine diagram in the SysML model. The description of the system state and state transitions are all included in the state machine information. In the IAML metamodel, state information is recorded in the StateVertex element, and state transition information is recorded in Transition. Transition contains three subclasses: Guard, Trigger, and Effect. In the SLIM model, state records state information, and the transition element class and subclasses correspond one-to-one to the elements in the IAML model.
[0025] The above step 2 uses ATL syntax to write the corresponding ATL conversion rules, as follows:
[0026] 1) The IAMLModel class in the IAML model is converted to the SLIMModel class in the SLIM model, which is the top-level label of the two models;
[0027] 2) The LogicalItemClass class in the IAML model is converted to the System class and SystemImpl class in the SLIM model;
[0028] 3) The LogicalItem class under the LogicalItemClass class in IAML is converted to the SubComponent class under the SystemImpl class, and the LogicalComponentName attribute and stereotype attribute under the LogicalItemClass class are converted to the name attribute and implementation attribute under the SubComponent class respectively;
[0029] 4) The LogicFlow class is converted to the Connection class under the SystemImpl class, the inport class of the LogicFlow class is converted to the start class of the Connection class, and the outPort class of the LogicFlow class is converted to the end class of the Connection class;
[0030] 5) The StateMachine class is converted to the StateMachine class under the SystemImpl class;
[0031] 6) The StateVertex class, a subclass of the StateMachine class in the IAML model, is converted to the state class, a subclass of the StateMachine class in the SLIM model. The name attribute of the StateVertex class is converted to the name attribute of the state class; the InitialState attribute of the StateVertex class is converted to the initial attribute of the state class;
[0032] 7) The Transition class under the StateMachine class in the IAML model is converted to the transition class, a subclass of the StateMachine class in the SLIM model. The source attribute of the Transition class is converted to the start attribute of the transition class; the target attribute of the Transition class is converted to the end attribute of the transition class;
[0033] 8) The subclass Trigger under the Transition class in the IAML model is converted to the subclass trigger under the transition class in the SLIM model, and the attribute eventName of the Trigger class is converted to the attribute eventName under the trigger class;
[0034] 9) The Guard subclass under the Transition class in the IAML model is converted to the guard subclass under the transition class in the SLIM model, and the attribute body of the Guard class is converted to the attribute body under the guard class;
[0035] 10) The subclass Effect under the Transition class in the IAML model is converted to the subclass effect under the transition class in the SLIM model, and the attribute body of the Effect class is converted to the attribute body under the effect class;
[0036] 11) The LogicPort class in the IAML model is converted to the Port class in the SLIM model, and the attribute direction under the LogicPort class is converted to the attribute direction under Port; the attribute dataType in the IAML model is converted to the dateType attribute in the SLIM model; the attribute initial in the IAML model is converted to the defaultValue attribute in the SLIM model; the attribute stereotype in the IAML model is converted to the portType attribute in the SLIM model;
[0037] In the above step 3, the IAML civil aircraft avionics architecture is first modeled through the tool ASPECT, and then the corresponding XML format file is exported. Then, the label hierarchy relationship of the XML format file is adjusted to ensure that the label hierarchy relationship of the XML format file is consistent with the metamodel, and the IAML source model is obtained.
[0038] In the above step 5, the dom4j toolkit in Java is used to read the SLIM file in XML format, and then a complete SLIM model that complies with the SLIM language specification is generated through an algorithm. The model has .slim as the file suffix.
[0039] The process of obtaining System component information by the algorithm described in step 5 above is: first, use the document root node to traverse all tags and find the System tag. The information under this tag is recorded as the SLIM model component declaration information. At the same time, a new java System object is created, and all port information tags under the System tag are traversed. The port information is encapsulated into Port, and Port is added to the portList list of the newly created System object. Finally, the entire System object is added to the Map container.
[0040] The algorithm described in step 5 above outputs the System object to the file according to the SLIM syntax specification, as follows:
[0041] First, traverse the Map collection object of System to obtain SystemName and System objects, and then traverse the portList collection of System objects. For each Port, first determine whether it is a data port or an event port. If it is an event port, ignore the data type field and default value field of the port; if it is a data port, obtain the data type and initial value and write them together into the file; at the same time, add the beginning and ending syntax to each System.
[0042] The present invention has the following beneficial effects:
[0043] The present invention focuses on system architecture design and model conversion in the field of civil aircraft avionics. It can directly convert the IAML architecture model into a SLIM model, providing support for the next step of functional correctness analysis, reliability analysis, safety analysis, etc. based on the SLIM model. At the same time, in view of the current situation that there is little research on SLIM language in the academic community, the present invention provides the applicable fields of SLIM, providing reference value and applicable research value for industrial practice in the field of civil aircraft avionics.
[0044] The present invention selects the IAML model as the system architecture source model to be converted. Compared with the currently popular system modeling language SysML, the IAML language is more in line with the practice of the civil aircraft avionics industry because it is designed to be extended and customized for the current civil aircraft avionics architecture. At the same time, the SLIM file processing algorithm proposed in the present invention is based on object-oriented thinking for data structure design and encapsulation, and conforms to the hierarchical relationship of SLIM syntax, which can ensure the integrity of the SLIM file model information reading in XML format and the consistency of the generated standard SLIM file. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 A conversion framework for the method of the present invention;
[0046] Figure 2 It is a partial model of the IAML architecture;
[0047] Figure 3 It is the IAML metamodel;
[0048] Figure 4 It is the SLIM metamodel;
[0049] Figure 5 The conversion rules for LogicalItemClass elements and LogicFlow;
[0050] Figure 6 It is the GetSystems function;
[0051] Figure 7 A function to generate a standard syntax file for System information;
[0052] Figure 8 This is the code for the conversion result SLIM file example. DETAILED DESCRIPTION
[0053] The embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings.
[0054] like Figure 1 As shown, a method for converting an IAML model to a SLIM model based on ATL of the present invention comprises:
[0055] Step 1, construct IAML metamodel and SLIM metamodel;
[0056] Step 2: Design the model element conversion rules from IAML model to SLIM model, and write the corresponding ATL conversion rules;
[0057] Step 3, construct an IAML civil aircraft avionics architecture model and export and preprocess it to obtain an IAML source model;
[0058] Step 4, using the ATL transformation engine, through the metamodel and the transformation rules, to achieve the transformation from the IAML source model to the SLIM model, and obtain a SLIM file in XML format;
[0059] Step 5: Process and adjust the SLIM file in XML format to generate a SLIM model file that complies with the SLIM syntax specification.
[0060] The details are as follows:
[0061] 1. Build IAML model and SLIM model
[0062] The IAML metamodel and SLIM metamodel are constructed through the Eclipse metamodel construction plug-in. Since the IAML language does not have a formal syntax and many features are still consistent with the SysML language, the construction of the IAML metamodel mainly refers to the SysML official document and the civil aircraft avionics system architecture design work guide; the SLIM language is a formal language, and the syntax is defined by the BNF paradigm. This part mainly refers to the SLIM official syntax specification file to build the metamodel.
[0063] 1.1 IAML Metamodel Construction
[0064] Because there are functional layer architecture design, logical layer architecture design, physical layer architecture design and message layer architecture design in IAML language, and each layer corresponds to each other, but they are in different architectural layers. The real meaning of expressing the system architecture is the same. The functional layer only summarizes the functional requirements of the system layer, which is relatively abstract and general. It is not suitable as the metamodel expression model of IAML. The message architecture design focuses on the transmission of messages and parameters, which is not suitable. The physical layer involves more specific avionics system components and classes, but SLIM does not have such specific models. At the same time, security analysis does not actually require such fine granularity, so the study selected the logical layer to represent the IAML language to construct the metamodel. The partial architecture diagram of the IAML model is as follows Figure 2 shown.
[0065] IAML metamodel Figure 3As shown. The top-level model element of the IMAL metamodel is LogicalItem, which represents the avionics system or the logical component of avionics. This element includes StateMachine, LogicalItem, LogicFlow, and LogicPort model elements. The StateMachine element represents the state machine, which describes the behavior and state information of the system. The StateMachine element includes StateVertex and Transition elements. Among them, StateVertex describes the state node information, and the Transition element describes the transition state information. The Transition element contains three subclasses, namely Trigger element, Guard element, and Effect element. Trigger represents the trigger condition. Guard represents the guard. The state transition will only occur when the condition is triggered and the current guard expression is true. Effect represents the impact of the state transition. The LogicalItem element records the internal composition of the logical component. The LogicFlow element describes the logical interaction relationship, representing the flow of logical parameters from one logical component to another. The inPort and outPort under it represent the input port and output port respectively. LogicPort describes the logical interaction interface. The communication and parameter transfer between systems mainly rely on logical ports.
[0066] 1.2 SLIM metamodel construction
[0067] By analyzing the syntax specification file of SLIM language, the model structure of SLIM language is abstracted. The model structure is as follows: Figure 7 As shown. The SLIM component consists of two parts: Declaration and Implementation. The Declaration class includes the Port class, and the Implementation class mainly includes the State class, Subcomponent class, Transition class, and Connection class, etc. The State class is divided into the initial state and the normal state. The Transition class has subclasses Event class, Trigger class, and Effect class. According to the abstract model composition structure, the EcoreTools tool is further used to construct the SLIM metamodel structure. At the same time, the hierarchical relationship design of the structure is also designed to conform to the hierarchical relationship of the IAML model structure as much as possible to facilitate the conversion and mapping of elements. Figure 4 It is the meta-model of SLIM.
[0068] The SLIM metamodel mainly defines the System class and the SystemImpl class, which represent the declaration of the component and the implementation interface of the component respectively. The System class contains the Port class, which mainly describes the port information. SystemImpl mainly contains the SubComponent class, the Connection class and the StateMachine class, which respectively describe the internal components of the component, the connection information of the port and the state conversion. The StateMachine class does not exist in the SLIM syntax definition. The purpose of this construction is to be able to put the state and state conversion information in SLIM under this class at the same time, which can correspond to the IAML metamodel and facilitate the writing of mapping relationships. The StateMachine class includes the subclasses state class and transition class. The state class represents the state information of the component, and the transition class represents the dynamic behavior conversion information of the component. The subclasses guard, trigger and effect under it all have corresponding element classes in the IAML model, which represent the guard expression, trigger event and the resulting impact respectively.
[0069] 2. Design the conversion rules from IAML model to SLIM model and write ATL conversion rule files
[0070] By analyzing the syntax of the IAML model and the SLIM model and their hierarchical relationship in the system architecture, the following five important conversion rules are given.
[0071] Rule 1: Module conversion. In the IAML model, LogicalItemClass represents a system or subsystem, and the three views are integrated into the IAML metamodel. Each module includes internal properties, internal components, and dynamic behavior functions. In the SLIM model, component declarations and component implementations are separated, so LogicalItemClass should be converted to System and SystemImpl in the SLIM model, and its different elements correspond to different internal structures.
[0072] Rule 2: Subcomponent conversion. In the IAML model, the internal components of a system are represented by LogicalItem instances. In the SLIM model, the internal structure is expressed by SubComponent, so LogicalItem should be converted to SubComponent.
[0073] Rule 3: Port conversion. In the IAML model, the interactive interface is described by LogicPort, which also includes attributes such as direction (input port or output port), dataType (what is the transmission data type of the data port), initial (whether there is an initial value), etc. In the SLIM model, there is a Port element corresponding to it.
[0074] Rule 4: Connection conversion. A connection is a flow of communication between two ports, which mainly involves input port information, output port information, and transmission parameter information. In the IAML model, the connection is described by the LogicFlow element, which includes subclasses inPort and outPort to represent input port information and output port information. In the SLIM model, the Connection element represents a connection, and it also includes elements start and end to describe the data transmission direction of a section of information flow. Therefore, the model elements of the two elements have corresponding elements in the connection part.
[0075] Rule 5: Transition of system dynamic behavior. The IAML model inherits the state machine diagram in the SysML model, so the description of the system state and state transitions are all included in the state machine information. In the IAML metamodel, state information is recorded in the StateVertex element, and state transition information is recorded in Transition, which contains three subclasses: Guard, Trigger, and Effect. In the SLIM model, state records state information, and the transition element class and subclasses can correspond one-to-one with the elements in the IAML model.
[0076] Through the mapping rules of important elements, the next step is to write the ATL conversion rule file using ATL syntax. The specific implementation of the conversion rules is given below.
[0077] 1) The IAMLModel class in the IAML model is converted to the SLIMModel class in the SLIM model. This is the top-level tag of the two models.
[0078] 2) The LogicalItemClass class in the IAML model is converted to the System class and SystemImpl class in the SLIM model.
[0079] 3) The LogicalItem class under the LogicalItemClass class in IAML is converted to the SubComponent class under the SystemImpl class. The LogicalComponentName attribute under it is converted to the name attribute under the SubComponent class; the stereotype attribute should be converted to the implementation attribute under the SubComponent class.
[0080] 4) The LogicFlow class is converted to the Connection class under the SystemImpl class. The inport class, a subclass of the LogicFlow class, is converted to the start class, a subclass of the Connection class. The outPort class, a subclass of the LogicFlow class, is converted to the end class, a subclass of the Connection class.
[0081] 5) The StateMachine class is converted to the StateMachine class under the SystemImpl class.
[0082] 6) The StateVertex class, a subclass of the StateMachine class in the IAML model, is converted to the state class, a subclass of the StateMachine class in the SLIM model. The name attribute of the StateVertex class is converted to the name attribute of the state class; the InitialState attribute of the StateVertex class is converted to the initial attribute of the state class.
[0083] 7) The Transition class under the StateMachine class in the IAML model is converted to the transition class, a subclass of the StateMachine class in the SLIM model. The source attribute of the Transition class is converted to the start attribute of the transition class; the target attribute of the Transition class is converted to the end attribute of the transition class.
[0084] 8) The subclass Trigger of the Transition class in the IAML model is converted to the subclass trigger of the transition class in the SLIM model. The attribute eventName of the Trigger class is converted to the attribute eventName of the trigger class.
[0085] 9) The Guard subclass under the Transition class in the IAML model is converted to the guard subclass under the transition class in the SLIM model. The attribute body of the Guard class is converted to the attribute body of the guard class.
[0086] 10) The subclass Effect of the Transition class in the IAML model is converted to the subclass effect of the transition class in the SLIM model. The attribute body of the Effect class is converted to the attribute body of the effect class.
[0087] 11) The LogicPort class in the IAML model is converted to the Port class in the SLIM model. The attribute direction of the LogicPort class is converted to the attribute direction under Port; the attribute dataType is converted to the dateType attribute; the attribute initial is converted to the defaultValue attribute; the attribute stereotype is converted to the portType attribute;
[0088] Figure 5 The conversion rules from IAML's LogicalItemClass class to SLIM's SystemImpl class are given. In the conversion rule file, the input model IAML and the output model SLIM should be declared first, and the matching rule logicalItemClass2SystemImpl should be defined. The matching rule is automatically called and executed by the ATL engine. Under this rule, the properties of the LogicalItemClass class in IAML and the SystemImpl properties in SLIM can be directly converted, but the subclasses of these two classes cannot be directly converted. Delay rules need to be written. Here, the LogicFlow subclass of the LogicalItemClass class in IAML is taken as an example, and the delay rule logicFlow2Connection is defined. When the LogicFlow subclass is converted to the Connection subclass in the logicalItemClass2SystemImpl rule, the program will automatically call the delay rule to continue the conversion from subclass to subclass.
[0089] 3. Build the IAML source model
[0090] First, the system architecture needs to be modeled using the IAML modeling tool ASPECT, and then exported as an XML file. However, the default exported XML file contains a lot of redundant information, and the hierarchical structure of some tags is also different from the hierarchical structure of the metamodel. Further adjustments and construction using algorithms and manual processing are required to ensure that the tag hierarchy of the XML file is consistent with the metamodel.
[0091] 4.ATL conversion process
[0092] By using the IAML metamodel, SLIM metamodel and ATL conversion rule file obtained through the above steps, the IAML model in XML format can be converted into a SLIM file in XML format by calling the ATL engine.
[0093] 5. Generate a standardized SLIM file
[0094] The file converted by the ATL engine in the above steps is a file in the XML tag format that conforms to the SLIM metamodel, but it is not a standard SLIM model file. It is also necessary to read the XML SLIM file information through the dom4j toolkit written in Java, adjust the file structure by writing processing and conversion algorithms, and finally generate a complete .slim file that conforms to the SLIM syntax specification. Since it involves multiple tag functions, the following two function functions are used as examples for explanation.
[0095] 1) Algorithm 1: Get System component information
[0096] First, use the document root node to traverse all tags and find the System tag. The information under this tag is recorded as the SLIM model component declaration information. At the same time, create a new Java System object, traverse all port information tags under this System tag, encapsulate the port information into Port, and add Port to the portList list of the newly created System object. Finally, add the entire System object to the Map container. The algorithm code is as follows: Figure 6 shown.
[0097] 2) Algorithm 2: Output the System object to a file according to the SLIM syntax specification
[0098] First, you need to traverse the System Map collection object, obtain the SystemName and System object, and then traverse the System object's portList collection. For each Port, you first need to determine whether it is a data port or an event port. If it is an event port, you do not need to consider the port's data type field and default value field; if it is a data port, you need to obtain the data type and initial value and write them together into the file. At the same time, you need to add the beginning and end syntax to each System. The algorithm code is as follows: Figure 7 shown.
[0099] The SLIM model obtained after conversion by the Java algorithm is as follows Figure 8 shown.
[0100] The above are only preferred embodiments of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should be regarded as the protection scope of the present invention.
Claims
1. A method for converting an IAML model to a SLIM model based on ATL, characterized in that: include: Step 1, construct IAML metamodel and SLIM metamodel; Step 2: Design the model element conversion rules from IAML model to SLIM model, and write the corresponding ATL conversion rules; Step 3, construct an IAML civil aircraft avionics architecture model and export and preprocess it to obtain an IAML source model; Step 4, using the ATL transformation engine, through the metamodel and the transformation rules, to achieve the transformation from the IAML source model to the SLIM model, and obtain a SLIM file in XML format; Step 5: Process and adjust the SLIM file in XML format to generate a SLIM model file that complies with the SLIM syntax specification.
2. The method for converting an IAML model to a SLIM model based on ATL according to claim 1, characterized in that: The step 1 constructs the IAML metamodel and the SLIM metamodel through the Eclipse metamodel construction plug-in, wherein the construction of the IAML metamodel refers to the SysML official document and the civil aircraft avionics system architecture design work guide, and the construction of the SLIM metamodel is carried out by defining the syntax through the BNF paradigm and referring to the SLIM official syntax specification file.
3. The method for converting an IAML model to a SLIM model based on ATL according to claim 1, characterized in that: The top-level model element of the IAML metamodel is LogicalItem, which represents the avionics system or the logical component of avionics. This element includes StateMachine, LogicalItem, LogicFlow, and LogicPort elements. The StateMachine element represents the state machine and describes the behavior and state information of the system. The StateMachine element includes StateVertex and Transition elements. StateVertex describes the state node information, and the Transition element describes the conversion state information. The Transition element contains three subclasses, namely Trigger element, Guard element, and Effect element. Trigger represents the trigger condition, and Guard represents the guard. The state transition will only occur when the condition is triggered and the current guard expression is true. Effect represents the impact of the state transition. The LogicalItem element records the internal composition of the logical component. The LogicFlow element describes the logical interaction relationship, representing the flow of logical parameters from one logical component to another. It includes inPort and outPort, which represent the input port and output port respectively. The LogicPort element describes the logical interaction interface to realize communication and parameter transfer.
4. The method for converting an IAML model to a SLIM model based on ATL according to claim 1, characterized in that: The SLIM metamodel defines the System class and the SystemImpl class, which respectively represent the declaration of the component and the implementation interface of the component; the System class contains the Port class, which describes the port information; the SystemImpl class contains the SubComponent class, the Connection class and the StateMachine class, which respectively describe the internal components of the component, the connection information of the port and the state conversion; the StateMachine class can store the states in SLIM and the state conversion information to correspond to the IAML metamodel; the StateMachine class includes the subclasses state class and transition class, the state class represents the state information of the component, the transition class represents the dynamic behavior conversion information of the component, and the subclasses guard, trigger and effect under the transition class all have corresponding element classes in the IAML model, which respectively represent the guard expression, the trigger event and the resulting impact.
5. The method for converting an IAML model to a SLIM model based on ATL according to claim 1, characterized in that: The model element conversion rules from the IAML model to the SLIM model designed in step 2 include: Rule 1: Module conversion: In the IAML model, LogicalItemClass represents a system or subsystem, and the three views are integrated into the IAML metamodel. Each module includes internal attributes, internal components, and dynamic behavior functions. LogicalItemClass is converted to System and SystemImpl in the SLIM model, and its different elements also correspond to different internal structures; Rule 2: Subcomponent conversion: In the IAML model, the internal components of a system are represented by LogicalItem instances. In the SLIM model, the internal structure is expressed by SubComponent, and LogicalItem is converted to SubComponent. Rule 3: Port conversion: In the IAML model, the interactive interface is described by LogicPort, which also includes the attributes of direction, dataType, and initial. Direction indicates whether it is an input port or an output port. DataType indicates the type of data transmitted by the data port. Initial indicates whether there is an initial value. In the SLIM model, there is a Port element corresponding to it. Rule 4: Connection conversion: In the IAML model, the connection is represented by the LogicFlow element, which includes subclasses inPort and outPort to represent the input port information and output port information. In the SLIM model, the Connection element represents the connection, which includes elements start and end to describe the data transmission direction of a section of information flow. Therefore, the IAML model corresponds to the elements representing the connection in the SLIM model; Rule 5: Transformation of system dynamic behavior: The IAML model inherits the state machine diagram in the SysML model. The description of the system state and state transitions are all included in the state machine information. In the IAML metamodel, state information is recorded in the StateVertex element, and state transition information is recorded in Transition. Transition contains three subclasses: Guard, Trigger, and Effect. In the SLIM model, state records state information, and the transition element class and subclasses correspond one-to-one to the elements in the IAML model.
6. The method for converting an IAML model to a SLIM model based on ATL according to claim 1, characterized in that: The step 2 uses ATL syntax to write the corresponding ATL conversion rules, which are as follows: 1) The IAMLModel class in the IAML model is converted to the SLIMModel class in the SLIM model, which is the top-level label of the two models; 2) The LogicalItemClass class in the IAML model is converted to the System class and SystemImpl class in the SLIM model; 3) The LogicalItem class under the LogicalItemClass class in IAML is converted to the SubComponent class under the SystemImpl class, and the LogicalComponentName attribute and stereotype attribute under the LogicalItemClass class are converted to the name attribute and implementation attribute under the SubComponent class respectively; 4) The LogicFlow class is converted to the Connection class under the SystemImpl class, the inport class of the LogicFlow class is converted to the start class of the Connection class, and the outPort class of the LogicFlow class is converted to the end class of the Connection class; 5) The StateMachine class is converted to the StateMachine class under the SystemImpl class; 6) The StateVertex class, a subclass of the StateMachine class in the IAML model, is converted to the state class, a subclass of the StateMachine class in the SLIM model. The name attribute of the StateVertex class is converted to the name attribute of the state class; the InitialState attribute of the StateVertex class is converted to the initial attribute of the state class; 7) The Transition class under the StateMachine class in the IAML model is converted to the transition class, a subclass of the StateMachine class in the SLIM model. The source attribute of the Transition class is converted to the start attribute of the transition class; the target attribute of the Transition class is converted to the end attribute of the transition class; 8) The subclass Trigger under the Transition class in the IAML model is converted to the subclass trigger under the transition class in the SLIM model, and the attribute eventName of the Trigger class is converted to the attribute eventName under the trigger class; 9) The Guard subclass under the Transition class in the IAML model is converted to the guard subclass under the transition class in the SLIM model, and the attribute body of the Guard class is converted to the attribute body under the guard class; 10) The subclass Effect under the Transition class in the IAML model is converted to the subclass effect under the transition class in the SLIM model, and the attribute body of the Effect class is converted to the attribute body under the effect class; 11) The LogicPort class in the IAML model is converted to the Port class in the SLIM model, and the attribute direction under the LogicPort class is converted to the attribute direction under Port; the attribute dataType in the IAML model is converted to the dateType attribute in the SLIM model; the attribute initial in the IAML model is converted to the defaultValue attribute in the SLIM model; the attribute stereotype in the IAML model is converted to the portType attribute in the SLIM model.
7. The method for converting an IAML model to a SLIM model based on ATL according to claim 1, characterized in that: The step 3 first models the IAML civil aircraft avionics architecture through the tool ASPECT, then exports the corresponding XML format file, and then adjusts the label hierarchy relationship of the XML format file to ensure that the label hierarchy relationship of the XML format file is consistent with the metamodel to obtain the IAML source model.
8. The method for converting an IAML model to a SLIM model based on ATL according to claim 1, characterized in that: The step 5 uses the dom4j toolkit in Java to read the SLIM file in XML format, and then generates a complete SLIM model that complies with the SLIM language specification through an algorithm. The model has .slim as the file suffix.
9. The method for converting an IAML model to a SLIM model based on ATL according to claim 1, characterized in that: The process of the algorithm in step 5 to obtain the System component information is as follows: first, use the document root node to traverse all tags and find the System tag. The information under this tag is recorded as the SLIM model component declaration information. At the same time, a new java System object is created, and all port information tags under the System tag are traversed. The port information is encapsulated into Port, and Port is added to the portList list of the newly created System object. Finally, the entire System object is added to the Map container.
10. The method for converting an IAML model to a SLIM model based on ATL according to claim 1, characterized in that: The algorithm described in step 5 outputs the System object to the file according to the SLIM syntax specification, as follows: First, traverse the Map collection object of System to obtain SystemName and System object, and then traverse the portList collection of System object. For each Port, first determine whether it is a data port or an event port. If it is an event port, do not consider the data type field and default value field of the port; If it is a data port, obtain the data type and initial value and write them together into the file; at the same time, add the beginning and ending syntax to each System.
Citation Information
Cited By
Method for converting SLIM model to XSAP model based on ATL
CN116304193A
A method for converting SLIM models to XSAP models based on ATL
CN116304193B
