AtpClient.SystemOnTptp (AtpClient v0.1.7)

Copy Markdown View Source

Public tptp.org HTTP form API; see query_system/3 and query_all_systems/2.

Configuration

config :atp_client, :sotptp,
  url: "tptp.example.org/SystemOnTPTPFormReply",
  auto_refresh: true,
  refresh_timeout_ms: 100_000,
  default_time_limit_sec: 10

Example

thf_problem = """
thf(conj,conjecture,
  ![X: $o]: (X | ~X)
).
"""

{:ok, result} = AtpClient.SystemOnTptp.query_system(thf_problem, "Vampire-FMo---5.0")
# => {:ok, :thm}

Summary

Functions

Returns a list with all available system identifiers from SystemOnTPTP that correspond to known provers. This excludes type checking systems etc. which also get returned by the API.

Queries all available provers on SystemOnTPTP and returns results from systems that did not error out. Returns a list of tuples {system_id, result}.

Makes a single request to SystemOnTPTP to run all given systems with default arguments. Accepted options are the same as for query_system/3.

Queries a specific system via SystemOnTPTP. Available systems can be looked up with list_provers/0. The problem is expected to be in valid TPTP format and compatible with the selected prover.

Functions

list_provers()

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

Returns a list with all available system identifiers from SystemOnTPTP that correspond to known provers. This excludes type checking systems etc. which also get returned by the API.

query_all_systems(problem, opts \\ [])

@spec query_all_systems(String.t(), Keyword.t()) ::
  {:ok, [{String.t(), AtpClient.ResultNormalization.atp_result()}]}
  | {:ok, [{String.t(), String.t()}]}
  | {:error, term()}

Queries all available provers on SystemOnTPTP and returns results from systems that did not error out. Returns a list of tuples {system_id, result}.

All options accepted by query_selected_systems/3 are forwarded.

query_selected_systems(problem, system_ids, opts \\ [])

@spec query_selected_systems(String.t(), [String.t()], Keyword.t()) ::
  {:ok, [{String.t(), AtpClient.ResultNormalization.atp_result()}]}
  | {:ok, [{String.t(), String.t()}]}
  | {:error, term()}

Makes a single request to SystemOnTPTP to run all given systems with default arguments. Accepted options are the same as for query_system/3.

query_system(problem, system_id, opts \\ [])

@spec query_system(String.t(), String.t(), Keyword.t()) ::
  {:ok, String.t()}
  | AtpClient.ResultNormalization.atp_result()
  | {:error, term()}

Queries a specific system via SystemOnTPTP. Available systems can be looked up with list_provers/0. The problem is expected to be in valid TPTP format and compatible with the selected prover.

Options

  • :time_limit_sec — time limit in seconds (default 5);
  • :raw — return the raw prover output instead of interpreting it (default false);
  • :url — override the SystemOnTPTP endpoint URL.