gulps.analysis.coverage.CoverageReport

class gulps.analysis.coverage.CoverageReport(rows, decomposer)[source]

Bases: object

Haar coverage and cost of a fixed ISA, integrated in floating point.

Parameters:
  • rows (tuple[SentenceCoverage, ...]) – Every sentence the search emitted through the last entry, in search order, including those whose region earlier sentences already cover.

  • decomposer (GulpsDecomposer) – The instruction set the search ran on.

property entries: tuple[SentenceCoverage, ...]

The cost-ordered rows that reach classes no earlier row reaches.

property expected_cost: float

The Haar-weighted cost summed over the reported regions.

property total_coverage: float

The covered Haar fraction, within numerical tolerance of 1.

plot()

Draw each entry’s reachable region in its own Weyl-chamber subplot.

Return type:

matplotlib.figure.Figure | None

plot_tree(names=None)

Draw the search rows and the candidates pruned among them as a tree.

Parameters:

names (Sequence[str] | None) – A display name for each gate of the decomposer, in order. Defaults to the gates’ names.

Return type:

matplotlib.figure.Figure

property cost_cdf: list[tuple[float, float]]

(cost, cumulative Haar fraction) at each cost, ascending.

percentile(q)

The cost at which the cumulative Haar fraction first reaches q.

percentile(0.5) estimates the median cost. percentile(1.0) returns the endpoint of the reported distribution, not a guaranteed worst-case cost: small uncovered regions can remain when integration stops. Returns infinity if q exceeds the reported coverage by more than its numerical tolerance.

Parameters:

q (float) – A cumulative probability from 0 through 1.

Return type:

float

plot_reach(ax=None)

Plot cumulative Haar coverage against cost on ax, or on new axes.

Parameters:

ax (matplotlib.axes.Axes | None)

Return type:

matplotlib.axes.Axes