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.context.Context Class Reference

DVM Context. More...

Inherits object.

Public Member Functions

def __init__
 
def __str__
 
def __eq__
 
def __hash__
 
def hashPair
 Generate a unique, integral identifier for a pair of non-negative integers. More...
 
def unhashPair
 Unhashes the hash. More...
 

Public Attributes

 hash
 
 core
 

Detailed Description

DVM Context.

A context is the part of a token tag. Contexts differentiate between various instances of a single part of the program.

For instance, when calling a function, DVM will create a new context shared by all the arguments to this function. Upon returning, the context will be used to find the destination of the function results.

Internally, a context is a wrapper around a unique integer.

Constructor & Destructor Documentation

def core.context.Context.__init__ (   self,
  core,
  key 
)

Member Function Documentation

def core.context.Context.__str__ (   self)
def core.context.Context.__eq__ (   self,
  other 
)
def core.context.Context.__hash__ (   self)
def core.context.Context.hashPair (   self,
  a,
  b 
)

Generate a unique, integral identifier for a pair of non-negative integers.

See also
http://szudzik.com/ElegantPairing.pdf
http://stackoverflow.com/a/13871379
def core.context.Context.unhashPair (   self)

Unhashes the hash.

Returns
a (prefix, key) pair
See also
slide 8 of http://szudzik.com/ElegantPairing.pdf

Member Data Documentation

core.context.Context.hash
core.context.Context.core