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.dev12.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.dev12-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: flamapy_dnnf-2.6.0.dev12.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.dev12.tar.gz
Algorithm Hash digest
SHA256 55b73f178f12a9ccb29424e28f6397a448465152c603d42225ecc5bb53d5354a
MD5 5d939f5cba08a71368723e9c612619f3
BLAKE2b-256 651ac06e84d31f83dd300dc2de948b1d3545e00452756c76bf5d091432ce22b5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flamapy_dnnf-2.6.0.dev12-py3-none-any.whl
Algorithm Hash digest
SHA256 e45f81b7900643c906674267b5e01b868907a56f6dd7311c076985d6154a5302
MD5 8883658a9891c6bac082b9bf7a4f618b
BLAKE2b-256 7c6c93fb9879db140754c67ff31954b21a10b9d754b9bdf15080ace31a80afc3

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