예제 #1
0
        public override PDLPred ToPDL(List <MonaMacro> macros, Dictionary <string, string> sub)
        {
            var m1 = set1.ToPDL(macros, sub);
            var m2 = set2.ToPDL(macros, sub);

            return(new PDLAnd(new PDLSubset(m1, m2), new PDLSubset(m2, m1)));
        }
        public override PDLSet ToPDL(List <MonaMacro> macros, Dictionary <string, string> sub)
        {
            switch (op)
            {
            case MonaBinarySetOperator.Intersection:
            {
                return(new PDLIntersect(set1.ToPDL(macros, sub), set2.ToPDL(macros, sub)));
            }

            case MonaBinarySetOperator.Union:
            {
                return(new PDLUnion(set1.ToPDL(macros, sub), set2.ToPDL(macros, sub)));
            }

            default: throw new MonaException("undefined operator");
            }
        }
예제 #3
0
 public override PDLPred ToPDL(List <MonaMacro> macros, Dictionary <string, string> sub)
 {
     return(new PDLBelongs(pos.ToPDL(macros, sub), set.ToPDL(macros, sub)));
 }