@@ -81,14 +81,15 @@ AnalysisController::AnalysisController(
8181 CallGraphAnalysisType CGTy, Soundness SoundnessLevel,
8282 bool AutoGlobalSupport, const std::set<std::string> &EntryPoints,
8383 AnalysisStrategy Strategy, AnalysisControllerEmitterOptions EmitterOptions,
84- const std::string &ProjectID, const std::string &OutDirectory)
84+ IFDSIDESolverConfig SolverConfig, const std::string &ProjectID,
85+ const std::string &OutDirectory)
8586 : IRDB(IRDB), TH(IRDB), PT(IRDB, !needsToEmitPTA(EmitterOptions), PTATy),
8687 ICF (IRDB, CGTy, EntryPoints, &TH, &PT, SoundnessLevel, AutoGlobalSupport),
8788 DataFlowAnalyses(std::move(DataFlowAnalyses)),
8889 AnalysisConfigs(std::move(AnalysisConfigs)), EntryPoints(EntryPoints),
8990 Strategy(Strategy), EmitterOptions(EmitterOptions), ProjectID(ProjectID),
90- OutDirectory(OutDirectory), SoundnessLevel(SoundnessLevel ),
91- AutoGlobalSupport(AutoGlobalSupport) {
91+ OutDirectory(OutDirectory), SolverConfig(SolverConfig ),
92+ SoundnessLevel(SoundnessLevel), AutoGlobalSupport(AutoGlobalSupport) {
9293 if (!OutDirectory.empty ()) {
9394 // create directory for results
9495 ResultDirectory = OutDirectory + " /" + ProjectID + " -" + createTimeStamp ();
@@ -145,22 +146,22 @@ void AnalysisController::executeWholeProgram() {
145146 case DataFlowAnalysisType::IFDSUninitializedVariables: {
146147 WholeProgramAnalysis<IFDSSolver_P<IFDSUninitializedVariables>,
147148 IFDSUninitializedVariables>
148- WPA (IRDB, EntryPoints, &PT, &ICF, &TH);
149+ WPA (SolverConfig, IRDB, EntryPoints, &PT, &ICF, &TH);
149150 WPA.solve ();
150151 emitRequestedDataFlowResults (WPA);
151152 WPA.releaseAllHelperAnalyses ();
152153 } break ;
153154 case DataFlowAnalysisType::IFDSConstAnalysis: {
154155 WholeProgramAnalysis<IFDSSolver_P<IFDSConstAnalysis>, IFDSConstAnalysis>
155- WPA (IRDB, EntryPoints, &PT, &ICF, &TH);
156+ WPA (SolverConfig, IRDB, EntryPoints, &PT, &ICF, &TH);
156157 WPA.solve ();
157158 emitRequestedDataFlowResults (WPA);
158159 WPA.releaseAllHelperAnalyses ();
159160 } break ;
160161 case DataFlowAnalysisType::IFDSTaintAnalysis: {
161162 auto Config = getTaintConfig ();
162163 WholeProgramAnalysis<IFDSSolver_P<IFDSTaintAnalysis>, IFDSTaintAnalysis>
163- WPA (IRDB, &Config, EntryPoints, &PT, &ICF, &TH);
164+ WPA (SolverConfig, IRDB, &Config, EntryPoints, &PT, &ICF, &TH);
164165 WPA.solve ();
165166 emitRequestedDataFlowResults (WPA);
166167 WPA.releaseAllHelperAnalyses ();
@@ -169,7 +170,7 @@ void AnalysisController::executeWholeProgram() {
169170 auto Config = getTaintConfig ();
170171 WholeProgramAnalysis<IDESolver_P<IDEExtendedTaintAnalysis<>>,
171172 IDEExtendedTaintAnalysis<>>
172- WPA (IRDB, &Config, EntryPoints, &PT, &ICF, &TH);
173+ WPA (SolverConfig, IRDB, &Config, EntryPoints, &PT, &ICF, &TH);
173174 WPA.solve ();
174175 emitRequestedDataFlowResults (WPA);
175176 WPA.releaseAllHelperAnalyses ();
@@ -179,7 +180,7 @@ void AnalysisController::executeWholeProgram() {
179180 // / So, keep the error-message until we have an implementation
180181
181182 // WholeProgramAnalysis<IDESolver_P<IDETaintAnalysis>, IDETaintAnalysis>
182- // WPA(IRDB, EntryPoints, &PT, &ICF, &TH);
183+ // WPA(SolverConfig, IRDB, EntryPoints, &PT, &ICF, &TH);
183184 // WPA.solve();
184185 // emitRequestedDataFlowResults(WPA);
185186 // WPA.releaseAllHelperAnalyses();
@@ -190,7 +191,7 @@ void AnalysisController::executeWholeProgram() {
190191 OpenSSLEVPKDFDescription TSDesc;
191192 WholeProgramAnalysis<IDESolver_P<IDETypeStateAnalysis>,
192193 IDETypeStateAnalysis>
193- WPA (IRDB, &TSDesc, EntryPoints, &PT, &ICF, &TH);
194+ WPA (SolverConfig, IRDB, &TSDesc, EntryPoints, &PT, &ICF, &TH);
194195 WPA.solve ();
195196 emitRequestedDataFlowResults (WPA);
196197 WPA.releaseAllHelperAnalyses ();
@@ -199,29 +200,29 @@ void AnalysisController::executeWholeProgram() {
199200 CSTDFILEIOTypeStateDescription TSDesc;
200201 WholeProgramAnalysis<IDESolver_P<IDETypeStateAnalysis>,
201202 IDETypeStateAnalysis>
202- WPA (IRDB, &TSDesc, EntryPoints, &PT, &ICF, &TH);
203+ WPA (SolverConfig, IRDB, &TSDesc, EntryPoints, &PT, &ICF, &TH);
203204 WPA.solve ();
204205 emitRequestedDataFlowResults (WPA);
205206 WPA.releaseAllHelperAnalyses ();
206207 } break ;
207208 case DataFlowAnalysisType::IFDSTypeAnalysis: {
208209 WholeProgramAnalysis<IFDSSolver_P<IFDSTypeAnalysis>, IFDSTypeAnalysis>
209- WPA (IRDB, EntryPoints, &PT, &ICF, &TH);
210+ WPA (SolverConfig, IRDB, EntryPoints, &PT, &ICF, &TH);
210211 WPA.solve ();
211212 emitRequestedDataFlowResults (WPA);
212213 WPA.releaseAllHelperAnalyses ();
213214 } break ;
214215 case DataFlowAnalysisType::IFDSSolverTest: {
215216 WholeProgramAnalysis<IFDSSolver_P<IFDSSolverTest>, IFDSSolverTest> WPA (
216- IRDB, EntryPoints, &PT, &ICF, &TH);
217+ SolverConfig, IRDB, EntryPoints, &PT, &ICF, &TH);
217218 WPA.solve ();
218219 emitRequestedDataFlowResults (WPA);
219220 WPA.releaseAllHelperAnalyses ();
220221 } break ;
221222 case DataFlowAnalysisType::IFDSLinearConstantAnalysis: {
222223 WholeProgramAnalysis<IFDSSolver_P<IFDSLinearConstantAnalysis>,
223224 IFDSLinearConstantAnalysis>
224- WPA (IRDB, EntryPoints, &PT, &ICF, &TH);
225+ WPA (SolverConfig, IRDB, EntryPoints, &PT, &ICF, &TH);
225226 WPA.solve ();
226227 emitRequestedDataFlowResults (WPA);
227228 WPA.releaseAllHelperAnalyses ();
@@ -230,30 +231,30 @@ void AnalysisController::executeWholeProgram() {
230231 auto Config = getTaintConfig ();
231232 WholeProgramAnalysis<IFDSSolver_P<IFDSFieldSensTaintAnalysis>,
232233 IFDSFieldSensTaintAnalysis>
233- WPA (IRDB, &Config, EntryPoints, &PT, &ICF, &TH);
234+ WPA (SolverConfig, IRDB, &Config, EntryPoints, &PT, &ICF, &TH);
234235 WPA.solve ();
235236 emitRequestedDataFlowResults (WPA);
236237 WPA.releaseAllHelperAnalyses ();
237238 } break ;
238239 case DataFlowAnalysisType::IDELinearConstantAnalysis: {
239240 WholeProgramAnalysis<IDESolver_P<IDELinearConstantAnalysis>,
240241 IDELinearConstantAnalysis>
241- WPA (IRDB, EntryPoints, &PT, &ICF, &TH);
242+ WPA (SolverConfig, IRDB, EntryPoints, &PT, &ICF, &TH);
242243 WPA.solve ();
243244 emitRequestedDataFlowResults (WPA);
244245 WPA.releaseAllHelperAnalyses ();
245246 } break ;
246247 case DataFlowAnalysisType::IDESolverTest: {
247248 WholeProgramAnalysis<IDESolver_P<IDESolverTest>, IDESolverTest> WPA (
248- IRDB, EntryPoints, &PT, &ICF, &TH);
249+ SolverConfig, IRDB, EntryPoints, &PT, &ICF, &TH);
249250 WPA.solve ();
250251 emitRequestedDataFlowResults (WPA);
251252 WPA.releaseAllHelperAnalyses ();
252253 } break ;
253254 case DataFlowAnalysisType::IDEInstInteractionAnalysis: {
254255 WholeProgramAnalysis<IDESolver_P<IDEInstInteractionAnalysis>,
255256 IDEInstInteractionAnalysis>
256- WPA (IRDB, EntryPoints, &PT, &ICF, &TH);
257+ WPA (SolverConfig, IRDB, EntryPoints, &PT, &ICF, &TH);
257258 WPA.solve ();
258259 emitRequestedDataFlowResults (WPA);
259260 WPA.releaseAllHelperAnalyses ();
@@ -262,23 +263,23 @@ void AnalysisController::executeWholeProgram() {
262263 WholeProgramAnalysis<
263264 IntraMonoSolver_P<IntraMonoFullConstantPropagation>,
264265 IntraMonoFullConstantPropagation>
265- WPA (IRDB, EntryPoints, &PT, &ICF, &TH);
266+ WPA (SolverConfig, IRDB, EntryPoints, &PT, &ICF, &TH);
266267 WPA.solve ();
267268 emitRequestedDataFlowResults (WPA);
268269 WPA.releaseAllHelperAnalyses ();
269270 } break ;
270271 case DataFlowAnalysisType::IntraMonoSolverTest: {
271272 WholeProgramAnalysis<IntraMonoSolver_P<IntraMonoSolverTest>,
272273 IntraMonoSolverTest>
273- WPA (IRDB, EntryPoints, &PT, &ICF, &TH);
274+ WPA (SolverConfig, IRDB, EntryPoints, &PT, &ICF, &TH);
274275 WPA.solve ();
275276 emitRequestedDataFlowResults (WPA);
276277 WPA.releaseAllHelperAnalyses ();
277278 } break ;
278279 case DataFlowAnalysisType::InterMonoSolverTest: {
279280 WholeProgramAnalysis<InterMonoSolver_P<InterMonoSolverTest, 3 >,
280281 InterMonoSolverTest>
281- WPA (IRDB, EntryPoints, &PT, &ICF, &TH);
282+ WPA (SolverConfig, IRDB, EntryPoints, &PT, &ICF, &TH);
282283 WPA.solve ();
283284 emitRequestedDataFlowResults (WPA);
284285 WPA.releaseAllHelperAnalyses ();
@@ -287,7 +288,7 @@ void AnalysisController::executeWholeProgram() {
287288 auto Config = getTaintConfig ();
288289 WholeProgramAnalysis<InterMonoSolver_P<InterMonoTaintAnalysis, 3 >,
289290 InterMonoTaintAnalysis>
290- WPA (IRDB, &Config, EntryPoints, &PT, &ICF, &TH);
291+ WPA (SolverConfig, IRDB, &Config, EntryPoints, &PT, &ICF, &TH);
291292 WPA.solve ();
292293 emitRequestedDataFlowResults (WPA);
293294 WPA.releaseAllHelperAnalyses ();
@@ -299,6 +300,7 @@ void AnalysisController::executeWholeProgram() {
299300 _DataFlowAnalysis)) {
300301 auto Problem = std::get<IFDSPluginConstructor>(_DataFlowAnalysis)(
301302 &IRDB, &TH, &ICF, &PT, EntryPoints);
303+ Problem->setIFDSIDESolverConfig (SolverConfig);
302304 IFDSSolver_P<std::remove_reference<decltype (*Problem)>::type> Solver (
303305 *Problem);
304306 Solver.solve ();
@@ -307,6 +309,7 @@ void AnalysisController::executeWholeProgram() {
307309 _DataFlowAnalysis)) {
308310 auto Problem = std::get<IDEPluginConstructor>(_DataFlowAnalysis)(
309311 &IRDB, &TH, &ICF, &PT, EntryPoints);
312+ Problem->setIFDSIDESolverConfig (SolverConfig);
310313 IDESolver_P<std::remove_reference<decltype (*Problem)>::type> Solver (
311314 *Problem);
312315 Solver.solve ();
0 commit comments