Module Absint.HilExp
module Access : sig ... endtype t=|AccessExpression of access_expressionaccess path (e.g., x.f.g or x
i)|UnaryOperator of IR.Unop.t * t * IR.Typ.t optionUnary operator with type of the result if known
|BinaryOperator of IR.Binop.t * t * tBinary operator
|Exception of tException
|Closure of IR.Procname.t * (AccessPath.base * t) listName of function + environment
|Constant of IR.Const.tConstants
|Cast of IR.Typ.t * tType cast
|Sizeof of IR.Typ.t * t optionC-style sizeof(), and also used to treate a type as an expression. Refer to
Expmodule for canonical documentationand access_expression= private|Base of AccessPath.base|FieldOffset of access_expression * IR.Fieldname.tfield access
|ArrayOffset of access_expression * IR.Typ.t * t optionarray access
|AddressOf of access_expression"address of" operator
&|Dereference of access_expression"dereference" operator
*
val compare : t -> t -> intval compare_access_expression : access_expression -> access_expression -> int
module AccessExpression : sig ... endval pp : F.formatter -> t -> unitval get_typ : IR.Tenv.t -> t -> IR.Typ.t optionGet the type of the expression. Warning: not fully implemented
val of_sil : include_array_indexes:bool -> f_resolve_id:(IR.Var.t -> AccessExpression.t option) -> add_deref:bool -> IR.Exp.t -> IR.Typ.t -> tConvert SIL expression to HIL expression
val get_access_exprs : t -> AccessExpression.t listGet all the access paths used in the given HIL expression, including duplicates if a path is used more than once.
val is_null_literal : t -> boolval is_int_zero : t -> boolval eval : t -> IR.Const.t optionval eval_boolean_exp : AccessExpression.t -> t -> bool optioneval_boolean_exp var expreturnsSome bool_valueif the given boolean expressionexpevaluates tobool_valuewhenvaris set to true. Return None if it has free variables that stop us from evaluating it, or is not a boolean expression.
val ignore_cast : t -> tval access_expr_of_exp : include_array_indexes:bool -> f_resolve_id:(IR.Var.t -> AccessExpression.t option) -> IR.Exp.t -> IR.Typ.t -> access_expression optionbest effort translating a SIL expression to an access path, not semantics preserving in particular in the presence of pointer arithmetic