flamapy-sdd 2.6.0.dev12__py3-none-any.whl → 2.9.0.dev1__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.
@@ -0,0 +1,24 @@
1
+ from flamapy.core.manifest import OperationCapability, PluginManifest
2
+ from flamapy.core.models.language_level import LanguageLevel, MajorLevel, MinorLevel
3
+
4
+ # Costs are estimated milliseconds from the 2026-11-06 calibration (betty synthetic models at 1%
5
+ # and 30% constraint density plus JHipster and busybox; worst case of the two densities, never
6
+ # decreasing). Compilation depends on the constraint density far more than on the size: the
7
+ # sparse models compile in 0.3 s up to 2,000 features, the dense 500-feature one takes 7.5 s and
8
+ # the dense 1,000-feature one (like busybox, 1,108 features) does not finish in 5 minutes.
9
+ # Counting is then immediate (66 ms at 500 features), but core/dead features condition the SDD
10
+ # per variable: 41 s for core and more than 3 minutes for dead on the dense 500-feature model.
11
+ MANIFEST = PluginManifest(
12
+ name='sdd',
13
+ calibration='2026-11-06',
14
+ extension='sdd',
15
+ supported_level=LanguageLevel(MajorLevel.BOOLEAN, {MinorLevel.GROUP_CARDINALITY}),
16
+ max_features=2000,
17
+ transformation_cost_curve=((50, 3), (100, 5), (200, 10), (500, 7500), (1000, 300000)),
18
+ operations={
19
+ 'satisfiable': OperationCapability(cost=1),
20
+ 'configurations_number': OperationCapability(cost_curve=((200, 1), (500, 66))),
21
+ 'core_features': OperationCapability(cost_curve=((100, 1), (200, 5), (500, 41000))),
22
+ 'dead_features': OperationCapability(cost_curve=((100, 1), (200, 4), (500, 180000))),
23
+ },
24
+ )
@@ -9,7 +9,8 @@ class SDDCoreFeatures(CoreFeatures):
9
9
  """Core features: present in every valid configuration.
10
10
 
11
11
  A feature is core iff no model selects it as false, i.e. conjoining its negative literal
12
- with the compiled SDD yields the false node.
12
+ with the compiled SDD yields the false node. A void model has no core features (the
13
+ convention of the SAT and BDD plugins), not vacuously all of them.
13
14
  """
14
15
 
15
16
  def __init__(self) -> None:
@@ -24,7 +25,10 @@ class SDDCoreFeatures(CoreFeatures):
24
25
  def execute(self, model: VariabilityModel) -> 'SDDCoreFeatures':
25
26
  sdd_model = cast(SDDModel, model)
26
27
  manager = sdd_model.manager
27
- core = []
28
+ core: list[Any] = []
29
+ if sdd_model.root.is_false(): # void model
30
+ self._result = core
31
+ return self
28
32
  for variable, name in sdd_model.features.items():
29
33
  if (sdd_model.root & manager.literal(-variable)).is_false():
30
34
  core.append(name)
@@ -1,7 +1,7 @@
1
1
  from pysdd.sdd import SddManager, Vtree
2
2
 
3
3
  from flamapy.core.transformations import ModelToModel
4
- from flamapy.metamodels.fm_metamodel.models import FeatureModel, ClauseSet
4
+ from flamapy.metamodels.fm_metamodel.models import ClauseSet, DEFAULT_CNF_METHOD, FeatureModel
5
5
  from flamapy.metamodels.sdd_metamodel.models import SDDModel
6
6
 
7
7
 
@@ -20,7 +20,7 @@ class FmToSDD(ModelToModel):
20
20
  def get_destination_extension() -> str:
21
21
  return 'sdd'
22
22
 
23
- def __init__(self, source_model: FeatureModel, cnf_method: str = 'distributive') -> None:
23
+ def __init__(self, source_model: FeatureModel, cnf_method: str = DEFAULT_CNF_METHOD) -> None:
24
24
  self.source_model = source_model
25
25
  self.cnf_method = cnf_method
26
26
  self.destination_model = SDDModel()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flamapy-sdd
3
- Version: 2.6.0.dev12
3
+ Version: 2.9.0.dev1
4
4
  Summary: flamapy-sdd is a plugin to flamapy providing Sentential Decision Diagram (SDD) knowledge compilation for exact 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/sdd_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.6.0.dev12
12
- Requires-Dist: flamapy-fm~=2.6.0.dev12
11
+ Requires-Dist: flamapy-fw~=2.9.0.dev1
12
+ Requires-Dist: flamapy-fm~=2.9.0.dev1
13
13
  Requires-Dist: PySDD~=1.0
14
14
  Provides-Extra: dev
15
15
  Requires-Dist: pytest; extra == "dev"
@@ -1,15 +1,16 @@
1
- flamapy/metamodels/sdd_metamodel/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1
+ flamapy/metamodels/sdd_metamodel/__init__.py,sha256=-YFL9jGyC7C_hDkoNx4zzJuyYgaH5nYDvziBW4F2XfY,1466
2
2
  flamapy/metamodels/sdd_metamodel/models/__init__.py,sha256=bR7xcBcfqNqhYnOAZc-Pro66wYeLulQVW3lH1gzIOrM,57
3
3
  flamapy/metamodels/sdd_metamodel/models/sdd_model.py,sha256=QIQ4t6ba7ygy55qztlNCMn2a30Ok8uP0oBSrOSlL1Ko,1105
4
4
  flamapy/metamodels/sdd_metamodel/operations/__init__.py,sha256=NrgZpLepc_a5UaW-cifCn62kCPDx3LfFTugUqT6mQTU,316
5
5
  flamapy/metamodels/sdd_metamodel/operations/sdd_configurations_number.py,sha256=WLbCywogkoMZdsoiEqReldzPUJ04suEvu4gLFesNLx0,1104
6
- flamapy/metamodels/sdd_metamodel/operations/sdd_core_features.py,sha256=K2-xRbBBmYB03-BhTt8cuI37rttg1KGG2bVu3vVnPN8,1031
6
+ flamapy/metamodels/sdd_metamodel/operations/sdd_core_features.py,sha256=N36R2OOjFb7kkF8FUB0QYiRgBmdWvjvcaG4IzflhI8E,1260
7
7
  flamapy/metamodels/sdd_metamodel/operations/sdd_dead_features.py,sha256=JpbWkFzVRs_2fvk0GKmpHgCAQIRR5Df7BBUkr8Rw42g,1026
8
8
  flamapy/metamodels/sdd_metamodel/operations/sdd_satisfiable.py,sha256=e7L1eWlmR8WQyjQrbNO6IbSdDna7tpEX8UuZCqz4uN4,690
9
9
  flamapy/metamodels/sdd_metamodel/transformations/__init__.py,sha256=-lqZfRPHTUimN4Z8eSiF6yp4lLucbQkv7QnF5F5pD-E,55
10
- flamapy/metamodels/sdd_metamodel/transformations/fm_to_sdd.py,sha256=To0SKpIFWl074oXo7CEbPbKGDxH84aPHYLuTUt8emU0,1813
11
- flamapy_sdd-2.6.0.dev12.dist-info/licenses/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
12
- flamapy_sdd-2.6.0.dev12.dist-info/METADATA,sha256=GKLZru4oz3RLDbvutTbSF6YJk06ceeBHzBRM8WY_EWA,2240
13
- flamapy_sdd-2.6.0.dev12.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
14
- flamapy_sdd-2.6.0.dev12.dist-info/top_level.txt,sha256=2YBI9dg4GVk28AJuyNu6dldi5Riwt5SP0zpNe2lSU5M,8
15
- flamapy_sdd-2.6.0.dev12.dist-info/RECORD,,
10
+ flamapy/metamodels/sdd_metamodel/transformations/fm_to_sdd.py,sha256=FXtx8x4vIRB_kgsevMcQzT4jxd8aMRxwSj4uS72LlSI,1837
11
+ flamapy_sdd-2.9.0.dev1.dist-info/licenses/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
12
+ flamapy_sdd-2.9.0.dev1.dist-info/METADATA,sha256=zjuVIjxVIniq1-PtyiLA5U5AY2nS-zJ-XiV6rQYoS9E,2237
13
+ flamapy_sdd-2.9.0.dev1.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
14
+ flamapy_sdd-2.9.0.dev1.dist-info/entry_points.txt,sha256=aiMGmg8j1k3749vCwMNM09z07STMsulWQFNagYUNckw,57
15
+ flamapy_sdd-2.9.0.dev1.dist-info/top_level.txt,sha256=2YBI9dg4GVk28AJuyNu6dldi5Riwt5SP0zpNe2lSU5M,8
16
+ flamapy_sdd-2.9.0.dev1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (82.0.1)
2
+ Generator: setuptools (84.2.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -0,0 +1,2 @@
1
+ [flamapy.plugins]
2
+ sdd = flamapy.metamodels.sdd_metamodel