AtpClient.SystemOnTptp.Provers (AtpClient v0.2.2)

Copy Markdown View Source

Stateful Agent that caches the list of prover identifiers currently advertised by a SystemOnTPTP deployment.

The initial refresh is triggered in the background once the agent starts. get_systems_list/0 blocks on the first call until the initial refresh completes or refresh_timeout_ms elapses. Subsequent calls return the cached list immediately. Callers can force a re-fetch via refresh_systems_list/0.

Summary

Functions

Returns a specification to start this module under a supervisor.

Returns the list of available provers (e.g. "cvc5---1.3.0").

Refreshes the cached system list via a synchronous query to SystemOnTPTP.

Links the module as an Agent process with the caller process and schedules a background refresh of the system list.

Functions

child_spec(arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

get_systems_list()

@spec get_systems_list() :: [String.t()]

Returns the list of available provers (e.g. "cvc5---1.3.0").

Blocks on the first call until the background refresh triggered at startup completes or refresh_timeout_ms elapses; subsequent calls return the cached list immediately.

refresh_systems_list(opts \\ [])

@spec refresh_systems_list(keyword()) :: :ok | {:error, any()}

Refreshes the cached system list via a synchronous query to SystemOnTPTP.

Accepts the same options as the rest of the SoTPTP API:

  • :url — SystemOnTPTP endpoint (defaults to the configured URL);
  • :refresh_timeout_ms — request timeout in ms.

start_link(args)

@spec start_link(any()) :: {:ok, pid()} | {:error, any()}

Links the module as an Agent process with the caller process and schedules a background refresh of the system list.