A SysML v2-oriented model enhancement and bidirectional conversion method and system

Through the mapping and transformation method of SysML v2 to SysMLine, the semantics and structural complexity of the SysML v2 model in EMF model transformation are solved, the integration of model management and toolchain is realized, and the usability and interoperability of the model are improved.

CN120215958BActive Publication Date: 2025-08-22DALIAN UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510703381.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-29
Publication Date
2025-08-22
Estimated Expiration
2045-05-29

AI Technical Summary

Technical Problem

The existing SysML v2 tools lack semantic integrity when converted to EMF models, lack of complexity and comprehensibility of the model structure, lack of systematic management support, and the toolchain functions are limited, making it difficult to support the needs of engineering collaboration.

Method used

Provide a model enhancement and bidirectional transformation method for SysML v2. Map the SysML v2 model into a SysMLine metamodel through rule scripts, complete the missing semantic information, simplify the structure, and realize bidirectional transformation through the reverse mapping mechanism.

Benefits of technology

It improves model management capabilities and interoperability, enhances the analytics and reusability of the model, supports a diversified development environment, and improves model ecological compatibility and engineering availability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120215958B_ABST
    Figure CN120215958B_ABST
Patent Text Reader

Abstract

The present application discloses a model enhancement and bidirectional conversion method and system for SysML v2, the method comprising: receiving and parsing a source SysML v2 model to establish a source model resource, wherein the source SysML v2 model is a SysML v2 text representation or its corresponding EMF instance model; mapping model elements in the source model resource to intermediate model elements based on a preset SysMLine metamodel to generate an intermediate model; performing enhancement processing on the intermediate model; outputting the enhanced intermediate model as a SysMLine model in EMF format, and converting the EMF format SysMLine model into a SysML v2 text representation through a reverse mapping mechanism. Utilizing the solution of the present application, semantic abstraction and logical isolation of SysML v2 can be achieved, making subsequent processing independent of the specific source format, and improving model management capabilities and interoperability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application generally relates to the technical field of model conversion, management and optimization of system modeling languages. More specifically, the present application relates to a method and system for model enhancement and bidirectional conversion for SysML v2. Background Art

[0002] As system complexity increases, model-based systems engineering (MBSE) has become a core approach for managing systems throughout their lifecycle. SysML v2, a key supporter of MBSE, significantly enhances complex system modeling capabilities by enhancing language precision, expressiveness, and interoperability. However, existing technologies still have the following limitations in practical applications:

[0003] First, EMF models lack semantic integrity: Current SysML v2 tools only retain explicit modeling elements (such as attributes and connections) when converting to EMF models, ignoring derived information (such as inherited attributes and dependency transitivity). This results in a lack of complete semantic context during model verification and analysis, limiting automated reasoning and cross-tool collaboration. For example, in system architecture verification, implicit dependencies cannot be directly captured from the EMF model, requiring manual logic addition, increasing the risk of errors and iteration costs.

[0004] Second, model structure complexity and comprehensibility deficiencies: SysML v2's EMF implementation directly maps to the language specification, resulting in deep model hierarchies and redundant reference relationships (such as multi-level nested type definitions). Model analysis requires developers to deeply understand the underlying metamodel structure, resulting in a high learning curve and prone to errors. For example, verification engineers must traverse complex reference paths to locate specific state machine behaviors, reducing model review efficiency.

[0005] Third, there is a lack of model management mechanisms: Existing technologies lack support for the systematic management of SysML v2 models, including features such as version control, modular reuse, and relationship tracking. For example, in digital twin scenarios, model elements cannot be updated and rolled back on demand, making it difficult to collaborate on multiple versions of models. In large-scale team collaboration, the lack of a unified interface for managing model changes can easily lead to consistency conflicts.

[0006] Fourth, toolchain functional limitations: Existing tools (such as SysON and SysIDE) focus on model editing and visualization but lack core model management capabilities. For example, while SysIDE supports efficient text-based editing, it lacks global retrieval and dependency analysis capabilities for model elements. SysON's graphical editing platform lacks a model version comparison or incremental update mechanism, making it difficult to support engineering collaboration requirements.

[0007] In view of this, there is an urgent need to provide a model enhancement and bidirectional conversion solution for SysML v2, which can improve the practicality and scalability of model-driven engineering by integrating semantic enhancement, structural optimization and full lifecycle management. Summary of the Invention

[0008] In order to at least solve one or more of the technical problems mentioned above, the present application proposes a model enhancement and bidirectional conversion solution for SysML v2 in multiple aspects.

[0009] In a first aspect, the present application provides a model enhancement and bidirectional conversion method for SysML v2, comprising: receiving and parsing a source SysML v2 model to establish a source model resource, wherein the source SysML v2 model is a SysMLv2 text representation or its corresponding EMF instance model; applying a rule script to map model elements in the source model resource to intermediate model elements based on a preset SysMLine metamodel to generate an intermediate model; enhancing the intermediate model; outputting the enhanced intermediate model as a SysMLine model in EMF format, and converting the SysMLine model in EMF format to a SysML v2 text representation through a reverse mapping mechanism.

[0010] In some embodiments, when the SysML v2 text representation is received, a SysML v2 original model is constructed using the SysML v2 text representation, and the SysML v2 original model is converted into an EMF instance model using a SysML v2 Pilot tool or a syntax tree generation tool.

[0011] In some embodiments, after converting the SysML v2 original model to an EMF instance model, an enhanced The conversion mechanism completes the missing semantic information in the converted EMF instance model.

[0012] In some embodiments, the missing semantic information includes the semantic subset relationship that the attribute should have.

[0013] In some embodiments, the rule script is SysML2SysMLine.etl.

[0014] In some embodiments, during the enhancement process of the intermediate model, at least one of the following steps is performed: completing the missing derived semantic information in the intermediate model through static analysis and rule deduction; automatically generating the attribute identification and value range information of the intermediate model through the EOL script; simplifying and reconstructing the structure of the intermediate model.

[0015] In some embodiments, after the intermediate model is enhanced, one of the following steps is performed on the enhanced intermediate model: automatically modifying the structure or content of the enhanced intermediate model through an EOL script; performing naming convention verification and structural consistency check on the enhanced intermediate model through an EVL verification engine.

[0016] In some embodiments, the derived semantic information includes isDerived information, direction information, and multiplicityRange information.

[0017] In some embodiments, simplifying and reconstructing the structure of the intermediate model includes eliminating intermediate levels and merging redundant links.

[0018] In a second aspect, the present application provides a SysML v2-oriented model enhancement and bidirectional conversion system, which implements SysML v2-oriented model enhancement and bidirectional conversion using the SysML v2-oriented model enhancement and bidirectional conversion method as described in any embodiment of the first aspect. The system includes: a model import module, configured to receive and parse a source SysML v2 model to establish a source model resource, wherein the source SysML v2 model is a SysML v2 text representation or its corresponding EMF instance model; a model conversion module, configured to apply a rule script to map model elements in the source model resource into intermediate model elements based on a preset SysMLine metamodel to generate an intermediate model; a model enhancement module, configured to enhance the intermediate model; and a model export module, configured to output the enhanced intermediate model as a SysMLine model in EMF format, and convert the SysMLine model in EMF format into a SysML v2 text representation through a reverse mapping mechanism.

[0019] Through the model enhancement and bidirectional conversion solution for SysML v2 provided above, the embodiment of the present application ensures that the tool chain can adapt to different development environments and meet diverse user needs by supporting two input formats: SysML v2 text representation and EMF instance model. By mapping the source model to an intermediate model based on the preset SysMLine metamodel through rule scripts, semantic abstraction and logical isolation of SysML v2 are achieved, making subsequent processing independent of the specific source format, and improving model management capabilities and interoperability. By enhancing the intermediate model, domain-specific optimizations can be injected to improve the analyzability and reuse value of the model. The enhanced processing results are written back to the SysML v2 text representation through the reverse mapping mechanism, realizing a bidirectional mapping mechanism from the original SysML v2 model to the SysMLine model, supporting model forward import and reverse transmission, and improving the ecological compatibility and engineering usability of the SysML v2 model.

[0020] Furthermore, in some embodiments, upon receiving the SysML v2 text representation, a SysML v2 original model is constructed using the SysML v2 text representation, the SysML v2 original model is converted into an EMF instance model using a SysML v2 Pilot tool or a syntax tree generation tool, and an enhanced The conversion mechanism completes the missing semantic information in the converted EMF instance model. This not only maintains the semantic consistency of the original SysML v2 model, but also ensures standard compatibility while laying a well-structured model foundation for subsequent analysis, verification, export and other operations.

[0021] Furthermore, in some embodiments, during the enhancement process of the intermediate model, by completing the missing derived semantic information in the intermediate model, the implicit or not explicitly defined intermediate model semantics can be automatically derived through logical rules, and the logical faults caused by source model format differences or information loss can be repaired. By automatically generating the attribute identifiers and value range information of the intermediate model, the metadata of the intermediate model elements can be dynamically expanded, and the attribute definitions can be standardized to adapt to the corresponding data format requirements. By simplifying and reconstructing the structure of the intermediate model, the model hierarchical relationship can be optimized, irrelevant details or intermediate state data can be eliminated, the core logical expression can be focused, and the subsequent conversion and verification process can be accelerated.

[0022] Furthermore, in some embodiments, after the intermediate model is enhanced, automated modifications to its structure or content can be performed to support dynamic adjustments to the model structure based on preset rules, improving the clarity of the model logic. By performing naming convention verification and structural consistency checks on the enhanced intermediate model, model readability can be ensured, and reverse quality feedback can be provided, forming a continuous optimization mechanism. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The above and other objects, features and advantages of the exemplary embodiments of the present application will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present application are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:

[0024] Figure 1 An exemplary flow chart of a SysML v2-oriented model enhancement and bidirectional conversion method according to an embodiment of the present application is shown;

[0025] Figure 2 An exemplary structural block diagram of a SysML v2-oriented model enhancement and bidirectional conversion system according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0026] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts are within the scope of protection of this application.

[0027] It should be understood that the terms "include" and "comprising" used in the description and claims of this application indicate the presence of described features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or collections thereof.

[0028] It should also be understood that the terms used in this specification are for the purpose of describing specific embodiments only and are not intended to limit this application. As used in this specification and claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise. It should also be further understood that the term "and / or" as used in this specification and claims refers to any and all possible combinations of one or more of the associated listed items, including and including these combinations.

[0029] Figure 1 An exemplary flow chart of a SysML v2-oriented model enhancement and bidirectional conversion method 100 according to an embodiment of the present application is shown.

[0030] like Figure 1 As shown, in step S110 , a source SysML v2 model is received and parsed to create a source model resource.

[0031] Specifically, the source SysML v2 model is a SysML v2 text representation or its corresponding EMF instance model.

[0032] In an embodiment of the present application, when a SysML v2 text representation is received, a SysML v2 original model is constructed using the SysML v2 text representation, and the SysML v2 original model is converted into an EMF instance model using a SysML v2 Pilot tool or a syntax tree generation tool.

[0033] In an embodiment of the present application, in the process of constructing a SysML v2 original model through SysML v2 text representation, first, the model organizational structure is defined (such as creating a package) and the core model elements are declared (such as defining blocks and defining requirements). Secondly, the relationships between model elements are established (such as inheritance relationships, composition relationships, association relationships, etc.). Then, constraints and rules are added to declare the restrictions on the model elements. Finally, other model files are introduced through import, and SysML v2 compatible tools (such as HYPERLINK "https: / / sysml.org" SysML v2 API) are used to check text syntax errors and ensure logical consistency (such as no cycles in inheritance relationships, reasonable constraints, etc.), thereby obtaining the SysML v2 original model.

[0034] Specifically, when converting a SysML v2 source model to an EMF instance model using the SysML v2 Pilot tool, the SysML2XMI feature provided by the SysML v2 Pilot tool is used to convert the model to an EMF instance model. Since XMI (XMLMetadata Interchange) is an OMG standard data exchange format, the XMI file generated by SysML2XMI implements a standardized mapping from SysML v2 models to EMF instance models, ensuring seamless exchange of models between different tools, such as modeling tools in the Eclipse ecosystem.

[0035] In the embodiment of the present application, after converting the SysML v2 original model into an EMF instance model, an enhanced The conversion mechanism completes the missing semantic information in the converted EMF instance model.

[0036] In an embodiment of the present application, the aforementioned missing semantic information includes the semantic subset relationship that the attribute should have.

[0037] In some embodiments of this application, when converting the SysML v2 original model to the EMF instance model, the semantic subsetting relationship (Subsetting) information of the attribute "mass" in the PartDefinition Vehicle is lost and is only mapped to an isolated AttributeUsage entity. To solve this problem, an enhanced The conversion mechanism completes the missing semantic information without changing the original EMF instance model, for example, explicitly completing the subsetting of the attribute "mass" to "ISQBase::mass".

[0038] By introducing enhanced The conversion mechanism completes missing semantic information in the converted EMF instance model, including missing SysML v2-specific concepts, ensuring the complete preservation of the semantic information of model elements. Furthermore, the converted EMF model is guaranteed to be strictly consistent with the original SysML v2 model in terms of structure (e.g., classes, associations, inheritance) and dynamic behavior (e.g., state machines, activity diagrams), avoiding logical gaps. Furthermore, it automatically fills in implicit semantic information, reducing manual intervention and improving conversion efficiency.

[0039] After step S110 is executed, in step S120 , the rule script is applied to map the model elements in the source model resource into intermediate model elements based on the preset SysMLine metamodel to generate an intermediate model.

[0040] In the embodiment of the present application, the rule script is SysML2SysMLine.etl.

[0041] The SysML2SysMLine.etl script implements semantic mapping from the source SysML metamodel to an intermediate model based on the pre-defined SysMLine metamodel, effectively addressing issues such as insufficient information in the source SysML metamodel. This conversion not only involves adjusting the grammatical structure but also achieves precise transfer of domain semantics through element type conversion rules.

[0042] In an embodiment of the present application, during the execution of step S120, first, the elements of the source SysML model (such as FeatureMembership, Import, etc.) and their nested structures (such as the hierarchical relationship of OwningMembership) are parsed. Simultaneously, mapping rules are defined through the ETL script (SysML2SysMLine.etl) to semantically map SysML v2 elements to the core classes of the SysMLine metamodel. For example, SysML v2's FeatureMembership is mapped to SysMLine's Feature abstract class, and its concrete subclasses (such as PortUsage and PartUsage) directly inherit to preserve semantic details. Complex SysML v2 membership relationships (such as NamespaceMembership) are converted to SysMLine's flattened Relationship type, with dependency directions and context explicitly annotated.

[0043] Secondly, the multi-layer nested OwningMembership structure in the source SysML model is expanded into independent elements of SysMLine, and connections are established through direct associations (such as Relationship) to eliminate redundant encapsulation. The SysML v2 Import relationship is converted to explicit tags of SysMLine (such as Dependency or ImportRelationship) to simplify cross-package reference resolution. In other words, the process of elements in one SysML package referencing or depending on elements defined in another SysML package becomes easier and clearer.

[0044] Secondly, through the logical judgment of the ETL script (such as analyzing the element type or association relationship), the Boolean flags such as isDerived and isOrdered of SysMLine are automatically filled in to make the information more concise.

[0045] Finally, the final output is an intermediate model instance that conforms to the SysMLine metamodel. Its elements, attributes, and relationships are instantiated using the EMF (Eclipse Modeling Framework) structure, ensuring compatibility with the SysMLine toolchain. This also makes it more suitable for management and verification, laying the foundation for subsequent verification, modification, and writeback operations.

[0046] By executing step S120 above, strict semantic mapping rules (such as directly mapping the Port direction attribute to the PortDefinition) are enforced, ensuring that the intermediate model faithfully reflects the original design intent of SysML v2 and avoiding information loss during the conversion process. Furthermore, the deep nesting of SysML v2 is eliminated, making elements directly accessible (for example, without having to parse the Port attribute across multiple layers), reducing model traversal complexity. By making identifiers such as isReadOnly explicit, the readability of model content is enhanced, making it easier for developers and tools to quickly understand constraints. Furthermore, injected attributes such as isDerived provide a foundation for model validation and optimization, such as identifying features that require dynamic calculation. The valuePart and type_ fields support reverse engineering and impact analysis, such as tracing the impact path of requirement changes on specific model elements. Furthermore, the generated intermediate model is implemented based on EMF and can be directly integrated into modeling tools or code generators supported by SysMLline. This provides a conversion bridge for the long-term coexistence of SysML v2 and SysMLine, supporting model migration and collaboration between heterogeneous tools.

[0047] After step S120 is executed, in step S130 , the intermediate model is enhanced.

[0048] In embodiments of the present application, during the enhancement process of the intermediate model, at least one of the following steps is performed: completing missing derived semantic information in the intermediate model through static analysis and rule deduction; automatically generating attribute identifiers and value range information for the intermediate model through an EOL script; and simplifying and reconstructing the structure of the intermediate model. That is, one, two, or three of these steps may be performed.

[0049] In an embodiment of the present application, the aforementioned derived semantic information includes isDerived information, direction information, and multiplicityRange information.

[0050] Logical contradictions caused by manual filling are avoided through rule inference. For example, multiplicityRange information is automatically inferred based on the class relationship at both ends of the association to prevent multiplicity range conflicts. By completing the missing derived semantic information in the intermediate model, it can be ensured that the intermediate model contains all necessary metadata (such as association direction, multiplicity constraints, etc.), providing complete input for subsequent verification and conversion. At the same time, by completing the missing derived semantic information in the intermediate model to generate complete semantic information, the intermediate model can be directly used in the automated tool chain, reducing manual intervention and improving development efficiency. In addition, completing information such as direction (association direction) and isDerived (derived attribute marker) makes the intermediate model more readable and reduces users' misunderstanding of implicit logic.

[0051] In an embodiment of the present application, the attribute identification and value range information of the intermediate model are automatically generated by the EOL script, which can dynamically extend the metadata of the intermediate model elements and standardize the attribute definition to adapt to the corresponding data format requirements.

[0052] In an embodiment of the present application, simplifying and reconstructing the structure of the aforementioned intermediate model includes eliminating intermediate levels and merging redundant links.

[0053] By eliminating intermediate levels and merging redundant links, the intermediate model structure can be made more refined, intuitive, and engineering-friendly.

[0054] In an embodiment of the present application, after the intermediate model is enhanced, at least the enhanced intermediate model is subjected to automated structural or content modification using an EOL script, and the enhanced intermediate model is subjected to naming convention verification and structural consistency check using an EVL verification engine. In other words, either one or both of the above two steps may be performed.

[0055] By automatically modifying the structure or content of the enhanced intermediate model, it can support dynamic adjustment of the model structure based on preset rules, improving the clarity of the model logic. By verifying the naming conventions and checking the structural consistency of the enhanced intermediate model, it can ensure the readability of the model and provide reverse quality feedback to form a continuous optimization mechanism.

[0056] After step S130 is performed, in step S140 , the enhanced intermediate model is output as a SysMLine model in EMF format, and the SysMLine model in EMF format is converted into a SysML v2 text representation through a reverse mapping mechanism.

[0057] In an embodiment of the present application, in the process of outputting the enhanced intermediate model as a SysMLine model in EMF format, the serialization function provided by the EMF framework is used to write the enhanced intermediate model that already exists in the memory and conforms to the SysMLine metamodel definition into a persistent file (for example, XMI format). This file follows the specification defined by the SysMLine metamodel, which defines the format of the SysMLine model, thereby forming a SysMLine model in EMF format.

[0058] In an embodiment of the present application, in the process of converting a SysMLine model in EMF format to a SysML v2 textual representation using a reverse mapping mechanism, first, a mapping rule file (such as an Xtext grammar or a QVT script) is created to map the SysMLine model in EMF format to the grammatical structure of SysML v2. Secondly, the SysMLine2SysML.egx script is executed to traverse the SysMLine model in EMF format to generate text that conforms to the SysML v2 textual grammar (such as a .sysml file). Then, the generated text is syntax-checked using the official SysML v2 toolchain (such as the SysML v2 API) to ensure compliance with the specification.

[0059] By executing step S140 , the enhanced intermediate model can be returned and semantics preserved.

[0060] In summary, through the model enhancement and bidirectional conversion solution for SysML v2 provided above, the embodiment of the present application ensures that the tool chain can adapt to different development environments and meet diverse user needs by supporting two input formats: SysML v2 text representation and EMF instance model. By mapping the source model to an intermediate model based on the preset SysMLine metamodel through rule scripts, semantic abstraction and logical isolation of SysML v2 are achieved, making subsequent processing independent of the specific source format, and improving model management capabilities and interoperability. By enhancing the intermediate model, domain-specific optimizations can be injected to improve the analyzability and reuse value of the model. By writing the enhanced processing results back to SysML v2 text representation through the reverse mapping mechanism, a bidirectional mapping mechanism from the original SysML v2 model to the SysMLine model is implemented, supporting model forward import and reverse feedback, and improving the ecological compatibility and engineering usability of the SysML v2 model.

[0061] Furthermore, in some embodiments, upon receiving the SysML v2 text representation, a SysML v2 original model is constructed using the SysML v2 text representation, the SysML v2 original model is converted into an EMF instance model using a SysML v2 Pilot tool or a syntax tree generation tool, and an enhanced The conversion mechanism completes the missing semantic information in the converted EMF instance model. This not only maintains the semantic consistency of the original SysML v2 model, but also ensures standard compatibility while laying a well-structured model foundation for subsequent analysis, verification, export and other operations.

[0062] Furthermore, in some embodiments, during the enhancement process of the intermediate model, by completing the missing derived semantic information in the intermediate model, the implicit or not explicitly defined intermediate model semantics can be automatically derived through logical rules, and the logical faults caused by source model format differences or information loss can be repaired. By automatically generating the attribute identifiers and value range information of the intermediate model, the metadata of the intermediate model elements can be dynamically expanded, and the attribute definitions can be standardized to adapt to the corresponding data format requirements. By simplifying and reconstructing the structure of the intermediate model, the model hierarchical relationship can be optimized, irrelevant details or intermediate state data can be eliminated, the core logical expression can be focused, and the subsequent conversion and verification process can be accelerated.

[0063] Furthermore, in some embodiments, after the intermediate model is enhanced, automated modifications to its structure or content can be performed to support dynamic adjustments to the model structure based on preset rules, improving the clarity of the model logic. By performing naming convention verification and structural consistency checks on the enhanced intermediate model, model readability can be ensured, and reverse quality feedback can be provided, forming a continuous optimization mechanism.

[0064] The embodiments of the present application further provide a SysML v2-oriented model enhancement and bidirectional conversion system, which can use the aforementioned SysML v2-oriented model enhancement and bidirectional conversion method 100 to perform SysML v2-oriented model enhancement and bidirectional conversion, or can use other methods to perform SysML v2-oriented model enhancement and bidirectional conversion, which is not limited in the present application.

[0065] Figure 2 An exemplary structural block diagram of a SysML v2-oriented model enhancement and bidirectional conversion system according to an embodiment of the present application is shown.

[0066] like Figure 2 As shown, the system 200 includes a model import module 210, a model conversion module 220, a model enhancement module 230, and a model export module 240. In the embodiment of the present application, the model import module 210, the model conversion module 220, the model enhancement module 230, and the model export module 240 can be separate units or integrated into the same integrated circuit, which is not limited in the present application.

[0067] Specifically, the model import module 210 is used to receive and parse a source SysML v2 model to create a source model resource, wherein the source SysML v2 model is a SysML v2 text representation or its corresponding EMF instance model.

[0068] Specifically, the model conversion module 220 is used to apply rule scripts to map the model elements in the aforementioned source model resources into intermediate model elements based on the preset SysMLine meta-model, thereby generating an intermediate model.

[0069] Specifically, the model enhancement module 230 is used to enhance the aforementioned intermediate model.

[0070] Specifically, the model export module 240 is used to output the enhanced intermediate model as a SysMLine model in EMF format, and convert the SysMLine model in EMF format into a SysML v2 text representation through a reverse mapping mechanism.

[0071] When the system 200 uses the aforementioned SysML v2-oriented model enhancement and bidirectional conversion method 100 to perform SysML v2-oriented model enhancement and bidirectional conversion, the aforementioned step S110 is executed by the model import module 210, the aforementioned step S120 is executed by the model conversion module 220, the aforementioned step S130 is executed by the model enhancement module 230, and the aforementioned step S140 is executed by the model export module 240. The specific execution process can be found in the previous text and will not be repeated here.

[0072] Although multiple embodiments of the present application have been shown and described herein, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art can conceive of many changes, modifications, and alternatives without departing from the thought and spirit of the present application. It should be understood that in the process of practicing the present application, various alternatives to the embodiments of the present application described herein can be adopted. The accompanying claims are intended to define the scope of protection of the present application and therefore cover equivalents or alternatives within the scope of these claims.

Claims

1. A SysML v2-oriented model enhancement and bidirectional conversion method, characterized in that: include: Receive and parse a source SysML v2 model to establish a source model resource, wherein the source SysML v2 model is a SysML v2 text representation or its corresponding EMF instance model; When the SysML v2 text representation is received, a SysML v2 original model is constructed by using the SysML v2 text representation, and the SysML v2 original model is converted into an EMF instance model by using a SysML v2 Pilot tool or a syntax tree generation tool; After converting the SysML v2 original model to the EMF instance model, the enhanced The conversion mechanism completes the missing semantic information in the converted EMF instance model; Applying a rule script to map the model elements in the source model resource into intermediate model elements based on a preset SysMLine metamodel to generate an intermediate model, specifically comprising: parsing the elements and nested structures of the source SysML v2 model; defining mapping rules through an ETL script to semantically correspond the SysML v2 elements to the core classes of the SysMLine metamodel; expanding the nested structures in the source SysML v2 model into independent elements of SysMLine, establishing connections through direct associations to eliminate redundant encapsulation, and converting the Import relationship of the SysML v2 model into an explicit tag of SysMLine to simplify cross-package reference resolution; automatically filling in the Boolean flags of isDerived and isOrdered of SysMLine through logical judgment of the ETL script; and outputting an intermediate model instance that conforms to the SysMLine metamodel. performing enhancement processing on the intermediate model; In the process of enhancing the intermediate model, at least one of the following steps is performed: Complete the missing derived semantic information in the intermediate model through static analysis and rule inference; Automatically generate attribute identifiers and value range information of the intermediate model through EOL scripts; Simplifying and reconstructing the structure of the intermediate model; The enhanced intermediate model is output as a SysMLine model in EMF format, and the SysMLine model in EMF format is converted into SysML v2 text representation through the reverse mapping mechanism.

2. The SysML v2-oriented model enhancement and bidirectional conversion method according to claim 1, characterized in that: The missing semantic information includes the semantic subset relationship that the attribute should have.

3. The SysML v2-oriented model enhancement and bidirectional conversion method according to claim 1, characterized in that: The rule script is SysML2SysMLine.etl.

4. The SysML v2-oriented model enhancement and bidirectional conversion method according to claim 1, characterized in that: After the intermediate model is enhanced, one of the following steps is performed on the enhanced intermediate model: Automatically modify the structure or content of the enhanced intermediate model through EOL scripts; The EVL verification engine is used to perform naming convention verification and structural consistency check on the enhanced intermediate model.

5. The SysML v2-oriented model enhancement and bidirectional conversion method according to claim 1, characterized in that: The derived semantic information includes isDerived information, direction information and multiplicityRange information.

6. The SysML v2-oriented model enhancement and bidirectional conversion method according to claim 1, characterized in that: The simplifying and reconstructing the structure of the intermediate model includes eliminating intermediate levels and merging redundant links.

7. A SysML v2-oriented model enhancement and bidirectional conversion system, characterized by: The SysML v2-oriented model enhancement and bidirectional conversion method according to any one of claims 1 to 6 is used to implement SysML v2-oriented model enhancement and bidirectional conversion, the system comprising: The model import module is used to receive and parse the source SysML v2 model to establish a source model resource, wherein the source SysML v2 model is a SysML v2 text representation or its corresponding EMF instance model; wherein, when the SysML v2 text representation is received, a SysML v2 original model is constructed by the SysML v2 text representation, and the SysML v2 original model is converted into an EMF instance model by using the SysML v2 Pilot tool or the syntax tree generation tool; after the SysML v2 original model is converted into the EMF instance model, an enhanced The conversion mechanism completes the missing semantic information in the converted EMF instance model; A model conversion module is used to apply rule scripts to map the model elements in the source model resources into intermediate model elements based on a preset SysMLine metamodel to generate an intermediate model, specifically including: parsing the elements and nested structures of the source SysML v2 model; defining mapping rules through ETL scripts to semantically correspond the SysML v2 elements to the core classes of the SysMLine metamodel; expanding the nested structures in the source SysML v2 model into independent elements of SysMLine, establishing connections through direct associations to eliminate redundant encapsulation, and converting the Import relationship of the SysML v2 model into explicit tags of SysMLine to simplify cross-package reference resolution; automatically filling in the Boolean flags of isDerived and isOrdered of SysMLine through logical judgment of the ETL script; and outputting an intermediate model instance that conforms to the SysMLine metamodel; A model enhancement module is used to enhance the intermediate model; wherein, during the enhancement process of the intermediate model, at least one of the following steps is performed: completing the missing derived semantic information in the intermediate model through static analysis and rule deduction; automatically generating attribute identification and value range information of the intermediate model through EOL scripts; simplifying and reconstructing the structure of the intermediate model; a model export module is used to output the enhanced intermediate model as a SysMLine model in EMF format, and converting the SysMLine model in EMF format into a SysML v2 text representation through a reverse mapping mechanism.

Citation Information

Patent Citations

  • Bidirectional model conversion method based on SysML v1 and SysML v2

    CN116822195A

  • Method for converting SysML model to X language model based on meta-model

    CN117931206A