Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flamapy_dnnf-2.6.0.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flamapy_dnnf-2.6.0-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file flamapy_dnnf-2.6.0.tar.gz.

File metadata

  • Download URL: flamapy_dnnf-2.6.0.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for flamapy_dnnf-2.6.0.tar.gz
Algorithm Hash digest
SHA256 48a6be28906714bdf86a954ad460bea7eec179f10b315a63126b466ffab24d39
MD5 2de4b6cc1c6ec5d544ae4f497dbbdf4b
BLAKE2b-256 295e3800882442eabea5ef4ec6e7ae25b1c282dfc309df6cc20a6604c16438ba

See more details on using hashes here.

File details

Details for the file flamapy_dnnf-2.6.0-py3-none-any.whl.

File metadata

  • Download URL: flamapy_dnnf-2.6.0-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

Hashes for flamapy_dnnf-2.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9eddfd0e5feca04da66ee1df7ad2f647e51ea02393145d255b2d58fd26537b40
MD5 3fef1b6d71d869742f48bfc13590f0ae
BLAKE2b-256 4bd1f3d13ff17e5931bab3543da880ec1409e82b24098279a78dec287dcd95dd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page