Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(52)  |  Call(43)  |  Derive(0)  |  Import(9)

src/s/y/sympy-polys-HEAD/sympy/logic/inference.py   sympy-polys(Download)
    expr = to_cnf(expr)
    if algorithm == "dpll":
        from sympy.logic.algorithms.dpll import dpll_satisfiable
        return dpll_satisfiable(expr)
    raise NotImplementedError

src/s/y/sympy-0.7.5/sympy/logic/inference.py   sympy(Download)
    expr = to_cnf(expr)
    if algorithm == "dpll":
        from sympy.logic.algorithms.dpll import dpll_satisfiable
        return dpll_satisfiable(expr)
    elif algorithm == "dpll2":

src/s/y/sympy-HEAD/sympy/logic/inference.py   sympy(Download)
    expr = to_cnf(expr)
    if algorithm == "dpll":
        from sympy.logic.algorithms.dpll import dpll_satisfiable
        return dpll_satisfiable(expr)
    elif algorithm == "dpll2":

src/s/y/sympy-0.7.5/sympy/logic/tests/test_inference.py   sympy(Download)
from sympy.logic.inference import is_literal, literal_symbol, \
     pl_true, satisfiable, PropKB
from sympy.logic.algorithms.dpll import dpll, dpll_satisfiable, \
    find_pure_symbol, find_unit_clause, unit_propagate, \
    find_pure_symbol_int_repr, find_unit_clause_int_repr, \
def test_dpll_satisfiable():
    A, B, C = symbols('A,B,C')
    assert dpll_satisfiable( A & ~A ) is False
    assert dpll_satisfiable( A & ~B ) == {A: True, B: False}
    assert dpll_satisfiable(
        A | B ) in ({A: True}, {B: True}, {A: True, B: True})
    assert dpll_satisfiable(
        (~A | B) & (~B | A) ) in ({A: True, B: True}, {A: False, B: False})

src/s/y/sympy-HEAD/sympy/logic/tests/test_inference.py   sympy(Download)
from sympy.logic.inference import is_literal, literal_symbol, \
     pl_true, satisfiable, PropKB
from sympy.logic.algorithms.dpll import dpll, dpll_satisfiable, \
    find_pure_symbol, find_unit_clause, unit_propagate, \
    find_pure_symbol_int_repr, find_unit_clause_int_repr, \
def test_dpll_satisfiable():
    A, B, C = symbols('A,B,C')
    assert dpll_satisfiable( A & ~A ) is False
    assert dpll_satisfiable( A & ~B ) == {A: True, B: False}
    assert dpll_satisfiable(
        A | B ) in ({A: True}, {B: True}, {A: True, B: True})
    assert dpll_satisfiable(
        (~A | B) & (~B | A) ) in ({A: True, B: True}, {A: False, B: False})

src/s/y/sympy-polys-HEAD/sympy/logic/tests/test_inference.py   sympy-polys(Download)
from sympy.logic.boolalg import Equivalent, Implies
from sympy.logic.inference import pl_true, satisfiable, PropKB
from sympy.logic.algorithms.dpll import dpll, dpll_satisfiable, \
    find_pure_symbol, find_unit_clause, unit_propagate, \
    find_pure_symbol_int_repr, find_unit_clause_int_repr, \
def test_dpll_satisfiable():
    A, B, C = symbols('ABC')
    assert dpll_satisfiable( A & ~A ) == False
    assert dpll_satisfiable( A & ~B ) == {A: True, B: False}
    assert dpll_satisfiable( A | B ) in ({A: True}, {B: True}, {A: True, B: True})
    assert dpll_satisfiable( (~A | B) & (~B | A) ) in ({A: True, B: True}, {A: False, B:False})

src/s/y/sympy-0.7.5/sympy/logic/tests/test_dimacs.py   sympy(Download)
 
from sympy.logic.utilities.dimacs import load
from sympy.logic.algorithms.dpll import dpll_satisfiable
from sympy.utilities.pytest import skip
 
 
def test_f1():
    assert bool(dpll_satisfiable(load(f1)))
def test_f2():
    assert bool(dpll_satisfiable(load(f2)))
 
 
def test_f3():
    assert bool(dpll_satisfiable(load(f3)))
 
 
def test_f4():
    assert not bool(dpll_satisfiable(load(f4)))

src/s/y/sympy-HEAD/sympy/logic/tests/test_dimacs.py   sympy(Download)
 
from sympy.logic.utilities.dimacs import load
from sympy.logic.algorithms.dpll import dpll_satisfiable
from sympy.utilities.pytest import skip
 
 
def test_f1():
    assert bool(dpll_satisfiable(load(f1)))
def test_f2():
    assert bool(dpll_satisfiable(load(f2)))
 
 
def test_f3():
    assert bool(dpll_satisfiable(load(f3)))
 
 
def test_f4():
    assert not bool(dpll_satisfiable(load(f4)))

src/s/y/sympy-polys-HEAD/sympy/logic/tests/test_dimacs.py   sympy-polys(Download)
 
from sympy.logic.utilities.dimacs import load
from sympy.logic.algorithms.dpll import dpll_satisfiable
from sympy.utilities.pytest import skip
 
def test_f1():
    assert bool(dpll_satisfiable(load(f1)))
 
def test_f2():
    assert bool(dpll_satisfiable(load(f2)))
def test_f3():
    assert bool(dpll_satisfiable(load(f3)))
 
def test_f4():
    assert not bool(dpll_satisfiable(load(f4)))