コード例 #1
0
def main():
    with open(sys.argv[1]) as cnf_file:
        cnf = load(cnf_file.read())
    result = dpll_satisfiable(cnf)
    print(result)
    return 0
コード例 #2
0
ファイル: test_dimacs.py プロジェクト: wuxi20/Pythonista
def test_f4():
    assert not bool(dpll_satisfiable(load(f4)))
コード例 #3
0
ファイル: test_dimacs.py プロジェクト: wuxi20/Pythonista
def test_f5():
    assert bool(dpll_satisfiable(load(f5)))
コード例 #4
0
ファイル: test_dimacs.py プロジェクト: wuxi20/Pythonista
def test_f2():
    assert bool(dpll_satisfiable(load(f2)))
コード例 #5
0
ファイル: test_dimacs.py プロジェクト: wuxi20/Pythonista
def test_f3():
    assert bool(dpll_satisfiable(load(f3)))
コード例 #6
0
ファイル: test_dimacs.py プロジェクト: ryanGT/sympy
def test_f1():
    assert bool(dpll_satisfiable(load(f1)))
コード例 #7
0
ファイル: test_dimacs.py プロジェクト: wuxi20/Pythonista
def test_f1():
    assert bool(dpll_satisfiable(load(f1)))
コード例 #8
0
ファイル: test_dimacs.py プロジェクト: ryanGT/sympy
def test_f4():
    # re-enable this when dpll is efficient
    skip('Takes too much time')
    assert not bool(dpll_satisfiable(load(f4)))
コード例 #9
0
ファイル: test_dimacs.py プロジェクト: ryanGT/sympy
def test_f3():
    assert bool(dpll_satisfiable(load(f3)))
コード例 #10
0
ファイル: test_dimacs.py プロジェクト: ryanGT/sympy
def test_f2():
    assert bool(dpll_satisfiable(load(f2)))
コード例 #11
0
ファイル: test_dimacs.py プロジェクト: KevinGoodsell/sympy
def test_f4():
    assert not bool(dpll_satisfiable(load(f4)))
コード例 #12
0
ファイル: test_dimacs.py プロジェクト: AdrianPotter/sympy
def test_f5():
    assert bool(dpll_satisfiable(load(f5)))