module Ast_info: sig
.. end
AST manipulation utilities.
Consult the Plugin Development Guide for additional details.
Annotations
val lift_annot_func : (Cil_types.code_annotation -> 'a) -> Cil_types.rooted_code_annotation -> '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) ->
Cil_types.rooted_code_annotation 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 -> My_bigint.t option
val possible_value_of_integral_expr : Cil_types.exp -> My_bigint.t option
val value_of_integral_const : Cil_types.constant -> My_bigint.t
val value_of_integral_expr : Cil_types.exp -> My_bigint.t
val constant_expr : loc:Cil_types.location -> My_bigint.t -> 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 -> My_bigint.t 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 : Cil_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_assumes : Cil_types.funbehavior -> Cil_types.predicate Cil_types.named
Since Nitrogen-20111001
Builds the conjonction of the [b_assumes]
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 disjoint_behaviors : Cil_types.funspec -> string list -> Cil_types.predicate Cil_types.named
Since Nitrogen-20111001
Builds the [disjoint_behaviors] property for the behavior names
val complete_behaviors : Cil_types.funspec -> string list -> Cil_types.predicate Cil_types.named
Since Nitrogen-20111001
Builds the [disjoint_behaviors] property for the behavior names
val merge_assigns : Cil_types.funbehavior list -> Cil_types.identified_term Cil_types.assigns
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 -> My_bigint.t -> 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 -> My_bigint.t
val array_size : Cil_types.typ -> My_bigint.t
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 can_be_cea_function : string -> bool
val is_cea_function : string -> bool
val is_cea_dump_function : string -> bool
val is_cea_alloc_with_validity : string -> bool
val is_cea_dump_function : string -> bool
val is_cea_dump_file_function : string -> bool
val is_frama_c_builtin : string -> bool