Simple fix.
Example abfattree-testpaths2 KAT and Mininet topo.
An example that works with local compiler. Start mininet as: mn --mac --arp --switch=user --controller=remote
Make sure we have one controller instance, otherwise the switches will run without connecting to the controller.
Let's try with a simpler example: 2 hosts, 4 switches.
A working example for the local compiler. Run with ./katnetic run local.
Must add all hosts otherwise the gaps in port numbers are not propagated to the user switch and ta da ba fail and wast 1 hour.
Fix issue with port check ordering

The link-free policy may modify the port, so do the port checking
extracted from the link terms at at the end of the link-free policy.

Closes #148.
Automaton assumes that hosts send/receive VLAN-tagged packets. So be it.
autofix: Fix bug in branchy(TP, S) case

The Alt constructor was hardcoded. It should have been using the `cr`
constructor that's passed to rpc_branchy.
autofix: fix branchy(NL, NL) case

This is a much simpler and correct implementation, and corresponds to to
distribution laws of parallel composition and choice.

Related to #152
autofix: correct ingress and egress policies

Previously, the egress policy was of the form:

  (filter vlan = egress; vlan := 1) | id

This had the effect of both ejecting packets from the network, and
allowing them remain in the network. At the next hop they would have
been elminated, so this was technically correct, but at the cost of
duplicating all traffic, which is unacceptable. The new policy is this:

  (filter vlan = egress; vlan := 1) | (filter not(vlan = egress); id)

This will ensure that egress packets are ejected and not duplicated,
while leaving internal packets unchanged.
autofix: cache per-switch compilation results

At the moment, trying to compile a switch policy when a switch connects
to the controller will lead to connection time-outs. To avoid this in
the short term, katnetic will now compile all switch policies and cache
them before the controller starts.
autofix: eliminate Choice from lf_policy

Choices cannot appear in link-free policies, because the automaton
states have to represent those choices. By removing Choice from
lf_policy, that forces dehopification to return a policy instead of an
lf_policy, since choices may appear when setting the vlan tag in the
local policy.
autofix: off-by-one error accounting for pick states

The epsilon elimination code was assuming that an automaton would alway
transition to a choice node via a character. This is not always the
case. In fact, if a choice node is never preceded by a sequental
composition, it will always be the case. Examples:

  p + q
  (p + q) | r
autofix: correctly handle initial choice

A choice node may be an initial state. In this case, all states that are
reachable by epsilon transitions from that initial states are potential
start states and the ingress policy must choose between them.

The initial state may not be a choice node, but a choice node may be
reachable from the initial state by epsilon transitions. In that case,
find all the states that are reachable from those choice nodes via
epsilon transition. The ingress policy must choose between these, but
may also in parallel perform other character transitions from the
initial state.
autofix: refactor katnetic front-end

Group the different subcommands into modules
autofix: add subcommands for dump automaton

Now available:

  - dump automaton policies: print the policy for each switch
  - dump automaton flowtables: print the flowtable for each switch
  - dump automaton [all]: print the policy and flowtable for each switch

So if you want to just look at the policies for abfattree-tables.kat

  ./katnetic.byte dump automaton policies examples/abfattree-tables.kat
merge. Fix trailing whitespace
Merge pull request #182 from frenetic-lang/katnetic

Katnetic