Commit 60ba5fa
Rewire interprocedural to be one-Analysis [1] update public interface
Summary:
**About the stack**
After some discussion, all the pysa stakeholders are agreed that we don't have
any expectation of needing to run multiple concurrent analyses and share data
across them.
As a result, we can significantly simplify the framework by restricting
to one analysis at a time.
Code simplification is an important long-term goal, but our immediate concern
is really functionality: by restricting the framework to run on one analysis
at a time, we can make it possible for us to put callbacks into the analysis
which the "plumbing" code, such as callgraph construction, can use to customize
framework behavior for each analysis; this isn't possible to do cleanly in
a multi-analysis framework because it's not clear which analysis would call
the shots.
This change is needed to unblock full feature parity of interprocedural
infer vs ordinary infer, because we need the ability to exclude some code
from the analysis based on commandline flags that don't line up with
taint.
**About this diff**
It's going to take some time to fully simplify the existing multi-analysis
code. This diff is a minimal initial change to rewire the public functions
from `interproceduralAnalysis.ml` while making it trivial to review the
changes; the interfaces are clean but the code is now a little messy
because to preserve the existing logic I'm often doing a "fold" over just one
analysis.
I'll stack changes on top to both simplify the interproceduralResult types
and get rid of some of the accumulate boilerplate still left over because
we previously had to fold over analyses.
Reviewed By: dkgi
Differential Revision: D28886238
fbshipit-source-id: d82d3c422a71c8ce0a260289e0ab36d67e60d3561 parent 8a355b9 commit 60ba5fa
File tree
10 files changed
+45
-133
lines changed- source
- command
- interprocedural_analyses
- taint/test
- type_inference/test
- interprocedural
- test
- service
10 files changed
+45
-133
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
180 | | - | |
| 180 | + | |
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
237 | | - | |
| 237 | + | |
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
22 | 19 | | |
23 | 20 | | |
24 | 21 | | |
25 | 22 | | |
26 | 23 | | |
27 | 24 | | |
28 | 25 | | |
29 | | - | |
30 | | - | |
| 26 | + | |
31 | 27 | | |
32 | 28 | | |
33 | 29 | | |
| |||
57 | 53 | | |
58 | 54 | | |
59 | 55 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
| 56 | + | |
64 | 57 | | |
65 | 58 | | |
66 | 59 | | |
| |||
103 | 96 | | |
104 | 97 | | |
105 | 98 | | |
106 | | - | |
| 99 | + | |
107 | 100 | | |
108 | 101 | | |
109 | 102 | | |
| |||
113 | 106 | | |
114 | 107 | | |
115 | 108 | | |
116 | | - | |
| 109 | + | |
117 | 110 | | |
118 | 111 | | |
119 | 112 | | |
| |||
289 | 282 | | |
290 | 283 | | |
291 | 284 | | |
292 | | - | |
| 285 | + | |
293 | 286 | | |
294 | 287 | | |
295 | 288 | | |
| |||
329 | 322 | | |
330 | 323 | | |
331 | 324 | | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
| 325 | + | |
338 | 326 | | |
339 | 327 | | |
340 | 328 | | |
| |||
407 | 395 | | |
408 | 396 | | |
409 | 397 | | |
410 | | - | |
| 398 | + | |
411 | 399 | | |
412 | 400 | | |
413 | 401 | | |
| |||
446 | 434 | | |
447 | 435 | | |
448 | 436 | | |
449 | | - | |
| 437 | + | |
450 | 438 | | |
451 | 439 | | |
452 | 440 | | |
453 | 441 | | |
454 | 442 | | |
455 | | - | |
| 443 | + | |
456 | 444 | | |
457 | 445 | | |
458 | 446 | | |
| |||
470 | 458 | | |
471 | 459 | | |
472 | 460 | | |
473 | | - | |
474 | | - | |
| 461 | + | |
| 462 | + | |
475 | 463 | | |
476 | 464 | | |
477 | | - | |
| 465 | + | |
478 | 466 | | |
479 | 467 | | |
480 | 468 | | |
| |||
564 | 552 | | |
565 | 553 | | |
566 | 554 | | |
567 | | - | |
| 555 | + | |
568 | 556 | | |
569 | 557 | | |
570 | 558 | | |
| |||
635 | 623 | | |
636 | 624 | | |
637 | 625 | | |
638 | | - | |
| 626 | + | |
639 | 627 | | |
640 | 628 | | |
641 | 629 | | |
| |||
722 | 710 | | |
723 | 711 | | |
724 | 712 | | |
725 | | - | |
| 713 | + | |
726 | 714 | | |
727 | 715 | | |
728 | 716 | | |
| |||
740 | 728 | | |
741 | 729 | | |
742 | 730 | | |
743 | | - | |
744 | | - | |
| 731 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
Lines changed: 5 additions & 77 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
| 109 | + | |
179 | 110 | | |
180 | 111 | | |
181 | 112 | | |
| |||
197 | 128 | | |
198 | 129 | | |
199 | 130 | | |
200 | | - | |
| 131 | + | |
201 | 132 | | |
202 | 133 | | |
203 | 134 | | |
204 | 135 | | |
205 | 136 | | |
206 | 137 | | |
207 | | - | |
208 | | - | |
| 138 | + | |
209 | 139 | | |
210 | 140 | | |
211 | 141 | | |
| |||
215 | 145 | | |
216 | 146 | | |
217 | 147 | | |
218 | | - | |
| 148 | + | |
219 | 149 | | |
220 | 150 | | |
221 | 151 | | |
| |||
228 | 158 | | |
229 | 159 | | |
230 | 160 | | |
231 | | - | |
232 | | - | |
233 | 161 | | |
234 | 162 | | |
235 | 163 | | |
| |||
262 | 190 | | |
263 | 191 | | |
264 | 192 | | |
265 | | - | |
| 193 | + | |
266 | 194 | | |
267 | 195 | | |
268 | 196 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
34 | | - | |
| 33 | + | |
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
| 112 | + | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| |||
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | 39 | | |
41 | 40 | | |
42 | 41 | | |
43 | 42 | | |
44 | | - | |
| 43 | + | |
45 | 44 | | |
46 | 45 | | |
47 | 46 | | |
| |||
0 commit comments