Skip to content

feat(omni-graph): implement MathWorks MATLAB (.m) AST extraction engine (R-107) - #17

Merged
vadde merged 1 commit into
mainfrom
feat/r107-matlab-ast-ingestion
Nov 6, 2026
Merged

vadde merged 1 commit into
mainfrom
feat/r107-matlab-ast-ingestion

Conversation

@vadde

@vadde vadde commented Nov 6, 2026

Copy link
Copy Markdown
Owner

Summary

Implements Phase 2 of the MathWorks MBSE & Systems Ingestion roadmap: MathWorks MATLAB (.m) AST Extraction Engine (R-107).

Architectural Highlights

  • Vendored ABI 14 Grammar: Resolved Tree-sitter ABI 15 incompatibilities and crate version conflicts by vendoring the official ABI 14 tree-sitter-matlab parser sub-crate.
  • Full Syntax Extraction:
    • Functions: Single and multi-return ([y1, y2] = func(u1, u2)) with CALLS edge tracing.
    • Classes: Object-oriented classdef definitions with multiple inheritance (EXTENDS edges).
    • Properties: Properties block extraction linked with CONTAINS edges to parent classes.
    • Methods & Constructors: Differentiated constructors (CONTAINS) and instance methods (DECLARES).
    • AST Receiver Preservation: Invocations like FilterEngine.calculate(x) preserve root receivers as REFERENCES edges.
    • Import Commands: Extracts specific (control.guidance.NavSystem) and wildcard (math.filters.*) statements as IMPORTS edges.
    • Package Resolution: Automatically synthesizes package namespace nodes for +pkg1/+pkg2 directory layouts.
  • Verification:
    • 5 new unit tests added covering all constructs (test_r107_matlab_*).
    • Full suite passes: 118/118 unit tests green.
    • 0 Clippy warnings on --all-targets.
    • Maintained Quad-Parity across specs/catalog/omni-graph-live-watcher-fidelity-parity.md, STATUS.md, DEVLOG.md, and CONTEXT.md.

…ne (R-107)

- Vendor official ABI 14 tree-sitter-matlab parser sub-crate with native C bindings
- Extract single and multi-return MATLAB functions and method declarations
- Extract classdef definitions with multiple inheritance EXTENDS edges
- Extract class properties with CONTAINS edges from enclosing classes
- Extract constructors and methods with DECLARES/CONTAINS edges
- Preserve AST receiver targets on invocations as REFERENCES edges
- Extract import statements with specific and wildcard symbol resolution
- Synthesize package namespace nodes for +pkg directory structures
- Add AC-054 through AC-060 to live-watcher fidelity parity spec
- Maintain Quad-Parity across STATUS.md, DEVLOG.md, and CONTEXT.md
- Add 5 comprehensive unit tests (all 118 unit tests pass, 0 clippy warnings)
@vadde
vadde merged commit 8dbf56d into main Nov 6, 2026
6 checks passed
@vadde
vadde deleted the feat/r107-matlab-ast-ingestion branch November 6, 2026 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant