anchor.diff:  block_size([]) -> 0;
   block_size([X]) ->
     instruction_size(X);
  +% FIXME: Hack
  +block_size([{par, _}|XS]) -> block_size(XS);
  +block_size([_|[{continue, _}|_]]) -> 0;
   block_size([X|XS]) ->
     instruction_size(X) + 1 + block_size(XS).
   
  +instruction_size({rec, _, Block}) ->
  +  block_size(Block);
   instruction_size({choice, _, Choices}) ->
     lists:foldl(fun(ChoiceBlock, Sum) ->
                 Sum + (block_size(ChoiceBlock)) end, 0, Choices);
   instruction_size(_) -> 0.
  -
  -% instruction_size({local_send, _, _}) -> 1;
  -% instruction_size({local_receive, _, _}) -> 1;
  -% instruction_size({local_call_request_send, _, _}) -> 1;
  -% instruction_size({local_call_request_recv, _, _}) -> 1;
  -% instruction_size({local_call_response_send, _, _}) -> 1;
  -% instruction_size({local_call_response_recv, _, _}) -> 1;
  -% instruction_size({choice, _, Choices}) ->
  -%   % Final transition in the choice block goes to the end index
  -%   BasicSize = lists:foldl(fun(ChoiceBlock, Sum) -> Sum + (block_size(ChoiceBlock)) end, 0, Choices),
  -%   BasicSize;
  -% instruction_size({rec, _, Block}) -> 1 + block_size(Block);
  -% instruction_size({par, _ParallelBlocks}) -> 1; % Nested FSMs have their own internal numbering system
  -% instruction_size({local_interruptible, _, InterruptibleBlock, _}) -> % Not supported.
  -%   block_size(InterruptibleBlock);
  -% instruction_size({local_interruptible_throw, _, InterruptibleBlock, _, _}) ->
  -%   block_size(InterruptibleBlock);
  -% % Do's just add a transition, without adding a node
  -% instruction_size({do, _, _, _}) -> 0;
  -% instruction_size({do_scope, _, _, _}) -> 0;
  -% % Continue's just a transition.
  -% instruction_size({continue, _}) -> 0.
  -
   
   % add_state: Takes FSMState, returns (new state ID, new FSMState)
   add_state(State, FSMState) ->
  
positive.code: % evaluate_block([X|XS], PrevIndex, EndIndex, FSMState, MonitorState) ->
  
    ScopeEndIndex = block_size(Block) + 1,
    EvalRes = evaluate_block(Block, 0, ScopeEndIndex, FSMState1, MonitorState2),
    case EvalRes of
      {FSMState2, MonitorState3} ->
        FSMState3 = add_state(end_state(), FSMState2),
  
negative.code: % end index of the block, and FSM state.
  % Returns next ID, FSM with either a new state and a transition to it, or a transition
  %  to the end state added.
  
  evaluate_transition(X, [{continue, RecName}|_], PrevID, _EndIndex,
                      RecMap, FSMState, MonitorState) ->
    FSMState1 = evaluate_rec_transition(X, PrevID, RecName, RecMap, FSMState),
    {FSMState1, MonitorState};
  evaluate_transition(X, [{par, ParallelBlocks}|XS], PrevID, EndIndex, RecMap, FSMState,
                      MonitorState) ->
    RunningID = get_running_id(FSMState),
  
    {MonitorState1, NestedFSMIDs} = evaluate_parallel_blocks(ParallelBlocks,
                                                             MonitorState, RecMap),
    io:format("In Eval transition, X: ~p, PrevID: ~p, EndIndex: ~p, ~n XS: ~p~n",
              [X, PrevID, EndIndex, XS]),
    FSMState1 = evaluate_comm_transition(X, PrevID, par_state(NestedFSMIDs), FSMState),
    evaluate_block(XS, RunningID, EndIndex, RecMap, FSMState1, MonitorState1);
  evaluate_transition(X, XS, PrevID, EndIndex, RecMap, FSMState, MonitorState) ->
    RunningID = get_running_id(FSMState),
    FSMState1 = evaluate_comm_transition(X, PrevID, standard_state(), FSMState),
    evaluate_block(XS, RunningID, EndIndex, RecMap, FSMState1, MonitorState).
  
  
  evaluate_comm_transition(CommAST, PrevID, StateToAdd, FSMState) ->
    RunningID = get_running_id(FSMState),
    FSMState1 = add_state(StateToAdd, FSMState),
    add_comm_transition(CommAST, PrevID, RunningID, FSMState1).
  
  evaluate_rec_transition(CommAST, PrevID, RecName, RecMap, FSMState) ->
    IDRes = orddict:find(RecName, RecMap),
    case IDRes of
      {ok, ID} ->
        add_comm_transition(CommAST, PrevID, ID, FSMState);
      _ -> error(rec_name_unbound)
    end.
  
  % Takes the ID of the previously-created node, end index, FSM state, monitor state.
  % On each step?
  