python-sat 1.9.dev9__tar.gz → 1.9.dev11__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of python-sat might be problematic. Click here for more details.
- {python_sat-1.9.dev9/python_sat.egg-info → python_sat-1.9.dev11}/PKG-INFO +1 -1
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/pysat/__init__.py +1 -1
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/pysat/formula.py +16 -1
- {python_sat-1.9.dev9 → python_sat-1.9.dev11/python_sat.egg-info}/PKG-INFO +1 -1
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/tests/test_clausification.py +2 -1
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/LICENSE.txt +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/MANIFEST.in +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/README.rst +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/allies/__init__.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/allies/approxmc.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/allies/unigen.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/cardenc/bitwise.hh +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/cardenc/card.hh +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/cardenc/clset.hh +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/cardenc/common.hh +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/cardenc/itot.hh +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/cardenc/ladder.hh +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/cardenc/mto.hh +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/cardenc/pairwise.hh +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/cardenc/ptypes.hh +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/cardenc/pycard.cc +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/cardenc/seqcounter.hh +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/cardenc/sortcard.hh +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/cardenc/utils.hh +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/examples/__init__.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/examples/bbscan.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/examples/bica.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/examples/fm.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/examples/genhard.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/examples/hitman.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/examples/lbx.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/examples/lsu.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/examples/mcsls.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/examples/models.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/examples/musx.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/examples/optux.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/examples/primer.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/examples/rc2.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/examples/usage.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/formula/pf_parse.cc +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/formula/pf_plus.cc +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/formula/pf_plus.hh +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/formula/pf_py.hh +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/formula/pf_scan.hh +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/formula/pf_weight.cc +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/formula/pf_weight.hh +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/formula/pyformula.cc +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/formula/pyformula.hh +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/pysat/_fileio.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/pysat/_utils.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/pysat/card.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/pysat/engines.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/pysat/integer.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/pysat/pb.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/pysat/process.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/pysat/solvers.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/python_sat.egg-info/SOURCES.txt +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/python_sat.egg-info/dependency_links.txt +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/python_sat.egg-info/requires.txt +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/python_sat.egg-info/top_level.txt +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/requirements.txt +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/setup.cfg +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/setup.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/solvers/cadical103.tar.gz +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/solvers/cadical153.tar.gz +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/solvers/cadical195.tar.gz +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/solvers/cadical300.tar.gz +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/solvers/glucose30.tar.gz +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/solvers/glucose41.tar.gz +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/solvers/glucose421.tar.gz +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/solvers/lingeling.tar.gz +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/solvers/maplechrono.zip +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/solvers/maplecm.zip +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/solvers/maplesat.zip +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/solvers/mergesat3.tar.gz +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/solvers/minicard.tar.gz +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/solvers/minisat22.tar.gz +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/solvers/minisatgh.zip +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/solvers/patches/cadical103.patch +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/solvers/patches/cadical153.patch +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/solvers/patches/cadical195.patch +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/solvers/patches/cadical300.patch +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/solvers/patches/glucose30.patch +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/solvers/patches/glucose41.patch +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/solvers/patches/glucose421.patch +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/solvers/patches/gluecard30.patch +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/solvers/patches/gluecard41.patch +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/solvers/patches/kissat404.patch +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/solvers/patches/lingeling.patch +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/solvers/patches/maplechrono.patch +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/solvers/patches/maplecm.patch +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/solvers/patches/maplesat.patch +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/solvers/patches/mergesat3.patch +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/solvers/patches/minicard.patch +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/solvers/patches/minisat22.patch +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/solvers/patches/minisatep.patch +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/solvers/patches/minisatgh.patch +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/solvers/prepare.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/solvers/pysolvers.cc +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/tests/test_accum_stats.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/tests/test_atmost.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/tests/test_atmost1.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/tests/test_atmostk.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/tests/test_boolengine.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/tests/test_cnf.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/tests/test_empty_extclause.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/tests/test_encode_pb_conditional.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/tests/test_equals1.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/tests/test_formula_parsing.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/tests/test_formula_unique.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/tests/test_idpool.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/tests/test_integer.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/tests/test_oom.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/tests/test_process.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/tests/test_propagate.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/tests/test_unique_model.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/tests/test_unique_mus.py +0 -0
- {python_sat-1.9.dev9 → python_sat-1.9.dev11}/tests/test_warmstart.py +0 -0
|
@@ -972,7 +972,7 @@ class Formula(object):
|
|
|
972
972
|
return ('identity', type(obj), id(obj))
|
|
973
973
|
return ('obj', type(obj), obj)
|
|
974
974
|
|
|
975
|
-
def
|
|
975
|
+
def _formula_key_uncached(form):
|
|
976
976
|
"""
|
|
977
977
|
Get a structural key without a formula's merge flag.
|
|
978
978
|
"""
|
|
@@ -1001,6 +1001,21 @@ class Formula(object):
|
|
|
1001
1001
|
counts = collections.Counter(_formula_key(subform) for subform in form.subformulas)
|
|
1002
1002
|
return (form.type, frozenset(counts.items()))
|
|
1003
1003
|
|
|
1004
|
+
def _formula_key(form):
|
|
1005
|
+
"""
|
|
1006
|
+
Get a cached structural key for an immutable formula.
|
|
1007
|
+
"""
|
|
1008
|
+
|
|
1009
|
+
if isinstance(form, Formula):
|
|
1010
|
+
key = getattr(form, '_key_cache', None)
|
|
1011
|
+
if key is None:
|
|
1012
|
+
key = _formula_key_uncached(form)
|
|
1013
|
+
form._key_cache = key
|
|
1014
|
+
|
|
1015
|
+
return key
|
|
1016
|
+
|
|
1017
|
+
return _formula_key_uncached(form)
|
|
1018
|
+
|
|
1004
1019
|
def _merged_operands(operands, formula_type):
|
|
1005
1020
|
"""Flatten same-type operands for a merged connective."""
|
|
1006
1021
|
result = []
|
|
@@ -33,9 +33,10 @@ def test_clausification():
|
|
|
33
33
|
[1, 5, -6], [6, -1, 5], [6, 1, -5], [6], [7]])
|
|
34
34
|
|
|
35
35
|
# multiple successive inner/outermost clausification
|
|
36
|
+
Formula.cleanup()
|
|
36
37
|
f = And(Atom('1'), Atom('2'))
|
|
37
38
|
compare(list(f), [[1], [2]])
|
|
38
39
|
|
|
39
40
|
# nested conjunctions are inherited directly by the outer conjunction
|
|
40
41
|
g = And(f, Atom('3'))
|
|
41
|
-
compare(list(g), [[1], [2], [
|
|
42
|
+
compare(list(g), [[1], [2], [3]])
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|