sig
module Package :
sig
type plugin = Kernel | Plugin of string
type ident = private {
plugin : Server.Package.plugin;
package : string list;
name : string;
}
type jtype =
Jany
| Jnull
| Jboolean
| Jnumber
| Jstring
| Jalpha
| Jtag of string
| Jkey of string
| Jindex of string
| Joption of Server.Package.jtype
| Jdict of Server.Package.jtype
| Jlist of Server.Package.jtype
| Jarray of Server.Package.jtype
| Jtuple of Server.Package.jtype list
| Junion of Server.Package.jtype list
| Jrecord of (string * Server.Package.jtype) list
| Jdata of Server.Package.ident
| Jenum of Server.Package.ident
| Jself
type fieldInfo = {
fd_name : string;
fd_type : Server.Package.jtype;
fd_descr : Markdown.text;
}
type tagInfo = {
tg_name : string;
tg_label : Markdown.text;
tg_descr : Markdown.text;
}
type paramInfo =
P_value of Server.Package.jtype
| P_named of Server.Package.fieldInfo list
type requestInfo = {
rq_kind : [ `EXEC | `GET | `SET ];
rq_input : Server.Package.paramInfo;
rq_output : Server.Package.paramInfo;
}
type arrayInfo = { arr_key : string; arr_kind : string; }
type declKindInfo =
D_signal
| D_type of Server.Package.jtype
| D_enum of Server.Package.tagInfo list
| D_record of Server.Package.fieldInfo list
| D_request of Server.Package.requestInfo
| D_value of Server.Package.jtype
| D_state of Server.Package.jtype
| D_array of Server.Package.arrayInfo
| D_safe of Server.Package.ident * Server.Package.jtype
| D_loose of Server.Package.ident * Server.Package.jtype
| D_order of Server.Package.ident * Server.Package.jtype
type declInfo = {
d_ident : Server.Package.ident;
d_descr : Markdown.text;
d_kind : Server.Package.declKindInfo;
}
type packageInfo = {
p_plugin : Server.Package.plugin;
p_package : string list;
p_title : string;
p_descr : Markdown.text;
p_readme : string option;
p_content : Server.Package.declInfo list;
}
val pp_plugin :
Stdlib.Format.formatter -> Server.Package.plugin -> unit
val pp_pkgname :
Stdlib.Format.formatter -> Server.Package.packageInfo -> unit
val pp_ident : Stdlib.Format.formatter -> Server.Package.ident -> unit
val pp_jtype : Stdlib.Format.formatter -> Server.Package.jtype -> unit
val derived :
?prefix:string ->
?suffix:string -> Server.Package.ident -> Server.Package.ident
module Derived :
sig
val signal : Server.Package.ident -> Server.Package.ident
val getter : Server.Package.ident -> Server.Package.ident
val setter : Server.Package.ident -> Server.Package.ident
val data : Server.Package.ident -> Server.Package.ident
val fetch : Server.Package.ident -> Server.Package.ident
val reload : Server.Package.ident -> Server.Package.ident
val safe : Server.Package.ident -> Server.Package.ident
val loose : Server.Package.ident -> Server.Package.ident
val order : Server.Package.ident -> Server.Package.ident
val decode :
safe:bool -> Server.Package.ident -> Server.Package.ident
end
module IdMap :
sig
type key = ident
type +'a t
val empty : 'a t
val is_empty : 'a t -> bool
val mem : key -> 'a t -> bool
val add : key -> 'a -> 'a t -> 'a t
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t
val singleton : key -> 'a -> 'a t
val remove : key -> 'a t -> 'a t
val merge :
(key -> 'a option -> 'b option -> 'c option) ->
'a t -> 'b t -> 'c t
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val for_all : (key -> 'a -> bool) -> 'a t -> bool
val exists : (key -> 'a -> bool) -> 'a t -> bool
val filter : (key -> 'a -> bool) -> 'a t -> 'a t
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t
val cardinal : 'a t -> int
val bindings : 'a t -> (key * 'a) list
val min_binding : 'a t -> key * 'a
val min_binding_opt : 'a t -> (key * 'a) option
val max_binding : 'a t -> key * 'a
val max_binding_opt : 'a t -> (key * 'a) option
val choose : 'a t -> key * 'a
val choose_opt : 'a t -> (key * 'a) option
val split : key -> 'a t -> 'a t * 'a option * 'a t
val find : key -> 'a t -> 'a
val find_opt : key -> 'a t -> 'a option
val find_first : (key -> bool) -> 'a t -> key * 'a
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option
val find_last : (key -> bool) -> 'a t -> key * 'a
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option
val map : ('a -> 'b) -> 'a t -> 'b t
val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t
val to_seq : 'a t -> (key * 'a) Seq.t
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t
val of_seq : (key * 'a) Seq.t -> 'a t
end
module Scope :
sig
type t
val create : Server.Package.plugin -> Server.Package.Scope.t
val reserve : Server.Package.Scope.t -> string -> unit
val declare :
Server.Package.Scope.t -> Server.Package.ident -> unit
val use : Server.Package.Scope.t -> Server.Package.ident -> unit
val resolve :
Server.Package.Scope.t -> string Server.Package.IdMap.t
end
val isRecursive : Server.Package.jtype -> bool
val visit_jtype :
(Server.Package.ident -> unit) -> Server.Package.jtype -> unit
val visit_field :
(Server.Package.ident -> unit) -> Server.Package.fieldInfo -> unit
val visit_param :
(Server.Package.ident -> unit) -> Server.Package.paramInfo -> unit
val visit_request :
(Server.Package.ident -> unit) -> Server.Package.requestInfo -> unit
val visit_dkind :
(Server.Package.ident -> unit) -> Server.Package.declKindInfo -> unit
val visit_decl :
(Server.Package.ident -> unit) -> Server.Package.declInfo -> unit
val visit_package_decl :
(Server.Package.ident -> unit) -> Server.Package.packageInfo -> unit
val visit_package_used :
(Server.Package.ident -> unit) -> Server.Package.packageInfo -> unit
type package
val package :
?plugin:string ->
?name:string ->
title:string ->
?descr:Markdown.text ->
?readme:string -> unit -> Server.Package.package
val declare :
package:Server.Package.package ->
name:string ->
?descr:Markdown.text -> Server.Package.declKindInfo -> unit
val declare_id :
package:Server.Package.package ->
name:string ->
?descr:Markdown.text ->
Server.Package.declKindInfo -> Server.Package.ident
val update :
package:Server.Package.package ->
name:string -> Server.Package.declKindInfo -> unit
val iter : (Server.Package.packageInfo -> unit) -> unit
val resolve :
?keywords:string list ->
Server.Package.packageInfo -> string Server.Package.IdMap.t
val field : Server.Package.fieldInfo -> string * Server.Package.jtype
val name_of_pkg :
?sep:string -> Server.Package.plugin -> string list -> string
val name_of_pkginfo :
?sep:string -> Server.Package.packageInfo -> string
val name_of_package : ?sep:string -> Server.Package.package -> string
val name_of_ident : ?sep:string -> Server.Package.ident -> string
type pp = {
self : Markdown.text;
ident : Server.Package.ident -> Markdown.text;
}
val litteral : string -> Markdown.text
val md_jtype :
Server.Package.pp -> Server.Package.jtype -> Markdown.text
val md_tags :
?title:string -> Server.Package.tagInfo list -> Markdown.table
val md_fields :
?title:string ->
Server.Package.pp -> Server.Package.fieldInfo list -> Markdown.table
end
module Data :
sig
type json = Json.t
val pretty : Stdlib.Format.formatter -> Server.Data.json -> unit
module type S =
sig
type t
val jtype : Server.Package.jtype
val of_json : Server.Data.json -> Server.Data.S.t
val to_json : Server.Data.S.t -> Server.Data.json
end
module Junit :
sig
type t = unit
val jtype : Package.jtype
val of_json : json -> t
val to_json : t -> json
end
module Jany :
sig
type t = json
val jtype : Package.jtype
val of_json : json -> t
val to_json : t -> json
end
module Jbool :
sig
type t = bool
val jtype : Package.jtype
val of_json : json -> t
val to_json : t -> json
end
module Jint :
sig
type t = int
val jtype : Package.jtype
val of_json : json -> t
val to_json : t -> json
end
module Jfloat :
sig
type t = float
val jtype : Package.jtype
val of_json : json -> t
val to_json : t -> json
end
module Jstring :
sig
type t = string
val jtype : Package.jtype
val of_json : json -> t
val to_json : t -> json
end
module Jalpha :
sig
type t = string
val jtype : Package.jtype
val of_json : json -> t
val to_json : t -> json
end
module Jtext :
sig
type t = json
val jtype : Package.jtype
val of_json : json -> t
val to_json : t -> json
end
module Jmarkdown :
sig
type t = Markdown.text
val jtype : Package.jtype
val of_json : json -> t
val to_json : t -> json
end
module Joption :
functor (A : S) ->
sig
type t = A.t option
val jtype : Package.jtype
val of_json : json -> t
val to_json : t -> json
end
module Jpair :
functor (A : S) (B : S) ->
sig
type t = A.t * B.t
val jtype : Package.jtype
val of_json : json -> t
val to_json : t -> json
end
module Jtriple :
functor (A : S) (B : S) (C : S) ->
sig
type t = A.t * B.t * C.t
val jtype : Package.jtype
val of_json : json -> t
val to_json : t -> json
end
module Jlist :
functor (A : S) ->
sig
type t = A.t list
val jtype : Package.jtype
val of_json : json -> t
val to_json : t -> json
end
module Jalist :
functor (A : S) ->
sig
type t = A.t list
val jtype : Package.jtype
val of_json : json -> t
val to_json : t -> json
end
module Jarray :
functor (A : S) ->
sig
type t = A.t array
val jtype : Package.jtype
val of_json : json -> t
val to_json : t -> json
end
type 'a data = (module Server.Data.S with type t = 'a)
val junit : unit Server.Data.data
val jany : Server.Data.json Server.Data.data
val jbool : bool Server.Data.data
val jint : int Server.Data.data
val jfloat : float Server.Data.data
val jstring : string Server.Data.data
val jalpha : string Server.Data.data
val jindex : kind:string -> int Server.Data.data
val jkey : kind:string -> string Server.Data.data
val jlist : 'a Server.Data.data -> 'a list Server.Data.data
val jalist : 'a Server.Data.data -> 'a list Server.Data.data
val jarray : 'a Server.Data.data -> 'a array Server.Data.data
val joption : 'a Server.Data.data -> 'a option Server.Data.data
val derived :
package:Server.Package.package ->
id:Server.Package.ident -> Server.Package.jtype -> unit
val declare :
package:Server.Package.package ->
name:string ->
?descr:Markdown.text -> Server.Package.jtype -> Server.Package.jtype
module Record :
sig
type 'a record
type 'a signature
type ('a, 'b) field
module type S =
sig
type r
type t = r record
val jtype : Package.jtype
val of_json : json -> t
val to_json : t -> json
val default : t
val has :
(Server.Data.Record.S.r, 'a) Server.Data.Record.field ->
t -> bool
val get :
(Server.Data.Record.S.r, 'a) Server.Data.Record.field ->
t -> 'a
val set :
(Server.Data.Record.S.r, 'a) Server.Data.Record.field ->
'a -> t -> t
end
val signature : unit -> 'a Server.Data.Record.signature
val field :
'r Server.Data.Record.signature ->
name:string ->
descr:Markdown.text ->
?default:'a ->
'a Server.Data.data -> ('r, 'a) Server.Data.Record.field
val option :
'r Server.Data.Record.signature ->
name:string ->
descr:Markdown.text ->
'a Server.Data.data -> ('r, 'a option) Server.Data.Record.field
val publish :
package:Server.Package.package ->
name:string ->
?descr:Markdown.text ->
'a Server.Data.Record.signature ->
(module Server.Data.Record.S with type r = 'a)
end
module Tag :
sig
type t = Package.tagInfo
val jtype : Package.jtype
val of_json : json -> t
val to_json : t -> json
end
module Enum :
sig
type 'a dictionary
type 'a tag
type 'a prefix
val tag_name : 'a Server.Data.Enum.tag -> string
val dictionary : unit -> 'a Server.Data.Enum.dictionary
val tag :
name:string ->
?label:Markdown.text ->
descr:Markdown.text ->
?value:'a ->
'a Server.Data.Enum.dictionary -> 'a Server.Data.Enum.tag
val add :
name:string ->
?label:Markdown.text ->
descr:Markdown.text ->
?value:'a -> 'a Server.Data.Enum.dictionary -> unit
val find :
'a Server.Data.Enum.dictionary -> 'a Server.Data.Enum.tag -> 'a
val lookup :
'a Server.Data.Enum.dictionary -> 'a -> 'a Server.Data.Enum.tag
val find_tag :
'a Server.Data.Enum.dictionary ->
string -> 'a Server.Data.Enum.tag
val prefix :
name:string ->
?var:string ->
?label:Markdown.text ->
descr:Markdown.text ->
'a Server.Data.Enum.dictionary -> 'a Server.Data.Enum.prefix
val instance :
'a Server.Data.Enum.prefix -> string -> 'a Server.Data.Enum.tag
val extends :
name:string ->
?label:Markdown.text ->
descr:Markdown.text ->
?value:'a ->
'a Server.Data.Enum.prefix -> 'a Server.Data.Enum.tag
val tags : 'a Server.Data.Enum.dictionary -> Server.Data.Tag.t list
val set_lookup :
'a Server.Data.Enum.dictionary ->
('a -> 'a Server.Data.Enum.tag) -> unit
val publish :
package:Server.Package.package ->
name:string ->
descr:Markdown.text ->
'a Server.Data.Enum.dictionary ->
(module Server.Data.S with type t = 'a)
end
module type Info = sig val name : string end
module type Map =
sig
type 'a t
type key
val empty : 'a Server.Data.Map.t
val add :
Server.Data.Map.key ->
'a -> 'a Server.Data.Map.t -> 'a Server.Data.Map.t
val find : Server.Data.Map.key -> 'a Server.Data.Map.t -> 'a
end
module type Index =
sig
type t
val jtype : Package.jtype
val of_json : json -> t
val to_json : t -> json
val get : t -> int
val find : int -> t
val clear : unit -> unit
end
module Static :
functor (M : Map) (I : Info) ->
sig
type t = M.key
val jtype : Package.jtype
val of_json : json -> t
val to_json : t -> json
val get : t -> int
val find : int -> t
val clear : unit -> unit
end
module Index :
functor (M : Map) (I : Info) ->
sig
type t = M.key
val jtype : Package.jtype
val of_json : json -> t
val to_json : t -> json
val get : t -> int
val find : int -> t
val clear : unit -> unit
end
module type IdentifiedType =
sig type t val id : Server.Data.IdentifiedType.t -> int end
module Identified :
functor (A : IdentifiedType) (I : Info) ->
sig
type t = A.t
val jtype : Package.jtype
val of_json : json -> t
val to_json : t -> json
val get : t -> int
val find : int -> t
val clear : unit -> unit
end
exception InputError of string
val failure :
?json:Server.Data.json ->
('a, Stdlib.Format.formatter, unit, 'b) Stdlib.format4 -> 'a
val failure_from_type_error : string -> Server.Data.json -> 'a
end
module Request :
sig
type json = Server.Data.json
type kind = [ `EXEC | `GET | `SET ]
module type Input =
sig
type t
val jtype : Server.Package.jtype
val of_json : Server.Request.json -> Server.Request.Input.t
end
module type Output =
sig
type t
val jtype : Server.Package.jtype
val to_json : Server.Request.Output.t -> Server.Request.json
end
type 'a input = (module Server.Request.Input with type t = 'a)
type 'b output = (module Server.Request.Output with type t = 'b)
type signal
val signal :
package:Server.Package.package ->
name:string -> descr:Markdown.text -> Server.Request.signal
val emit : Server.Request.signal -> unit
val on_signal : Server.Request.signal -> (bool -> unit) -> unit
val register :
package:Server.Package.package ->
kind:Server.Request.kind ->
name:string ->
descr:Markdown.text ->
input:'a Server.Request.input ->
output:'b Server.Request.output -> ('a -> 'b) -> unit
type ('a, 'b) signature
val signature :
?input:'a Server.Request.input ->
?output:'b Server.Request.output ->
unit -> ('a, 'b) Server.Request.signature
type rq
type 'a param = Server.Request.rq -> 'a
type 'b result = Server.Request.rq -> 'b -> unit
val register_sig :
package:Server.Package.package ->
kind:Server.Request.kind ->
name:string ->
descr:Markdown.text ->
('a, 'b) Server.Request.signature ->
(Server.Request.rq -> 'a -> 'b) -> unit
val param :
(unit, 'b) Server.Request.signature ->
name:string ->
descr:Markdown.text ->
?default:'a -> 'a Server.Request.input -> 'a Server.Request.param
val param_opt :
(unit, 'b) Server.Request.signature ->
name:string ->
descr:Markdown.text ->
'a Server.Request.input -> 'a option Server.Request.param
val result :
('a, unit) Server.Request.signature ->
name:string ->
descr:Markdown.text ->
?default:'b -> 'b Server.Request.output -> 'b Server.Request.result
val result_opt :
('a, unit) Server.Request.signature ->
name:string ->
descr:Markdown.text ->
'b Server.Request.output -> 'b option Server.Request.result
val dictionary :
package:Server.Package.package ->
name:string ->
descr:Markdown.text ->
'a Server.Data.Enum.dictionary ->
(module Server.Data.S with type t = 'a)
end
module States :
sig
type 'a callback = ('a -> unit) -> unit
val register_value :
package:Server.Package.package ->
name:string ->
descr:Markdown.text ->
output:'a Server.Request.output ->
get:(unit -> 'a) ->
?add_hook:unit Server.States.callback ->
unit -> Server.Request.signal
val register_state :
package:Server.Package.package ->
name:string ->
descr:Markdown.text ->
data:'a Server.Data.data ->
get:(unit -> 'a) ->
set:('a -> unit) ->
?add_hook:unit Server.States.callback ->
unit -> Server.Request.signal
type 'a model
val model : unit -> 'a Server.States.model
val column :
name:string ->
descr:Markdown.text ->
data:'b Server.Request.output ->
get:('a -> 'b) -> 'a Server.States.model -> unit
type 'a array
val reload : 'a Server.States.array -> unit
val update : 'a Server.States.array -> 'a -> unit
val remove : 'a Server.States.array -> 'a -> unit
val signal : 'a Server.States.array -> Server.Request.signal
val register_array :
package:Server.Package.package ->
name:string ->
descr:Markdown.text ->
key:('a -> string) ->
?keyName:string ->
?keyKind:string ->
iter:'a Server.States.callback ->
?add_update_hook:'a Server.States.callback ->
?add_remove_hook:'a Server.States.callback ->
?add_reload_hook:unit Server.States.callback ->
'a Server.States.model -> 'a Server.States.array
end
module Kernel_main :
sig
module LogSource :
sig
type t = Filepath.position
val jtype : Package.jtype
val of_json : Data.json -> t
val to_json : t -> Data.json
end
module LogEvent :
sig
type t = Log.event
val jtype : Package.jtype
val of_json : Data.json -> t
val to_json : t -> Data.json
end
end
module Kernel_ast :
sig
module Kf :
sig
type t = Cil_types.kernel_function
val jtype : Package.jtype
val of_json : Data.json -> t
val to_json : t -> Data.json
end
module Ki :
sig
type t = Cil_types.kinstr
val jtype : Package.jtype
val of_json : Data.json -> t
val to_json : t -> Data.json
end
module Stmt :
sig
type t = Cil_types.stmt
val jtype : Package.jtype
val of_json : Data.json -> t
val to_json : t -> Data.json
end
module Marker :
sig
type t = Printer_tag.localizable
val jtype : Package.jtype
val of_json : Data.json -> t
val to_json : t -> Data.json
val jstmt : Server.Package.jtype
val jdecl : Server.Package.jtype
val jlval : Server.Package.jtype
val jexpr : Server.Package.jtype
val jterm : Server.Package.jtype
val jglobal : Server.Package.jtype
val jproperty : Server.Package.jtype
val create : t -> string
val lookup : string -> t
end
module KfMarker :
sig
type t = Cil_types.kernel_function * Printer_tag.localizable
val jtype : Package.jtype
val of_json : Data.json -> t
val to_json : t -> Data.json
end
module Printer : Printer_tag.S_pp
module Functions :
sig val array : Cil_types.kernel_function Server.States.array end
end
module Kernel_properties :
sig
val register_propkind :
name:string ->
kind:[ `Clause | `Loop | `Other ] ->
?label:Markdown.text -> descr:Markdown.text -> unit -> unit
val reload : unit -> unit
end
end