12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697(**************************************************************************)(* *)(* SPDX-License-Identifier LGPL-2.1 *)(* Copyright (C) *)(* CEA (Commissariat à l'énergie atomique et aux énergies alternatives) *)(* *)(**************************************************************************)includePlugin.Register(structletname="Metrics"letshortname="metrics"lethelp="syntactic metrics"end)moduleEnabled=False(structletoption_name="-metrics"lethelp="activate metrics computation"end)moduleByFunction=False(structletoption_name="-metrics-by-function"lethelp="also compute metrics on a per-function basis"end)moduleOutputFile=Filepath(structletoption_name="-metrics-output"letarg_name="filename"letfile_kind="Text, HTML or JSON"letexistence=Fclib.Filepath.Indifferentlethelp="print some metrics into the specified file; \
the output format is recognized through the extension: \
.text/.txt for text, .html/.htm for HTML, or .json for JSON."end)moduleValueCoverage=False(structletoption_name="-metrics-eva-cover"lethelp="estimate Eva coverage w.r.t. reachable syntactic definitions"end)let()=ValueCoverage.add_aliases["-metrics-value-cover"]moduleAstType=String(structletoption_name="-metrics-ast"letarg_name="[cabs | cil | acsl]"lethelp="apply metrics to Cabs or CIL AST, or to ACSL specs"letdefault="cil"end)moduleLibc=False(structletoption_name="-metrics-libc"lethelp="show functions from Frama-C standard C library in the \
results; deactivated by default."end)let()=AstType.set_possible_values["cil";"cabs";"acsl"]moduleSyntacticallyReachable=Kernel_function_set(structletoption_name="-metrics-cover"letarg_name="f1,..,fn"lethelp="compute an overapproximation of the functions reachable from \
f1,..,fn."end)moduleLocalsSize=Kernel_function_set(structletoption_name="-metrics-locals-size"letarg_name="f1,...,fn"lethelp="prints the size of local variables for functions f1,...,fn, \
and for the functions called within them \
(does not support recursive calls)"end)moduleUsedFiles=False(structletoption_name="-metrics-used-files"lethelp="list files containing global definitions reachable by main"end)