anchor.diff:  % evaluate_block([X|XS], PrevIndex, EndIndex, FSMState, MonitorState) ->
   
     ScopeEndIndex = block_size(Block) + 1,
  -  io:format("ScopeEndIndex top level: ~p~n", [ScopeEndIndex]),
     EvalRes = evaluate_block(Block, 0, ScopeEndIndex, orddict:new(), FSMState1, MonitorState2),
     case EvalRes of
       {FSMState2, MonitorState3} ->
  
positive.code:   % We have a choice block.
    % We need to evaluate each block in turn.
    % Each block needs to converge on the end index.
    evaluate_blocks(ChoiceBlocks, PrevIndex, EndIndex, RecMap, FSMState, MonitorState).
  
  
  
  
negative.code: 
  instruction_size({rec, _, Block}) ->
    block_size(Block);
  instruction_size({local_initiates, _, SN, _, SuccessBlock, HandleBlocks}) ->
    HandleBlocksSize = lists:foldl(fun(HB = {handle_block, _, Block}, Sum) ->
                                       Sum + initiates_size(Block) end, 0, HandleBlocks),
    SuccessBlockSize = initiates_size(SuccessBlock),
    HandleBlocksSize + SuccessBlockSize + 1;
  instruction_size({choice, _, Choices}) ->
    lists:foldl(fun(ChoiceBlock, Sum) ->
                Sum + (block_size(ChoiceBlock)) end, 0, Choices);
  instruction_size(Other) -> 0.
  
  initiates_size([]) -> 0;
  initiates_size([{continue, _}|_]) -> 0;
  initiates_size([X]) -> 1 + instruction_size(X);
  initiates_size([X|XS]) -> 1 + block_size([X|XS]).
  
  % add_state: Takes FSMState, returns (new state ID, new FSMState)
  add_state(State, FSMState) ->
  