Module Metrics_cilast

module Metrics_cilast: sig .. end
Visitor to compute various syntactic metrics. In particular, it fetches all necessary informations to compute cyclomatic complexity .

Syntactic metrics ================= The goal is to collect various (syntactic) information about the source code (slocs, assignments, loops, ...). From those one can compute McCabe's cyclomatic complexity.


class type sloc_visitor = object .. end
Syntactic metrics ================= The goal is to collect various (syntactic) information about the source code (slocs, assignments, loops, ...).
class slocVisitor : sloc_visitor
val get_metrics : unit -> Metrics_base.BasicMetrics.t
val compute_on_cilast : unit -> unit
Compute metrics on whole CIL AST
val compute_locals_size : Kernel_function.t -> unit
Compute and print the size (in bytes) of local variables on the CIL AST. This is a rough approximation, neither guaranteed to be smaller or larger than the actual value. Only automatic, non-ghost and non-temporary variables present in the source are included. This is useful to estimate the stack size of a function.