package frama-c
Install
dune-project
Dependency
Authors
-
MMichele Alberti
-
TThibaud Antignac
-
GGergö Barany
-
PPatrick Baudin
-
TThibaut Benjamin
-
AAllan Blanchard
-
LLionel Blatter
-
FFrançois Bobot
-
RRichard Bonichon
-
QQuentin Bouillaguet
-
DDavid Bühler
-
ZZakaria Chihani
-
LLoïc Correnson
-
JJulien Crétin
-
PPascal Cuoq
-
ZZaynah Dargaye
-
BBasile Desloges
-
JJean-Christophe Filliâtre
-
PPhilippe Herrmann
-
MMaxime Jacquemin
-
FFlorent Kirchner
-
AAlexander Kogtenkov
-
TTristan Le Gall
-
JJean-Christophe Léchenet
-
MMatthieu Lemerre
-
DDara Ly
-
DDavid Maison
-
CClaude Marché
-
AAndré Maroneze
-
TThibault Martin
-
FFonenantsoa Maurica
-
MMelody Méaulle
-
BBenjamin Monate
-
YYannick Moy
-
AAnne Pacalet
-
VValentin Perrelle
-
GGuillaume Petiot
-
DDario Pinto
-
VVirgile Prevosto
-
AArmand Puccetti
-
FFélix Ridoux
-
VVirgile Robles
-
MMuriel Roger
-
JJulien Signoles
-
NNicolas Stouls
-
KKostyantyn Vorobyov
-
BBoris Yakobowski
Maintainers
Sources
sha256=5b13574a16a58971c27909bee94ae7f37b17d897852b40c768a3d4e2e09e39d2
doc/frama-c.kernel/Frama_c_kernel/Kernel/index.html
Module Frama_c_kernel.Kernel
Provided services for kernel developers.
Log Machinery
include Plugin.S
include Log.Messages
category for debugging/verbose messages. Must be registered before any use. Each column in the string defines a sub-category, e.g. a:b:c defines a subcategory c of b, which is itself a subcategory of a. Enabling a category (via -plugin-msg-category) will enable all its subcategories.
val printf :
?level:int ->
?dkey:category ->
?current:bool ->
?source:Filepath.position ->
?append:(Format.formatter -> unit) ->
?header:(Format.formatter -> unit) ->
('a, Format.formatter, unit) format ->
'aOutputs the formatted message on stdout. Levels and key-categories are taken into account like event messages. The header formatted message is emitted as a regular result message.
val result : ?level:int -> ?dkey:category -> 'a Log.pretty_printerResults of analysis. Default level is 1.
val feedback :
?ontty:Log.ontty ->
?level:int ->
?dkey:category ->
'a Log.pretty_printerProgress and feedback. Level is tested against the verbosity level.
val debug : ?level:int -> ?dkey:category -> 'a Log.pretty_printerDebugging information dedicated to Plugin developers. Default level is 1. The debugging key is used in message headers. See also set_debug_keys and set_debug_keyset.
val warning : ?wkey:warn_category -> 'a Log.pretty_printerHypothesis and restrictions.
val error : 'a Log.pretty_printeruser error: syntax/typing error, bad expected input, etc.
val abort : ('a, 'b) Log.pretty_aborteruser error stopping the plugin.
val failure : 'a Log.pretty_printerinternal error of the plug-in.
val fatal : ('a, 'b) Log.pretty_aborterinternal error of the plug-in.
val verify : bool -> ('a, bool) Log.pretty_aborterIf the first argument is true, return true and do nothing else, otherwise, send the message on the fatal channel and return false.
The intended usage is: assert (verify e "Bla...") ;.
val not_yet_implemented :
?current:bool ->
?source:Filepath.position ->
('a, Format.formatter, unit, 'b) format4 ->
'araises FeatureRequest but does not send any message. If the exception is not caught, Frama-C displays a feature-request message to the user.
deprecated s ~now f indicates that the use of f of name s is now deprecated. It should be replaced by now.
val with_result : (Log.event option -> 'b) -> ('a, 'b) Log.pretty_aborterwith_result f fmt calls f in the same condition as logwith.
val with_warning : (Log.event option -> 'b) -> ('a, 'b) Log.pretty_aborterwith_warning f fmt calls f in the same condition as logwith.
val with_error : (Log.event option -> 'b) -> ('a, 'b) Log.pretty_aborterwith_error f fmt calls f in the same condition as logwith.
val with_failure : (Log.event option -> 'b) -> ('a, 'b) Log.pretty_aborterwith_failure f fmt calls f in the same condition as logwith.
val log : ?kind:Log.kind -> ?verbose:int -> ?debug:int -> 'a Log.pretty_printerGeneric log routine. The default kind is Result. Use cases (with n,m > 0):
log ~verbose:n: emit the message only when verbosity level is at leastn.log ~debug:n: emit the message only when debugging level is at leastn.log ~verbose:n ~debug:m: any debugging or verbosity level is sufficient.
val logwith :
(Log.event option -> 'b) ->
?wkey:warn_category ->
?emitwith:(Log.event -> unit) ->
?once:bool ->
('a, 'b) Log.pretty_aborterRecommanded generic log routine using warn_category instead of kind. logwith continuation ?wkey fmt similar to warning ?wkey fmt and then calling the continuation. The optional continuation argument refers to the corresponding event. None is used iff no message is logged. In case the wkey is considered as a Failure, the continution is not called. This kind of message denotes a fatal error aborting Frama-C. Notice that the ~emitwith action is called iff a message is logged.
Category management
val register_category : string -> categoryregister a new debugging/verbose category. Note: categories must be added (e.g. via add_debug_keys) after registration.
val pp_category : Format.formatter -> category -> unitpretty-prints a category.
val dkey_name : category -> stringreturns the category name as a string.
val get_category : string -> category optionreturns the corresponding registered category or None if no such category exists.
val get_all_categories : unit -> category listreturns all registered categories.
val add_debug_keys : category -> unitadds categories corresponding to string (including potential subcategories) to the set of categories for which messages are to be displayed. The string must have been registered beforehand.
val del_debug_keys : category -> unitremoves the given categories from the set for which messages are printed. The string must have been registered beforehand.
val get_debug_keys : unit -> category listReturns currently active keys
val is_debug_key_enabled : category -> boolReturns true if the given category is currently active
val register_warn_category : string -> warn_categoryval pp_warn_category : Format.formatter -> warn_category -> unitval wkey_name : warn_category -> stringreturns the warning category name as a string.
val get_warn_category : string -> warn_category optionval get_all_warn_categories : unit -> warn_category listval get_all_warn_categories_status :
unit ->
(warn_category * Log.warn_status) listval set_warn_status : warn_category -> Log.warn_status -> unitval get_warn_status : warn_category -> Log.warn_statusinclude Plugin.S_no_log
val add_group : ?memo:bool -> string -> Cmdline.Group.tCreate a new group inside the plug-in. The given string must be different of all the other group names of this plug-in if memo is false. If memo is true the function will either create a fresh group or return an existing group of the same name in the same plugin. memo defaults to false
module Verbose : Parameter_sig.Intmodule Debug : Parameter_sig.IntHandle the specific `share' directory of the plug-in.
module Session : Parameter_sig.Specific_dirHandle the specific `session' directory of the plug-in.
module Config : Parameter_sig.Specific_dirHandle the specific `config' directory of the plug-in.
val help : Cmdline.Group.tThe group containing option -*-help.
val messages : Cmdline.Group.tThe group containing options -*-debug and -*-verbose.
Message and warning categories
val dkey_alpha : categoryval dkey_alpha_undo : categoryval dkey_asm_contracts : categoryval dkey_ast : categoryval dkey_builtins : categoryval dkey_check : categoryval dkey_constfold : categoryval dkey_comments : categoryval dkey_compilation_db : categoryval dkey_dataflow : categoryval dkey_dataflow_scc : categoryval dkey_dominators : categoryval dkey_dyncalls : categoryval dkey_emitter : categoryval dkey_emitter_clear : categoryval dkey_exn_flow : categoryval dkey_file_transform : categoryval dkey_file_print_one : categoryval dkey_file_annot : categoryval dkey_file_source : categoryMessages related to operations on files during preprocessing/parsing.
val dkey_filter : categoryval dkey_globals : categoryval dkey_kf_blocks : categoryval dkey_linker : categoryval dkey_linker_find : categoryval dkey_loops : categoryval dkey_parser : categoryval dkey_pp : categoryval dkey_pp_logic : categoryval dkey_print_attrs : categoryval dkey_print_bitfields : categoryval dkey_print_builtins : categoryval dkey_print_logic_coercions : categoryval dkey_print_logic_types : categoryval dkey_print_sid : categoryval dkey_print_unspecified : categoryval dkey_print_vid : categoryval dkey_print_field_offsets : categoryval dkey_prop_status : categoryval dkey_prop_status_emit : categoryval dkey_prop_status_merge : categoryval dkey_prop_status_graph : categoryval dkey_prop_status_reg : categoryval dkey_rmtmps : categoryval dkey_referenced : categoryval dkey_task : categoryval dkey_typing_global : categoryval dkey_typing_init : categoryval dkey_typing_chunk : categoryval dkey_typing_cast : categoryval dkey_typing_pragma : categoryval dkey_ulevel : categoryval dkey_visitor : categoryval wkey_annot_error : warn_categoryerror in annotation. If only a warning, annotation will just be ignored.
val wkey_ghost_already_ghost : warn_categoryghost element is qualified with \ghost while this is already the case by default
val wkey_ghost_bad_use : warn_categoryerror in ghost code
val wkey_acsl_float_compare : warn_categoryval wkey_conditional_feature : warn_categoryparsing feature that is only supported in specific modes (e.g. C11, gcc, ...).
val wkey_drop_unused : warn_categoryval wkey_implicit_conv_void_ptr : warn_categoryval wkey_incompatible_types_call : warn_categoryval wkey_incompatible_pointer_types : warn_categoryval wkey_inconsistent_specifier : warn_categoryval wkey_int_conversion : warn_categoryval wkey_cert_exp_46 : warn_categoryval wkey_cert_msc_37 : warn_categoryval wkey_cert_msc_38 : warn_categoryval wkey_cert_exp_10 : warn_categoryval wkey_check_volatile : warn_categoryval wkey_jcdb : warn_categoryval wkey_implicit_function_declaration : warn_categoryval wkey_no_proto : warn_categoryval wkey_missing_spec : warn_categoryval wkey_multi_from : warn_categoryval wkey_decimal_float : warn_categoryval wkey_acsl_extension : warn_categoryval wkey_cmdline : warn_categoryCommand-line related warning, e.g. for invalid options given by the user
val wkey_audit : warn_categoryWarning related to options '-audit-*'.
val wkey_parser_unsupported : warn_categoryWarning related to unsupported parsing-related features.
val wkey_asm : warn_categoryWarnings related to assembly code.
val wkey_unnamed_typedef : warn_categoryWarning related to "unnamed typedef that does not introduce a struct or enumeration type".
val wkey_file_not_found : warn_categoryWarnings related to missing files during preprocessing/parsing.
val wkey_c11 : warn_categoryWarnings related to usage of C11-specific constructions.
Functors for late option registration
Kernel_function-related options cannot be registered in this module: They depend on Globals, which is linked later. We provide here functors to declare them after Globals
module type Input_with_arg = sig ... endOption groups
val inout_source : Cmdline.Group.tval saveload : Cmdline.Group.tval parsing : Cmdline.Group.tval normalisation : Cmdline.Group.tval analysis_options : Cmdline.Group.tval seq : Cmdline.Group.tval project : Cmdline.Group.tval checks : Cmdline.Group.tInstallation Information
module Version : Parameter_sig.BoolBehavior of option "-version"
module PrintVersion : Parameter_sig.BoolBehavior of option "-print-version"
module PrintConfig : Parameter_sig.BoolBehavior of option "-print-config"
Behavior of option "-print-share-path"
module PrintLib : Parameter_sig.BoolBehavior of option "-print-lib-path"
module PrintPluginPath : Parameter_sig.BoolBehavior of option "-print-plugin-path"
module AutocompleteHelp : Parameter_sig.String_setBehavior of option "-autocomplete"
module PrintConfigJson : Parameter_sig.BoolBehavior of option "-print-config-json"
Output Messages
module GeneralVerbose : Parameter_sig.IntBehavior of option "-verbose"
module GeneralDebug : Parameter_sig.IntBehavior of option "-debug"
module Quiet : Parameter_sig.BoolBehavior of option "-quiet"
module Permissive : Parameter_sig.BoolBehavior of option "-permissive"
module Unicode : sig ... endmodule Time : Parameter_sig.StringBehavior of option "-time"
Input / Output Source Code
module PrintCode : Parameter_sig.BoolBehavior of option "-print"
module PrintAsIs : Parameter_sig.BoolBehavior of option "-print-as-is"
module PrintMachdep : Parameter_sig.BoolBehavior of option "-print-machdep"
module PrintMachdepHeader : Parameter_sig.BoolBehavior of option "-print-machdep-header"
module PrintLibc : Parameter_sig.BoolBehavior of option "-print-libc"
module PrintComments : Parameter_sig.BoolBehavior of option "-keep-comments"
module PrintReturn : Parameter_sig.BoolBehavior of option "-print-return"
module CodeOutput : sig ... endBehavior of option "-ocode".
module AstDiff : Parameter_sig.BoolBehavior of option "-ast-diff"
module SymbolicPath : Parameter_sig.Filepath_map with type value = stringBehavior of option "-add-symbolic-path"
module FloatNormal : Parameter_sig.BoolBehavior of option "-float-normal"
module FloatRelative : Parameter_sig.BoolBehavior of option "-float-relative"
module FloatHex : Parameter_sig.BoolBehavior of option "-float-hex"
module BigIntsHex : Parameter_sig.IntBehavior of option "-hexadecimal-big-integers"
module EagerLoadSources : Parameter_sig.BoolBehavior of option "-eager-load-sources"
Save/Load
module SaveState : Parameter_sig.FilepathBehavior of option "-save"
module LoadState : Parameter_sig.FilepathBehavior of option "-load"
module LoadModule : Parameter_sig.String_listBehavior of option "-load-module"
module LoadLibrary : Parameter_sig.String_listBehavior of option "-load-library"
module AutoLoadPlugins : Parameter_sig.BoolBehavior of option "-autoload-plugins"
module Session_dir : Parameter_sig.FilepathDirectory in which session files are searched.
module Config_dir : Parameter_sig.FilepathDirectory in which config files are searched.
module Set_project_as_default : Parameter_sig.BoolUndocumented.
Customizing Normalization and parsing
module UnrollingLevel : Parameter_sig.IntBehavior of option "-ulevel"
module UnrollingForce : Parameter_sig.BoolBehavior of option "-ulevel-force"
module Machdep : Parameter_sig.StringBehavior of option "-machdep". If function set is called, then File.prepare_from_c_files must be called for well preparing the AST.
module LogicalOperators : Parameter_sig.BoolBehavior of invisible option -keep-logical-operators: Tries to avoid converting && and || into conditional statements. Note that this option is incompatible with many (most) plug-ins of the platform and thus should only be enabled with great care and for very specific analyses need.
module Enums : Parameter_sig.StringBehavior of option "-enums"
module CppCommand : Parameter_sig.StringBehavior of option "-cpp-command"
module CppExtraArgs : Parameter_sig.String_listBehavior of option "-cpp-extra-args"
module CppExtraArgsPerFile :
Parameter_sig.Filepath_map with type value = stringBehavior of option "-cpp-extra-args-per-file"
module CppGnuLike : Parameter_sig.BoolBehavior of option "-cpp-frama-c-compliant"
module PrintCppCommands : Parameter_sig.BoolBehavior of option "-print-cpp-commands"
module AuditPrepare : Parameter_sig.FilepathBehavior of option "-audit-prepare"
module AuditCheck : Parameter_sig.FilepathBehavior of option "-audit-check"
module FramaCStdLib : Parameter_sig.BoolBehavior of option "-frama-c-stdlib"
module ReadAnnot : Parameter_sig.BoolBehavior of option "-read-annot"
module PreprocessAnnot : Parameter_sig.BoolBehavior of option "-pp-annot"
module ContinueOnAnnotError : Parameter_sig.BoolBehavior of option "-continue-annot-error"
module SimplifyCfg : Parameter_sig.BoolBehavior of option "-simplify-cfg"
module KeepSwitch : Parameter_sig.BoolBehavior of option "-keep-switch"
Behavior of option "-keep-unused-specified-functions".
module Keep_unused_types : Parameter_sig.BoolBehavior of option "-keep-unused-types".
module SimplifyTrivialLoops : Parameter_sig.BoolBehavior of option "-simplify-trivial-loops".
module Constfold : Parameter_sig.BoolBehavior of option "-constfold"
Behavior of option "-initialized-padding-locals"
module AggressiveMerging : Parameter_sig.BoolBehavior of option "-aggressive-merging"
module AsmContractsGenerate : Parameter_sig.BoolBehavior of option "-asm-contracts"
Behavior of option "-asm-contracts-auto-validate."
module RemoveExn : Parameter_sig.BoolBehavior of option "-remove-exn"
module Files : Parameter_sig.Filepath_listAnalyzed files
module Orig_name : Parameter_sig.BoolBehavior of option "-orig-name"
val normalization_parameters : unit -> Typed_parameter.t listAll the normalization options that influence the AST (in particular, changing one will reset the AST entirely.contents
module WarnDecimalFloat : Parameter_sig.StringBehavior of option "-warn-decimal-float"
Behavior of option "-implicit-function-declaration"
module C11 : Parameter_sig.BoolBehavior of option "-c11"
Behavior of option "-json-compilation-database"
Customizing cabs2cil options
module AllowDuplication : Parameter_sig.BoolBehavior of option "-allow-duplication".
module DoCollapseCallCast : Parameter_sig.BoolBehavior of option "-collapse-call-cast".
Analysis Behavior of options
module MainFunction : sig ... endBehavior of option "-main".
module LibEntry : sig ... endBehavior of option "-lib-entry".
module UnspecifiedAccess : Parameter_sig.BoolBehavior of option "-unspecified-access"
module SafeArrays : Parameter_sig.BoolBehavior of option "-safe-arrays".
module SignedOverflow : Parameter_sig.BoolBehavior of option "-warn-signed-overflow"
module UnsignedOverflow : Parameter_sig.BoolBehavior of option "-warn-unsigned-overflow"
module LeftShiftNegative : Parameter_sig.BoolBehavior of option "-warn-left-shift-negative"
module RightShiftNegative : Parameter_sig.BoolBehavior of option "-warn-right-shift-negative"
module SignedDowncast : Parameter_sig.BoolBehavior of option "-warn-signed-downcast"
module UnsignedDowncast : Parameter_sig.BoolBehavior of option "-warn-unsigned-downcast"
module PointerDowncast : Parameter_sig.BoolBehavior of option "-warn-pointer-downcast"
module SpecialFloat : Parameter_sig.StringBehavior of option "-warn-special-float"
module InvalidBool : Parameter_sig.BoolBehavior of option "-warn-invalid-bool"
module InvalidPointer : Parameter_sig.BoolBehavior of option "-warn-invalid-pointer"
module AbsoluteValidRange : Parameter_sig.StringBehavior of option "-absolute-valid-range"
Checks
module Check : Parameter_sig.BoolBehavior of option "-check"
module Copy : Parameter_sig.BoolBehavior of option "-copy"
module TypeCheck : Parameter_sig.BoolBehavior of option "-typecheck"