Method for automatic conversion of atl-based sysml models to slim models
By constructing SysML and SLIM metamodels, designing source file processing algorithms and ATL conversion rules, the automatic conversion from SysML models to SLIM models is realized, solving the problem that complex system design models cannot be used for security analysis, providing a method for converting formal semantic structures, and expanding the application of the SLIM language.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
- Filing Date
- 2023-04-10
- Publication Date
- 2026-07-14
AI Technical Summary
The design models of complex systems cannot be directly used for security analysis, especially since SysML models lack formal semantic structure, making qualitative and quantitative security analysis impossible.
By constructing SysML and SLIM metamodels, establishing element mapping tables, designing source file processing algorithms, and writing ATL conversion rule files, the automatic conversion from SysML to SLIM models is achieved using the ATL engine. This includes deleting irrelevant attributes, adding port information, defining element conversion rules, and realizing automatic conversion between models.
A conversion method conforming to the semantics of the SLIM language is provided, ensuring that the converted model has a formal semantic structure, enabling security analysis, expanding the application field of the SLIM language, and providing a reference for its research.
Smart Images

Figure CN116304192B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of security analysis technology for complex systems, specifically involving an automatic conversion method from an ATL-based SysML model to a SLIM model. Background Technology
[0002] ATL (ATLAS Transformation Language) is a model transformation language developed by the ATLAS research group. Its engine is an Eclipse plugin based on EMF (Eclipse Model Framework).
[0003] SysML is a general-purpose graphical modeling language that reuses and extends a subset of UML 2.0. It supports the analysis, specification, design, and verification of complex systems, and can include hardware, software, data, people, facilities, and other elements within the physical environment. It is designed to describe system architecture to promote the widespread application of the MBSE (Method of Module Structure and Environment) approach. SysML models include nine types of diagrams: Block Definition Diagram (BDD), Internal Block Diagram (IBD), Use Case Diagram, Activity Diagram, Sequence Diagram, State Machine Diagram, Parametric Diagram, Package Diagram, and Requirements Diagram. In the modeling process, BDD diagrams, IBD diagrams, and state machine diagrams are primarily used to construct the architecture of complex systems. BDD diagrams describe the system's structural composition; IBD diagrams describe the relationships between the system's internal components; and state machine diagrams describe the system's dynamic behavior.
[0004] SLIM is a canonical formal modeling language that provides a convenient way to describe normal hardware and software operation, hybridity, (faults) and their propagation, error recovery, and degraded operating modes. System specifications are organized into hierarchical components that allow message (event) and continuous (data) communication ports to interact via connections and can be dynamically reconfigured. SLIM is inspired by the AADL architecture analysis and design language and its error model appendix, and is a subset of the AADL language.
[0005] Specifically, SLIM aims to provide a cohesive and unified approach to modeling heterogeneous systems composed of software (e.g., processes and threads) and hardware (e.g., processors and buses) components and their interactions. Furthermore, it considers the following fundamental characteristics:
[0006] To model the normal and abnormal behavior of a system, SLIM provides descriptions of software and hardware failures, error propagation (i.e., the transformation of failure occurrences into failure events), transient and permanent failures, and degraded operating modes (by mapping failures from the architecture to service levels).
[0007] Modeling (partial) observability and related observability requirements are concepts that are crucial for handling diagnostic and fault detection, isolation, and recovery (FDIR) analyses.
[0008] Specify timing and hybrid behavior; in particular, for analyzing continuous physical systems such as mechanics and hydraulics, the SLIM language supports continuous real-valued variables with (linear) time-dependent dynamics.
[0009] In terms of modeling probabilities, such as random failures, maintenance, and random timing.
[0010] The aforementioned characteristics, combined with formal interpretation, make SLIM suitable for specifying and reasoning about system properties from several perspectives: functional correctness, especially in cases of hardware operational degradation; security and reliability; diagnostics and FDIR; and system performance under degraded operations. It can be used to address the problem that security analysis cannot be directly performed on the design models of complex systems. Summary of the Invention
[0011] This invention provides an automatic conversion method from an ATL-based SysML model to a SLIM model, solving the problem that the design model of a complex system cannot be directly used for security analysis.
[0012] To achieve the above-mentioned technical objectives, the technical solution adopted by the present invention is as follows:
[0013] Automatic conversion methods from SysML models to SLIM models based on ATL include:
[0014] S1. Construct the SysML metamodel and SLIM metamodel, and establish an element mapping table between the SysML model and the SLIM model by analyzing the SysML metamodel and SLIM metamodel.
[0015] S2. Design source file processing algorithm to obtain SysML model source files for conversion;
[0016] S3. Based on the element mapping table between SysML and SLIM models, a conversion rule file for converting SysML models to SLIM models is written using the ATL language. Combined with the SysML model source file, the ATL engine is called to automatically realize the conversion from SysML model to SLIM model.
[0017] To optimize the above technical solution, the specific measures also include:
[0018] The above-mentioned S1 constructs the SysML metamodel based on the SysML specification document and XMI file, and establishes the SLIM metamodel based on the BNF paradigm of SLIM.
[0019] The above SysML model to SLIM model element mapping table includes:
[0020] The elements of the SysML model are: classElement, ownedPort, type, defaultValue, ownedAttribute (name != null), ownedConnector, start, end, ownedBehavior, subvertex, transition, guard, and effect, which respectively represent: system component, component port, port type, port default value, component, port connection, output port, input port, state machine, state, state transition, guard, and effect.
[0021] The elements of the SLIM model are: System and SystemImpl, Port, Type, Defaultvalue, SubComponent, Connection, start, end, StateMachine, state, transition, guard, and effect, which respectively represent: module and implementation interface, component port, port type, port default value, subcomponent, port connection, output port, input port, state machine, state, state transition, guard, and effect.
[0022] The above-mentioned S2 uses the Dom4j and org.w3c.dom toolkits to design a source file processing algorithm. The source file processing algorithm is used to process the SysML model XMI file and adjust the structure of the XMI file to obtain the SysML model source file for conversion, that is, the SysML model source file to be converted.
[0023] The above-mentioned source file processing algorithm is used to process SysML model XMI files and adjust the XMI file structure, including: deleting attributes in the tags that are not related to the transformation and adding the attribute direction to the ownedPort tag that records port information.
[0024] The method for deleting attributes unrelated to the conversion in the above-mentioned tags is as follows:
[0025] The root node of the document is used as the starting point for traversal. Based on the tag name and attribute name, it is determined whether the current node has an attribute that is not related to the transformation, i.e., the attribute to be deleted. If it does, the attribute is deleted. Otherwise, the recursive traversal and judgment are performed from the parent node of the current node until all nodes with the attribute to be deleted are found and the attribute is deleted, or all nodes in the document have been looped through.
[0026] The above method of adding the `direction` attribute to the `ownedPort` tag that records port information is as follows:
[0027] First, write a `recordAttribute()` function to iterate through all nodes, find the `FlowPort` tag, and use two `List` arrays to record the values of the attributes `base_Port` and `direction` respectively. Then, in another `addAttribute()` function, find the `ownedPort` tag by iterating through it. In the `addAttribute()` function, it iterate through the array containing the values of `base_Port`, and denote the current value of the array as `s`. If the `id` of `ownedPort` is equal to `s`, then use the `setAttributeValue()` function to generate the attribute `direction`, whose value is the value of the array `direction` with the same index as `s`.
[0028] The conversion rule file mentioned in S2 above contains the following conversion rules:
[0029] 1) The classElement of the SysML model is converted into System and SystemImpl of the SLIM model. When converting to System, the port information of the component is included, and the name attribute of classElement is converted to the name of System. When converting to SystemImpl, the internal implementation information of the component is included, and the name attribute of classElement is converted to the name of SystemImpl by adding the string ".Imp".
[0030] 2) Convert the ownedPort of the SysML model to the Port of the System in the SLIM model, where the name attribute of the ownedPort is converted to the name of the Port, the direction is converted to the direction of the Port, and the kind is converted to the kind of the Port;
[0031] 3) In the SysML model, the subclass type of ownedPort is converted to the subclass type of Port, where the type attribute of type is converted to the type of type;
[0032] 4) In the SysML model, the subclass defaultValue of ownedPort is converted to the subclass defaultvalue of Port, where the value attribute of defaultValue is converted to the value of defaultvalue;
[0033] 5) The owned Behavior of the SysML model is converted into the StateMachine of SystemImpl;
[0034] 6) In the SysML model, the subvertex of the ownedBehavior is converted to the state of the SLIM model, where the name of the subvertex is converted to the name of the state, and the initial of the subvertex is converted to the initial of the state.
[0035] 7) In the SysML model, the subclass transition of ownedBehavior is converted to the transition of SLIM model, where the source of transition is converted to the start of transition and the target is converted to the end;
[0036] 8) In the SysML model, the subclass guard of transition is converted to the subclass guard of transition in the SLIM model, where the body of guard is converted to the body of guard in SLIM;
[0037] 9) In the SysML model, the subclass effect of transition is converted to the subclass effect of transition in SLIM, where the body of effect is converted to the body of effect in SLIM;
[0038] 10) In the SysML model, the ownedAttribute with a non-empty name attribute is converted to the SubComponent in the SystemImpl of the SLIM model. The name attribute of the ownedAttribute is converted to the name in the SubComponent, and the subtype attribute is converted to the subtype in the SubComponent.
[0039] 11) In the SysML model, the subclass ownedConnector of classElement is converted to the subclass Connection of SystemImpl in SLIM;
[0040] 12) In the SysML model, the subclass start of ownedConnector is converted to the subclass start of Connection, where the kind attribute of start is converted to the kind of start in SLIM, and the name attribute is converted to the name of start;
[0041] 13) In the SysML model, the subclass end of ownedConnector is converted to the subclass end of Connection, where the kind attribute of end is converted to the kind of end in SLIM, and the name attribute is converted to the name of end.
[0042] The present invention has the following beneficial effects:
[0043] Because SysML models typically exist in the form of views, they lack a formal semantic and syntactic structure and cannot be directly subjected to qualitative or quantitative security analysis. To address the lack of a formal semantic structure in SysML, some domestic scholars have proposed a conversion method for transforming SysML models into AADL models. This method defines conversion rules from a subset of SysML (SubSysML) to AADL, designs a conversion algorithm based on these rules, and ultimately generates an AADL model. However, this method cannot determine whether the generated AADL model has a semantic and syntactic structure conforming to the AADL specification. In contrast, this invention provides a SysML metamodel structure and a SLIM metamodel structure that conform to the semantics of the model language. It stipulates that only when the system models before and after conversion match the standards of the metamodel can model-to-model conversion be performed, which to some extent demonstrates the rigor of the conversion method designed in this patent.
[0044] In addition, given the current limited research on SLIM language in domestic industry and academia, the conversion method proposed in this invention connects the SysML modeling language with the uncommon SLIM language, providing a range of applicable fields for SLIM language and offering valuable reference for subsequent research on SLIM language. Attached Figure Description
[0045] Figure 1 This is a flowchart of the method of the present invention;
[0046] Figure 2 This is a partial meta-model of SysML;
[0047] Figure 3 This is a partial meta-model of SLIM;
[0048] Figure 4 This is the deleteAttribute function;
[0049] Figure 5 This is a function to add the direction property.
[0050] Figure 6 For ATL design patterns;
[0051] Figure 7 Design rules for model elements classElement and ownedPort;
[0052] Figure 8 The result of the conversion between classElement and ownedPort. Detailed Implementation
[0053] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0054] Although the steps in this invention are arranged by reference numerals, this is not intended to limit the order of the steps. Unless the order of the steps is explicitly stated or the execution of a step requires other steps as a basis, the relative order of the steps can be adjusted. It is understood that the term "and / or" as used herein refers to and covers any and all possible combinations of one or more of the associated listed items.
[0055] like Figure 1 As shown, the present invention provides an automatic conversion method from an ATL-based SysML model to a SLIM model, comprising:
[0056] S1. Construct the SysML metamodel based on the official SysML specification document and the exported XMI file. Establish the SLIM metamodel based on the BNF paradigm of SLIM. By analyzing the SysML and SLIM metamodels, establish an element mapping table between the SysML and SLIM models to represent the correspondence between model elements. The element mapping table is shown in Table 1.
[0057] Table 1. Mapping Table of SysML and SLIM Model Elements
[0058]
[0059]
[0060] S2. Design source file processing algorithm to obtain SysML model source files for conversion;
[0061] We designed a source file processing algorithm using the Dom4j and org.w3c.dom toolkits to process the exported SysML model XMI files, and adjusted the XMI file structure to obtain the SysML model source files to be converted, which facilitates the design of conversion rules.
[0062] The adjustments include:
[0063] 1) Remove attributes from the tag that are not related to the conversion:
[0064] The root node of the document is used as the starting point for traversal. Based on the tag name and attribute name, it is determined whether the current node has an attribute that is not related to the transformation, i.e., the attribute to be deleted. If it does, the attribute is deleted. Otherwise, the recursive traversal and judgment are performed from the parent node of the current node until all nodes with the attribute to be deleted are found and the attribute is deleted, or all nodes in the document have been looped through.
[0065] 2) Add the attribute `direction` to the ownedPort tag that records port information. The value of the `direction` attribute is extracted from FlowPort:
[0066] First, write a `recordAttribute()` function to iterate through all nodes, find the `FlowPort` tag, and use two `List` arrays to record the values of the attributes `base_Port` (port number) and `direction`, respectively. Then, in another `addAttribute()` function, find the `ownedPort` tag by iterating through it. In the `addAttribute()` function, it iterate through the array containing the values of `base_Port`, and denote the current value of the array as `s`. If the `id` (port number) of `ownedPort` is equal to `s`, then use the `setAttributeValue()` function to generate the attribute `direction`, whose value is the value of the array `direction` with the same index as `s`.
[0067] S3. Based on the element mapping table between SysML and SLIM models, ATL files (.atl) are written in ATL language to convert SysML models to SLIM models. Combined with the SysML model source files, the ATL engine is called to automatically realize the conversion from SysML model to SLIM model.
[0068] The conversion rule file contains a total of 13 conversion relationships.
[0069] 1) The classElement (system component) of the SysML model is converted into System (module) and SystemImpl (the specific implementation of the module) of the SLIM model;
[0070] When converted to System, the port information of the component is included, where the name attribute of classElement is converted to the name of System;
[0071] When converting to SystemImpl, the internal implementation information of the component is included. The name attribute of classElement is converted to the name of SystemImpl by adding the string ".Imp".
[0072] 2) The ownedPort in the SysML model is converted to the Port in the System in the SLIM model, where the name attribute of the ownedPort is converted to the name of the Port, the direction is converted to the direction of the Port, and the kind (port property) is converted to the kind of the Port.
[0073] 3) In the SysML model, the subclass type of ownedPort is converted to the subclass type of Port, where the type attribute of type is converted to the type of type.
[0074] 4) In the SysML model, the subclass defaultValue of ownedPort is converted to the subclass defaultvalue of Port, where the value property of defaultValue is converted to the value of defaultvalue;
[0075] 5) The owned Behavior (state machine) of the SysML model is converted into the StateMachine (state machine) of SystemImpl;
[0076] 6) In the SysML model, the subvertex (state) of the ownedBehavior is converted to the state (state) of the SLIM model, where the name of the subvertex is converted to the name of the state, and the initial (initial state identifier) of the subvertex is converted to the initial of the state.
[0077] 7) In the SysML model, the subclass transition of ownedBehavior is converted to the transition of the SLIM model, where the source of transition is converted to the start of transition and the target is converted to the end of transition.
[0078] 8) In the SysML model, the subclass guard of transition is converted to the subclass guard of transition in the SLIM model, where the body of guard (the condition for the conversion) is converted to the body of guard in SLIM;
[0079] 9) In the SysML model, the subclass effect of transition is converted to the subclass effect of transition in SLIM, where the body of effect is converted to the body of effect in SLIM;
[0080] 10) In the SysML model, the ownedAttribute (component) with a non-empty name attribute is converted to the SubComponent (subcomponent) of SystemImpl in the SLIM model. The name attribute of the ownedAttribute is converted to the name in the SubComponent, and the subtype (subcomponent type) attribute is converted to the subtype in the SubComponent.
[0081] 11) In the SysML model, the subclass ownedConnector of classElement is converted to the subclass Connection of SystemImpl in SLIM;
[0082] 12) In the SysML model, the subclass start (output port) of ownedConnector is converted to the subclass start of Connection. The kind (component type to which the port belongs) property of start is converted to the kind of start in SLIM, and the name property is converted to the name of start.
[0083] 13) In the SysML model, the subclass end (input port) of ownedConnector is converted to the subclass end of Connection. The kind (component type to which the port belongs) property of end is converted to the kind of end in SLIM, and the name property is converted to the name of end.
[0084] Based on the steps described above, the specific implementation method for the conversion is as follows:
[0085] Step 1: Using the official SysML specification document, draw the Ecore model in the Eclipse plugin as the SysML metamodel. The SLIM metamodel needs to be constructed according to the BNF paradigm defined in the specification document. The SysML and SLIM partial metamodels are as follows: Figure 2 , Figure 3 As shown, the element mapping table is referenced from Table 1 above.
[0086] Step 2 involves adjusting the exported system model XMI file. Since multiple labels are involved, the algorithms have many commonalities. The following two representative functional functions are given.
[0087] 1) Remove attributes from the tag that are not related to the conversion. See [link to implementation details] for instructions. Figure 4 As shown. The root node of the document is used as the starting point for traversal. Based on the tag name and attribute name, it is determined whether the current node has the attribute to be deleted. If it does, the attribute is deleted. Otherwise, the method is recursively called from the parent node of the current node until the node attribute is found and deleted or all nodes in the document have been traversed.
[0088] 2) Add the attribute `direction` to the `ownedPort` tag that records port information. The value of the `direction` attribute needs to be extracted from `FlowPort`. See below for implementation details. Figure 5 First, write a `recordAttribute()` function to iterate through all nodes, find the `FlowPort` tag, and use two `List` arrays to record the values of the attributes `base_Port` and `direction`, respectively. Then, in another `addAttribute()` function, find the `ownedPort` tag by iterating through it. In the `addAttribute()` function, it iterate through the array containing the values of `base_Port`, and denote the current value of the array as `s`. If the `id` of `ownedPort` is equal to `s`, then use the `setAttributeValue()` function to generate the attribute `direction`, whose value is the value of the array `direction` with the same index as `s`.
[0089] Step 3, to explain the ATL conversion process in detail, Figure 6 An ATL transformation mode description is provided, where mma2mmb.atl is the transformation rule file, Ma is the source model, Mb is the target model, MMa is the metamodel of Ma, and MMb is the metamodel of Mb. By defining the correspondence between the two model elements in mma2mmb.atl, the value of a certain type of element in Ma will be transformed into the value of the corresponding element in Mb.
[0090] Use the ATL language to write the transformation rules in an ATL file. The ATL file needs to declare that the input model is a SysML metamodel and the output is a SLIM metamodel. The transformation rules must have a one-to-one correspondence between classes in the SysML metamodel and classes in the SLIM metamodel, and attributes must also be mapped. If the attributes to be transformed are nested classes, the lazy rule pattern can be used to transform subclasses within the nested relationship. After the ATL file is written, call the ATL engine to complete the transformation. Figure 7The partial structure of the ATL file for SysML to SLIM conversion is given. In the conversion rule file, the input SysML metamodel and the output SLIM metamodel are first declared. The rule `sysml2slim` defines the conversion from `classElement` in SysML to `System` in SLIM. The attributes `name` and `kind` can be directly converted, while the conversion of subclass `Port` requires finding a set of `ownedPort`s that conform to the `Port2Port` lazy rule. This lazy rule defines the specific attribute conversion relationships between `ownedPort`s and `Port`s. The generated SLIM file after conversion is as follows: Figure 8 As shown.
[0091] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
[0092] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
Claims
1. An automatic conversion method from SysML model to SLIM model based on ATL, characterized in that, include: S1. Construct the SysML metamodel and SLIM metamodel, and establish an element mapping table between the SysML model and the SLIM model by analyzing the SysML metamodel and SLIM metamodel. S2. Design a source file processing algorithm to obtain the SysML model source file for conversion; use the source file processing algorithm to process the SysML model XMI file and adjust the XMI file structure, including: adding the attribute direction to the ownedPort tag that records port information; the method of adding the attribute direction to the ownedPort tag that records port information is as follows: first, write a recordAttribute() function to traverse all nodes, find the FlowPort tag, and use two List arrays to record the attribute port number base_Port and direction values respectively. Then, in another addAttribute() function, find the ownedPort tag by traversal, and then traverse the array containing the base_Port value. The current value of the array is denoted as s. If the id of ownedPort is equal to s, then use the setAttributeValue() function to generate the attribute direction, the value of which is the value of the array direction with the same index as s. S3. Based on the element mapping table between the SysML model and the SLIM model, a conversion rule file for converting the SysML model to the SLIM model is written using the ATL language. Combined with the SysML model source file, the ATL engine is called to automatically implement the conversion from the SysML model to the SLIM model. The conversion rule file contains the following conversion rules: 1) The system component classElement of the SysML model is converted into the module System and module implementation SystemImpl of the SLIM model. When converting to System, the component's port information is included, and the name attribute of classElement is converted to the name of System. When converting to SystemImpl, the component's internal implementation information is included, and the name attribute of classElement is converted to the name of SystemImpl by adding the string ".Imp". 2) The ownedPort of the SysML model is converted to the Port of the System in the SLIM model, where the name attribute of ownedPort is converted to the name of Port, the direction is converted to the direction of Port, and the kind of port property is converted to the kind of Port. 3) In the SysML model, the port value type of the subclass of ownedPort is converted to the subclass type of Port, where the port type attribute of type is converted to the type of type. 4) In the SysML model, the default value of the subclass port of ownedPort is converted to defaultvalue of the subclass of Port, where the default value property of defaultValue is converted to the value of defaultvalue; 5) The state machine ownedBehavior of the SysML model is transformed into the state machine StateMachine of SystemImpl; 6) In the SysML model, the subvertex of the ownedBehavior is converted into the state of the SLIM model, where the name of the subvertex is converted into the name of the state, and the initial state identifier of the subvertex is converted into the initial state identifier of the state. 7) The state transition of the subclass of ownedBehavior in the SysML model is converted to the transition of the SLIM model, where the initial state property source of the transition is converted to the initial state property start of the transition, and the ending state property target is converted to the ending state property end. 8) In the SysML model, the guard subclass of transition is converted to the guard subclass of transition in the SLIM model, where the body attribute of the transition in guard is converted to the body of guard in SLIM; 9) The subclass effect of transition in SysML model is converted to the subclass effect of transition in SLIM, where the body attribute of effect is converted to the body of effect in SLIM; 10) In the SysML model, the ownedAttribute of the component whose name property is not empty is converted to the SubComponent of SystemImpl in the SLIM model. The name property of ownedAttribute is converted to the name in SubComponent, and the subtype property of subComponent is converted to the subtype in SubComponent. 11) In the SysML model, the port connection of a subclass of classElement, ownedConnector, is converted into the port connection of a subclass of SystemImpl, Connection, in SLIM; 12) In the SysML model, the output port start of the subclass ownedConnector is converted to the subclass start of Connection. The component type kind attribute of the port of start is converted to the kind of start in SLIM, and the name attribute is converted to the name of start. 13) In the SysML model, the input port end of the subclass ownedConnector is converted to the subclass end of Connection. The kind attribute of the component type to which the port of end belongs is converted to the kind of end in SLIM, and the name attribute is converted to the name of end.
2. The automatic conversion method from an ATL-based SysML model to a SLIM model according to claim 1, characterized in that, S1 constructs a SysML metamodel based on the SysML specification document and XMI file, and establishes a SLIM metamodel based on the BNF paradigm of SLIM.
3. The automatic conversion method from an ATL-based SysML model to a SLIM model according to claim 1, characterized in that, The SysML model to SLIM model element mapping table includes: The elements of the SysML model are: classElement, ownedPort, type, defaultValue, ownedAttribute(name != null), ownedConnector, start, end, ownedBehavior, subvertex, transition, guard, and effect, which respectively represent: system component, component port, port type, port default value, component, port connection, output port, input port, state machine, state, state transition, guard, and effect. The elements of the SLIM model are: System and SystemImpl, Port, Type, Defaultvalue, SubComponent, Connection, start, end, StateMachine, state, transition, guard, and effect, which respectively represent: module and implementation interface, component port, port type, port default value, subcomponent, port connection, output port, input port, state machine, state, state transition, guard, and effect.
4. The automatic conversion method from an ATL-based SysML model to a SLIM model according to claim 1, characterized in that, The S2 method utilizes the Dom4j and org.w3c.dom toolkits to design a source file processing algorithm. This algorithm processes the SysML model XMI file and adjusts its structure to obtain the SysML model source file for conversion, i.e., the SysML model source file to be converted.
5. The automatic conversion method from an ATL-based SysML model to a SLIM model according to claim 4, characterized in that, The source file processing algorithm is used to process the SysML model XMI file and adjust the XMI file structure, including deleting attributes in the tags that are not related to the transformation.
6. The automatic conversion method from an ATL-based SysML model to a SLIM model according to claim 5, characterized in that, The method for deleting attributes unrelated to the conversion in the tags is as follows: The root node of the document is used as the starting point for traversal. Based on the tag name and attribute name, it is determined whether the current node has an attribute that is not related to the transformation, i.e., the attribute to be deleted. If it does, the attribute is deleted. Otherwise, the recursive traversal and judgment are performed from the parent node of the current node until all nodes with the attribute to be deleted are found and the attribute is deleted, or all nodes in the document have been looped through.