@@ -205,7 +205,7 @@ module AnalysisInstance (FunctionContext : FUNCTION_CONTEXT) = struct
205205 in
206206 let breadcrumbs =
207207 BackwardTaint. fold
208- BackwardTaint. simple_feature_self
208+ Features.SimpleSet. Self
209209 element
210210 ~f: Features. gather_breadcrumbs
211211 ~init: Features.SimpleSet. bottom
@@ -239,10 +239,7 @@ module AnalysisInstance (FunctionContext : FUNCTION_CONTEXT) = struct
239239 read_tree extra_path taint_to_propagate
240240 |> BackwardState.Tree. collapse
241241 ~transform: (BackwardTaint. add_features Features. tito_broadening)
242- |> BackwardTaint. transform
243- BackwardTaint. simple_feature_self
244- Abstract.Domain. Add
245- ~f: breadcrumbs
242+ |> BackwardTaint. transform Features.SimpleSet. Self Add ~f: breadcrumbs
246243 |> BackwardTaint. transform
247244 TraceLength. Self
248245 (Context (BackwardTaint. kind, Map ))
@@ -257,11 +254,8 @@ module AnalysisInstance (FunctionContext : FUNCTION_CONTEXT) = struct
257254 in
258255 let add_tito_feature_and_position leaf_taint =
259256 leaf_taint
260- |> FlowDetails. transform
261- FlowDetails. tito_position_element
262- Abstract.Domain. Add
263- ~f: location
264- |> FlowDetails. transform FlowDetails. simple_feature Abstract.Domain. Add ~f: Features. tito
257+ |> FlowDetails. transform Features.TitoPositionSet. Element Add ~f: location
258+ |> FlowDetails. transform Features.SimpleSet. Element Add ~f: Features. tito
265259 in
266260 BackwardState. read
267261 ~transform_non_leaves
@@ -295,7 +289,7 @@ module AnalysisInstance (FunctionContext : FUNCTION_CONTEXT) = struct
295289 in
296290 let taint_in_taint_out =
297291 BackwardState.Tree. transform
298- FlowDetails. tito_position_element
292+ Features.TitoPositionSet. Element
299293 Add
300294 ~f: argument.Node. location
301295 obscure_taint
@@ -324,7 +318,7 @@ module AnalysisInstance (FunctionContext : FUNCTION_CONTEXT) = struct
324318 let features_to_add =
325319 BackwardState.Tree. filter_by_kind ~kind: Sinks. AddFeatureToArgument sink_taint
326320 |> BackwardTaint. fold
327- BackwardTaint. simple_feature_self
321+ Features.SimpleSet. Self
328322 ~f: Features. gather_breadcrumbs
329323 ~init: Features.SimpleSet. bottom
330324 in
@@ -333,10 +327,7 @@ module AnalysisInstance (FunctionContext : FUNCTION_CONTEXT) = struct
333327 else
334328 let taint =
335329 BackwardState. read state.taint ~root ~path
336- |> BackwardState.Tree. transform
337- BackwardTaint. simple_feature_self
338- Abstract.Domain. Add
339- ~f: features_to_add
330+ |> BackwardState.Tree. transform Features.SimpleSet. Self Add ~f: features_to_add
340331 in
341332 { taint = BackwardState. assign ~root ~path taint state.taint }
342333 | None -> state
@@ -359,10 +350,7 @@ module AnalysisInstance (FunctionContext : FUNCTION_CONTEXT) = struct
359350 BackwardState.Tree. collapse
360351 ~transform: (BackwardTaint. add_features Features. tito_broadening)
361352 call_taint
362- |> BackwardTaint. transform
363- BackwardTaint. simple_feature_self
364- Abstract.Domain. Add
365- ~f: breadcrumbs
353+ |> BackwardTaint. transform Features.SimpleSet. Self Add ~f: breadcrumbs
366354 |> BackwardState.Tree. create_leaf
367355 else
368356 BackwardState.Tree. bottom
@@ -390,7 +378,7 @@ module AnalysisInstance (FunctionContext : FUNCTION_CONTEXT) = struct
390378 let analyze_argument ~resolution taint { Call.Argument. value = argument ; _ } state =
391379 let taint =
392380 BackwardState.Tree. transform
393- FlowDetails. tito_position_element
381+ Features.TitoPositionSet. Element
394382 Add
395383 ~f: argument.Node. location
396384 taint
@@ -401,7 +389,7 @@ module AnalysisInstance (FunctionContext : FUNCTION_CONTEXT) = struct
401389 BackwardState.Tree. collapse
402390 ~transform: (BackwardTaint. add_features Features. tito_broadening)
403391 call_taint
404- |> BackwardTaint. transform BackwardTaint. simple_feature Add ~f: Features. obscure
392+ |> BackwardTaint. transform Features.SimpleSet. Element Add ~f: Features. obscure
405393 |> BackwardState.Tree. create_leaf
406394 in
407395 let state =
@@ -563,7 +551,7 @@ module AnalysisInstance (FunctionContext : FUNCTION_CONTEXT) = struct
563551 | _ :: index :: _ ->
564552 let label = get_index index.value in
565553 BackwardState.Tree. transform
566- BackwardTaint. first_indices
554+ Features.FirstIndexSet. Self
567555 Map
568556 ~f: (add_first_index label)
569557 taint
@@ -688,7 +676,7 @@ module AnalysisInstance (FunctionContext : FUNCTION_CONTEXT) = struct
688676 BackwardState.Tree. join
689677 taint
690678 (get_taint (Some (AccessPath. create (Root. Variable " $all" ) [] )) state)
691- |> BackwardState.Tree. transform BackwardTaint. simple_feature Add ~f: Features. lambda
679+ |> BackwardState.Tree. transform Features.SimpleSet. Element Add ~f: Features. lambda
692680 in
693681 let all_assignee =
694682 Node. create
@@ -729,7 +717,7 @@ module AnalysisInstance (FunctionContext : FUNCTION_CONTEXT) = struct
729717 let taint =
730718 BackwardState.Tree. prepend [index] taint
731719 |> BackwardState.Tree. transform
732- BackwardTaint. first_indices
720+ Features.FirstIndexSet. Self
733721 Map
734722 ~f: (add_first_index index)
735723 in
@@ -950,8 +938,8 @@ module AnalysisInstance (FunctionContext : FUNCTION_CONTEXT) = struct
950938 (Name. Attribute
951939 { base = { Node. value = Expression. String _; _ }; attribute = " format" ; _ }) ->
952940 BackwardState.Tree. transform
953- BackwardTaint. simple_feature
954- Abstract.Domain. Add
941+ Features.SimpleSet. Element
942+ Add
955943 ~f: Features. format_string
956944 taint
957945 | _ -> taint
@@ -1017,8 +1005,8 @@ module AnalysisInstance (FunctionContext : FUNCTION_CONTEXT) = struct
10171005 in
10181006 let taint =
10191007 BackwardState.Tree. transform
1020- BackwardTaint. simple_feature
1021- Abstract.Domain. Add
1008+ Features.SimpleSet. Element
1009+ Add
10221010 ~f: Features. format_string
10231011 taint
10241012 in
@@ -1047,11 +1035,7 @@ module AnalysisInstance (FunctionContext : FUNCTION_CONTEXT) = struct
10471035 | Some override -> analyze_expression ~resolution ~taint ~state ~expression: override
10481036 | None ->
10491037 let taint =
1050- BackwardState.Tree. transform
1051- FlowDetails. simple_feature_self
1052- Add
1053- ~f: Features. type_bool
1054- taint
1038+ BackwardState.Tree. transform Features.SimpleSet. Self Add ~f: Features. type_bool taint
10551039 in
10561040 analyze_expression ~resolution ~taint ~state ~expression: right
10571041 |> fun state -> analyze_expression ~resolution ~taint ~state ~expression: left)
@@ -1131,8 +1115,8 @@ module AnalysisInstance (FunctionContext : FUNCTION_CONTEXT) = struct
11311115 in
11321116 if not (Features.SimpleSet. is_bottom attribute_features) then
11331117 BackwardState.Tree. transform
1134- BackwardTaint. simple_feature_self
1135- Abstract.Domain. Add
1118+ Features.SimpleSet. Self
1119+ Add
11361120 ~f: attribute_features
11371121 taint
11381122 else
@@ -1411,10 +1395,7 @@ let extract_tito_and_sink_models define ~is_constructor ~resolution ~existing_ba
14111395 ~transform: (BackwardTaint. add_features Features. widen_broadening)
14121396 tree
14131397 ~mold: essential
1414- |> BackwardState.Tree. transform
1415- BackwardTaint. simple_feature_self
1416- Abstract.Domain. Add
1417- ~f: type_breadcrumbs
1398+ |> BackwardState.Tree. transform Features.SimpleSet. Self Add ~f: type_breadcrumbs
14181399 |> BackwardState.Tree. limit_to
14191400 ~transform: (BackwardTaint. add_features Features. widen_broadening)
14201401 ~width: maximum_model_width
0 commit comments