IsabelleClient (isabelle_elixir v0.2.0)

View Source

Stateful, single-process Isabelle client.

This is the ergonomic client for scripts and LiveBooks. It keeps the socket and current session_id in a struct, but it is not meant to be shared by multiple concurrent processes. Use IsabelleClientFull for that.

Summary

Functions

Builds an Isabelle session image and waits for the task result.

Closes the client's socket.

Runs a synchronous Isabelle command.

Connects to an Isabelle server and returns a stateful client struct.

Round-trips a JSON value through Isabelle's echo command.

Returns the server command names supported by Isabelle.

Purges theories from the active session.

Asks the Isabelle server process to shut down.

Starts an Isabelle session, stores its session_id, and returns the updated client.

Stops the active Isabelle session and clears session_id.

Checks theories in the active session and waits for the task result.

Types

t()

@type t() :: %IsabelleClient{session_id: String.t() | nil, socket: port()}

Functions

build_session(isabelle_client, args, timeout \\ :infinity)

Builds an Isabelle session image and waits for the task result.

close(isabelle_client)

Closes the client's socket.

command(isabelle_client, name, arg \\ nil)

Runs a synchronous Isabelle command.

connect(password, opts \\ [])

Connects to an Isabelle server and returns a stateful client struct.

echo(client, value)

Round-trips a JSON value through Isabelle's echo command.

help(client)

Returns the server command names supported by Isabelle.

purge_theories(isabelle_client)

Purges theories from the active session.

purge_theories(isabelle_client, args)

shutdown_server(client)

Asks the Isabelle server process to shut down.

start_session(client, args, timeout \\ :infinity)

Starts an Isabelle session, stores its session_id, and returns the updated client.

stop_session(isabelle_client)

Stops the active Isabelle session and clears session_id.

stop_session(client, timeout \\ :infinity)

use_theories(client, args \\ nil, timeout \\ :infinity)

Checks theories in the active session and waits for the task result.