AtpClient.SystemOnTptp.Provers (AtpClient v0.1.4)

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, so application boot is never blocked on an HTTP call. Callers can force a synchronous refresh via refresh_systems_list/0 before using get_systems_list/0.

Summary

Functions

Returns a specification to start this module under a supervisor.

Returns a cached list of the 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 a cached list of the available provers (e.g. "cvc5---1.3.0").

Returns [] until the first successful refresh completes.

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.