Language record
Elixir
Elixir modules are indexed with the protocol and behaviour machinery intact: defimpl and @derive become implements edges, @behaviour marks the module it sits on, and a macro or a guard is recorded as a macro rather than as a function.
The registry row this page is generated from
Read at render time from the same family row the register reads, so nothing in this block can disagree with it.
- Extensions
- .ex, .exs
- Registry names
elixir- Recorded symbols
- modules · functions · typespecs
Relationship types this analyzer constructs
10 of 14 constructed, read from this analyzer's source and re-derived by the languages gate. Each row below is one of the engine's types, in the engine's own order.
| Relationship type | Constructed |
|---|---|
calls | constructed by this analyzer |
extends | ruled absent |
implements | constructed by this analyzer |
uses | constructed by this analyzer |
imports | constructed by this analyzer |
exports | constructed by this analyzer |
contains | constructed by this analyzer |
references | constructed by this analyzer |
overrides | constructed by this analyzer |
instantiates | constructed by this analyzer |
decorates | ruled absent |
renders | ruled absent |
mixes_in | constructed by this analyzer |
part_of | ruled absent |
10 constructed, 4 not constructed. All 4 absent types are recorded as ruled absent: the written reason and the corpus measurement behind each are in this family's completeness record. The register explains what each label means.
What this analyzer does not resolve
- Kernel builtins are excluded from the call graph on purpose, and the list holds 73 names: they exist in every module and would bury every real edge underneath them. The same rule drops the qualified spelling, so Kernel.length is as silent as length.
- Macros are not expanded, so an unqualified call through a bare import Foo — or through an import carrying an :except list — cannot be confirmed to come from where a reader would guess. Those calls stay unresolved instead of being attributed.
- Everything inside a quote do block is macro-generated data, so a name appearing only there publishes no symbol and no call edge. The exception is an unquote argument, which executes at expansion time and is walked.
Every line above was written against Elixir’s own analyzer module and is named against a construct in it, so it can be checked against the source. Nothing here is inherited from a template, or from another language’s page.
Where you meet it in a repository
Recognised by extension — .ex, .exs. Everything below is about where those files actually sit in a working repository.
- A mix umbrella is a tree of applications, so a protocol and its implementations routinely live in different ones.
- A behaviour is a contract the module then satisfies, and its callbacks are ordinary defs carrying a marker.
- Arity is part of a function's identity, so a search for one name has to account for the clause that introduced it.
Questions this index answers
Phrased as retrievals, because that is what an index can honestly do: it holds the symbols and the edges between them, and hands them back with the evidence attached.
- Which modules implement this protocol?
- Which callbacks does this behaviour declare?
- Is this module a GenServer, and which of its functions are the callbacks?
- Which fields does this struct carry?
What the analyzer sees in code like this
defmodule MyApp.OrderBook do # bb records: module MyApp.OrderBook
@behaviour GenServer # bb records: implements GenServer
defstruct bids: [], total: 0 # bb records: struct with fields bids, total
def place(o, n) when n > 0 do # bb records: function place/2, with its guard
Acct.charge(o, n) # bb records: a call resolved through the alias
end
endSymbols are stored with the file they came from and the bytes they span, so a hit points at a line rather than at a guess. The annotations in the sample are commentary for the reader, not strings the index would store.
Languages that turn up in the same repository
Functional & declarative — the count beside each name is how many relationship types that family’s analyzer constructs.
The extensions, registry names, recorded symbols and relationship types above are the parser registry row for Elixir, read while the page rendered — the same row the register reads, so the two surfaces cannot tell two stories. Every relationship type listed as constructed appears in src/ast/real-*, the analyzer modules bb ships. bb 0.1.0 answers from a local store over 50 languages (53 registry ids, three of them aliases). There is no benchmark on this page: every claim here is one you can go and read in the source.