Beispiel #1
0
        public void firstOcc()
        {
            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 PDLAnd(new PDLNot(new PDLIntLeq(new PDLIndicesOf("abc"), 0)),
                                     new PDLIntLeq(new PDLAllPosBefore(new PDLFirstOcc("abc")), 2));

            StringBuilder sb = new StringBuilder();

            phi.ToString(sb);
            System.Console.WriteLine(sb);

            System.Console.WriteLine(phi.Eval("acabc", new Dictionary <string, int>()));

            var dfa = phi.GetDFA(al, solver);
            //string file = "../../../TestPDL/DotFiles/firstOcc";
            //solver.SaveAsDot(dfa, "aut", file);
        }
        public void firstOcc()
        {
            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 PDLAnd(new PDLNot(new PDLIntLeq(new PDLIndicesOf("abc"), 0)),
                new PDLIntLeq(new PDLAllPosBefore(new PDLFirstOcc("abc")), 2));

            StringBuilder sb = new StringBuilder();
            phi.ToString(sb);
            System.Console.WriteLine(sb);

            System.Console.WriteLine(phi.Eval("acabc", new Dictionary<string, int>()));

            var dfa = phi.GetDFA(al, solver);
            //string file = "../../../TestPDL/DotFiles/firstOcc";
            //solver.SaveAsDot(dfa, "aut", file);
        }