# `Choreo.Sequence.Analysis`
[🔗](https://github.com/code-shoily/choreo/blob/v0.14.1/lib/choreo/sequence/analysis.ex#L1)

Analysis helpers for `Choreo.Sequence` diagrams.

# `isolated_participants`

```elixir
@spec isolated_participants(Choreo.Sequence.t()) :: [atom()]
```

Returns participants that never send or receive a message.

# `missing_labels`

```elixir
@spec missing_labels(Choreo.Sequence.t()) :: [{:error, String.t()}]
```

Returns messages that are missing labels.

# `unbalanced_activations`

```elixir
@spec unbalanced_activations(Choreo.Sequence.t()) :: [{:warning, String.t()}]
```

Detects unbalanced activation boxes.

Returns `{participant, imbalance}` where imbalance is positive if there
are more activates than deactivates and negative if there are more
deactivates than activates.

# `unclosed_fragments`

```elixir
@spec unclosed_fragments(Choreo.Sequence.t()) :: [{:error, String.t()}]
```

Detects fragments that were opened but never closed.

# `unknown_participants`

```elixir
@spec unknown_participants(Choreo.Sequence.t()) :: [{:error, String.t()}]
```

Returns events that reference unknown participants.

# `validate`

```elixir
@spec validate(Choreo.Sequence.t()) :: [{:error | :warning, String.t()}]
```

Validates the sequence diagram and returns a list of issues.

Each issue is a tuple of `{severity, message}` where severity is
`:error` or `:warning`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
