Page 1 of 1

Problems USEing matroid in 2.10

Posted: 15 Jul 2011, 17:36
by hampe
I have a problem when trying to include functionality from the application matroid in my extension.

I have a main.rules file for tropical that includes a "USE matroid" clause at the beginning. When I start polymake it complains
Loading applications now...polymake: ERROR: "/home/hampe/work/atint/apps/tropical/rules/main.rules", line 24: rule file /home/hampe/work/atint/apps/matroid/rules/main.rules does not exist
In fact, I don't have any extension to matroid in my extension directory. Even if I do create it via found_extension and add a main.rules file (either empty or containing some dummy functions), polymake now complains upon restart:
Loading applications now...polymake: ERROR: "/usr/local/share/polymake/perllib/Polymake/Core/Application.pm", line 309: Can't call method "so_name" on an undefined value
If I replace USE matroid by any other application, i.e USE fan/ USE polytope, etc., everything works fine (except that I can't call the functions from matroid ;) ). As the subject title suggests, this only happens in 2.10 :)

Re: Problems USEing matroid in 2.10

Posted: 16 Jul 2011, 12:15
by gawrilow
First of all, I'm not lucky about the idea of introducing dependences between applications at the extension level. We should probably constrain the allowed appearances of USE and IMPORT commands to the primary main.rules of each application.

Anyway, in your concrete case you are trying to establish a circular dependence, because application matroid already USEs tropical, even if the reason for the latter remains obscure for me. Recently we have introduced a mechanism allowing to add properties in applications different from the object's "native" one. Perhaps this will help to remove the dependence between matroid and tropical as well.

Re: Problems USEing matroid in 2.10

Posted: 18 Jul 2011, 11:13
by hampe
So, if I understand this correctly: Currently there is no way to use matroid functionality in tropical - but there will be?

Re: Problems USEing matroid in 2.10

Posted: 19 Jul 2011, 00:38
by sherrmann
So, if I understand this correctly: Currently there is no way to use matroid functionality in tropical - but there will be?
There is, it is just not possible to do this via a USE statement in a rule file. For example, one can write scripts in the application tropical using function from the application matroid, or write c++ clients that include files form the application matroid.

Re: Problems USEing matroid in 2.10

Posted: 02 Aug 2011, 09:01
by hampe
Now, if I created a new application instead of an extension, adding dependencies via USE and IMPORT in the main.rules file should be fine?