# florianschanda/miss_hit architecture

> Architecture diagram of the GitHub repository florianschanda/miss_hit, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/florianschanda/miss_hit
- Repository: https://github.com/florianschanda/miss_hit

## Overview

MISS_HIT is a MATLAB/Octave code-quality tool suite. Users invoke a command on files, directories, or Simulink models; shared command-line processing discovers work packages and applies configuration, then tools analyze or modify source and report results. The suite includes style/formatting, metrics, linting, traceability, Simulink diffing, copyright updates, and bounded-model-checking support. The shared language front end tokenizes and parses MATLAB, with a separate Simulink parser for embedded MATLAB. Several tool implementations were not sampled, so their internal connections are shown only where documented or explicitly indicated by the source index.

Main entry points: [`miss_hit_core/command_line.py`](https://github.com/florianschanda/miss_hit/blob/master/miss_hit_core/command_line.py) (CLI processing), [`miss_hit_core/m_parser.py`](https://github.com/florianschanda/miss_hit/blob/master/miss_hit_core/m_parser.py) (MATLAB parser), [`miss_hit_core/work_package.py`](https://github.com/florianschanda/miss_hit/blob/master/miss_hit_core/work_package.py) (Work packages), [`miss_hit_core/mh_style.py`](https://github.com/florianschanda/miss_hit/blob/master/miss_hit_core/mh_style.py) (Style and formatting)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Invocation and dispatch"]
  node_cli["CLI processing<br/>[command_line.py]"]
  node_work["Work packages<br/>[work_package.py]"]
end

subgraph group_front["Language front end"]
  node_lexer["MATLAB lexer<br/>[m_lexer.py]"]
  node_parser["MATLAB parser<br/>[m_parser.py]"]
  node_ast["MATLAB AST<br/>[m_ast.py]"]
  node_language["Language profiles<br/>[m_language.py]"]
  node_simparser["Simulink parser<br/>[s_parser.py]"]
  node_simast["Simulink AST<br/>[s_ast.py]"]
end

subgraph group_quality["Quality analysis"]
  node_style["Style and formatting<br/>[mh_style.py]"]
  node_metrics["Code metrics<br/>[mh_metric.py]"]
  node_lint["Bug finding<br/>[mh_lint.py]"]
  node_semantic["Semantic analysis<br/>[m_sem.py]"]
end

subgraph group_advanced["Advanced tools"]
  node_trace["Traceability<br/>[mh_trace.py]"]
  node_diff["Simulink diff<br/>[mh_diff.py]"]
  node_copyright["Copyright helper<br/>[mh_copyright.py]"]
  node_bmc["Bounded model checking<br/>[mh_bmc.py]"]
end

subgraph group_support["Configuration and reporting"]
  node_cfg["Project configuration<br/>[cfg_tree.py]"]
  node_config["Analysis settings<br/>[config.py]"]
  node_messages["Diagnostics<br/>[errors.py]"]
end

node_user(("Engineer"))

node_user -->|"invokes"| node_cli
node_cli -->|"creates packages"| node_work
node_work -->|"parses models"| node_simparser
node_simparser -->|"builds model AST"| node_simast
node_parser -->|"consumes tokens"| node_lexer
node_parser -.->|"builds syntax tree"| node_ast
node_lexer -->|"uses profile"| node_language
node_cli -->|"registers inputs"| node_cfg
node_work -->|"gets configuration"| node_cfg
node_cfg -->|"produces settings"| node_config
node_cli -.->|"runs tool"| node_style
node_cli -.->|"runs tool"| node_metrics
node_cli -.->|"runs tool"| node_lint
node_cli -.->|"runs tool"| node_trace
node_cli -.->|"runs tool"| node_diff
node_cli -.->|"runs tool"| node_copyright
node_cli -.->|"runs tool"| node_bmc
node_style -->|"uses parser"| node_parser
node_style -->|"reports findings"| node_messages
node_metrics -.->|"uses parser"| node_parser
node_lint -->|"uses parser"| node_parser
node_lint -->|"calls analysis"| node_semantic
node_trace -->|"uses parser"| node_parser
node_copyright -->|"uses parser"| node_parser
node_bmc -->|"uses parser"| node_parser
node_diff -.->|"uses model parser"| node_simparser

click node_cli "https://github.com/florianschanda/miss_hit/blob/master/miss_hit_core/command_line.py"
click node_work "https://github.com/florianschanda/miss_hit/blob/master/miss_hit_core/work_package.py"
click node_lexer "https://github.com/florianschanda/miss_hit/blob/master/miss_hit_core/m_lexer.py"
click node_parser "https://github.com/florianschanda/miss_hit/blob/master/miss_hit_core/m_parser.py"
click node_ast "https://github.com/florianschanda/miss_hit/blob/master/miss_hit_core/m_ast.py"
click node_language "https://github.com/florianschanda/miss_hit/blob/master/miss_hit_core/m_language.py"
click node_simparser "https://github.com/florianschanda/miss_hit/blob/master/miss_hit_core/s_parser.py"
click node_style "https://github.com/florianschanda/miss_hit/blob/master/miss_hit_core/mh_style.py"
click node_metrics "https://github.com/florianschanda/miss_hit/blob/master/miss_hit_core/mh_metric.py"
click node_lint "https://github.com/florianschanda/miss_hit/blob/master/miss_hit/mh_lint.py"
click node_semantic "https://github.com/florianschanda/miss_hit/blob/master/miss_hit/m_sem.py"
click node_trace "https://github.com/florianschanda/miss_hit/blob/master/miss_hit/mh_trace.py"
click node_diff "https://github.com/florianschanda/miss_hit/blob/master/miss_hit/mh_diff.py"
click node_copyright "https://github.com/florianschanda/miss_hit/blob/master/miss_hit/mh_copyright.py"
click node_bmc "https://github.com/florianschanda/miss_hit/blob/master/miss_hit/mh_bmc.py"
click node_cfg "https://github.com/florianschanda/miss_hit/blob/master/miss_hit_core/cfg_tree.py"
click node_config "https://github.com/florianschanda/miss_hit/blob/master/miss_hit_core/config.py"
click node_messages "https://github.com/florianschanda/miss_hit/blob/master/miss_hit_core/errors.py"
click node_simast "https://github.com/florianschanda/miss_hit/blob/master/miss_hit_core/s_ast.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli,node_work toneBlue
class node_lexer,node_parser,node_ast,node_language,node_simparser,node_simast toneAmber
class node_style,node_metrics,node_lint,node_semantic toneMint
class node_trace,node_diff,node_copyright,node_bmc toneRose
class node_cfg,node_config,node_messages,node_user toneIndigo
```

## Components

### Invocation and dispatch

- [CLI processing](https://github.com/florianschanda/miss_hit/blob/master/miss_hit_core/command_line.py): `miss_hit_core/command_line.py`
- [Work packages](https://github.com/florianschanda/miss_hit/blob/master/miss_hit_core/work_package.py): `miss_hit_core/work_package.py`

### Language front end

- [MATLAB lexer](https://github.com/florianschanda/miss_hit/blob/master/miss_hit_core/m_lexer.py): `miss_hit_core/m_lexer.py`
- [MATLAB parser](https://github.com/florianschanda/miss_hit/blob/master/miss_hit_core/m_parser.py): `miss_hit_core/m_parser.py`
- [MATLAB AST](https://github.com/florianschanda/miss_hit/blob/master/miss_hit_core/m_ast.py): `miss_hit_core/m_ast.py`
- [Language profiles](https://github.com/florianschanda/miss_hit/blob/master/miss_hit_core/m_language.py): `miss_hit_core/m_language.py`
- [Simulink parser](https://github.com/florianschanda/miss_hit/blob/master/miss_hit_core/s_parser.py): `miss_hit_core/s_parser.py`
- [Simulink AST](https://github.com/florianschanda/miss_hit/blob/master/miss_hit_core/s_ast.py): `miss_hit_core/s_ast.py`

### Quality analysis

- [Style and formatting](https://github.com/florianschanda/miss_hit/blob/master/miss_hit_core/mh_style.py): `miss_hit_core/mh_style.py`
- [Code metrics](https://github.com/florianschanda/miss_hit/blob/master/miss_hit_core/mh_metric.py): `miss_hit_core/mh_metric.py`
- [Bug finding](https://github.com/florianschanda/miss_hit/blob/master/miss_hit/mh_lint.py): `miss_hit/mh_lint.py`
- [Semantic analysis](https://github.com/florianschanda/miss_hit/blob/master/miss_hit/m_sem.py): `miss_hit/m_sem.py`

### Advanced tools

- [Traceability](https://github.com/florianschanda/miss_hit/blob/master/miss_hit/mh_trace.py): `miss_hit/mh_trace.py`
- [Simulink diff](https://github.com/florianschanda/miss_hit/blob/master/miss_hit/mh_diff.py): `miss_hit/mh_diff.py`
- [Copyright helper](https://github.com/florianschanda/miss_hit/blob/master/miss_hit/mh_copyright.py): `miss_hit/mh_copyright.py`
- [Bounded model checking](https://github.com/florianschanda/miss_hit/blob/master/miss_hit/mh_bmc.py): `miss_hit/mh_bmc.py`

### Configuration and reporting

- [Project configuration](https://github.com/florianschanda/miss_hit/blob/master/miss_hit_core/cfg_tree.py): `miss_hit_core/cfg_tree.py`
- [Analysis settings](https://github.com/florianschanda/miss_hit/blob/master/miss_hit_core/config.py): `miss_hit_core/config.py`
- [Diagnostics](https://github.com/florianschanda/miss_hit/blob/master/miss_hit_core/errors.py): `miss_hit_core/errors.py`

### Other components

- **Engineer**

## Connections

- Engineer → CLI processing: invokes (evidence: `README.md`)
- CLI processing → Work packages: creates packages (evidence: `miss_hit_core/command_line.py`)
- Work packages → Simulink parser: parses models (evidence: `miss_hit_core/work_package.py`)
- Simulink parser → Simulink AST: builds model AST (evidence: `miss_hit_core/s_parser.py`)
- MATLAB parser → MATLAB lexer: consumes tokens (evidence: `miss_hit_core/m_parser.py`)
- MATLAB parser → MATLAB AST: builds syntax tree (evidence: `miss_hit_core/m_parser.py`)
- MATLAB lexer → Language profiles: uses profile (evidence: `miss_hit_core/m_lexer.py`)
- CLI processing → Project configuration: registers inputs (evidence: `miss_hit_core/command_line.py`)
- Work packages → Project configuration: gets configuration (evidence: `miss_hit_core/work_package.py`)
- Project configuration → Analysis settings: produces settings (evidence: `miss_hit_core/cfg_tree.py`)
- CLI processing → Style and formatting: runs tool (evidence: `miss_hit_core/mh_style.py`)
- CLI processing → Code metrics: runs tool
- CLI processing → Bug finding: runs tool (evidence: `miss_hit/mh_lint.py`)
- CLI processing → Traceability: runs tool (evidence: `miss_hit/mh_trace.py`)
- CLI processing → Simulink diff: runs tool
- CLI processing → Copyright helper: runs tool (evidence: `miss_hit/mh_copyright.py`)
- CLI processing → Bounded model checking: runs tool (evidence: `miss_hit/mh_bmc.py`)
- Style and formatting → MATLAB parser: uses parser (evidence: `miss_hit_core/mh_style.py`)
- Style and formatting → Diagnostics: reports findings (evidence: `miss_hit_core/mh_style.py`)
- Code metrics → MATLAB parser: uses parser
- Bug finding → MATLAB parser: uses parser (evidence: `miss_hit/mh_lint.py`)
- Bug finding → Semantic analysis: calls analysis (evidence: `miss_hit/mh_lint.py`)
- Traceability → MATLAB parser: uses parser (evidence: `miss_hit/mh_trace.py`)
- Copyright helper → MATLAB parser: uses parser (evidence: `miss_hit/mh_copyright.py`)
- Bounded model checking → MATLAB parser: uses parser (evidence: `miss_hit/mh_bmc.py`)
- Simulink diff → Simulink parser: uses model parser
