(************************************************************************) (* * The Rocq Prover / The Rocq Development Team *) (* v * Copyright INRIA, CNRS and contributors *) (* <O___,, * (see version control and CREDITS file for authors & dates) *) (* \VV/ **************************************************************) (* // * This file is distributed under the terms of the *) (* * GNU Lesser General Public License Version 2.1 *) (* * (see LICENSE file for the text of the license) *) (************************************************************************)
(** Ltac debugger interface; clients should register hooks to interact
with their provided interface. *)
(** The debugger receives requests by calling read_cmd to get Actions. EachActionmayreturnoneormoreresponsesasAnswersbycallingsubmit_answer. ManyofthemreturnasingleAnswerornoAnswer,butasinglestepmaygenerateany numberofOutputs.
StoppinginthedebuggergeneratesAnswer.PromptandAnswer.Goalmessages, atwhichpointtheIDEwilltypicallycallGetStackandGetVars.Whenthe IDEsendswithStepIn..Continue,thedebuggerwillexecutemorecode.At thatpoint,Rocqwon'ttrytoreadmoremessagesfromtheIDEuntilthe debuggerstopsagainorexits.
*)
module Action : sig type t =
| StepIn (* execute a single step in the tactic *)
| StepOver (* execute steps until DB is back in the current stack frame *)
| StepOut (* execute steps until DB exits current stack frame *)
| Continue (* execute steps until a breakpoint or the debugger exits *)
| Skip (* legacy: continue execution with no further debugging *)
| Interrupt (* exit the debugger *)
| Help (* legacy: print help text *)
| UpdBpts of ((string * int) * bool) list (* sets or clears breakpoints. Values are: -absolutepathnameofthethefile -byteoffsetintheUTF-8representationofthefile
- true to set, false to clear *)
| Configd (* "config done" - indicates that the debugger has been
configured, debugger does a Continue *)
| GetStack (* request the call stack, returned as Answer.Stack *)
| GetVars of int (* request the variables defined for stack frame N, returnedasAnswer.Vars.0isthetopmostframe,
followed by 1,2,3, ... *)
| RunCnt of int (* legacy: run for N steps *)
| RunBreakpoint ofstring (* legacy: run until an idtac prints the string *)
| Command ofstring (* legacy: user-typed command to the debugger *)
| Failed (* legacy: user command doesn't parse *)
| Ignore (* internal: do nothing, read another command *)
(* XXX: Should be moved to the clients *) val parse : string -> (t, string) result end
module Answer : sig type t =
| Prompt of Pp.t (* output signalling the debugger has stopped Shouldbeprintedasapromptforuserinput,
e.g. in color without a newline at the end *)
| Goal of Pp.t (* goal for the current proof state *)
| Output of Pp.t (* general output *)
| Init (* signals initialization of the debugger *)
| Stack of (string * (string * int list) option) list (* The call stack, starting from TOS. Valuesare: -descriptionoftheframe (egtacticname,linenumber,module) -absolutepathnameofthefile -arraycontainingLoc.bpandLoc.epofthe
corresponding code *)
| Vars of (string * Pp.t) list (* The variable values for the specified stack
frame. Values are variable name and variable value *) end
module Intf : sig type t =
{ read_cmd : unit -> Action.t (** request a debugger command from the client *)
; submit_answer : Answer.t -> unit (** receive a debugger answer from Ltac *)
; isTerminal : bool (** whether the debugger is running as a terminal (non-visual) *)
}
valset : t -> unit val get : unit -> t option end
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.9 Sekunden
(vorverarbeitet am 2026-06-10)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.