Dataflow Software Stack  032db78
Master Thesis of Mathijs Saey at the VUB
 All Classes Namespaces Files Functions Variables Pages
Public Member Functions | Public Attributes | List of all members
core.runtime.Core Class Reference

Runtime core. More...

Inherits object.

Public Member Functions

def __init__
 Initialize a core. More...
 
def __str__
 String representation of a core. More...
 
def __eq__
 See if 2 cores are equal. More...
 
def add
 Add a token to the inbox of a core. More...
 
def addToAll
 Add a token to all the other cores. More...
 
def getCore
 
def link
 Add a reference to the message queues of the other cores. More...
 
def start
 Start the runtime. More...
 
def stop
 Stop the current core. More...
 
def returnValue
 Return a value to the user. More...
 

Public Attributes

 memory
 Instruction memory. More...
 
 identifier
 Identifier of this core. More...
 
 active
 See if this core is running. More...
 
 cores
 Message Queues of the other cores. More...
 
 maxIdx
 Highest index of the core array. More...
 
 inbox
 Message Queue of this core. More...
 
 contextCreator
 Context creator for this core. More...
 
 tokenizer
 Tokenizer for this core. More...
 
 dispatcher
 Token dispatcher for this core. More...
 
 scheduler
 Scheduler for this core. More...
 
 matcher
 Context matcher for this core. More...
 

Detailed Description

Runtime core.

A runtime core is a worker unit in DVM. It defines it's own scheduler, matcher and token dispatcher and it has a static copy of the instruction memory.

Constructor & Destructor Documentation

def core.runtime.Core.__init__ (   self,
  identifier,
  memory 
)

Initialize a core.

This method only initializes all the components of the core that are not dependent on multiprocessing elements.

Parameters
identifierThe identifier of this core, this identifier should be unique and it should match the identifier of this core in the collection of all the cores.
memoryA reference to the static instruction memory.

Member Function Documentation

def core.runtime.Core.__str__ (   self)

String representation of a core.

def core.runtime.Core.__eq__ (   self,
  other 
)

See if 2 cores are equal.

def core.runtime.Core.add (   self,
  token,
  core = None 
)

Add a token to the inbox of a core.

Parameters
tokenThe token to add.
coreThe core to add the token to. The current core will be used if this argument is not added.
def core.runtime.Core.addToAll (   self,
  token 
)

Add a token to all the other cores.

def core.runtime.Core.getCore (   self)
def core.runtime.Core.link (   self,
  cores 
)

Add a reference to the message queues of the other cores.

def core.runtime.Core.start (   self)

Start the runtime.

def core.runtime.Core.stop (   self)

Stop the current core.

def core.runtime.Core.returnValue (   self,
  value 
)

Return a value to the user.

Parameters
valueThe value to return to the user.

Member Data Documentation

core.runtime.Core.memory

Instruction memory.

core.runtime.Core.identifier

Identifier of this core.

(integer)

core.runtime.Core.active

See if this core is running.

core.runtime.Core.cores

Message Queues of the other cores.

core.runtime.Core.maxIdx

Highest index of the core array.

core.runtime.Core.inbox

Message Queue of this core.

core.runtime.Core.contextCreator

Context creator for this core.

core.runtime.Core.tokenizer

Tokenizer for this core.

core.runtime.Core.dispatcher

Token dispatcher for this core.

core.runtime.Core.scheduler

Scheduler for this core.

core.runtime.Core.matcher

Context matcher for this core.