BuildExpressionTrees() public method

Processes procedures individually, building complex expression trees out of the simple, close-to-the-machine code generated by the disassembly.
public BuildExpressionTrees ( ) : void
return void
Esempio n. 1
0
 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);
 }
Esempio n. 2
0
 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);
 }
Esempio n. 3
0
        ///<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.");
        }
Esempio n. 4
0
        ///<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.");
        }