示例#1
0
        public static WEFilter Create(Filtermode filtermode, WExpr original)
        {
            switch (filtermode)
            {
            case Filtermode.NONE: return(new NoFilter());

            case Filtermode.INPUTS: return(new InputsFilter());

            case Filtermode.INFINITE: return(new LongExecutionsFilter());
            }
            return(null);
        }
 public static PdlFilter Create(Filtermode filtermode, PDLPred original, HashSet<char> alphabet) {
     switch (filtermode)
     {
         case Filtermode.NONE: return new NoFilter();
         case Filtermode.TRIVIAL: return new TrivialFormulaFilter(alphabet, 4);
         case Filtermode.STATEBASED: return new DfaStateNumberFilter(original, alphabet);
         case Filtermode.BOTH:
             PdlFilter trivialFilter = new TrivialFormulaFilter(alphabet, 4);
             PdlFilter stateFilter = new DfaStateNumberFilter(original, alphabet);
             return new ConsFilter(trivialFilter, stateFilter);
     }
     return null;
 }