Module Server.Package

type plugin =
| Kernel
| Plugin of string
type ident = private {
plugin : plugin;
package : string list;
name : string;
}
type jtype =
| Jany
| Jnull
| Jboolean
| Jnumber
| Jstring
| Jalpha(*

string primarily compared without case

*)
| Jtag of string(*

single constant string

*)
| Jkey of string(*

kind of a string used for indexing

*)
| Jindex of string(*

kind of an integer used for indexing

*)
| Joption of jtype
| Jdict of jtype(*

dictionaries

*)
| Jarray of jtype(*

order matters

*)
| Jtuple of jtype list
| Junion of jtype list
| Jrecord of (string * jtype) list
| Jdata of ident
| Jenum of ident(*

data that is an enum

*)
| Jself(*

for (simply) recursive types

*)
type fieldInfo = {
fd_name : string;
fd_type : jtype;
fd_descr : Frama_c_kernel.Markdown.text;
}
type tagInfo = {
tg_name : string;
tg_label : Frama_c_kernel.Markdown.text;
tg_descr : Frama_c_kernel.Markdown.text;
}
type paramInfo =
| P_value of jtype
| P_named of fieldInfo list
type requestInfo = {
rq_kind : [ `GET | `SET | `EXEC ];
rq_input : paramInfo;
rq_output : paramInfo;
rq_signals : string list;
}
type arrayInfo = {
arr_key : string;
arr_kind : jtype;
}
type declKindInfo =
| D_signal
| D_type of jtype
| D_enum of tagInfo list
| D_record of fieldInfo list
| D_request of requestInfo
| D_value of jtype
| D_state of jtype
| D_array of arrayInfo
| D_decoder of ident * jtype
| D_order of ident * jtype
type declInfo = {
d_ident : ident;
d_descr : Frama_c_kernel.Markdown.text;
d_kind : declKindInfo;
}
type packageInfo = {
p_plugin : plugin;
p_package : string list;
p_title : string;
p_descr : Frama_c_kernel.Markdown.text;
p_readme : string option;
p_content : declInfo list;
}
val pp_plugin : Stdlib.Format.formatter -> plugin -> unit
val pp_pkgname : Stdlib.Format.formatter -> packageInfo -> unit
val pp_ident : Stdlib.Format.formatter -> ident -> unit
val pp_jtype : Stdlib.Format.formatter -> jtype -> unit
val derived : ?prefix:string -> ?suffix:string -> ident -> ident
module Derived : sig ... end
module IdMap : Stdlib.Map.S with type key = ident
module Scope : sig ... end
val isRecursive : jtype -> bool
val visit_jtype : ( ident -> unit ) -> jtype -> unit
val visit_field : ( ident -> unit ) -> fieldInfo -> unit
val visit_param : ( ident -> unit ) -> paramInfo -> unit
val visit_request : ( ident -> unit ) -> requestInfo -> unit
val visit_dkind : ( ident -> unit ) -> declKindInfo -> unit
val visit_decl : ( ident -> unit ) -> declInfo -> unit
val visit_package_decl : ( ident -> unit ) -> packageInfo -> unit
val visit_package_used : ( ident -> unit ) -> packageInfo -> unit
type package
val package : ?plugin:string -> ?name:string -> title:string -> ?descr:Frama_c_kernel.Markdown.text -> ?readme:string -> unit -> package
val declare : package:package -> name:string -> ?descr:Frama_c_kernel.Markdown.text -> declKindInfo -> unit

Register the declaration in the Server API. This is only way to obtain identifiers. This ensures identifiers are declared before being used.

val declare_id : package:package -> name:string -> ?descr:Frama_c_kernel.Markdown.text -> declKindInfo -> ident

Same as declare but returns the associated identifier.

val update : package:package -> name:string -> declKindInfo -> unit

Replace the declaration for the given name in the package.

val iter : ( packageInfo -> unit ) -> unit
val resolve : ?keywords:string list -> packageInfo -> string IdMap.t

Assigns non-classing names for each identifier.

val field : fieldInfo -> string * jtype
val name_of_pkg : ?sep:string -> plugin -> string list -> string
val name_of_pkginfo : ?sep:string -> packageInfo -> string
val name_of_package : ?sep:string -> package -> string
val name_of_ident : ?sep:string -> ident -> string
val litteral : string -> Frama_c_kernel.Markdown.text

Quoted string

val md_tags : ?title:string -> tagInfo list -> Frama_c_kernel.Markdown.table
val md_fields : ?title:string -> pp -> fieldInfo list -> Frama_c_kernel.Markdown.table