package lambdapi

All checked builds pass
  1. Overview
  2. Docs
Proof assistant for the λΠ-calculus modulo rewriting

Install

dune-project
 Dependency

Authors

Maintainers

Sources

lambdapi-4.0.0.tbz
sha256=0e2e73e0ea0c674f1263bf85ed3453ed3d6084d38eea29974a03ba9e382d29d7
sha512=2831db57fcd09206687a92fc9ee7d363e87bcec5167949e9c8161d41c63d5887b9f3556bfd63a7a9a0c12e5a5dc61a397baf4f496ebdb2a2fce122142c05e7a1

doc/lambdapi.pure/Pure/index.html

Module PureSource

Interface to LSP.

Sourcemodule Command : sig ... end

Abstract representation of a command (top-level item).

Sourcemodule Tactic : sig ... end

Abstract representation of a tactic (proof item).

Sourcemodule ProofTree : sig ... end

Abstract representation of a proof.

Sourcetype state

Representation of the state when at the toplevel.

Sourcetype proof_state

Representation of the state when in a proof.

Sourceval parse_text : fname:string -> string -> Command.t list * (Common.Pos.pos * string) option

parse_text ~fname contents runs the parser on the string contents as if it were a file named fname. It returns the list of commands it could parse and, either None if it could parse all commands, or some position and error message otherwise.

Sourceval current_goals : proof_state -> Handle.Goal.info list

current_goals s returns the list of open goals for proof state s.

Sourcetype command_result =
  1. | Cmd_OK of state * string option
    (*

    Command is done.

    *)
  2. | Cmd_Proof of proof_state * ProofTree.t * Common.Pos.popt * Common.Pos.popt
    (*

    Enter proof mode (positions are for statement and qed).

    *)
  3. | Cmd_Error of Common.Pos.popt option * string
    (*

    Error report.

    *)

Result type of the handle_command function.

Sourcetype tactic_result =
  1. | Tac_OK of proof_state * string option
  2. | Tac_Error of Common.Pos.popt option * string

Result type of the handle_tactic function.

Sourceval initial_state : string -> state

initial_state fname gives an initial state for working with the (source) file fname. The resulting state can be used by handle_command.

Sourceval handle_command : state -> Command.t -> command_result

handle_command st cmd evaluates the command cmd in state st, giving one of three possible results: the command is fully handled (corresponding to the Cmd_OK constructor, the command starts a proof (corresponding to the Cmd_Proof constructor), or the command fails (corresponding to the Cmd_Error constuctor).

Sourceval handle_tactic : proof_state -> Tactic.t -> int -> tactic_result

handle_tactic ps tac n evaluates the tactic tac with n subproofs in proof state ps, returning a new proof state (with Tac_OK) or an error (with Tac_Error).

end_proof st finalises the proof which state is st, returning a result at the command level for the whole theorem. This function should be called when all the tactics have been handled with handle_tactic. Note that the value returned by this function cannot be Cmd_Proof.

get_symbols st returns all the symbols defined in the signature at state st. This can be used for displaying the type of symbols.

Sourceval find_sym : state -> Core.Term.qident -> Core.Term.sym option

find_sym st qid returns the symbol denoted by qid in state st. Handles short names in scope, aliased module paths, and fully-qualified identifiers. Returns None if no such symbol is accessible.

Sourceval restore_time : state -> unit

restore_time st activates the timed state (loaded signatures, library mappings, ...) captured when st was computed. LSP handlers must call this before touching timed globals, otherwise they see whichever document was opened most recently.

Sourceval set_initial_time : unit -> unit

set_initial_time () records the current imperative state as the rollback "time" for the initial_state function. This is only useful to initialise or reinitialise the pure interface.