Behaviour implemented by external model-finding backends.
A backend answers the question "is this %ShotDs.Data.Problem{}
satisfiable, and if so, produce a witness." The default implementation
(ShotTx.Prover.ModelAgent.Backend.Nitpick, layer 3) sends the problem to
a warm Isabelle server and runs nitpick[satisfy]. Backend.Stub returns
:unknown unconditionally and is the safe default for tests / CI.
The API is deliberately async: probe/2 returns immediately with a
reference; the caller later drains the verdict via await/2. This lets
ShotTx.Prover.ModelAgent fan out multiple probes without blocking its
GenServer mailbox.
Summary
Types
Opaque handle identifying an in-flight probe.
Terminal verdicts a backend can return.
A model witness — backend-specific payload attached to a :sat verdict.
Callbacks
Waits up to timeout_ms for the probe to finish. Returns a verdict or
{:error, :timeout} when the budget elapses without a reply.
Dispatches a probe. Returns an opaque reference the agent will later hand
to await/2, or {:error, reason} if the backend refused to accept the
probe (e.g. queue full, service unavailable).
Types
Callbacks
@callback await(ref(), timeout_ms :: pos_integer()) :: verdict()
Waits up to timeout_ms for the probe to finish. Returns a verdict or
{:error, :timeout} when the budget elapses without a reply.
@callback probe( ShotDs.Data.Problem.t(), keyword() ) :: {:ok, ref()} | {:error, term()}
Dispatches a probe. Returns an opaque reference the agent will later hand
to await/2, or {:error, reason} if the backend refused to accept the
probe (e.g. queue full, service unavailable).