Ejemplo n.º 1
0
def test_solver_constrained_unsatisfiable():
    domain = SignDomain(["a", "b", "c"])
    state = SignAbstractState({
        "a": Sign.Positive,
        "b": Sign.Negative,
        "c": Sign.Bottom
    })
    solution = domain.model(domain.gamma_hat(state))

    assert solution is None
Ejemplo n.º 2
0
def test_solver_constrained_satisfiable():
    domain = SignDomain(["a", "b", "c"])
    state = SignAbstractState({
        "a": Sign.Positive,
        "b": Sign.Negative,
        "c": Sign.Positive
    })
    solution = domain.model(domain.gamma_hat(state))

    assert solution is not None

    assert solution.value_of("a") > 0
    assert solution.value_of("b") < 0
    assert solution.value_of("c") > 0