public static MemberDecl ApplyTacticInMethod(Program program, MemberDecl target, ErrorReporterDelegate erd, Resolver r = null, Program raw = null) { Contract.Requires(program != null); Contract.Requires(target != null); Stopwatch watch = new Stopwatch(); watch.Start(); _driver = new TacnyDriver(program, erd); // backup datatype info, as this will be reset by the internal resolving process in tacny. // this contains datatype obj instance for comparing types Type.BackupScopes(); var result = _driver.InterpretAndUnfoldTactic(target, r); Type.RestoreScopes(); var p = new Printer(Console.Out); p.PrintMembers(new List <MemberDecl>() { result }, 0, ""); watch.Stop(); Console.WriteLine("Time Used: " + watch.Elapsed.TotalSeconds); _errorReporterDelegate = null; return(result); }