System and method for enabling graphical program polymorphism. A "polymorphic
node" to be included in a graphical program may be created and configured. A parameter
interface that defines allowable inputs and outputs for the polymorphic node may
be specified, and a set of functions or subprograms may be associated with the
polymorphic node. The functions may have parameter interfaces that specify particular
data types for the inputs/outputs of the functions. Once a polymorphic node is
included in a graphical program, the node may be configured with typed inputs and
outputs. The graphical programming system may determine a particular function associated
with the polymorphic node to match the polymorphic node to, based on the data types
of the configured inputs and outputs. This determination may also be based on an
ordering specified for the set of functions associated with the polymorphic node.
A best-fit heuristic for automatically making this determination is described.
The user may also manually specify which function to match the polymorphic node
to. The graphical program may be generated just as if the matched function were
called directly, thus incurring no execution performance loss.