de.cau.cs.kieler.dataflow.codegen
Class Helper

java.lang.Object
  extended by de.cau.cs.kieler.dataflow.codegen.Helper

public final class Helper
extends Object

Helper functions for type and io inference of dataflow models.

Rating red

Method Summary
static Set<Port> getInputs()
          Returns all global input ports.
static Set<Port> getLocals()
          This function should only be called after initIO.
static Set<Port> getLocals(Box box)
          collect all local variables inside a box.
static Set<Port> getOutputs()
          Returns all global output ports.
static void init(Box box)
          Generate unique name for all connections by mapping target or source name to it.
static void initIO(Box box)
          Determine unconnected input and output ports, these are handled as external io.
static void reset()
          reset all internal variables.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

reset

public static void reset()
reset all internal variables.


init

public static void init(Box box)
Generate unique name for all connections by mapping target or source name to it. For inter-level transitions, the outermost port wins, otherwise the source-port.

Parameters:
box - unnamed box

initIO

public static void initIO(Box box)
Determine unconnected input and output ports, these are handled as external io.

Parameters:
box - outermost box that represents the complete model

getInputs

public static Set<Port> getInputs()
Returns all global input ports. This function should only be called after initIO.

Returns:
global inputs

getOutputs

public static Set<Port> getOutputs()
Returns all global output ports. This function should only be called after initIO.

Returns:
global outputs

getLocals

public static Set<Port> getLocals()
This function should only be called after initIO.

Returns:
local variables

getLocals

public static Set<Port> getLocals(Box box)
collect all local variables inside a box.

Parameters:
box - for which the local variables are collected
Returns:
names of all internal connections