kframework/k — pull request #949 by osa1 (2014-09-13 09:42:24+00:00)
Title: [WIP] plugin loading

I'm creating this to get some comments and discuss what to do next. This is a very basic and crude implementation of plugin loader. I'll clean the implementation and squash commits before merging.

As an example, I created this kompile plugin: https://github.com/osa1/kompile-plugin. This is the output I get when I run the patched version of K:

```
➜ k git:(plugin-wip) ✗ ./target/release/k/bin/kompile
found a kmodule
running my kompile frontend
➜ k git:(plugin-wip) ✗
```

Second line is printed by the plugin which works as kompile.

Now I have some questions to improve:

1) I'd like to know if I understand the use case correctly. @dwightguth can you please review https://github.com/osa1/kompile-plugin too just to make sure I'm not doing something wrong?
2) How should I get path of the JAR or the directory to search JARs in from user?
3) What should the framework do if there are multiple plugins for same K part? For example, multiple kompile implementations.
4) What should the framework do if there are multiple plugins for different K parts? For example, there may be plugins for kompile and krun. Should we load both? Should we allow user to choose what to load so that he/she can tell the framework to use only kompile plugin?