TTTag
Tokens carry tags that identify where they are meant to go. In the dynamic tagged token dataflow, this included form of ‘static’ and ‘dynamic’ context tag, where the static tag was akin to the program counter (telling where to execute in the code) and dynamic was related to the memory/runtime usage of that code, like a stack frame.
Tags in TTPython carry a similar dynamic context (which is currently unused, but is useful for function application or multi-tenant programs) ‘u’, whereas the rest of the tag pertains to where the token must go, including the recipient SQ (name), port (number), and ensemble (name).
Most of the static tag is filled in during the forwarding phase of the SQ, as tokens are duplicated for all of their recipients
- class ticktalkpython.Tag.TTTag(context=None, sq=None, port=None, ensemble_name=None)
Form a token’s tag from a context id, an SQ name, a timestamp, and a port. In u-interpreter parlance, u is the context, c is the ‘code block’ and s is the instruction (so they are combined as we cannot use any further graularity than one sq), t overtakes the ‘i’ iterator part of dynamic context, and p is the port.
- Parameters:
context (string) – ‘u’ of the tag. Related to function application
sq (string) – the name of the SQ the token is intended for
port (int) – the port number the token should arrive to
ensemble_name (string) – the name of the ensemble the SQ of interest is expected to reside on