This paper presents a human-in-the-loop framework for automatically identifying and repairing semantic errors in SysML v2 models that compilers cannot detect. The approach combines fine-tuned Small Language Models with a domain knowledge graph to ground repair suggestions in valid engineering constraints.

  • The framework uses Qwen2.5-Coder-1.5B and DeepSeek-Coder-6.7B to output unified diff patches for fault localization and candidate repairs.
  • A domain knowledge graph encodes physical compatibility rules, guiding synthetic training data generation and inference.
  • Evaluation of 1,184 test samples shows semantic fault repair improved from less than 3% to over 91%.
  • Patch-based output reduces token length by over 60% compared to previous methods.

The framework provides a practical path toward AI-assisted model verification that complements existing MBSE tools while preserving human judgment in the design process.