Beispiel #1
0
        public void once_aaa()
        {
            var         solver = new CharSetSolver(BitWidth.BV64);
            List <char> alph   = new List <char> {
                'a', 'b'
            };
            HashSet <char> al = new HashSet <char>(alph);

            PDLPred phi = new PDLIntEq(new PDLIndicesOf("aaa"), 1);

            StringBuilder sb = new StringBuilder();

            phi.ToMSO(new FreshGen()).ToString(sb);

            System.Console.WriteLine(sb);

            var dfa = phi.GetDFA(al, solver);

            var test = solver.Convert(@"^b*(ab+|aab+)*aaa(b+a|b+aa)*b*$");

            //string file = "../../../TestPDL/DotFiles/once_aaa";

            //solver.SaveAsDot(dfa, "aut", file);

            Assert.IsTrue(dfa.IsEquivalentWith(test, solver));
        }
        public void intEq2()
        {
            var solver = new CharSetSolver(BitWidth.BV64);

            List<char> alph = new List<char> { 'a', 'b', 'c' };
            HashSet<char> al = new HashSet<char>(alph);

            PDLPred phi = new PDLIntEq(new PDLAllPos(), 2);

            StringBuilder sb = new StringBuilder();


            phi.ToMSO(new FreshGen()).ToString(sb);

            System.Console.WriteLine(sb);

            var dfa = phi.GetDFA(al, solver);

            var test = solver.Convert(@"^(a|b|c){2}$");

            Assert.IsTrue(dfa.IsEquivalentWith(test, solver));

            ////string file = "../../../TestPDL/DotFiles/IntEq2";

            //solver.SaveAsDot(dfa, "aut", file);

        }
Beispiel #3
0
        public void intEq2()
        {
            var solver = new CharSetSolver(BitWidth.BV64);

            List <char> alph = new List <char> {
                'a', 'b', 'c'
            };
            HashSet <char> al = new HashSet <char>(alph);

            PDLPred phi = new PDLIntEq(new PDLAllPos(), 2);

            StringBuilder sb = new StringBuilder();


            phi.ToMSO(new FreshGen()).ToString(sb);

            System.Console.WriteLine(sb);

            var dfa = phi.GetDFA(al, solver);

            var test = solver.Convert(@"^(a|b|c){2}$");

            Assert.IsTrue(dfa.IsEquivalentWith(test, solver));

            ////string file = "../../../TestPDL/DotFiles/IntEq2";

            //solver.SaveAsDot(dfa, "aut", file);
        }
        public void once_aaa()
        {
            var solver = new CharSetSolver(BitWidth.BV64);
            List<char> alph = new List<char> { 'a', 'b' };
            HashSet<char> al = new HashSet<char>(alph);

            PDLPred phi = new PDLIntEq(new PDLIndicesOf("aaa"), 1);

            StringBuilder sb = new StringBuilder();

            phi.ToMSO(new FreshGen()).ToString(sb);

            System.Console.WriteLine(sb);

            var dfa = phi.GetDFA(al, solver);

            var test = solver.Convert(@"^b*(ab+|aab+)*aaa(b+a|b+aa)*b*$");

            //string file = "../../../TestPDL/DotFiles/once_aaa";

            //solver.SaveAsDot(dfa, "aut", file);

            Assert.IsTrue(dfa.IsEquivalentWith(test, solver));
        }