flamapy-dnnf is a plugin to flamapy providing exact analysis of feature models via d-DNNF knowledge compilation with the d4 compiler
Project description
flamapy-dnnf
flamapy-dnnf is a flamapy plugin for exact analysis of feature
models via d-DNNF knowledge compilation, using the d4 compiler.
d-DNNF (deterministic Decomposable Negation Normal Form) is a highly succinct compilation target that supports exact, polytime model counting. It complements the ecosystem:
flamapy-bdd— OBDD; exact, but can blow up on large models.flamapy-sdd— SDD; exact, more succinct than OBDD, pure-Python (PySDD).flamapy-sharpsat— ApproxMC; approximate count for very large models.flamapy-dnnf— d4/d-DNNF; exact count that scales to large industrial models.
Requirements
d4 is a native C++ binary with no PyPI package. Install it from
https://github.com/crillab/d4 and either put it on your PATH as d4 or point
FLAMAPY_D4_PATH at the binary.
pip install flamapy-dnnf
export FLAMAPY_D4_PATH=/path/to/d4 # or have `d4` on PATH
Operations
| Operation | Class |
|---|---|
| Exact number of configurations | DDNNFConfigurationsNumber |
| Satisfiable (non-void) | DDNNFSatisfiable |
Usage
from flamapy.metamodels.fm_metamodel.transformations import UVLReader
from flamapy.metamodels.dnnf_metamodel.transformations import FmToDDNNF
from flamapy.metamodels.dnnf_metamodel.operations import DDNNFConfigurationsNumber
fm = UVLReader('model.uvl').transform()
dnnf_model = FmToDDNNF(fm).transform() # add compile=True to also dump the d-DNNF file
count = DDNNFConfigurationsNumber().execute(dnnf_model).get_result()
License
GPL-3.0-or-later.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flamapy_dnnf-2.6.0.dev11.tar.gz.
File metadata
- Download URL: flamapy_dnnf-2.6.0.dev11.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37b0c42603bb274b29db262c95cbac16e45b1fb0d116ffd37bbbd2ad7cb0f8df
|
|
| MD5 |
98ebaf1e3cffb917eedeb21b52cfc0da
|
|
| BLAKE2b-256 |
f38d4a25f04d8900f21a87c650e291a2401b0e200817b6f33623aa21cc6936e9
|
File details
Details for the file flamapy_dnnf-2.6.0.dev11-py3-none-any.whl.
File metadata
- Download URL: flamapy_dnnf-2.6.0.dev11-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee462db35f2efb46b01c5948103c9471c5cf115f03050f7d5c3013c7ee0ab0c5
|
|
| MD5 |
ac40c9afc04880b70c4c42398b66e364
|
|
| BLAKE2b-256 |
0559d188b326180330d9c1b34c7ddb09d2574b4ea95fc3eefd9291f4b57eae62
|