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
Exemplo 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);
 }
Exemplo 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);
 }
Exemplo 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.");
        }
Exemplo 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.");
        }