Egglog. Snapshot
(EgglogElixir v0.1.0)
Copy Markdown
Helpers for egglog JSON snapshots.
The wrapper asks native egglog to serialize snapshots. This module only decodes that JSON and computes small summaries that are convenient in tests, notebooks, and debugging sessions.
Summary
Functions
Returns the serialized e-class metadata map from a decoded or raw JSON snapshot.
Decodes an egglog JSON snapshot.
Bang variant of decode/1.
Returns the serialized node map from a decoded or raw JSON snapshot.
Counts serialized e-nodes by operator name.
Returns a compact summary of an egglog JSON snapshot.
Types
@type decoded() :: map()
Functions
Returns the serialized e-class metadata map from a decoded or raw JSON snapshot.
Decodes an egglog JSON snapshot.
Accepts a raw JSON string, a snapshot map returned by Egglog.snapshot/3, or
a run result containing a native :snapshot.
Bang variant of decode/1.
Returns the serialized node map from a decoded or raw JSON snapshot.
@spec operator_counts(String.t() | map()) :: %{ required(String.t()) => non_neg_integer() }
Counts serialized e-nodes by operator name.
Returns a compact summary of an egglog JSON snapshot.
The summary is deliberately plain data so it can be displayed directly in IEx, tests, or Livebook.