Beispiel #1
0
def test7():
    x = SyExp("x", [])
    y = SyExp("y", [])
    e1 = SyExp("or", [x, y])
    e2 = SyExp("and", [x, y])

    c = CegarQBF(e1, e2)
    status = c.any_hope()
    print("status: ", status)
    assert status is False

    c = CegarQBF(e2, e2)
    status = c.any_hope()
    print("status: ", status)
    assert status is True
Beispiel #2
0
def test4():
    x = SyExp("x", [])
    y = SyExp("d1", [])

    c = CegarQBF(x, y)
    print("status: ", c.any_hope())
    assert c
Beispiel #3
0
def test10():
    x = SyExp("x", [])
    y = SyExp("y", [])
    e = SyExp("and", [x, y])
    c = CegarQBF(e, y)
    status = c.any_hope()
    print("status: ", status)
    assert status is False
Beispiel #4
0
def test5():
    x = SyExp("x", [])
    y = SyExp("y", [])
    e1 = SyExp("or", [x, y])
    e2 = SyExp("d1", [])

    c = CegarQBF(e1, e2)
    status = c.any_hope()
    print("status: ", status)
    assert status
Beispiel #5
0
def test11():
    x = SyExp("x", [])
    y = SyExp("y", [])
    z = SyExp("z", [])
    d1 = SyExp("depth1", [])

    e1 = SyExp("or", [x, SyExp("and", [y, z])])
    e2 = SyExp("not", [SyExp("not", [y])])

    c = CegarQBF(e1, e2)
    status = c.any_hope()
    print("status: ", status)
    assert status is False
Beispiel #6
0
def test9():
    x = SyExp("x", [])
    y = SyExp("y", [])
    z = SyExp("z", [])

    e1 = SyExp("or", [x, SyExp("and", [y, z])])
    # e2 = SyExp("and", [SyExp("and", [y,y]), SyExp("and", [y,y])])

    # e1 = SyExp("or", [x,y] )
    e2 = SyExp("and", [y, y])

    c = CegarQBF(e1, e2)
    status = c.any_hope()
    print("status: ", status)
    assert status is False