úÎiŸc™Z      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXY Safe-InferedZ[\]Z[\]Z[\]None(The internal simulator state The A- of the component currently under evaluation The 6 of the node containing the component currently under  evaluation .The set of nodes comprising the entire system "Unlimited supply of unique values FThe internal monad of the simulator is currently a simple state-monad  wrapping STM ?The simulator monad used by the OS components offers resumable F computations in the form of coroutines. These resumable computations  expect a value of type , and return a value of type a. IWe need resumable computations to simulate synchronous messaging between K two components. When a component synchronously sends a message to another J component, we store the rest of the computation as part of the execution I context in the simulator state. When a message is send back, the stored = computation will continue with the message content (of type ). (To suspend a computation you simply do:  'request  componentId'  Where the  componentId3 is the ID of the OS component you are expecting a C message from. The execute a resumeable computation you simply do:  'resume  comp' 5Nodes represent computing entities in the simulator, 4 and host the OS components and application threads Globally Unique ID of the node Meta-data describing the node <Lookup table of OS components running on the node, key: the  @, value: unique A &Map of component contexts, key is the A Node-local memory FMeta-data describing the functionaly of the computing node, currently  just a singleton type. +Events send to components by the simulator !"Event send every simulation round "<A message send another component: the field argument is the  A5 of the sender, the second field the message content #Status of a running component $Module scheduled for deletion %%Component is busy doing computations &(Component is waiting for a message from A, will continue  with computation ('(' -> SimM a) once received 'Component is doing nothing -)Key: senderId; Value: number of messages .+Key: receiverId: Value: number of messages /1Context of a running component in the simulator. FWe need existential types because we need to make a single collection H of several component contexts, each having their own type representing  their internal state. 1Interface type 2A of this component 3A. of the component that created this component 4Status of the component 5 State internal to the component 61Message waiting to be processed by the component 7Trace message buffer 8.Statistical information regarding a component 9(Type class that defines an OS component :'Type of messages send by the component ;+Type of messages received by the component <(Type of internal state of the component =-The minimal internal state of your component >>A function returning the unique global name of your component ?6The function defining the behaviour of your component D  !"#$%&'()*+,-./0123456789:;<=>?@A^_`ab?  !"#$%&'()*+,-./0123456789:;<=>?@A?9:;<=>? "!A@/012345678#'&%$ ()*+,-.    "!#'&%$()*+,-./ 0123456789:;<=>?@A^_`ab Safe-Infered c"ID of the node you want to update Update function d"ID of the node you want to update Update function efRecipient component ID Actual message Node containing the component g RecipientID  SenderId Node containing the sender hijklB cdefghijklB cdefghijklB Safe-Inferedm6Update component context according to simulator event CnopqrmCurrent component context Simulator Event <Returns tuple of: ((potentially updated) component context, ' (potentially update) component state, s when event is consumed;  t ComponentInput otherwise) CnopqrmCnopqrm Safe-InferedDCreate a new component ECreate a new component FCreate a new component G'Synchronously invoke another component H'Synchronously invoke another component I9Invoke another component, handle response asynchronously J9Invoke another component, handle response asynchronously KRespond to an invocation LRespond to an invocation M0Yield internal state to the simulator scheduler N'Get the component id of your component OFGet the node id of of the node your component is currently running on PCreate a new node QWrite memory of local node RWrite memory of local node SRead memory of local node TRead memory of local node U Return the A+ of the component that created the current  component VGet the unique A* of a component implementing an interface DComponent Interface A of the created component EComponent Interface F&Node to create component on, leave to s to create on current  node %ComponentId to set as parent, set to s to use own ComponentId Component Interface A of the created component GInterface type ComponentId of callee  Argument Response from callee HInterface type Caller, leave s to set to current module Callee  Argument Response from recipient IInterface type ComponentId of callee  Argument Response Handler Call returns immediately JInterface type Parent of handler, leave s to set to the current module Callee  Argument Handler Call returns immediately KInterface type #Return address to send response to Value to send as response Call returns immediately LInterface type Callee Id, leave s to set to current module Return address Value to send as response Call returns immediately MNOPNodeId of the created node QAddress to write Value to write R!Node you want to write on, leave s to set to current node Address to write Value to write SAddress to read T Node you want to look on, leave s to set to current node Address to read UV4Interface type of the component you are looking for t  ComponentID if a component is found, s otherwise WXuDEFGHIJKLMNOPQRSTUVWXDEFGHIJKLMNOPQRSTUVWXu Safe-InferedY) !"9:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXY)DGIKMSQVWPXNOUEFHJLTR9:;<=>? "!A@CYBYv       !!"#$%&'()*+,-../0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyxz{|SoOSiM-0.2.1.0SoOSiM SoOSiM.Types SoOSiM.UtilSoOSiM.Simulator.UtilSoOSiM.SimulatorSoOSiM.SimMonadbaseData.Typeable.InternalTypeable Data.DynamicDynamic unmarshallSimStatecurrentComponent currentNodenodes uniqueSupplySimMonadRequestOrYieldKillYieldRequest SimInternalSimrunSimNodenodeIdnodeInfonodeComponentLookupnodeComponents nodeMemorynodeComponentOrderNodeInfoNodeId ReturnAddressRAunRAInputTickMessageComponentStatusKilled ReadyToRun WaitingFor ReadyToIdle SimMetaData cyclesRunning cyclesWaiting cyclesIdling msgsReceivedmsgsSendComponentContextCCcomponentIface componentIdcreator currentStatuscomponentState msgBuffer traceMsgs simMetaDataComponentInterfaceSendReceiveState initState componentNamecomponentBehaviour ComponentName ComponentId returnAddresstickcreateComponentcreateComponentNcreateComponentNPinvokeinvokeS invokeAsync invokeAsyncSrespondrespondSyieldgetComponentId getNodeId createNode writeMemory writeMemoryN readMemory readMemoryNcomponentCreatorcomponentLookuptraceMsgrunSTMignore MonadUnique getUniqueM adjustForce mapAccumLM$fMonadUniqueStateT$fFunctorRequestOrYield$fMonadUniqueCoroutine$fMonadStateSimStateCoroutine $fShowInput modifyNode modifyNodeM componentNodeupdateMsgBufferincrSendCounterupdateTraceBuffer incrIdleCountincrWaitingCountincrRunningCount fromDynMsg handleInput executeNodeexecuteComponent resumeYield handleResultrunUntilNothingM Data.MaybeNothingJust$fComponentInterfaceHandlerStub