Bloccs.Coverage (bloccs v0.1.0)

Copy Markdown View Source

Structural coverage over a parsed network.

Inspired by Kahani & Bagherzadeh 2026 ("Testing Agentic Workflows with Structural Coverage Criteria", arXiv 2605.26521). Enumerates the coverage obligations of a network — every in-port, out-port, and edge — and checks them against a reached set produced by Bloccs.Trace (recorded live from a run, or loaded from a .bloccs-trace file). With no reached set it reports a pure structural enumeration (everything unreached).

Summary

Functions

Enumerate every coverage obligation in a network.

Render a human-readable summary for the CLI.

Build a report comparing a network's obligations against a reached set (from Bloccs.Trace). Defaults to an empty reached set (structural-only).

Types

obligation()

@type obligation() ::
  {:port_in, atom(), atom()}
  | {:port_out, atom(), atom()}
  | {:edge, {atom(), atom()}, {atom(), atom()}}

report()

@type report() :: %{
  obligations: [obligation()],
  reached: [obligation()],
  unreached: [obligation()]
}

Functions

obligations(network)

@spec obligations(Bloccs.Manifest.Network.t()) :: [obligation()]

Enumerate every coverage obligation in a network.

render(network, map)

@spec render(Bloccs.Manifest.Network.t(), report()) :: String.t()

Render a human-readable summary for the CLI.

report(network, reached \\ [])

@spec report(Bloccs.Manifest.Network.t(), [obligation()]) :: report()

Build a report comparing a network's obligations against a reached set (from Bloccs.Trace). Defaults to an empty reached set (structural-only).