Пример #1
0
        public void OptimizationTest()
        {
            var prog = new Problem("Optimzer test");
            var p    = (Proposition)"p";
            var q    = (Proposition)"q";
            var r    = (Proposition)"r";
            var s    = (Proposition)"s";

            prog.Assert(
                p <= q,
                p <= r,
                Not(p)
                );
            prog.Optimize();
            Assert.IsTrue(prog.IsAlwaysFalse(p));
            Assert.IsTrue(prog.IsAlwaysFalse(q));
            Assert.IsTrue(prog.IsAlwaysFalse(r));
            Assert.IsFalse(prog.IsConstant(s));
        }