Krun options

**please review**

* use JCommander for krun
* clean up krun frontend to be more generic
* fix some hacky behavior in some of the options
It's a migration pattern. We need to get this info into any class in
kompile or krun which asks for it. Using context which is already passed
everywhere is how I chose to do it. The change I am working on next adds a
dependency on Google Guice, a dependency injection framework. Eventually,
the constructor to ConstrainedTerm will take this parameter as a Boolean.
That value will be initialized by Guice's injector after having been
initialized at the beginning of the process execution from an inner class
of JavaExecutionOptions, which will no longer be passed anywhere following
the initialization of the application.

Does that answer satisfy you? In order to do this, I must first eliminate
static state, which is the primary purpose of this change.
On Jul 16, 2014 5:51 PM, "Ömer Sinan Ağacan" <notifications@github.com>
wrote:

> In
> src/javasources/KTool/src/org/kframework/backend/java/kil/ConstrainedTerm.java:
>
> > @@ -256,7 +256,8 @@ public Term term() {
> >              solutions.add(candidate);
> >          }
> >
> > -        if (K.do_testgen && !solutions.isEmpty()) {
> > +        if (context.definition().context().javaExecutionOptions.generateTests
>
> Isn't execution option related with arguments that are passed to krun? (or
> in other words, it's related with krun and not related with the definition
> in any sense) Why is this info part of the definition context?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/kframework/k/pull/674/files#r15032964>.
>