Refining Architectures with AI Recontextualization

Estimated reading: 3 minutes

Systems engineering is an iterative process. Requirements change, new components are added, and architectures must evolve. The AI SysML v2 Editor goes beyond simple code generation by offering “Recontextualization”?the ability for the AI to understand your existing model and propose intelligent updates. This tutorial will teach you how to refine your SysML v2 software models using this advanced AI SysML tool capability.

Objective

By the end of this tutorial, you will have taken an existing “Spacecraft” model and used the AI Assistant to add a complex communication subsystem and power attributes, ensuring your stable SysML v2 tool project stays up to date with changing design needs.

Step 1: Prepare Your Base Model

  1. Open your web-based SysML v2 editor.
  2. Open the Basics.sysml file (or any file with an existing part def). For this tutorial, ensure you have the following code:
package 'Spacecraft Project' {
    part def Spacecraft {
        part engine : Engine;
    }
    part def Engine;
}
    

Step 2: Trigger the AI Assistant

The AI SysML tool is context-aware. When you open the assistant while a file is active, it can “read” your current SysML editor content to understand your architecture.

  1. Click the AI Assistant icon in the right-hand panel.
  2. Ensure you are on the Diagram tab.

Step 3: Prompt for a Model Expansion

Instead of asking for a new model, we will ask the AI to modify the one currently on your screen. This demonstrates the power of the AI SysML v2 software in a real-world iterative workflow.

  1. In the prompt box, type the following:

    “In my Spacecraft model, add a communication subsystem part named ‘CommSystem’. Also, add a ‘powerConsumption’ attribute of type Real to both the Engine and the CommSystem.”
  2. Click Generate.

Step 4: Review the Side-by-Side Comparison

Because you are refining an existing model, the AI SysML tool provides a specialized preview window.

  1. The assistant will display the new, updated code.
  2. Carefully review how the AI has integrated the CommSystem into the Spacecraft definition and updated the internal attributes.
  3. This stable SysML v2 tool approach prevents “model drift” by ensuring the AI’s suggestions are consistently applied to your current namespace.

Step 5: Apply the Recontextualized Code

  1. Click Apply to update your main editor with the AI’s suggestions.
  2. Observe your code: You will see the new parts and attributes highlighted by the precise syntax highlighting of the SysML v2 editor.
  3. The LSP worker will immediately validate the new structure, ensuring the powerConsumption attributes are correctly typed.

Step 6: Visualizing the Refined Architecture

As always, the web-based SysML software keeps your diagrams in perfect sync.

  1. Check the Diagram Viewer. You will see the Spacecraft block now contains two sub-parts (engine and commSystem).
  2. If you have “Show Memberships in Compartment” enabled in the diagram settings, you will also see the powerConsumption attributes listed inside the blocks.

Why Recontextualization is Essential

Using the AI SysML tool for refinement provides three major benefits:

  • Consistency: The AI maintains the naming conventions and structure of your existing SysML v2 software.
  • Speed: Quickly adding standard attributes or boilerplate subsystems takes seconds instead of minutes.
  • Safety: By reviewing changes in the preview before applying, you maintain the integrity of your stable SysML v2 tool project.

Summary and Next Steps

You have mastered the art of AI-driven model refinement! You’ve learned how to use the AI SysML v2 editor to evolve your designs incrementally. This is the mark of a truly professional SysML tool user.

In the next tutorial, “Modular Modeling with Imports and Libraries,” we will learn how to handle large projects by splitting them into multiple files and using standard SysML v2 libraries.


Share this Doc

Refining Architectures with AI Recontextualization

Or copy link

CONTENTS
Scroll to Top