예제 #1
0
        public void TestWS1S_Forall_x_Exists_y_x_lt_y()
        {
            var triv   = new TrivialBooleanAlgebra();
            var ca     = new BDDAlgebra <bool>(triv);
            var x      = new Variable("x", false);
            var y      = new Variable("y", false);
            var x_lt_y = new WS1SLt <bool>(x, y);
            var psi4   = ~(new WS1SExists <bool>(x, new WS1SSingleton <bool>(x) & ~(new WS1SExists <bool>(y, new WS1SSingleton <bool>(y) & (x_lt_y)))));
            var aut    = psi4.GetAutomaton(ca, x, y);

            //aut.ShowGraph("aut");
            //accepts only the empty word
            Assert.IsTrue(aut.StateCount == 1 && aut.IsFinalState(aut.InitialState) && aut.MoveCount == 0);
        }
예제 #2
0
 public void TestWS1S_Forall_x_Exists_y_x_lt_y() 
 {
     var triv = new TrivialBooleanAlgebra();
     var ca = new BDDAlgebra<bool>(triv); 
     var x = new Variable("x", true);
     var y = new Variable("y", true);
     var x_lt_y = new MSOLt<bool>(x, y);
     var aut_x_lt_y = x_lt_y.GetAutomaton(ca);
     //aut_x_lt_y.ShowGraph("aut_x_lt_y");
     var psi4 = new MSOForall<bool>(x, new MSOExists<bool>(y, (x_lt_y)));
     var aut = psi4.GetAutomaton(ca);
     //accepts only the empty word
     Assert.IsTrue(aut.StateCount == 1 && aut.IsFinalState(aut.InitialState) && aut.MoveCount == 0);
 }
예제 #3
0
        public void TestWS1S_Forall_x_Exists_y_x_lt_y()
        {
            var triv = new TrivialBooleanAlgebra();
            var ca   = new BDDAlgebra <bool>(triv);
            var x    = new WS1SVariable <bool>("x");
            var y    = new WS1SVariable <bool>("y");
            // Forall x.Exists y.x < y
            var psi4 = ~(x ^ !x & ~(y ^ (x < y)));
            var aut  = psi4.GetAutomaton(ca, x, y);

            //aut.ShowGraph("aut");
            //accepts only the empty word
            Assert.IsTrue(aut.StateCount == 1 && aut.IsFinalState(aut.InitialState) && aut.MoveCount == 0);
        }