flamapy / flamapy_fw

This repository hosts the main components of flamapy
4 stars 5 forks source link

Default implementation of the operations #50

Open jmhorcas opened 2 years ago

jmhorcas commented 2 years ago

Testing the framework as an end-user, I perform the following commands with success :)

from famapy.core.discover import DiscoverMetamodels 
dm = DiscoverMetamodels()
result = dm.use_operation_from_file(operation, filename)

However, which implementation of the operation (e.g., sat, fm, bdd) take it by default? I am using a feature model in FeatureIDE (extension .fide), and it is taking the FM_METAMODELS operations by default in all cases. Operations work for those that are defined in the FM plugin but not for those that are defined in other plugins but not in FM.

How can I select the specific implementation? I've tried with the concrete name of the implementation (e.g,. Glucose3ProductsNumber), but it doesn't work, obtaining an NotImplementedError: Way to execute operation not found.

Other related minor issues:

jagalindo commented 2 years ago

This is a current limitarion. I assign the issue for the latest release

jagalindo commented 2 years ago

I do thknk that this is already implemented by means of using a different function. Anyhow I'll take a look to it

jagalindo commented 2 years ago

from famapy.core.discover import DiscoverMetamodels dm = DiscoverMetamodels() result = dm.use_operation_from_file(operation, filename)

About this. In case that you're interested in using another plugin you should rely on this style of implementation

from famapy.core.discover import DiscoverMetamodels dm = DiscoverMetamodels() fm=dm.use_transformation_t2m("path",'fm') pysat=dm.use_transformation_m2m(fm,'pysat') operation=dm.use_operation(pysat,'Valid') print(operation.get_resutl())

We will implement this option in the command line for the end users asap