void DoFPE() { graph = new FunctionsProceduresExampleGraph(); actions = new FunctionsProceduresExampleActions(graph); procEnv = new LGSPGraphProcessingEnvironment(graph, actions); // use graph rewrite sequence procEnv.ApplyGraphRewriteSequence("init"); Console.WriteLine(procEnv.PerformanceInfo.MatchesFound + " matches found."); Console.WriteLine(procEnv.PerformanceInfo.RewritesPerformed + " rewrites performed."); procEnv.PerformanceInfo.Reset(); // use new 2.5 exact interface IMatchesExact<Rule_r.IMatch_r> matchesExact = actions.r.Match(procEnv, 0); Console.WriteLine(matchesExact.Count + " matches found."); actions.r.Modify(procEnv, matchesExact.FirstExact); }
void DoFPE() { graph = new FunctionsProceduresExampleGraph(); actions = new FunctionsProceduresExampleActions(graph); procEnv = new LGSPGraphProcessingEnvironment(graph, actions); // use graph rewrite sequence procEnv.ApplyGraphRewriteSequence("init"); Console.WriteLine(procEnv.PerformanceInfo.MatchesFound + " matches found."); Console.WriteLine(procEnv.PerformanceInfo.RewritesPerformed + " rewrites performed."); procEnv.PerformanceInfo.Reset(); // use new 2.5 exact interface IMatchesExact <Rule_r.IMatch_r> matchesExact = actions.r.Match(procEnv, 0); Console.WriteLine(matchesExact.Count + " matches found."); actions.r.Modify(procEnv, matchesExact.FirstExact); }