package mopsa
Install
    
    dune-project
 Dependency
Authors
Maintainers
Sources
md5=37966e98ffeebcedc09bd6e9b2b81f69
    
    
  sha512=40d4d826c25f680766c07eccbabdf5e8a4fa023016e8a164e4e4f6b3781c8484dc4df437055721dfd19b9db8fb7fe3b61236c4833186d346fc7204a68d01eaaa
    
    
  doc/mopsa.mopsa_analyzer/Mopsa_analyzer/Languages/C/Lang/Frontend/index.html
Module Lang.Frontend
C front-end to translate parser AST into MOPSA AST
val debug : ('a, Format.formatter, unit, unit) format4 -> 'aCommand-line options
========================
val opt_clang : string list refExtra options to pass to clang when parsing
val opt_include_dirs : string list refList of include directories
val opt_make_target : string refName of the target binary to analyze
val opt_without_libc : bool refDisable stubs of the standard library
val opt_enable_cache : bool refEnable the parser cache.
val opt_warn_all : bool refDisplay all compiler warnings
val opt_use_stub : string list refLists of functions that the body will be replaced by a stub
val opt_library_only : bool refAllow library-only targets in the .db files (used for multilanguage analysis)
val opt_target_triple : string refTarget architecture triple to analyze for (host if left empty)
val opt_stubs_files : string list refAdditional stub files to parse
List of translation units to ignore during linking
val opt_save_preprocessed_file : string refWhere to save the preprocessed file
val opt_store_project : bool refStore project in memory for automated testcase reduction capabilities
Contexts
============
type ctx = {ctx_prj : Mopsa_c_parser.C_AST.project;ctx_fun : Lang.Ast.c_fundec Mopsa_c_parser.C_AST.StringMap.t;ctx_type : (type_space * string, MopsaLib.typ) Hashtbl.t;ctx_vars : (int * string, MopsaLib.var * Mopsa_c_parser.C_AST.variable) Hashtbl.t;ctx_macros : Mopsa_c_parser.C_AST.macro Mopsa_c_parser.C_AST.StringMap.t;ctx_predicates : Mopsa_c_stubs_parser.Passes.Preprocessor.predicate Mopsa_c_parser.C_AST.StringMap.t;ctx_stubs : (string, Mopsa_c_stubs_parser.Cst.stub) Hashtbl.t;ctx_enums : Z.t Mopsa_c_parser.C_AST.StringMap.t;
}val input_files : string list refList of input files
val target_info : Mopsa_c_parser.Clang_AST.target_info refTarget information used for parsing
val o_prj : Mopsa_c_parser.C_AST.project option refSaved project
val find_function_in_context : 
  ctx ->
  Mopsa_utils.Core.Location.range ->
  Mopsa_c_parser.C_AST.func ->
  Lang.Ast.c_fundecval get_parsed_system_headers : 
  Mopsa_c_parser.Clang_to_C.context ->
  string listval save_preprocessed_file : 
  Mopsa_c_parser.C_AST.project ->
  string ->
  string listEntry point
===============
val parse_program : string list -> MopsaLib.programval parse_db : string -> Mopsa_c_parser.Clang_to_C.context -> unitval parse_file : 
  string ->
  ?nb:(int * int) ->
  ?stub:bool ->
  string list ->
  string ->
  bool ->
  bool ->
  Mopsa_c_parser.Clang_to_C.context ->
  unitval parse_stubs : Mopsa_c_parser.Clang_to_C.context -> unit -> unitval from_project : Mopsa_c_parser.C_AST.project -> MopsaLib.prog_kindval find_target : String.t -> string list -> stringfunctions
=============
val from_function : Mopsa_c_parser.C_AST.func -> Lang.Ast.c_fundecScope update
****************
val from_scope_update : 
  ctx ->
  Mopsa_c_parser.C_AST.scope_update ->
  Lang.Ast.c_scope_updateStatements
==============
val from_stmt : ctx -> Mopsa_c_parser.C_AST.statement -> MopsaLib.stmtval from_block : 
  ctx ->
  MopsaLib.range ->
  Mopsa_c_parser.C_AST.block ->
  MopsaLib.stmtval from_body_option : 
  ctx ->
  MopsaLib.range ->
  Mopsa_c_parser.C_AST.block option ->
  MopsaLib.stmt optionExpressions
===============
val from_expr : ctx -> Mopsa_c_parser.C_AST.expr -> MopsaLib.exprval from_expr_option : 
  ctx ->
  Mopsa_c_parser.C_AST.expr option ->
  MopsaLib.expr optionval from_unary_operator : 
  Mopsa_c_parser.C_AST.unary_operator ->
  MopsaLib.typ ->
  Framework.Core.Ast.Operator.operatorval from_binary_operator : 
  Mopsa_c_parser.C_AST.binary_operator ->
  MopsaLib.typ ->
  Framework.Core.Ast.Operator.operatorval from_character_kind : 
  Mopsa_c_parser.C_AST.character_kind ->
  Lang.Ast.c_character_kindVariables
=============
val from_var : ctx -> Mopsa_c_parser.C_AST.variable -> MopsaLib.varval patch_array_parameters : MopsaLib.var -> MopsaLib.varval from_var_scope : 
  ctx ->
  Mopsa_c_parser.C_AST.variable_kind ->
  Lang.Ast.c_var_scopeval from_var_init : 
  ctx ->
  Mopsa_c_parser.C_AST.variable ->
  Lang.Ast.c_var_init optionval from_init_option : 
  ctx ->
  Mopsa_c_parser.C_AST.init option ->
  Lang.Ast.c_var_init optionval from_init : ctx -> Mopsa_c_parser.C_AST.init -> Lang.Ast.c_var_initTypes
=========
val from_typ : ctx -> Mopsa_c_parser.C_AST.type_qual -> MopsaLib.typval from_unqual_typ : ctx -> Mopsa_c_parser.C_AST.typ -> MopsaLib.typval from_integer_type : 
  Mopsa_c_parser.C_AST.integer_type ->
  Lang.Ast.c_integer_typeval from_float_type : Mopsa_c_parser.C_AST.float_type -> Lang.Ast.c_float_typeval from_array_length : 
  ctx ->
  Mopsa_c_parser.C_AST.array_length ->
  Lang.Ast.c_array_lengthval from_function_type : 
  ctx ->
  Mopsa_c_parser.C_AST.function_type ->
  Lang.Ast.c_function_typeval find_field_index : Mopsa_c_parser.C_AST.type_qual -> string -> intval under_type : 
  Mopsa_c_parser.C_AST.type_qual ->
  Mopsa_c_parser.C_AST.type_qualRanges and locations
========================
val from_loc : Mopsa_c_parser.Clang_AST.loc -> Mopsa_utils.Core.Location.posval from_eloc : Mopsa_c_parser.Clang_AST.eloc -> Mopsa_utils.Core.Location.eposval from_range : Mopsa_c_parser.C_AST.range -> MopsaLib.rangeStubs annotations
=====================
val from_stub_comment : 
  ctx ->
  Mopsa_c_parser.C_AST.func ->
  Stubs.Ast.stub_func optionval from_stub_func : 
  ctx ->
  Mopsa_c_parser.C_AST.func ->
  Parsing.Ast.stub ->
  Stubs.Ast.stub_funcval from_stub_section : ctx -> Parsing.Ast.section -> Stubs.Ast.sectionval from_stub_leaf : ctx -> Parsing.Ast.leaf -> Stubs.Ast.leafval from_stub_case : ctx -> Parsing.Ast.case -> Stubs.Ast.caseval from_stub_requires : 
  ctx ->
  Parsing.Ast.requires Mopsa_utils.Core.Location.with_range ->
  Stubs.Ast.requires MopsaLib.with_rangeval from_stub_free : 
  ctx ->
  Parsing.Ast.free Mopsa_utils.Core.Location.with_range ->
  Stubs.Ast.free MopsaLib.with_rangeval from_stub_message : 
  ctx ->
  Parsing.Ast.message Mopsa_utils.Core.Location.with_range ->
  Stubs.Ast.message MopsaLib.with_rangeval from_stub_message_kind : Parsing.Ast.message_kind -> Stubs.Ast.message_kindval from_stub_assigns : 
  ctx ->
  Parsing.Ast.assigns Mopsa_utils.Core.Location.with_range ->
  Stubs.Ast.assigns MopsaLib.with_rangeval from_stub_local : 
  ctx ->
  Parsing.Ast.local Mopsa_utils.Core.Location.with_range ->
  Stubs.Ast.local MopsaLib.with_rangeval from_stub_local_value : 
  ctx ->
  Parsing.Ast.local_value ->
  Stubs.Ast.local_valueval from_stub_ensures : 
  ctx ->
  Parsing.Ast.ensures Mopsa_utils.Core.Location.with_range ->
  Stubs.Ast.ensures MopsaLib.with_rangeval from_stub_assumes : 
  ctx ->
  Parsing.Ast.assumes Mopsa_utils.Core.Location.with_range ->
  Stubs.Ast.assumes MopsaLib.with_rangeval from_stub_formula : ctx -> Parsing.Ast.requires -> Stubs.Ast.requiresval from_stub_set : ctx -> Parsing.Ast.set -> Stubs.Ast.setval from_stub_interval : ctx -> Parsing.Ast.interval -> Stubs.Ast.intervalval from_stub_expr : ctx -> Parsing.Ast.free -> Stubs.Ast.freeval from_stub_log_binop : Parsing.Ast.log_binop -> Stubs.Ast.log_binopval from_stub_expr_binop : 
  Mopsa_c_stubs_parser.Ast.binop ->
  Framework.Core.Ast.Operator.operatorval from_stub_expr_unop : 
  Mopsa_c_stubs_parser.Ast.unop ->
  Framework.Core.Ast.Operator.operatorval from_stub_directives : 
  ctx ->
  (Mopsa_c_parser.Clang_AST.comment
   * Mopsa_c_parser.C_AST.macro Mopsa_c_parser.C_AST.StringMap.t)
    list
    Mopsa_c_parser.C_AST.RangeMap.t ->
  Stubs.Ast.stub_directive listval from_stub_directive : ctx -> Parsing.Ast.stub -> Stubs.Ast.stub_directive