Skip to content

Theory Engine Refusals

The exceptions the theory engine raises when panproto refuses a request. Each carries the refusal as a typed value, such as the conflict of a refused composition.

errors

Refusals of panproto's theory engine, carrying typed detail.

panproto raises its own exception classes with a variant name and a serialized payload. quivers.gat.engine catches them at its boundary and raises these instead, so a caller sees the refusal as a typed record from quivers.gat.records and never has to read a payload dictionary.

GatRefusal

GatRefusal(message: str)

Bases: Exception

The theory engine refused a request.

PARAMETER DESCRIPTION
message

The engine's rendered message.

TYPE: str

Source code in src/quivers/gat/errors.py
def __init__(self, message: str) -> None:
    super().__init__(message)
    self.message = message

CompositionRefused

CompositionRefused(conflict: CompositionConflict, message: str)

Bases: GatRefusal

A diagram has no colimit the engine can build, or a cocone does not factor.

PARAMETER DESCRIPTION
conflict

The obstruction, with both sources of a clash or conflict.

TYPE: CompositionConflict

message

The engine's rendered message.

TYPE: str

Source code in src/quivers/gat/errors.py
def __init__(self, conflict: CompositionConflict, message: str) -> None:
    super().__init__(message)
    self.conflict = conflict

ViewRefused

ViewRefused(reason: str, message: str)

Bases: GatRefusal

A proposed view is not a theory morphism.

Raised when the signature part of a view fails: a sort or operation is unmapped, an image has the wrong sort, a derived term does not typecheck, or a directed equation is not preserved. Equations are obligations and are reported per equation instead.

PARAMETER DESCRIPTION
reason

The engine's variant name for the failure, such as "missing_sort_mapping" or "op_type_mismatch".

TYPE: str

message

The engine's rendered message.

TYPE: str

Source code in src/quivers/gat/errors.py
def __init__(self, reason: str, message: str) -> None:
    super().__init__(message)
    self.reason = reason

ModelRefused

ModelRefused(reason: str, message: str)

Bases: GatRefusal

A model operation was refused.

PARAMETER DESCRIPTION
reason

The engine's variant name: "derived_term_needs_domain", "model_budget_exhausted", or "model_construction_unsupported".

TYPE: str

message

The engine's rendered message.

TYPE: str

Source code in src/quivers/gat/errors.py
def __init__(self, reason: str, message: str) -> None:
    super().__init__(message)
    self.reason = reason