Lang.AstSourceAbstract Syntax Tree extension for the simple Universal language.
type Mopsa.typ += | T_boolBoolean
*)| T_intMathematical integers with arbitrary precision.
*)| T_float of float_precFloating-point real numbers.
*)| T_stringStrings.
*)| T_array of Mopsa.typArray of typ
| T_unitUnit type
*)| T_chartype Mopsa.constant += | C_unit| C_bool of bool| C_int of Z.tInteger numbers, with arbitrary precision.
*)| C_float of floatFloating-point numbers.
*)| C_string of stringString constants.
*)| C_int_interval of Mopsa.ItvUtils.IntBound.t * Mopsa.ItvUtils.IntBound.tInteger ranges.
*)| C_float_interval of float * floatFloat ranges.
*)Constants.
type Mopsa.operator += | O_sqrtsquare root
*)| O_absabsolute value
*)| O_bit_invertbitwise ~
*)| O_wrap of Z.t * Z.twrap
*)| O_filter_float_class of float_classfilter float by class
*)| O_plus| O_minus| O_mult*
*)| O_div/
*)| O_mod% where the remainder can be negative, following C
*)| O_ediveuclidian division
*)| O_eremremainder for euclidian division
*)| O_powpower
*)| O_bit_and&
*)| O_bit_or|
*)| O_bit_xor^
*)| O_bit_rshift>>
*)| O_bit_lshift<<
*)| O_concatconcatenation of arrays and strings
*)| O_convex_joinconvex join of arithmetic expressions
*)| O_float_class of float_classtype fundec = {fun_orig_name : string;original name of the function
*)fun_uniq_name : string;unique name of the function
*)fun_range : Mopsa.range;function range
*)fun_parameters : Mopsa.var list;list of parameters
*)fun_locvars : Mopsa.var list;list of local variables
*)mutable fun_body : Mopsa.stmt;body of the function
*)fun_return_type : Mopsa.typ option;return type
*)fun_return_var : Mopsa.var;variable storing the return value
*)}Function definition
type u_program = {universal_gvars : Mopsa.var list;universal_fundecs : fundec list;universal_main : Mopsa.stmt;}module UProgramKey : sig ... endFlow-insensitive context to keep the analyzed C program
Set the C program in the flow
Get the C program from the flow
type Mopsa.expr_kind += | E_function of fun_expr| E_call of Mopsa.expr * Mopsa.expr listList of arguments
*)| E_array of Mopsa.expr list| E_subscript of Mopsa.expr * Mopsa.expr| E_len of Mopsa.exprtype Mopsa.stmt_kind += | S_expression of Mopsa.exprExpression statement, useful for calling functions without a return value
*)| S_if of Mopsa.expr * Mopsa.stmt * Mopsa.stmtelse branch
*)| S_return of Mopsa.expr optionFunction return with an optional return expression
*)| S_while of Mopsa.expr * Mopsa.stmtloop body
*)| S_breakLoop break
*)| S_continueLoop continue
*)| S_unit_tests of (string * Mopsa.stmt) listlist of unit tests and their names
*)| S_assert of Mopsa.exprUnit tests assertions
*)| S_satisfy of Mopsa.exprUnit tests satisfiability check
*)| S_print_statePrint the abstract flow map at current location
*)| S_print_expr of Mopsa.expr listPretty print the values of expressions
*)| S_free of Mopsa.addrRelease a heap address
*)val mk_int_interval :
int ->
int ->
?typ:Mopsa.typ ->
Mopsa_utils.Location.range ->
Mopsa.exprval mk_int_general_interval :
Mopsa.ItvUtils.IntBound.t ->
Mopsa.ItvUtils.IntBound.t ->
?typ:Mopsa.typ ->
Mopsa_utils.Location.range ->
Mopsa.exprval mk_float_interval :
?prec:float_prec ->
float ->
float ->
Mopsa_utils.Location.range ->
Mopsa.exprval mk_in :
?strict:bool ->
?left_strict:bool ->
?right_strict:bool ->
?etyp:Mopsa.typ ->
Mopsa.expr ->
Mopsa.expr ->
Mopsa.expr ->
Mopsa_utils.Location.range ->
Mopsa.exprval add :
Mopsa.expr ->
Mopsa.expr ->
?typ:Ast.Typ.typ ->
Mopsa_utils.Location.range ->
Mopsa.exprval sub :
Mopsa.expr ->
Mopsa.expr ->
?typ:Ast.Typ.typ ->
Mopsa_utils.Location.range ->
Mopsa.exprval mul :
Mopsa.expr ->
Mopsa.expr ->
?typ:Ast.Typ.typ ->
Mopsa_utils.Location.range ->
Mopsa.exprval div :
Mopsa.expr ->
Mopsa.expr ->
?typ:Ast.Typ.typ ->
Mopsa_utils.Location.range ->
Mopsa.exprval ediv :
Mopsa.expr ->
Mopsa.expr ->
?typ:Ast.Typ.typ ->
Mopsa_utils.Location.range ->
Mopsa.exprval _mod_ :
Mopsa.expr ->
Mopsa.expr ->
?typ:Ast.Typ.typ ->
Mopsa_utils.Location.range ->
Mopsa.exprval erem :
Mopsa.expr ->
Mopsa.expr ->
?typ:Ast.Typ.typ ->
Mopsa_utils.Location.range ->
Mopsa.exprval eq :
Mopsa.expr ->
Mopsa.expr ->
?etyp:Mopsa.typ ->
Mopsa_utils.Location.range ->
Mopsa.exprval ne :
Mopsa.expr ->
Mopsa.expr ->
?etyp:Mopsa.typ ->
Mopsa_utils.Location.range ->
Mopsa.exprval lt :
Mopsa.expr ->
Mopsa.expr ->
?etyp:Mopsa.typ ->
Mopsa_utils.Location.range ->
Mopsa.exprval le :
Mopsa.expr ->
Mopsa.expr ->
?etyp:Mopsa.typ ->
Mopsa_utils.Location.range ->
Mopsa.exprval gt :
Mopsa.expr ->
Mopsa.expr ->
?etyp:Mopsa.typ ->
Mopsa_utils.Location.range ->
Mopsa.exprval ge :
Mopsa.expr ->
Mopsa.expr ->
?etyp:Mopsa.typ ->
Mopsa_utils.Location.range ->
Mopsa.exprval mk_eq :
Mopsa.expr ->
Mopsa.expr ->
?etyp:Mopsa.typ ->
Mopsa_utils.Location.range ->
Mopsa.exprval mk_ne :
Mopsa.expr ->
Mopsa.expr ->
?etyp:Mopsa.typ ->
Mopsa_utils.Location.range ->
Mopsa.exprval mk_lt :
Mopsa.expr ->
Mopsa.expr ->
?etyp:Mopsa.typ ->
Mopsa_utils.Location.range ->
Mopsa.exprval mk_le :
Mopsa.expr ->
Mopsa.expr ->
?etyp:Mopsa.typ ->
Mopsa_utils.Location.range ->
Mopsa.exprval mk_gt :
Mopsa.expr ->
Mopsa.expr ->
?etyp:Mopsa.typ ->
Mopsa_utils.Location.range ->
Mopsa.exprval mk_ge :
Mopsa.expr ->
Mopsa.expr ->
?etyp:Mopsa.typ ->
Mopsa_utils.Location.range ->
Mopsa.exprval log_or :
Mopsa.expr ->
Mopsa.expr ->
?etyp:Mopsa.typ ->
Mopsa_utils.Location.range ->
Mopsa.exprval log_and :
Mopsa.expr ->
Mopsa.expr ->
?etyp:Mopsa.typ ->
Mopsa_utils.Location.range ->
Mopsa.exprval log_xor :
Mopsa.expr ->
Mopsa.expr ->
?etyp:Mopsa.typ ->
Mopsa_utils.Location.range ->
Mopsa.exprval mk_log_or :
Mopsa.expr ->
Mopsa.expr ->
?etyp:Mopsa.typ ->
Mopsa_utils.Location.range ->
Mopsa.exprval mk_log_and :
Mopsa.expr ->
Mopsa.expr ->
?etyp:Mopsa.typ ->
Mopsa_utils.Location.range ->
Mopsa.exprval mk_log_xor :
Mopsa.expr ->
Mopsa.expr ->
?etyp:Mopsa.typ ->
Mopsa_utils.Location.range ->
Mopsa.exprval mk_filter_float_class :
float_class ->
Mopsa.expr ->
Mopsa_utils.Location.range ->
Mopsa.exprval mk_block :
Mopsa.stmt list ->
?vars:Ast.Var.var list ->
Mopsa_utils.Location.range ->
Mopsa.stmtval mk_if :
Mopsa.expr ->
Mopsa.stmt ->
Mopsa.stmt ->
Mopsa_utils.Location.range ->
Mopsa.stmtval mk_rename_addr :
Ast.Addr.addr ->
Ast.Addr.addr ->
Mopsa_utils.Location.range ->
Mopsa.stmtval mk_expand_addr :
Ast.Addr.addr ->
Ast.Addr.addr list ->
Mopsa_utils.Location.range ->
Mopsa.stmtval mk_fold_addr :
Ast.Addr.addr ->
Ast.Addr.addr list ->
Mopsa_utils.Location.range ->
Mopsa.stmt