Example #1
0
        public void TestBREXLikeExpressionSmall()
        {
            var man   = new BREXManager();
            var like1 = man.MkLike(@"%[ab]_____");
            var like2 = man.MkLike(@"%[bc]_____");
            var and   = man.MkAnd(like1, like2);
            var dfa   = and.Optimize();
            var like  = man.MkLike(@"%b_____");
            var dfa2  = like.Optimize();
            var equiv = dfa.IsEquivalentWith(dfa2);

            Assert.IsTrue(equiv);
        }
Example #2
0
 public void TestBREXLikeExpressionMedium()
 {
     try
     {
         var man   = new BREXManager();
         var like1 = man.MkLike(@"%[ab]________");
         var like2 = man.MkLike(@"%[bc]________");
         var and   = man.MkAnd(like1, like2);
         var dfa   = and.Optimize();
     }
     catch (AutomataException e)
     {
         Assert.IsTrue(e.kind == AutomataExceptionKind.AutomataConversionFailed);
     }
 }
Example #3
0
        public void TestBREXLikeExpressionLargeTimeout()
        {
            var man   = new BREXManager("Matcher", "FString", int.MaxValue);
            var like1 = man.MkLike(@"%[ab]_____________");
            var like2 = man.MkLike(@"%[bc]_____________");
            var and   = man.MkAnd(like1, like2);

            try
            {
                var dfa = and.Optimize();
            }
            catch (AutomataException e)
            {
                Assert.IsTrue(e.kind == AutomataExceptionKind.AutomataConversionFailed);
            }
        }