module Ast_info: sig
.. end
AST manipulation utilities.
Consult the Plugin Development Guide for additional details.
val pretty_vname : Format.formatter -> Cil_types.varinfo -> unit
Annotations
val before_after_content : 'a Db_types.before_after -> 'a
val lift_annot_func : (Cil_types.code_annotation -> 'a) ->
Db_types.rooted_code_annotation Db_types.before_after -> 'a
lifts a function that operates on code_annotation up to the
annotations used in Db.
val lift_annot_list_func : (Cil_types.code_annotation list -> 'a) ->
Db_types.rooted_code_annotation Db_types.before_after list -> 'a
lifts a function taking lists of code_annotation up to the annotations
lists in Db. Ignores WP annotations.
Expressions
val is_integral_const : Cil_types.constant -> bool
val possible_value_of_integral_const : Cil_types.constant -> int64 option
val possible_value_of_integral_expr : Cil_types.exp -> int64 option
val value_of_integral_const : Cil_types.constant -> int64
val value_of_integral_expr : Cil_types.exp -> int64
val constant_expr : ?loc:Cil_types.location -> int64 -> Cil_types.exp
val is_null_expr : Cil_types.exp -> bool
val is_non_null_expr : Cil_types.exp -> bool
Logical terms
val possible_value_of_integral_term : Cil_types.term -> int64 option
val term_lvals_of_term : Cil_types.term -> Cil_types.term_lval list
Return the list of all the term lvals of a given term.
Purely syntactic function.
val is_trivial_predicate : Cil_types.predicate -> bool
val is_trivial_rooted_assertion : Db_types.rooted_code_annotation -> bool
val is_trivial_named_predicate : Cil_types.predicate Cil_types.named -> bool
val precondition : Cil_types.funspec -> Cil_types.predicate Cil_types.named
Since Carbon-20101201
Builds the precondition from [b_assumes] and [b_requires] clauses.
val behavior_precondition : Cil_types.funbehavior -> Cil_types.predicate Cil_types.named
Since Carbon-20101201
Builds the precondition from [b_assumes] and [b_requires] clauses.
val behavior_postcondition : Cil_types.funbehavior ->
Cil_types.termination_kind -> Cil_types.predicate Cil_types.named
Change in Boron-20100401: added termination kind as filtering argument.
Builds the postcondition from b_assumes
and b_post_cond
clauses.
val merge_assigns : Cil_types.funbehavior list ->
Cil_types.identified_term Cil_types.assigns list
Returns the assigns of an unguarded behavior.
val variable_term : Cil_types.location -> Cil_types.logic_var -> Cil_types.term
val constant_term : Cil_types.location -> int64 -> Cil_types.term
val is_null_term : Cil_types.term -> bool
Predicates
val predicate : Cil_types.location ->
Cil_types.predicate -> Cil_types.predicate Cil_types.named
Statements
val is_loop_statement : Cil_types.stmt -> bool
val get_sid : Cil_types.kinstr -> int
val mkassign : Cil_types.lval -> Cil_types.exp -> Cil_types.location -> Cil_types.instr
val mkassign_statement : Cil_types.lval -> Cil_types.exp -> Cil_types.location -> Cil_types.stmt
val is_block_local : Cil_types.varinfo -> Cil_types.block -> bool
determines if a var is local to a block.
Types
val array_type : ?length:Cil_types.exp ->
?attr:Cil_types.attributes -> Cil_types.typ -> Cil_types.typ
val direct_array_size : Cil_types.typ -> int64
val array_size : Cil_types.typ -> int64
val direct_element_type : Cil_types.typ -> Cil_types.typ
val element_type : Cil_types.typ -> Cil_types.typ
val direct_pointed_type : Cil_types.typ -> Cil_types.typ
val pointed_type : Cil_types.typ -> Cil_types.typ
Functions
val is_function_type : Cil_types.varinfo -> bool
Return true
iff the type of the given varinfo is a function type.
module Function: sig
.. end
Operations on cil function.
Predefined
val is_cea_function : string -> bool
val is_cea_dump_function : string -> bool
val is_cea_alloc_with_validity : string -> bool
val is_frama_c_builtin : string -> bool