úÎlf†Z      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXY Safe-InferedZ[\]Z[\]Z[\]None'The internal simulator state The ?- 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 ? &Map of component contexts, key is the ? 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  ?5 of the sender, the second field the message content "Status of a running component #%Component is busy doing computations $(Component is waiting for a message from ?, 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. /Interface type 0? of this component 1?. of the component that created this component 2Status of the component 3 State internal to the component 41Message waiting to be processed by the component 5Trace message buffer 6.Statistical information regarding a component 7+Type class that defines every OS component 8'Type of messages send by the component 9+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 C  !"#$%&'()*+,-./0123456789:;<=>?@^_`ab>  !"#$%&'()*+,-./0123456789:;<=>?@>@?>789:;<=-./0123456&'()*+,"%$#!    ! "%$#&'()*+,- ./0123456789:;<=>?@^_`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 hijklA cdefghijklA cdefghijklA Safe-Inferedm6Update component context according to simulator event BnopqrmCurrent component context Simulator Event <Returns tuple of: ((potentially updated) component context, ' (potentially update) component state, s when event is consumed;  t ComponentInput otherwise) BnopqrmBnopqrm Safe-InferedCCreate a new component DCreate a new component ECreate a new component F'Synchronously invoke another component G'Synchronously invoke another component H9Invoke another component, handle response asynchronously I9Invoke another component, handle response asynchronously JRespond to an invocation KRespond to an invocation L0Yield internal state to the simulator scheduler M'Get the component id of your component NFGet the node id of of the node your component is currently running on OCreate a new node PWrite memory of local node QWrite memory of local node RRead memory of local node SRead memory of local node T Return the ?+ of the component that created the current  component UGet the unique ?* of a component implementing an interface VGet the unique ?* of a component implementing an interface CComponent Interface ? of the created component DComponent Interface E&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 ? of the created component FInterface type ComponentId of callee  Argument Response from callee GInterface type Caller, leave s to set to current module Callee  Argument Response from recipient HInterface type ComponentId of callee  Argument Response Handler Call returns immediately IInterface type Caller, leave s to set to current module Callee  Argument Handler Call returns immediately JInterface type #Return address to send response to Value to send as response Call returns immediately KInterface type Callee Id, leave s to set to current module Return address Value to send as response Call returns immediately LMNONodeId of the created node PAddress to write Value to write Q!Node you want to write on, leave s to set to current node Address to write Value to write RAddress to read S Node you want to look on, leave s to set to current node Address to read TU4Interface type of the component you are looking for t  ComponentID if a component is found, s otherwise V Node you want to look on, leave s to set to current node 4Interface type of the component you are looking for t  ComponentID if a component is found, s otherwise WXCDEFGHIJKLMNOPQRSTUVWXCDEFGHIJKLMNOPQRSTUVWX Safe-InferedY) !789:;<=?ABCDEFGHIJKLMNOPQRSTUVWXY)CDEFGHIJKLMNOPQRSTUVWX?789:;<=! YBAYu        !"#$%&'()*+,,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyxz{SoOSiM-0.2.0.0SoOSiM SoOSiM.Types SoOSiM.UtilSoOSiM.Simulator.UtilSoOSiM.SimulatorSoOSiM.SimMonadbaseData.Typeable.InternalTypeable Data.DynamicDynamic unmarshallSimStatecurrentComponent currentNodenodes uniqueSupplySimMonadRequestOrYieldYieldRequest SimInternalSimrunSimNodenodeIdnodeInfonodeComponentLookupnodeComponents nodeMemorynodeComponentOrderNodeInfoNodeId ReturnAddressRAunRAInputTickMessageComponentStatus ReadyToRun WaitingFor ReadyToIdle SimMetaData cyclesRunning cyclesWaiting cyclesIdling msgsReceivedmsgsSendComponentContextCCcomponentIface componentIdcreator currentStatuscomponentState msgBuffer traceMsgs simMetaDataComponentInterfaceSendReceiveState initState componentNamecomponentBehaviour ComponentName ComponentIdUnique returnAddresstickcreateComponentcreateComponentNcreateComponentNPinvokeinvokeS invokeAsync invokeAsyncSrespondrespondSyieldgetComponentId getNodeId createNode writeMemory writeMemoryN readMemory readMemoryNcomponentCreatorcomponentLookupcomponentLookupNtraceMsgrunSTMignore MonadUnique getUniqueM adjustForce mapAccumLM$fMonadUniqueStateT$fFunctorRequestOrYield$fMonadUniqueCoroutine$fMonadStateSimStateCoroutine $fShowInput modifyNode modifyNodeM componentNodeupdateMsgBufferincrSendCounterupdateTraceBuffer incrIdleCountincrWaitingCountincrRunningCount fromDynMsg handleInput executeNodeexecuteComponent resumeYield handleResultrunUntilNothingM Data.MaybeNothingJust