ShotTx.Config (ShotTx v0.0.1)

Copy Markdown View Source

Session-global defaults for ShotTx.Prover calls.

Values set here are used as the base parameters for every prove/* and sat/* call; per-call options still override them. Intended for Livebook sessions where you want to fix a few flags once (e.g. timeout, unfold_defs, suggestions_enabled) instead of threading them through every invocation.

ShotTx.Config.configure(timeout: 30_000, suggestions_enabled: true)
ShotTx.Prover.prove(problem)                     # uses the globals
ShotTx.Prover.prove(problem, [], timeout: 1_000) # per-call wins

Storage is Application.put_env(:shot_tx, :prover_defaults, ...), so the scope is the whole OTP node — two Livebooks sharing a runtime share config.

Summary

Functions

Merges opts into the current global defaults. Unknown keys (not fields of ShotTx.Data.Parameters) raise ArgumentError.

Returns the current global defaults as a keyword list.

Clears all global defaults.

Functions

configure(opts)

@spec configure(keyword()) :: keyword()

Merges opts into the current global defaults. Unknown keys (not fields of ShotTx.Data.Parameters) raise ArgumentError.

get()

@spec get() :: keyword()

Returns the current global defaults as a keyword list.

reset()

@spec reset() :: :ok

Clears all global defaults.