LineageShape.Summary
val pp : Stdlib.Format.formatter -> t -> unit
val fold_field_labels :
t option ->
VarPath.t ->
init:'accum ->
f:('accum -> FieldLabel.t -> 'accum) ->
fallback:('accum -> 'accum) ->
'accum
If a variable path has a shape that corresponds to a statically known set of field labels, folds over those field labels.
Otherwise, calls the fallback
function on init
.
If the summary is None
, will always fallback.
val as_field_label_singleton : t option -> VarPath.t -> FieldLabel.t option
If a variable path has the shape that corresponds to a single statically known label, return it.
Folds over all cells under a variable and field path. A field path is "terminal" if its length (that includes the prefixed fields given as parameters) is equal to IBase.Config.lineage_field_depth
, or no more field can be subscripted from its corresponding type, or it has strictly more than IBase.Config.lineage_field_width
immediate subfields.
The result will not cross any shape whose field table is wider than IBase.Config.lineage_field_width
, even if one of the parameter does. For instance, if some variable X
has a huge number of fields, the only terminal field of X#field1
will be X
itself.
If the summary is None
, f
will be called once with a var-only abstract cell.
val fold_argument :
t option ->
int ->
FieldPath.t ->
init:'accum ->
f:('accum -> FieldPath.t -> 'accum) ->
'accum
Folds over the terminal field paths of the given field of the argument at the given index. See fold_cells
.
val fold_return :
t option ->
FieldPath.t ->
init:'accum ->
f:('accum -> FieldPath.t -> 'accum) ->
'accum
Folds over the terminal field paths of the given field of the formal return. See fold_cells
.
Special instances of fold_...
functions when one wants to build a list.
val map_argument :
t option ->
int ->
FieldPath.t ->
f:(FieldPath.t -> 'a) ->
'a list
val map_return : t option -> FieldPath.t -> f:(FieldPath.t -> 'a) -> 'a list
val map_argument_of :
t option ->
IR.Procname.t ->
int ->
FieldPath.t ->
f:(FieldPath.t -> 'a) ->
'a list
val map_return_of :
t option ->
IR.Procname.t ->
FieldPath.t ->
f:(FieldPath.t -> 'a) ->
'a list