Ejemplo n.º 1
0
    public void DisjTests()
    {
        Pair a = Pair.Variable("a");
        Goal g = new Disj(new Eq(a, Pair.Value("the letter a")), new Eq(a, Pair.Value("the letter b")));

        AssertResults(new string[, , ] {
            {
                { "a", "the letter a" }
            },
            {
                { "a", "the letter b" }
            }
        }, g);
    }
Ejemplo n.º 2
0
    public void TestConjDisj()
    {
        Pair a = Pair.Variable("a");
        Pair b = Pair.Variable("b");
        Goal g = new Disj(
            new Conj(new Eq(a, Pair.Value("the letter a")), new Eq(b, Pair.Value("the letter b"))),
            new Eq(a, Pair.Value("Another thing entirely"))
            );

        AssertResults(new string[, , ] {
            {
                { "a", "the letter a" },
                { "b", "the letter b" }
            },
            {
                { "a", "Another thing entirely" },
                { "b", null }
            }
        }, g);
    }