Module Visitor_behavior

module Visitor_behavior: sig .. end

Operations on visitor behaviors.


type t 

How the visitor should behave in front of mutable fields: in place modification or copy of the structure. This type is abstract. Use one of the two values below in your classes.

val inplace : unit -> t

In-place modification. Behavior of the original cil visitor.

val copy : Project.t -> t

Makes fresh copies of the mutable structures.

val refresh : Project.t -> t

Makes fresh copies of the mutable structures and provides fresh id for the structures that have ids. Note that as for Visitor_behavior.copy, only varinfo that are declared in the scope of the visit will be copied and provided with a new id.

val is_fresh : t -> bool

true iff the behavior provides fresh id for copied structs with id. Always false for an inplace visitor.

val is_copy : t -> bool

true iff the behavior is a copy behavior.

val get_project : t -> Project.t option
module Reset: sig .. end

Reset operations on behaviors, allows to reset the tables associated to a given kind of AST elements.

module type Get = sig .. end
module Get: Get 

Get operations on behaviors, allows to get the representative of an AST element in the current state of the visitor.

module Get_orig: Get 

Get operations on behaviors, allows to get the original representative of an element of the new AST in the curent state of the visitor.

module Memo: Get 

Memo operations on behaviors, allows to get a binding in the new project for the given AST element, creating one if it does not already exists.

module type Set = sig .. end
module Set: Set 

Set operations on behaviors, allows to change the representative of a given AST element in the current state of the visitor.

module Set_orig: Set 

Set operations on behaviors related to original representatives, allows to change the reference of an element of the new AST in the current state of the visitor.

module type Unset = sig .. end
module Unset: Unset 

Operations to remove the entry associated to a given AST element in the current state of the visitor.

module Unset_orig: Unset 

Operations to remove the entry associated to a given element of the new AST in the current state of the visitor.

module Iter: sig .. end

Iter operations on the table of a given type of AST elements.

module Fold: sig .. end

Fold operations on table of a given type of AST elements.