protected void RunTest(ProgramBuilder mock, string outputFile) { Program program = mock.BuildProgram(); var importResolver = MockRepository.GenerateStub<IImportResolver>(); DataFlowAnalysis dfa = new DataFlowAnalysis(program, importResolver, new FakeDecompilerEventListener()); dfa.DumpProgram(); dfa.BuildExpressionTrees(); RunTest(program, outputFile); }
protected void RunTest(ProgramBuilder mock, string outputFile) { Program prog = mock.BuildProgram(); DataFlowAnalysis dfa = new DataFlowAnalysis(prog, new FakeDecompilerEventListener()); dfa.DumpProgram(); dfa.BuildExpressionTrees(); RunTest(prog, outputFile); }
///<summary> /// Determines the signature of the procedures, /// the locations and types of all the values in the program. ///</summary> public virtual void AnalyzeDataFlow() { foreach (var program in project.Programs) { eventListener.ShowStatus("Performing interprocedural analysis."); var dfa = new DataFlowAnalysis(program, eventListener); dfa.UntangleProcedures(); dfa.BuildExpressionTrees(); host.WriteIntermediateCode(program, writer => { EmitProgram(program, dfa, writer); }); } eventListener.ShowStatus("Interprocedural analysis complete."); }
///<summary> /// Determines the signature of the procedures, /// the locations and types of all the values in the program. ///</summary> public virtual void AnalyzeDataFlow() { var eventListener = services.RequireService<DecompilerEventListener>(); foreach (var program in project.Programs) { eventListener.ShowStatus("Performing interprocedural analysis."); var ir = new ImportResolver(project, program, eventListener); var dfa = new DataFlowAnalysis(program, ir, eventListener); dfa.UntangleProcedures(); dfa.BuildExpressionTrees(); host.WriteIntermediateCode(program, writer => { EmitProgram(program, dfa, writer); }); } eventListener.ShowStatus("Interprocedural analysis complete."); }