Skip to content

Complexity

opulse.analysis.complexity

Fit measured base-operation counts without changing operator semantics.

The fit describes observed, defined evaluations; it is not a worst-case bound. Branch witnesses supplement a sign-balanced logarithmic grid so narrow branches are represented even when the regular grid misses them.

measurement_grid

measurement_grid(
    operator: Operator,
) -> list[tuple[int, ...]]

A fixed grid through zero, both signs, and six orders of magnitude.

analyze_operator

analyze_operator(
    operator: Operator,
    runtime,
    oracle: Oracle,
    encoder: Z3Encoder | None = None,
) -> dict

Measure one defined operator and return its cost fit and branch coverage.

analyze_registry

analyze_registry(
    registry: OperatorRegistry,
    runtime,
    *,
    symbols: Symbols | None = None,
) -> Iterator[dict]

Analyze every defined operator using the runtime's configured semantics.