1. A computer-implemented method comprising: providing a graphical user interface for defining a function to be used in a graphical representation of a finite state machine, where the graphical representation is an executable model of the finite state machine in a statechart system and includes at least one state and at least one transition; representing the function graphically such that the function is graphically represented separately from the at least one state and at least one transition in the graphical representation of the finite state machine, wherein the function that is represented graphically has a function prototype that specifies a syntax for invoking the function, the function prototype specifying a function name for the function, and the function is defined in the statechart system in a graphical language; and calling the function that is represented graphically by the function name according to the syntax specified by the function prototype from within the graphical representation of the finite state machine.