# `Choreo.Lab.DSL.UML`
[🔗](https://github.com/code-shoily/choreo/blob/v0.14.1/lib/choreo/lab/dsl/uml.ex#L1)

Experimental Livebook-friendly DSL for sketching UML class diagrams.

This Lab DSL compiles to the stable, pipe-first `Choreo.UML` builders and
returns an ordinary `%Choreo.UML{}`. Classes, structs, behaviors, protocols,
and interfaces can be declared with block-based fields and functions. Edges
expose UML relationship types as readable domain vocabulary.

## Examples

    iex> import Choreo.Lab.DSL.UML
    ...> diagram = uml do
    ...>   user = struct("User") do
    ...>     field :id, :integer
    ...>     private field(:email, :string)
    ...>     function :authenticate, 2, return: :boolean
    ...>   end
    ...>
    ...>   auth = behavior("AuthProvider") do
    ...>     function :verify, 1, return: :ok_error
    ...>   end
    ...>
    ...>   realizes user ~> auth, "implements"
    ...> end
    iex> diagram.graph.nodes[:user].type
    :struct
    iex> diagram.graph.nodes[:user].fields |> Enum.map(& &1[:name])
    ["id", "email"]
    iex> [meta] = Map.values(diagram.edge_meta)
    iex> {meta.type, meta.label}
    {:realizes, "implements"}

Relationship edges can use typed constructors, generic `edge`, or pipe
modifiers:

    inherits child ~> parent, "extends"
    realizes adapter ~> protocol, "implements"
    associates user ~> profile, "has one"
    depends controller ~> repo, "calls"
    edge controller ~> repo, depends: "calls"
    controller ~> repo |> depends("calls")

The generic `~>` form defaults to `:depends`, which matches a lightweight
dependency sketch.

# `class_decl`

```elixir
@type class_decl() :: %{id: Yog.node_id(), opts: keyword()}
```

# `relationship_decl`

```elixir
@type relationship_decl() :: %{
  from: Yog.node_id(),
  to: Yog.node_id(),
  opts: keyword()
}
```

# `associates`

# `association`

# `attr`

# `attribute`

# `behavior`

# `class`

# `dependency`

# `depends`

# `edge`

# `extends`

# `field`

# `function`

# `has`

# `implements`

# `inherits`

# `interface`

# `method`

# `on`

# `operation`

# `private`

# `protected`

# `protocol`

# `public`

# `realizes`

# `struct`

# `taxonomy`

```elixir
@spec taxonomy() :: %{
  nodes: [atom()],
  members: [atom()],
  edges: [atom()],
  modifiers: [atom()],
  options: [atom()]
}
```

Returns the vocabulary supported by the UML DSL.

This is meant as a lightweight Livebook discovery helper when autocomplete is
not enough.

    iex> taxonomy = Choreo.Lab.DSL.UML.taxonomy()
    iex> :struct in taxonomy.nodes
    true
    iex> :function in taxonomy.members
    true
    iex> :implements in taxonomy.edges
    true

# `type`

# `uml`
*macro* 

Builds a `%Choreo.UML{}` from a compact Lab DSL block.

# `uml`
*macro* 

# `uses`

# `verbs`

```elixir
@spec verbs() :: %{
  nodes: [atom()],
  members: [atom()],
  edges: [atom()],
  modifiers: [atom()],
  options: [atom()]
}
```

Compatibility alias for `taxonomy/0`.

---

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