     }
     return _mapping
 
+  # push an incoming packet into the packet queue
   addToQueue = (packet) =>
     return if not Simulation.isInExecutionMode
 

    throw "#{name} in packet are not an array" unless Array.isArray arr
    throw "#{name} is empty" if arr.length <= 0

  simulateOperation = (packet) =>
    operations = packet.operations
    validateArray "operations", operations

        console.log "received invalid operation", op
        throw "Packet error: Invalid operation!"

  # highlights the current line of an simulation
  simulateLine = (packet) ->
    line = packet.line || 0
    throw "Packet error: line '#{line}' is not a valid line" unless line > 0
    CodeGUI.highlightLine line

  # show variable allocation
  simulateAllocations = (packet) ->
    allocations = packet.allocations
    for name of allocations
      CodeGUI.WatchList.setAllocation name, allocations[name]

  # simulate console output
  simulateMessages = (packet) ->
    messages = packet.messages
    validateArray "messages", messages
