Context refactoring

Second part of https://github.com/kframework/k/wiki/Design-of-the-new-compiler-parser .

Some things listed in the wiki link may not be possible:

- `Map<String, ASTNode> locations`: Not possible to move to Maude executor, because generated by `DefinitionLoader` which runs in kompile. We have to serialize this field and load in Maude krun.
- `Set<Sort> variableTokenSorts`: This is still used, are we sure that this won't break anyting? Or is it a mistake in the wiki page?

These are also missing:

- `SetMultiMap<String, Production> tags`: This should be possible, but it's a bit tricky. The problem is that currently it's collecting while productions are parsed to prevent redundant computations. I need to find a way to generate it after productions are added.
I mean look at org.kframework.kil.Attribute and the helper functions
associated with that class in ASTNode.

On Mon, Nov 3, 2014 at 11:20 AM, Ömer Sinan Ağacan <notifications@github.com
> wrote:

> In kernel/src/main/java/org/kframework/kil/Cell.java:
>
> > @@ -56,6 +56,12 @@
> >      String endLabel;
> >
> >      /**
> > +      * Builtin data structure (list, map, set) for the cell.
> > +      * Set by {@link org.kframework.compile.transformers.Cell2DataStructure}.
> > +      */
> > +    public CellDataStructure dataStructure;
>
> Sorry, what do you mean by an attribute?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/kframework/k/pull/1145/files#r19748383>.
>