private static void removeTypeQuantification(Procedure procedure)
        {
            var qtc = new QuantifiedTypeCollector(procedure);

            foreach (var bb in procedure.blocks)
            {
                foreach (var si in bb.statements)
                {
                    qtc.collect(si.statementId);
                }
            }
            TypeQuantificationRemover.remove(procedure, qtc);
        }
        private static bool commonSubexpressionElimination(Procedure procedure)
        {
            bool cse = false;

            if (cse)
            {
                var ser = new BackwardEvaluator <SubexpressionCounter>(procedure, new SubexpressionCounter(procedure));
                ser.analyze();
                SubexpressionEliminator.appendSubexpressions(procedure);
                procedure.cfg.validate();
            }

            return(cse);
        }
示例#3
0
 private StructuredProgramToCFG(Procedure procedure)
 {
     this.procedure = procedure;
     scope          = procedure;
 }
 private static void removeUnusedSymbols(Procedure procedure)
 {
     UnusedSymbolRemover.Remove(procedure);
 }
 private static void consolidateBranchConditionAssignments(Procedure procedure)
 {
     BranchConditionAssignmentConsolidator.consolidate(procedure);
 }
 private static void determinizeBranches(Procedure procedure)
 {
     BranchDeterminizer.analyze(procedure);
 }