pollywog 0.1.2__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.
Files changed (54) hide show
  1. pollywog-0.1.2/.clang-format +63 -0
  2. pollywog-0.1.2/.clangd +146 -0
  3. pollywog-0.1.2/.cmake-format.json +50 -0
  4. pollywog-0.1.2/.gitattributes +2 -0
  5. pollywog-0.1.2/.gitignore +279 -0
  6. pollywog-0.1.2/.python-version +1 -0
  7. pollywog-0.1.2/CMakeLists.txt +218 -0
  8. pollywog-0.1.2/LICENSE +29 -0
  9. pollywog-0.1.2/PKG-INFO +191 -0
  10. pollywog-0.1.2/README.rst +168 -0
  11. pollywog-0.1.2/ci/make-release +83 -0
  12. pollywog-0.1.2/ci/make-wheel +44 -0
  13. pollywog-0.1.2/cmake/BuildCudd.cmake +291 -0
  14. pollywog-0.1.2/cmake/cudd_config.h.in +85 -0
  15. pollywog-0.1.2/docs/Doxyfile.in +31 -0
  16. pollywog-0.1.2/docs/_static/.gitkeep +0 -0
  17. pollywog-0.1.2/docs/_templates/.gitkeep +0 -0
  18. pollywog-0.1.2/docs/api/cxx.rst +63 -0
  19. pollywog-0.1.2/docs/api/python.rst +109 -0
  20. pollywog-0.1.2/docs/bibliography.rst +4 -0
  21. pollywog-0.1.2/docs/concepts/lifetimes.rst +111 -0
  22. pollywog-0.1.2/docs/concepts/representation.rst +198 -0
  23. pollywog-0.1.2/docs/concepts/variables.rst +107 -0
  24. pollywog-0.1.2/docs/conf.py +74 -0
  25. pollywog-0.1.2/docs/index.bib +118 -0
  26. pollywog-0.1.2/docs/index.rst +22 -0
  27. pollywog-0.1.2/pixi.lock +7038 -0
  28. pollywog-0.1.2/pyproject.toml +266 -0
  29. pollywog-0.1.2/src/pollywog/__init__.py +43 -0
  30. pollywog-0.1.2/src/pollywog/_core.cpp +1092 -0
  31. pollywog-0.1.2/src/pollywog/_core.pyi +1358 -0
  32. pollywog-0.1.2/src/pollywog/_core.pyi.pattern +129 -0
  33. pollywog-0.1.2/src/pollywog/_version.py +24 -0
  34. pollywog-0.1.2/src/pollywog/add.hpp +179 -0
  35. pollywog-0.1.2/src/pollywog/bdd.hpp +420 -0
  36. pollywog-0.1.2/src/pollywog/context.py +335 -0
  37. pollywog-0.1.2/src/pollywog/cudd_headers.hpp +33 -0
  38. pollywog-0.1.2/src/pollywog/lattice.hpp +116 -0
  39. pollywog-0.1.2/src/pollywog/manager.hpp +225 -0
  40. pollywog-0.1.2/src/pollywog/ops.hpp +529 -0
  41. pollywog-0.1.2/src/pollywog/pollywog.cpp +17 -0
  42. pollywog-0.1.2/src/pollywog/poly.hpp +246 -0
  43. pollywog-0.1.2/src/pollywog/py.typed +0 -0
  44. pollywog-0.1.2/src/pollywog/spec.py +157 -0
  45. pollywog-0.1.2/src/pollywog/var.hpp +48 -0
  46. pollywog-0.1.2/tests/cxx/test_lattice.cpp +268 -0
  47. pollywog-0.1.2/tests/cxx/test_manager.cpp +198 -0
  48. pollywog-0.1.2/tests/cxx/test_mtbdd_ops.cpp +1020 -0
  49. pollywog-0.1.2/tests/python/conftest.py +84 -0
  50. pollywog-0.1.2/tests/python/test_bdd.py +629 -0
  51. pollywog-0.1.2/tests/python/test_lattice.py +181 -0
  52. pollywog-0.1.2/tests/python/test_manager.py +151 -0
  53. pollywog-0.1.2/tests/python/test_polynomial.py +626 -0
  54. pollywog-0.1.2/uv.lock +2157 -0
@@ -0,0 +1,63 @@
1
+ AccessModifierOffset: -1
2
+ AlignAfterOpenBracket: AlwaysBreak
3
+ AlignConsecutiveMacros:
4
+ Enabled: true
5
+ AcrossEmptyLines: false
6
+ AcrossComments: false
7
+ AlignCompound: false
8
+ AlignFunctionPointers: false
9
+ PadOperators: true
10
+ AlignConsecutiveAssignments:
11
+ Enabled: true
12
+ AcrossEmptyLines: false
13
+ AcrossComments: false
14
+ AlignCompound: false
15
+ AlignFunctionPointers: false
16
+ PadOperators: true
17
+ AlignConsecutiveDeclarations:
18
+ Enabled: false
19
+ AcrossEmptyLines: false
20
+ AcrossComments: false
21
+ AlignCompound: false
22
+ AlignFunctionPointers: false
23
+ PadOperators: true
24
+ AlignEscapedNewlines: Left
25
+ AlignOperands: Align
26
+ AlignTrailingComments: true
27
+ AllowAllParametersOfDeclarationOnNextLine: false
28
+ AllowShortBlocksOnASingleLine: "Always"
29
+ AllowShortCaseLabelsOnASingleLine: true
30
+ AllowShortFunctionsOnASingleLine: All
31
+ AllowShortIfStatementsOnASingleLine: WithoutElse
32
+ AllowShortLambdasOnASingleLine: Inline
33
+ AllowShortLoopsOnASingleLine: true
34
+ AlwaysBreakAfterReturnType: None
35
+ AlwaysBreakBeforeMultilineStrings: true
36
+ AlwaysBreakTemplateDeclarations: Yes
37
+ BinPackArguments: false
38
+ BinPackParameters: false
39
+ BreakBeforeBinaryOperators: None
40
+ BreakBeforeBraces: Attach
41
+ BreakBeforeTernaryOperators: true
42
+ BreakConstructorInitializers: AfterColon
43
+ BreakStringLiterals: false
44
+ ColumnLimit: 88
45
+ CompactNamespaces: false
46
+ ConstructorInitializerAllOnOneLineOrOnePerLine: true
47
+ ConstructorInitializerIndentWidth: 4
48
+ ContinuationIndentWidth: 4
49
+ Cpp11BracedListStyle: true
50
+ DerivePointerAlignment: false
51
+ DisableFormat: false
52
+ IndentCaseLabels: true
53
+ IndentWidth: 2
54
+ IndentWrappedFunctionNames: false
55
+ KeepEmptyLinesAtTheStartOfBlocks: false
56
+ Language: Cpp
57
+ MaxEmptyLinesToKeep: 1
58
+ NamespaceIndentation: None
59
+ PointerAlignment: Left
60
+ Standard: "c++20"
61
+ TabWidth: 2
62
+ UseTab: Never
63
+
pollywog-0.1.2/.clangd ADDED
@@ -0,0 +1,146 @@
1
+ # $schema: https://www.schemastore.org/clangd.json
2
+ CompileFlags:
3
+ # compile_commands.json is symlinked into the project root by CMake
4
+ CompilationDatabase: .
5
+
6
+ Documentation:
7
+ CommentFormat: Doxygen
8
+
9
+ Hover:
10
+ ShowAKA: true
11
+
12
+ Diagnostics:
13
+ Includes:
14
+ IgnoreHeader:
15
+ - "(build/_deps/|site-packages/|\\.pixi/)"
16
+ ClangTidy:
17
+
18
+ Add:
19
+ # Enable all warnings by default. This ensures we don't miss new and useful
20
+ # warnings when a new version of clang-tidy is dropped.
21
+ - '*'
22
+ Remove:
23
+ # Noise from macro expansion. The LACE task macros (TASK_DECL_N TASK_IMPL_N
24
+ # VOID_TASK_N) and nanobind's NB_MODULE expand to code we do not own but which
25
+ # clang-tidy attributes to our invocation line so it cannot be filtered by
26
+ # HeaderFilterRegex. Every check below was verified to fire only from those
27
+ # expansions. Checks kept on deliberately can still be silenced per site because
28
+ # a NOLINT on the macro invocation line does reach into the expansion. The one
29
+ # that needs this is modernize-use-trailing-return-type which we keep because we
30
+ # want trailing return types in our own code but which every TASK_IMPL_N and
31
+ # NB_MODULE will trip. Silence those with a trailing comment like
32
+ # NOLINT(modernize-use-trailing-return-type) on the macro line,
33
+ - modernize-use-trailing-return-type
34
+ # LACE task deque arithmetic
35
+ - cppcoreguidelines-pro-bounds-pointer-arithmetic
36
+ # See google-readability-casting which covers the same ground in our own code without the macro noise
37
+ - cppcoreguidelines-pro-type-cstyle-cast
38
+ # The LACE Task argument union
39
+ - cppcoreguidelines-pro-type-union-access
40
+ # NB_MODULE plus snprintf in mt callbacks
41
+ - cppcoreguidelines-pro-type-vararg
42
+ - misc-use-anonymous-namespace
43
+ - misc-use-internal-linkage
44
+
45
+ # Unavoidable when binding a C library from C++. These fire on our own code but
46
+ # the pattern they flag is required by the Sylvan or Python C API,
47
+ - cppcoreguidelines-owning-memory
48
+ # Custom MTBDD leaves store a pointer in the 64-bit payload slot so every callback
49
+ # round-trips int to ptr
50
+ - cppcoreguidelines-pro-type-reinterpret-cast
51
+ # The LACE task macros paste unqualified type names so a file-scope "using
52
+ # namespace sylvan" is required for them to compile. Also needed for nanobind's
53
+ # "_a" argument literals
54
+ - google-build-using-namespace
55
+ # Cannot see that the nanobind STL headers are included for their type-caster side
56
+ # effects and so wants to strip them
57
+ - misc-include-cleaner
58
+
59
+ # Untriaged warnings. Please categorize them accordingly if you find a relevant
60
+ # section for it,
61
+ - bugprone-assignment-in-if-condition
62
+ - bugprone-implicit-widening-of-multiplication-result
63
+ - bugprone-multi-level-implicit-pointer-conversion
64
+ - bugprone-not-null-terminated-result
65
+ - bugprone-suspicious-memory-comparison
66
+ - bugprone-switch-missing-default-case
67
+ - bugprone-tagged-union-member-count
68
+ - cert-env33-c
69
+ - cert-err33-c
70
+ - cert-err34-c
71
+ - concurrency-mt-unsafe
72
+ - cppcoreguidelines-narrowing-conversions
73
+
74
+ # Warnings that may be useful, but are too inconsistent to enable by default
75
+ # May yield useful results with some manual triaging,
76
+ - bugprone-branch-clone
77
+ - bugprone-macro-parentheses
78
+ - bugprone-sizeof-expression
79
+ - hicpp-multiway-paths-covered
80
+ - hicpp-signed-bitwise
81
+ - misc-unused-parameters
82
+ - modernize-macro-to-enum
83
+ - readability-avoid-nested-conditional-operator
84
+ - readability-else-after-return
85
+ - readability-enum-initial-value
86
+ - readability-function-size
87
+ - readability-isolate-declaration
88
+ - readability-use-anyofallof
89
+
90
+ # Warnings that are rarely useful,
91
+ - altera-*
92
+ - android-*
93
+ - fuchsia-*
94
+ - bugprone-easily-swappable-parameters
95
+ - bugprone-inc-dec-in-conditions
96
+ - bugprone-swapped-arguments
97
+ - cppcoreguidelines-avoid-non-const-global-variables
98
+ - cppcoreguidelines-init-variables
99
+ - llvm-header-guard
100
+ - llvmlibc-*
101
+ - misc-misplaced-const
102
+ - misc-no-recursion
103
+ - misc-non-private-member-variables-in-classes
104
+ - performance-no-int-to-ptr
105
+ - readability-function-cognitive-complexity
106
+ - readability-identifier-length
107
+ - readability-magic-numbers
108
+ - readability-math-missing-parentheses
109
+ - readability-redundant-declaration #
110
+ - readability-suspicious-call-argument
111
+
112
+ # Aliases. These are just duplicates of other warnings and should always be ignored.
113
+ # Note that disabling a check does not disable its aliases so both names must be
114
+ # listed here,
115
+ - bugprone-narrowing-conversions
116
+ - cppcoreguidelines-avoid-c-arrays
117
+ - hicpp-avoid-c-arrays
118
+ - modernize-avoid-c-arrays
119
+ - cppcoreguidelines-pro-bounds-array-to-pointer-decay
120
+ - hicpp-no-array-decay
121
+ - hicpp-vararg
122
+ - cert-arr39-c
123
+ - cert-dcl37-c
124
+ - cert-dcl51-cpp
125
+ - cert-exp42-c
126
+ - cert-flp37-c
127
+ - cert-int09-c
128
+ - cert-msc24-c
129
+ - cert-msc33-c
130
+ - cppcoreguidelines-avoid-magic-numbers
131
+ - cppcoreguidelines-macro-to-enum
132
+ - google-readability-braces-around-statements
133
+ - google-readability-function-size
134
+ - hicpp-braces-around-statements
135
+ - hicpp-function-size
136
+ - llvm-else-after-return
137
+
138
+ CheckOptions:
139
+ CheckOptions:
140
+ # Sylvan's C API returns int for predicates (mtbdd_isleaf, sylvan_mt_equals
141
+ # callbacks, ...), so testing one in a condition is idiomatic rather than a
142
+ # defect. The check stays on for the conversions that are genuinely worth
143
+ # flagging.
144
+ readability-implicit-bool-conversion.AllowIntegerConditions: true
145
+ readability-implicit-bool-conversion.AllowPointerConditions: true
146
+
@@ -0,0 +1,50 @@
1
+ {
2
+ "parse": {
3
+ "additional_commands": {
4
+ "nanobind_add_module": {
5
+ "pargs": [
6
+ {
7
+ "nargs": "1"
8
+ },
9
+ {
10
+ "flags": [
11
+ "STABLE_ABI",
12
+ "FREE_THREADED",
13
+ "NB_STATIC",
14
+ "NB_SHARED",
15
+ "NB_SUPPRESS_WARNINGS",
16
+ "PROTECT_STACK",
17
+ "LTO",
18
+ "NOMINSIZE",
19
+ "NOSTRIP",
20
+ "MUSL_DYNAMIC_LIBCPP"
21
+ ]
22
+ },
23
+ {
24
+ "nargs": "+"
25
+ }
26
+ ]
27
+ },
28
+ "nanobind_add_stub": {
29
+ "flags": [
30
+ "INSTALL_TIME",
31
+ "RECURSIVE",
32
+ "VERBOSE",
33
+ "EXCLUDE_DOCSTRINGS",
34
+ "INCLUDE_PRIVATE",
35
+ "EXCLUDE_FROM_ALL"
36
+ ],
37
+ "kwargs": {
38
+ "MODULE": "1",
39
+ "OUTPUT": "+",
40
+ "OUTPUT_PATH": "1",
41
+ "PYTHON_PATH": "+",
42
+ "DEPENDS": "+",
43
+ "MARKER_FILE": "*",
44
+ "PATTERN_FILE": "1",
45
+ "COMPONENT": "+"
46
+ }
47
+ }
48
+ }
49
+ }
50
+ }
@@ -0,0 +1,2 @@
1
+ # SCM syntax highlighting & preventing 3-way merges
2
+ pixi.lock merge=binary linguist-language=YAML linguist-generated=true -diff
@@ -0,0 +1,279 @@
1
+ # local things
2
+ /plans/
3
+ /issues/
4
+ /thoughts/
5
+
6
+ # skbuild generated
7
+ src/pollywog/_version.py
8
+
9
+ # pixi environments
10
+ .pixi/*
11
+ !.pixi/config.toml
12
+
13
+ # Created by https://www.toptal.com/developers/gitignore/api/python,c,cmake,c++
14
+ # Edit at https://www.toptal.com/developers/gitignore?templates=python,c,cmake,c++
15
+
16
+ ### C ###
17
+ # Prerequisites
18
+ *.d
19
+
20
+ # Object files
21
+ *.o
22
+ *.ko
23
+ *.obj
24
+ *.elf
25
+
26
+ # Linker output
27
+ *.ilk
28
+ *.map
29
+ *.exp
30
+
31
+ # Precompiled Headers
32
+ *.gch
33
+ *.pch
34
+
35
+ # Libraries
36
+ *.lib
37
+ *.a
38
+ *.la
39
+ *.lo
40
+
41
+ # Shared objects (inc. Windows DLLs)
42
+ *.dll
43
+ *.so
44
+ *.so.*
45
+ *.dylib
46
+
47
+ # Executables
48
+ *.exe
49
+ *.out
50
+ *.app
51
+ *.i*86
52
+ *.x86_64
53
+ *.hex
54
+
55
+ # Debug files
56
+ *.dSYM/
57
+ *.su
58
+ *.idb
59
+ *.pdb
60
+
61
+ # Kernel Module Compile Results
62
+ *.mod*
63
+ *.cmd
64
+ .tmp_versions/
65
+ modules.order
66
+ Module.symvers
67
+ Mkfile.old
68
+ dkms.conf
69
+
70
+ ### C++ ###
71
+ # Prerequisites
72
+
73
+ # Compiled Object files
74
+ *.slo
75
+
76
+ # Precompiled Headers
77
+
78
+ # Compiled Dynamic libraries
79
+
80
+ # Fortran module files
81
+ *.mod
82
+ *.smod
83
+
84
+ # Compiled Static libraries
85
+ *.lai
86
+
87
+ # Executables
88
+
89
+ ### CMake ###
90
+ CMakeLists.txt.user
91
+ CMakeCache.txt
92
+ CMakeFiles
93
+ CMakeScripts
94
+ Testing
95
+ Makefile
96
+ cmake_install.cmake
97
+ install_manifest.txt
98
+ compile_commands.json
99
+ CTestTestfile.cmake
100
+ _deps
101
+
102
+ ### CMake Patch ###
103
+ CMakeUserPresets.json
104
+
105
+ # External projects
106
+ *-prefix/
107
+
108
+ ### Python ###
109
+ # Byte-compiled / optimized / DLL files
110
+ __pycache__/
111
+ *.py[cod]
112
+ *$py.class
113
+
114
+ # C extensions
115
+
116
+ # Distribution / packaging
117
+ .Python
118
+ build/
119
+ develop-eggs/
120
+ dist/
121
+ downloads/
122
+ eggs/
123
+ .eggs/
124
+ lib/
125
+ lib64/
126
+ parts/
127
+ sdist/
128
+ var/
129
+ wheels/
130
+ share/python-wheels/
131
+ *.egg-info/
132
+ .installed.cfg
133
+ *.egg
134
+ MANIFEST
135
+
136
+ # PyInstaller
137
+ # Usually these files are written by a python script from a template
138
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
139
+ *.manifest
140
+ *.spec
141
+
142
+ # Installer logs
143
+ pip-log.txt
144
+ pip-delete-this-directory.txt
145
+
146
+ # Unit test / coverage reports
147
+ htmlcov/
148
+ .tox/
149
+ .nox/
150
+ .coverage
151
+ .coverage.*
152
+ .cache
153
+ nosetests.xml
154
+ coverage.xml
155
+ *.cover
156
+ *.py,cover
157
+ .hypothesis/
158
+ .pytest_cache/
159
+ cover/
160
+
161
+ # Translations
162
+ *.mo
163
+ *.pot
164
+
165
+ # Django stuff:
166
+ *.log
167
+ local_settings.py
168
+ db.sqlite3
169
+ db.sqlite3-journal
170
+
171
+ # Flask stuff:
172
+ instance/
173
+ .webassets-cache
174
+
175
+ # Scrapy stuff:
176
+ .scrapy
177
+
178
+ # Sphinx documentation
179
+ docs/_build/
180
+
181
+ # PyBuilder
182
+ .pybuilder/
183
+ target/
184
+
185
+ # Jupyter Notebook
186
+ .ipynb_checkpoints
187
+
188
+ # IPython
189
+ profile_default/
190
+ ipython_config.py
191
+
192
+ # pyenv
193
+ # For a library or package, you might want to ignore these files since the code is
194
+ # intended to run in multiple environments; otherwise, check them in:
195
+ # .python-version
196
+
197
+ # pipenv
198
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
199
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
200
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
201
+ # install all needed dependencies.
202
+ #Pipfile.lock
203
+
204
+ # poetry
205
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
206
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
207
+ # commonly ignored for libraries.
208
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
209
+ #poetry.lock
210
+
211
+ # pdm
212
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
213
+ #pdm.lock
214
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
215
+ # in version control.
216
+ # https://pdm.fming.dev/#use-with-ide
217
+ .pdm.toml
218
+
219
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
220
+ __pypackages__/
221
+
222
+ # Celery stuff
223
+ celerybeat-schedule
224
+ celerybeat.pid
225
+
226
+ # SageMath parsed files
227
+ *.sage.py
228
+
229
+ # Environments
230
+ .env
231
+ .venv
232
+ env/
233
+ venv/
234
+ ENV/
235
+ env.bak/
236
+ venv.bak/
237
+
238
+ # Spyder project settings
239
+ .spyderproject
240
+ .spyproject
241
+
242
+ # Rope project settings
243
+ .ropeproject
244
+
245
+ # mkdocs documentation
246
+ /site
247
+
248
+ # mypy
249
+ .mypy_cache/
250
+ .dmypy.json
251
+ dmypy.json
252
+
253
+ # Pyre type checker
254
+ .pyre/
255
+
256
+ # pytype static type analyzer
257
+ .pytype/
258
+
259
+ # Cython debug symbols
260
+ cython_debug/
261
+
262
+ # PyCharm
263
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
264
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
265
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
266
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
267
+ #.idea/
268
+
269
+ ### Python Patch ###
270
+ # Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
271
+ poetry.toml
272
+
273
+ # ruff
274
+ .ruff_cache/
275
+
276
+ # LSP config files
277
+ pyrightconfig.json
278
+
279
+ # End of https://www.toptal.com/developers/gitignore/api/python,c,cmake,c++
@@ -0,0 +1 @@
1
+ 3.12