public void Test30() // Length atleast 3, and third symbol is 'a', (correct but not most succint)
        {
            PDLPred phi = new PDLAtPos('a', new PDLSuccessor(new PDLSuccessor(new PDLSuccessor(new PDLFirst()))));

            PrintDFA(phi, "Test30", new List <char> {
                'a', 'b'
            });
        }
Beispiel #2
0
        public static Testcase createTestcase2()
        {
            // 0@x
            PDLPred zeroAtX = new PDLAtPos('0', new PDLPosVar("x"));
            // 1@x+1
            PDLPred zeroAtXPlus1 = new PDLAtPos('1', new PDLSuccessor(new PDLPosVar("x")));
            // 1@x+2
            PDLPred zeroAtXPlus2 = new PDLAtPos('1', new PDLSuccessor(new PDLSuccessor(new PDLPosVar("x"))));

            // \exists x. 0@x && 1@x+1 && 1@x+2
            PDLPred language = new PDLExistsFO("x",
                                               new PDLAnd(zeroAtX, new PDLAnd(zeroAtXPlus1, zeroAtXPlus2))
                                               );

            return(new Testcase(2, oneZeroAlphabet, language));
        }
        public static Testcase createTestFormula3()
        {
            // 0@x
            PDLPred zeroAtX = new PDLAtPos('0', new PDLPosVar("x"));
            // 1@x+1
            PDLPred zeroAtXPlus1 = new PDLAtPos('1', new PDLSuccessor(new PDLPosVar("x")));
            // 1@x+2
            PDLPred zeroAtXPlus2 = new PDLAtPos('1', new PDLSuccessor(new PDLSuccessor(new PDLPosVar("x"))));

            // \exists x. 0@x && 1@x+1 && 1@x+2
            PDLPred language = new PDLExistsFO("x",
                new PDLAnd(zeroAtX, new PDLAnd(zeroAtXPlus1, zeroAtXPlus2))
            );

            return new Testcase(3,createAlphabet10(), language);
        }
        public static Testcase createTestcase1()
        {
            // 0@x
            PDLPred zeroAtX = new PDLAtPos('0', new PDLPosVar("x"));
            // 0@x+1
            PDLPred zeroAtXPlus1 = new PDLAtPos('0', new PDLSuccessor(new PDLPosVar("x")));
            // 0@x+2
            PDLPred zeroAtXPlus2 = new PDLAtPos('0', new PDLSuccessor(new PDLSuccessor(new PDLPosVar("x"))));

            // \exists x. 0@x && 0@x+1 && 0@x+2
            PDLPred language = new PDLExistsFO("x",
                new PDLAnd(zeroAtX, new PDLAnd(zeroAtXPlus1, zeroAtXPlus2))
            );

            return new Testcase(1,oneZeroAlphabet, language);
        }
Beispiel #5
0
        public static Testcase createTestcase4()
        {
            PDLPos  lastMinusFour     = posMinusN(new PDLLast(), 4);
            PDLPred xLeqLastMinusFour = new PDLPosLeq(new PDLPosVar("x"), lastMinusFour);

            PDLPred xLeqY            = new PDLPosLeq(new PDLPosVar("x"), new PDLPosVar("y"));
            PDLPred xLeqZ            = new PDLPosLeq(new PDLPosVar("x"), new PDLPosVar("z"));
            PDLPred yLeqXPlusFour    = new PDLPosLeq(new PDLPosVar("y"), posPlusN(new PDLPosVar("x"), 4));
            PDLPred zLeqXPlusFour    = new PDLPosLeq(new PDLPosVar("z"), posPlusN(new PDLPosVar("x"), 4));
            PDLPred yNeqZ            = new PDLNot(new PDLPosEq(new PDLPosVar("y"), new PDLPosVar("z")));
            PDLPred zeroAtY          = new PDLAtPos('0', new PDLPosVar("y"));
            PDLPred zeroAtZ          = new PDLAtPos('0', new PDLPosVar("z"));
            PDLPred consequence      = new PDLAnd(xLeqY, new PDLAnd(xLeqZ, new PDLAnd(yLeqXPlusFour, new PDLAnd(zLeqXPlusFour, new PDLAnd(yNeqZ, new PDLAnd(zeroAtY, zeroAtZ))))));
            PDLPred quantConsequence = new PDLExistsFO("y", new PDLExistsFO("z", consequence));

            PDLPred language = new PDLForallFO("x", new PDLIf(xLeqLastMinusFour, quantConsequence));

            return(new Testcase(4, oneZeroAlphabet, language));
        }
Beispiel #6
0
        public static Testcase createTestcase5()
        {
            PDLPred language = new PDLAtPos('1', posMinusN(new PDLLast(), 9));

            return(new Testcase(5, oneZeroAlphabet, language));
        }
Beispiel #7
0
        public static Testcase createTestFormula16()
        {
            PDLPred language = new PDLAtPos('1', posMinusN(new PDLLast(), 9));

            return(new Testcase(16, createAlphabet10(), language));
        }
        public static Testcase createTestFormula5()
        {
            PDLPos lastMinusFour = posMinusN(new PDLLast(), 4);
            PDLPred xLeqLastMinusFour = new PDLPosLeq(new PDLPosVar("x"), lastMinusFour);

            PDLPred xLeqY = new PDLPosLeq(new PDLPosVar("x"), new PDLPosVar("y"));
            PDLPred xLeqZ = new PDLPosLeq(new PDLPosVar("x"), new PDLPosVar("z"));
            PDLPred yLeqXPlusFour = new PDLPosLeq(new PDLPosVar("y"), posPlusN(new PDLPosVar("x"), 4));
            PDLPred zLeqXPlusFour = new PDLPosLeq(new PDLPosVar("z"), posPlusN(new PDLPosVar("x"), 4));
            PDLPred yNeqZ = new PDLNot(new PDLPosEq(new PDLPosVar("y"), new PDLPosVar("z")));
            PDLPred zeroAtY = new PDLAtPos('0', new PDLPosVar("y"));
            PDLPred zeroAtZ = new PDLAtPos('0', new PDLPosVar("z"));
            PDLPred consequence = new PDLAnd(xLeqY, new PDLAnd(xLeqZ, new PDLAnd(yLeqXPlusFour, new PDLAnd(zLeqXPlusFour, new PDLAnd(yNeqZ, new PDLAnd(zeroAtY, zeroAtZ))))));
            PDLPred quantConsequence = new PDLExistsFO("y", new PDLExistsFO("z", consequence));

            PDLPred language = new PDLForallFO("x", new PDLIf(xLeqLastMinusFour, quantConsequence));
            return new Testcase(5,createAlphabet10(), language);
        }
 public static Testcase createTestFormula16()
 {
     PDLPred language = new PDLAtPos('1', posMinusN(new PDLLast(), 9));
     return new Testcase(16, createAlphabet10(), language);
 }
 public static Testcase createTestcase5()
 {
     PDLPred language = new PDLAtPos('1', posMinusN(new PDLLast(), 9));
     return new Testcase(5,oneZeroAlphabet, language);
 }
 public void Test30() // Length atleast 3, and third symbol is 'a', (correct but not most succint)
 {
     PDLPred phi = new PDLAtPos('a', new PDLSuccessor(new PDLSuccessor(new PDLSuccessor(new PDLFirst()))));
     PrintDFA(phi, "Test30", new List<char> { 'a', 'b' });
 }