boundlab.interp.base#

Base ONNX operators shared by every BoundLab abstract domain.

Module Attributes

interpret

The domain-independent base interpreter.

Classes

Add

Addition via Expr.__add__ — exact for every component class.

BroadcastTo

ONNX Expand to a constant shape.

Cast

ONNX Cast; abstract expressions only allow the no-op cast.

DivSimple

Division with a concrete divisor (x * (1/y)) or dividend (reciprocal(y) * x); the fully abstract case belongs to the domain.

Gemm

ONNX Gemm: alpha * op(x) @ op(weight) + beta * bias, lowered to the transpose / matmul / mul / add handlers.

Identity

ONNX Identity — pass through.

MatmulSimple

Matrix product with one concrete operand — exact, a linear map on the abstract one.

MulSimple

Product with at most one abstract operand — exact via einsum.

Neg

Negation — exact.

Reshape

ONNX Reshape with a constant target shape.

ReduceMean

ONNX ReduceMean axis by axis via Expr.mean — exact (linear).

ReduceSum

ONNX ReduceSum axis by axis via Expr.sum — exact (linear).

Squeeze

ONNX Squeeze: drop size-1 axes.

Sub

Subtraction x + (-1) * y — exact; shared symbols cancel.

Transpose

ONNX Transpose; expressions use Expr.transpose, tensors permute.

Unsqueeze

ONNX Unsqueeze: insert size-1 axes.