File: runtime.mli

package info (click to toggle)
elpi 2.0.7-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 50,296 kB
  • sloc: ml: 18,791; makefile: 229; python: 95; sh: 7
file content (29 lines) | stat: -rw-r--r-- 1,150 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
(* elpi: embedded lambda prolog interpreter                                  *)
(* copyright: 2014 - 2017 Enrico Tassi <enrico.tassi@inria.fr>               *)
(* license: GNU Lesser General Public License Version 2.1 or later           *)
(* ------------------------------------------------------------------------- *)

(* This is the runtime needed by trace_ppx *)

exception TREC_CALL of Obj.t * Obj.t (* ('a -> 'b) * 'a *)

type j = J : (Format.formatter -> 'a -> unit) * 'a -> j

val enter : runtime_id:int -> string ->  (Format.formatter -> unit) -> unit
val info : runtime_id:int -> ?goal_id:int -> string -> j list -> unit
val exit : runtime_id:int -> string -> bool -> exn option -> float -> unit
val end_trace : runtime_id:int -> unit

val set_cur_pred : string option -> unit
val get_cur_step : runtime_id:int -> string -> int
val incr_cur_step : runtime_id:int -> string -> unit

val log : runtime_id:int -> string -> string -> int -> unit

val debug : bool ref
val parse_argv : string list -> string list
val usage: string

(* prints here *)
type trace_format = TTY | JSON
val set_trace_output : trace_format -> Format.formatter -> unit