PySDD 1.0.5__tar.gz → 1.0.6__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.
- {pysdd-1.0.5 → pysdd-1.0.6}/PKG-INFO +3 -2
- {pysdd-1.0.5 → pysdd-1.0.6}/PySDD.egg-info/PKG-INFO +3 -2
- {pysdd-1.0.5 → pysdd-1.0.6}/pyproject.toml +1 -1
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/sdd.pyx +4 -1
- {pysdd-1.0.5 → pysdd-1.0.6}/tests/test_minimize.py +16 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/LICENSE +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/PySDD.egg-info/SOURCES.txt +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/PySDD.egg-info/dependency_links.txt +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/PySDD.egg-info/entry_points.txt +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/PySDD.egg-info/requires.txt +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/PySDD.egg-info/top_level.txt +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/README.rst +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/__init__.py +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/__main__.py +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/cli.py +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/iterator.py +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/basic/computed.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/basic/count_and_size.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/basic/gc.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/basic/hash.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/basic/memory.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/basic/multiply.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/basic/nodes.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/basic/partitions.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/basic/references.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/basic/replace.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/basic/shadows.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/basic/sort.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/manager/copy.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/manager/interface.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/manager/manager.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/manager/stats.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/manager/variables.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/sdds/apply.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/sdds/bits.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/sdds/cardinality.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/sdds/condition.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/sdds/copy.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/sdds/count.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/sdds/essential_vars.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/sdds/exists.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/sdds/exists_multiple.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/sdds/exists_multiple_static.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/sdds/forall.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/sdds/io.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/sdds/model_count.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/sdds/rename_vars.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/sdds/size.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/sdds/wmc.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/util.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/verify.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/version.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/vtree_fragments/construction.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/vtree_fragments/moves.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/vtree_fragments/operations.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/vtree_operations/cartesian_product.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/vtree_operations/dissect.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/vtree_operations/limits.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/vtree_operations/op_left_rotate.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/vtree_operations/op_right_rotate.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/vtree_operations/op_swap.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/vtree_operations/rollback.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/vtree_operations/split.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/vtree_search/auto.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/vtree_search/search.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/vtree_search/state.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/vtrees/compare.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/vtrees/edit.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/vtrees/io.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/vtrees/maps.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/vtrees/moves.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/vtrees/static.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/libsdd-2.0/src/vtrees/vtree.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/sdd-2.0/src/fnf/compiler.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/sdd-2.0/src/fnf/fnf.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/sdd-2.0/src/fnf/io.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/lib/sdd-2.0/src/fnf/utils.c +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/util.py +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/pysdd/wmcstochastic.py +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/setup.cfg +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/tests/test_iterator.py +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/tests/test_nnf.py +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/tests/test_psdd.py +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/tests/test_util.py +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/tests/test_vtree.py +0 -0
- {pysdd-1.0.5 → pysdd-1.0.6}/tests/test_wmcstochastic.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: PySDD
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.6
|
|
4
4
|
Summary: Sentential Decision Diagrams
|
|
5
5
|
Author: Arthur Choi
|
|
6
6
|
Author-email: Wannes Meert <wannes.meert@cs.kuleuven.be>, Robin Manhaeve <robin.manhaeve@kuleuven.be>
|
|
@@ -33,6 +33,7 @@ Provides-Extra: tests
|
|
|
33
33
|
Requires-Dist: pytest; extra == "tests"
|
|
34
34
|
Provides-Extra: notebooks
|
|
35
35
|
Requires-Dist: numpy; extra == "notebooks"
|
|
36
|
+
Dynamic: license-file
|
|
36
37
|
|
|
37
38
|
=====
|
|
38
39
|
PySDD
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: PySDD
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.6
|
|
4
4
|
Summary: Sentential Decision Diagrams
|
|
5
5
|
Author: Arthur Choi
|
|
6
6
|
Author-email: Wannes Meert <wannes.meert@cs.kuleuven.be>, Robin Manhaeve <robin.manhaeve@kuleuven.be>
|
|
@@ -33,6 +33,7 @@ Provides-Extra: tests
|
|
|
33
33
|
Requires-Dist: pytest; extra == "tests"
|
|
34
34
|
Provides-Extra: notebooks
|
|
35
35
|
Requires-Dist: numpy; extra == "notebooks"
|
|
36
|
+
Dynamic: license-file
|
|
36
37
|
|
|
37
38
|
=====
|
|
38
39
|
PySDD
|
|
@@ -53,6 +53,7 @@ cdef class SddNode:
|
|
|
53
53
|
wrapper._sddnode = node
|
|
54
54
|
if wrapper.garbage_collected():
|
|
55
55
|
return None
|
|
56
|
+
wrapper.ref()
|
|
56
57
|
if sddapi_c.sdd_node_is_literal(node):
|
|
57
58
|
wrapper._name = sddapi_c.sdd_node_literal(node)
|
|
58
59
|
elif sddapi_c.sdd_node_is_true(node):
|
|
@@ -63,6 +64,9 @@ cdef class SddNode:
|
|
|
63
64
|
wrapper._name = "Decision"
|
|
64
65
|
return wrapper
|
|
65
66
|
|
|
67
|
+
def __del__(self):
|
|
68
|
+
# clean up _sddnode ref
|
|
69
|
+
self.deref()
|
|
66
70
|
|
|
67
71
|
@property
|
|
68
72
|
def id(self):
|
|
@@ -306,7 +310,6 @@ cdef class SddNode:
|
|
|
306
310
|
|
|
307
311
|
Returns the node.
|
|
308
312
|
"""
|
|
309
|
-
# TODO: Should we ref every Python SDDNode object on creation and deref on Python GC?
|
|
310
313
|
sddapi_c.sdd_ref(self._sddnode, self._manager._sddmanager)
|
|
311
314
|
|
|
312
315
|
def deref(self):
|
|
@@ -74,6 +74,22 @@ def test_min2():
|
|
|
74
74
|
# with (directory / "sdd2_before_b.gv").open("w") as out:
|
|
75
75
|
# print(sdd_to_dot(sdd), file=out)
|
|
76
76
|
|
|
77
|
+
def test_refcount():
|
|
78
|
+
sdd = SddManager(var_count=2)
|
|
79
|
+
a, b = sdd.vars
|
|
80
|
+
f = a | b
|
|
81
|
+
assert f.ref_count() == 1
|
|
82
|
+
f.ref()
|
|
83
|
+
assert f.ref_count() == 2
|
|
84
|
+
f.deref()
|
|
85
|
+
assert f.ref_count() == 1
|
|
86
|
+
# equivalent formula will
|
|
87
|
+
# ref same formula object
|
|
88
|
+
f2 = b | a
|
|
89
|
+
assert f2.ref_count() == 2
|
|
90
|
+
assert f.ref_count() == 2
|
|
91
|
+
del f2
|
|
92
|
+
assert f.ref_count() == 1
|
|
77
93
|
|
|
78
94
|
if __name__ == "__main__":
|
|
79
95
|
logger.setLevel(logging.DEBUG)
|
|
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
|