TTArc

Arcs describe the connections between SQs within the graph. Arc destinations are a runtime version of an Arc that tells an SQ where it must send its output; a list of these sufficiently describes the Forwarding section of an SQ.

Arcs are generated within the compiler, and are often generated for variables that are assigned values by the output of an expression or function call. Some Arcs are auto-generated when there are multiple simply expressions on the same line.

class ticktalkpython.Arc.TTArc(source_sq, symbol)

TTArcs connect SQs. Each TTArc has zero or one source TTSQ and as many destination SQs as needed. Each can also be associated with a program symbol which only serves as a documentation string.

Parameters:
  • source_sq (TTSQ) – The SQ that will send its outputs ( TTToken ) along this arc

  • symbol (string) – A symbol name derived from the compiler; generally a variable name

add_destination(to_sq)

Specify an additional destination SQ that will receive tokens from this arc

Parameters:

sq (TTSQ) – The SQ that will receive tokens from this arc at runtime

arc_id()

Return arc’s ID

class ticktalkpython.Arc.TTArcDestination(ensemble_name, sq_name, port_number)

TTArcDestinations carry all the necessary information to generate tags that represent the location a token must be sent to. This information should be filled in when mapping the program to a set of ensembles. An arc’s mapping may contain multiple TTArcDestinations, one per port of an SQ that needs to receive a token from the arc this is attached to.

Parameters:
  • ensemble_name (String) – Name of an ensemble that hosts the recipient SQ

  • sq_name (String) – Name of the SQ to send output tokens to

  • port_number (int) – Index (from 0) of the port with the named SQ the token must be sent to