boundlab#

BoundLab’s core expression algebra.

An abstract value stands for a set of concrete tensors. BoundLab represents one as a sum of typed components

\[x \;=\; \underbrace{c}_{\text{Bias}} \;+\; \underbrace{\pm w}_{\text{Noise}} \;+\; \underbrace{G\,\varepsilon}_{\text{Zono}} \;+\; \cdots , \qquad \varepsilon_k \in [-1, 1],\]

where each addend is one Expr subclass capturing one kind of uncertainty. Mixed-class sums live in an ExprGroup (at most one component per class), Zeros is the empty sum, and Intersects conjoins several enclosures of the same value so the tightest bound of each wins.

Every component class implements a handful of primitives (einsum, shape ops, same-class add, ub/lb); everything else — operators, matmul, reductions, conversion — is derived from those in Expr. Soundness is compositional: if every component’s ub/lb encloses its set of values, so does every derived operation.

Classes

Bias

A deterministic additive component: lb == ub == arr.

Error

A named independent error expression with values in [-1, 1].

Expr

Abstract base of every BoundLab expression component.

ExprGroup

A typed sum of components: at most one Expr per class.

Intersects

Several sound enclosures of the same value, intersected.

Noise

An independent symmetric interval \(\pm w\) with provenance.

Zeros

The empty sum: exactly the all-zeros value.

Modules

ops

Numeric kernels shared by the abstract domains.