Module Metrics_base


module Metrics_base: sig .. end
Common utilities

Tag functions handling html tags for Format


val html_tag_functions : Format.formatter_tag_functions
Tag functions handling html tags for Format
exception No_suffix
val get_suffix : string -> string

type output_type =
| Html
| Text (*Type of the generated report file. Automatically set according to the file extension.*)
val get_file_type : string -> output_type
get_file_type extension sets the output type according to extension. Raise an error if extension is not among supported extensions or is empty.
module VInfoMap: sig .. end
Common utilities

type my_metrics = {
   cfile_name : string;
   cfunc_name : string;
   cslocs : int;
   cifs : int;
   cloops : int;
   ccalls : int;
   cgotos : int;
   cassigns : int;
   cexits : int;
   cfuncs : int;
   cptrs : int;
   cdecision_points : int;
}
Record type to compute cyclomatic complexity

Storing metrics information

val empty_metrics : my_metrics
Initial empty values for metrics computing.
val cyclo : my_metrics -> int
Compute cyclomatic complexity from my_metrics record type.
val pp_my_metrics : Format.formatter -> my_metrics -> unit
val pp_strg : Format.formatter -> string -> unit
val pp_int : Format.formatter -> int -> unit

type cell_type =
| Classic
| Entry
| Stat
| Result
val cell_type_to_string : cell_type -> string
val pp_cell_type_html : Format.formatter -> cell_type -> unit
val pp_cell : cell_type ->
(Format.formatter -> 'a -> unit) -> Format.formatter -> 'a -> unit
val pp_cell_default : (Format.formatter -> int -> unit) -> Format.formatter -> int -> unit
val pp_metrics_as_html_row : Format.formatter -> my_metrics -> unit
Pretty printers for metrics as text or html.
val name : string
module DatatypeMetrics: Datatype.Make(sig
include Datatype.Serializable_undefined
type t = Db.Metrics.t 
val name : string
val structural_descr : Structural_descr.t
val reprs : Db.Metrics.t list
val mem_project : (Project_skeleton.t -> bool) -> 'a -> bool
end)
val pretty_set : ((Cil_types.varinfo -> int -> unit) -> 'a -> 'b) ->
Format.formatter -> 'a -> unit
Other pretty-printing and formatting utilities

Pretty print a varinfo set

val pretty_varinfomap : Format.formatter -> int VInfoMap.t -> unit
val is_entry_point : Cil_types.varinfo -> int -> bool
val number_entry_points : ((Cil_types.varinfo -> int -> int -> int) -> 'a -> int -> 'b) -> 'a -> 'b
val pretty_entry_points : ((Cil_types.varinfo -> int -> unit) -> 'a -> unit) ->
Format.formatter -> 'a -> unit
val map_cardinal_varinfomap : 'a Cil_datatype.Varinfo.Map.t -> int
val pretty : Format.formatter -> Db.Metrics.t -> unit
Pretty print results
val file_of_vinfodef : Cil_types.varinfo -> string
Get the filename where the definition of a varinfo occurs
val file_of_fundef : Cil_types.fundec -> string
Get the filename containing the function definition
val extract_fundef_name : 'a * ('b * 'c * 'd * 'e) -> 'b
val get_filename : Cabs.definition -> string
val consider_function : Cil_types.varinfo -> bool
consider_function vinfo returns false if the varinfo is not a function we are interested in. For example, builtins should not be part of the analysis and return false. Skip them using this auxiliary function.