Example #1
0
        public static void RunTest()
        {
            NFAUtil.PrintHeader(Program.regexOutputFile);

            var lines = File.ReadAllLines(Program.path + Program.regexInputFile);

            var rex    = new Microsoft.Automata.Rex.RexEngine(BitWidth.BV16);
            var solver = rex.Solver;

            for (int i = 0; i < Math.Min(lines.Length, endAt); i++)
            {
                if (i >= startAt)
                {
                    string regex = lines[i].Trim();
                    try
                    {
                        var sfa = rex.CreateFromRegexes(regex).RemoveEpsilons().MakeTotal();
                        NFAUtil.RunAllAlgorithms(sfa, i.ToString(), Program.regexOutputFile, solver);
                    }
                    catch (Exception e)
                    {
                        e = e;
                        //Console.WriteLine("Can't parse " + regex);
                        //Console.WriteLine(e);
                    }
                }
            }
        }
        public static void RunFinAlphTest()
        {
            var           nfaPath = Program.path + @"NFA\";
            DirectoryInfo detDir  = new DirectoryInfo(nfaPath);

            if (startAt == 0)
            {
                NFAUtil.PrintHeader(Program.verifNFAOutputFile);
            }

            int count = 0;

            foreach (var file in detDir.GetFiles("*", SearchOption.AllDirectories))
            {
                if (startAt <= count && count <= endAt)
                {
                    var res = TimbukNFAParser.ParseVataFileFinSet(file.FullName);
                    NFAUtil.RunAllAlgorithms(res.Item1, file.Name, Program.verifNFAOutputFile, res.Item2);
                }
                count++;
            }
        }
        public static void RunTest()
        {
            CharSetSolver solver  = new CharSetSolver(BitWidth.BV7); //new solver using ASCII encoding
            var           nfaPath = Program.path + @"NFA\";
            DirectoryInfo detDir  = new DirectoryInfo(nfaPath);

            if (startAt == 0)
            {
                NFAUtil.PrintHeader(Program.verifNFAOutputFile);
            }

            int count = 0;

            foreach (var file in detDir.GetFiles("*", SearchOption.AllDirectories))
            {
                if (startAt <= count && count <= endAt)
                {
                    Automaton <BDD> detAut = TimbukNFAParser.ParseVataFile(file.FullName, solver);
                    NFAUtil.RunAllAlgorithms(detAut, file.Name, Program.verifNFAOutputFile, solver);
                }
                count++;
            }
        }