flamapy-bdd 2.9.0.dev0__py3-none-any.whl → 2.9.0.dev2__py3-none-any.whl

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.
@@ -1,16 +1,17 @@
1
1
  from flamapy.core.manifest import OperationCapability, PluginManifest
2
2
  from flamapy.core.models.language_level import LanguageLevel, MajorLevel, MinorLevel
3
3
 
4
- # Costs are estimated milliseconds from the 2026-11-06 calibration with the pure-Python dd
5
- # engine (what 2.9 ships): betty synthetic models at 1% and 30% constraint density plus
6
- # JHipster and busybox, worst case of the two densities, never decreasing. Compiling the BDD is
7
- # the wall, and it is erratic: 0.2 s for both 200-feature models, 0.4 s for the sparse
8
- # 500-feature model but more than 5 minutes for the dense one, 1.7 s / 32 s at 1,000, and
9
- # busybox (1,108 features) did not compile in 10 minutes. The journal benchmark with the same
10
- # engine (300 s cap, real UVLHub models) compiled 29 of 41 models of 501-1,000 features and 2
11
- # of 120 beyond, hence the 1,000-feature ceiling. Once compiled, every query is cheap (counting
12
- # 29 ms, core/dead 140 ms, false-optional 300 ms at 1,000 features). The experimental native
13
- # builder (flamapy-cudd, not released) is opt-in and not reflected here.
4
+ # Costs are estimated milliseconds from the 2026-11-06 calibration with dd's pure-Python engine
5
+ # (what dd installs on macOS, Windows and Pyodide; its Linux x86_64 wheels bring CUDD, which is
6
+ # faster, so on Linux these costs overestimate): betty synthetic models at 1% and 30% constraint
7
+ # density plus JHipster and busybox, worst case of the two densities, never decreasing. Compiling
8
+ # the BDD is the wall, and it is erratic: 0.2 s for both 200-feature models, 0.4 s for the sparse
9
+ # 500-feature model but more than 5 minutes for the dense one, 1.7 s / 32 s at 1,000, and busybox
10
+ # (1,108 features) did not compile in 10 minutes, hence the 1,000-feature ceiling. The journal
11
+ # benchmark (Linux, so dd with CUDD; 300 s cap, real UVLHub models) compiled 29 of 41 models of
12
+ # 501-1,000 features and 2 of 120 beyond, so the ceiling holds for CUDD too. Once compiled, every
13
+ # query is cheap (counting 29 ms, core/dead 140 ms, false-optional 300 ms at 1,000 features). The
14
+ # experimental native builder (flamapy-cudd, not released) is opt-in and not reflected here.
14
15
  _MAX_FEATURES = 1000
15
16
 
16
17
  MANIFEST = PluginManifest(
@@ -14,7 +14,8 @@ from flamapy.core.models import VariabilityModel
14
14
  logger = logging.getLogger(__name__)
15
15
 
16
16
  # The dd engine in use: 'cudd' (C extension, only when dd is built against CUDD) or the
17
- # pure-Python 'autoref' that a plain `pip install dd` provides.
17
+ # pure-Python 'autoref'. dd's Linux x86_64 wheels include CUDD; elsewhere `pip install dd` builds
18
+ # dd from source with the pure-Python engine only.
18
19
  DD_BACKEND = BDD.__module__.rsplit('.', 1)[-1]
19
20
  _reorder = importlib.import_module(BDD.__module__).reorder # sifting, in both engines
20
21
 
@@ -73,7 +73,7 @@ def _relation_lines(relation: Relation, to_l2b: dict[str, str]) -> list[str]:
73
73
  lines = [f"({parent} <-> {_or(children)})", *at_most_one]
74
74
  elif relation.is_mutex():
75
75
  lines = [*(f"({child} -> {parent})" for child in children), *at_most_one]
76
- elif relation.is_cardinal():
76
+ else:
77
77
  lines = _cardinality_lines(parent, children, relation.card_min, relation.card_max)
78
78
  return lines
79
79
 
@@ -101,7 +101,7 @@ class PLModel():
101
101
  kinds = (("mandatory", relation.is_mandatory), ("optional", relation.is_optional),
102
102
  ("or", relation.is_or), ("alternative", relation.is_alternative),
103
103
  ("mutex", relation.is_mutex), ("cardinality", relation.is_cardinal))
104
- return next((kind for kind, check in kinds if check()), "relation")
104
+ return next((kind for kind, check in kinds if check()), "cardinality")
105
105
 
106
106
  def _get_relation_formula(self, relation: Relation) -> str:
107
107
  result = ""
@@ -115,7 +115,7 @@ class PLModel():
115
115
  result = self._get_alternative_formula(relation)
116
116
  elif relation.is_mutex():
117
117
  result = self._get_mutex_formula(relation)
118
- elif relation.is_cardinal():
118
+ else:
119
119
  result = self._get_cardinality_formula(relation)
120
120
  return result
121
121
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flamapy-bdd
3
- Version: 2.9.0.dev0
3
+ Version: 2.9.0.dev2
4
4
  Summary: bdd-plugin for the automated analysis of feature models
5
5
  Author-email: Flamapy <flamapy@us.es>
6
6
  License-Expression: GPL-3.0-or-later
@@ -8,8 +8,8 @@ Project-URL: Homepage, https://github.com/flamapy/bdd_metamodel
8
8
  Requires-Python: >=3.11
9
9
  Description-Content-Type: text/markdown
10
10
  License-File: LICENSE
11
- Requires-Dist: flamapy-fw~=2.9.0.dev0
12
- Requires-Dist: flamapy-fm~=2.9.0.dev0
11
+ Requires-Dist: flamapy-fw~=2.9.0.dev2
12
+ Requires-Dist: flamapy-fm~=2.9.0.dev2
13
13
  Requires-Dist: dd~=0.6.0
14
14
  Requires-Dist: graphviz~=0.20
15
15
  Provides-Extra: dev
@@ -20,7 +20,7 @@ Requires-Dist: mypy; extra == "dev"
20
20
  Requires-Dist: coverage; extra == "dev"
21
21
  Provides-Extra: test
22
22
  Requires-Dist: pytest; extra == "test"
23
- Requires-Dist: flamapy-sat~=2.9.0.dev0; extra == "test"
23
+ Requires-Dist: flamapy-sat~=2.9.0.dev2; extra == "test"
24
24
  Dynamic: license-file
25
25
 
26
26
  # flamapy-bdd
@@ -36,9 +36,10 @@ the [dd](https://github.com/tulip-control/dd) library.
36
36
  pip install flamapy-bdd
37
37
  ```
38
38
 
39
- `pip install dd` provides dd's pure-Python engine. For larger models, build dd against
40
- [CUDD](https://github.com/ivmai/cudd), which is much faster and enables dynamic variable
41
- reordering:
39
+ Which BDD engine you get depends on the platform. On Linux x86_64, dd installs from wheels
40
+ that already include [CUDD](https://github.com/ivmai/cudd), which is much faster and enables
41
+ dynamic variable reordering. On macOS, Windows and Pyodide, dd installs from source with its
42
+ pure-Python engine; to use CUDD there, build dd against it:
42
43
 
43
44
  ```bash
44
45
  pip install cython
@@ -1,10 +1,10 @@
1
- flamapy/metamodels/bdd_metamodel/__init__.py,sha256=kcY-yaE9zM3kN0W3CQ4OSnY7ys36w74NS_xjfmtkU2g,3076
1
+ flamapy/metamodels/bdd_metamodel/__init__.py,sha256=wvqEQeEAPGCvVwCXOn9MqMIBai_1slkDNK-z3q1Hm6A,3237
2
2
  flamapy/metamodels/bdd_metamodel/models/__init__.py,sha256=-BpGCtgHz2rZUgGcTEwxGZV1th2k_IZTzRMYS248dvc,57
3
- flamapy/metamodels/bdd_metamodel/models/bdd_model.py,sha256=81Ril_91dr6m-58usOjfW_j7HShH-eQsE1HqDz22zcQ,11978
3
+ flamapy/metamodels/bdd_metamodel/models/bdd_model.py,sha256=rUfjb93lBs53GlpmBnVy11aiXe4s0zIBl1m2peL9pKk,12063
4
4
  flamapy/metamodels/bdd_metamodel/models/utils/__init__.py,sha256=H8u6unwMTgffAEHxKcLNTGo4w-VbIaVzaChbfqYVjdE,181
5
- flamapy/metamodels/bdd_metamodel/models/utils/logic2bdd_writer.py,sha256=JjNpMV2lfwC1H0d7-7i-VlUqZvhlvJUN_SLqIHwbmNM,5448
5
+ flamapy/metamodels/bdd_metamodel/models/utils/logic2bdd_writer.py,sha256=lH5YCIZQIsHxWJ37SMASl9REfLqSD13duesckYeUnsI,5425
6
6
  flamapy/metamodels/bdd_metamodel/models/utils/ordering.py,sha256=HfvVv_14lO5X_379a2M3RREe6yF3kZadVshsp_-p4yU,5825
7
- flamapy/metamodels/bdd_metamodel/models/utils/pl_model.py,sha256=hoPI7xzPWeSAaqEpi3-YNXKz3jewe6bd1Lmq_6ibB5k,10112
7
+ flamapy/metamodels/bdd_metamodel/models/utils/pl_model.py,sha256=8MJeCpqlj1DSJ-lQ5n3bP6eM-9x5CEtoUERcPPnFl_Y,10092
8
8
  flamapy/metamodels/bdd_metamodel/models/utils/txtcnf.py,sha256=T4ZBkpelD84mOJhA6zjfEcki_gTMw17xQUjmjTlwwA8,8815
9
9
  flamapy/metamodels/bdd_metamodel/operations/__init__.py,sha256=jXZoA9b7IQkPXClBIQ8XKBpK07SFNvt5m8Et5-RkvP8,1591
10
10
  flamapy/metamodels/bdd_metamodel/operations/bdd_backbone.py,sha256=CEhqApjkNnKOo7333asby9o33xorx2g8R735icsrl94,2840
@@ -45,9 +45,9 @@ flamapy/metamodels/bdd_metamodel/transformations/json_writer.py,sha256=V9WB2lZf3
45
45
  flamapy/metamodels/bdd_metamodel/transformations/pdf_writer.py,sha256=9gVPvsE7a5zrWs90Ga9zEFmZx8psDxGxArckEP6BytQ,618
46
46
  flamapy/metamodels/bdd_metamodel/transformations/png_writer.py,sha256=I9kzWHiiv2HH5xgReua6FlXLSUrTbFAoQYN8HPRN0fo,618
47
47
  flamapy/metamodels/bdd_metamodel/transformations/svg_writer.py,sha256=AOrP_nWyHTOFNZyfk93FQgYdax2wdG5ZU6j30cnU33U,618
48
- flamapy_bdd-2.9.0.dev0.dist-info/licenses/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
49
- flamapy_bdd-2.9.0.dev0.dist-info/METADATA,sha256=r9uAvjhDMQC72uWIIgog8OOzmslbrWbAO-uCSt5S5yA,2964
50
- flamapy_bdd-2.9.0.dev0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
51
- flamapy_bdd-2.9.0.dev0.dist-info/entry_points.txt,sha256=0tU2El7cp44QtkP_MQ5gWcX2HKEP8oIqzybN1v_CUqs,57
52
- flamapy_bdd-2.9.0.dev0.dist-info/top_level.txt,sha256=2YBI9dg4GVk28AJuyNu6dldi5Riwt5SP0zpNe2lSU5M,8
53
- flamapy_bdd-2.9.0.dev0.dist-info/RECORD,,
48
+ flamapy_bdd-2.9.0.dev2.dist-info/licenses/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
49
+ flamapy_bdd-2.9.0.dev2.dist-info/METADATA,sha256=9tyFsS4SL60Ik2GBYv0W4ObKDvfEpvF1s8WjsoSJ0Qs,3113
50
+ flamapy_bdd-2.9.0.dev2.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
51
+ flamapy_bdd-2.9.0.dev2.dist-info/entry_points.txt,sha256=0tU2El7cp44QtkP_MQ5gWcX2HKEP8oIqzybN1v_CUqs,57
52
+ flamapy_bdd-2.9.0.dev2.dist-info/top_level.txt,sha256=2YBI9dg4GVk28AJuyNu6dldi5Riwt5SP0zpNe2lSU5M,8
53
+ flamapy_bdd-2.9.0.dev2.dist-info/RECORD,,