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.dev6.tar.gz (9.5 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.dev6-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

Hashes for flamapy_dnnf-2.6.0.dev6.tar.gz
Algorithm Hash digest
SHA256 cdcfbd4dddf97dc10f4646ef853af2d15afe614aea801c2fa70b0627708aa8ec
MD5 4136b4e4bcbec8dbfd30d6ceb55e942d
BLAKE2b-256 29096733ada6cec673221f9f5c8031b82e836040e634220b681d0d064a81e8dd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flamapy_dnnf-2.6.0.dev6-py3-none-any.whl
Algorithm Hash digest
SHA256 086ad71b687cd2f70b462b63788a3a55ab004cf02cc4fa5b83dad1f7f8754064
MD5 67f933d1c1cb4920bf13ff560a061912
BLAKE2b-256 e8a022f70cc2046a2a416c08ea8fcfaaa1645b2f53365d028778c9fc1e766f18

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