1. A method comprising: creating an execution context that is represented as a data structure associated with a first element in a time-based block diagram, the execution context containing information used to control execution of the first element based on a satisfaction of a pre-condition; specifying that a second element in the time-based block diagram is an inheriting element that inherits the execution context associated with the first element; propagating, during compilation of the time-based block diagram, the execution context from the first element to the inheriting second element, the propagating associating the execution context associated with the first element with the inheriting second element, the propagating including: creating a hierarchical data structure for the block diagram that includes a reference to the first element, identifying whether the inheriting second element can inherit the execution context via its input ports and/or output ports, and grouping a reference to the inheriting second element with the reference to the first element in the hierarchical data structure for the block diagram; determining an order of execution for the time-based block diagram using the execution context associated with the inheriting element; executing the first element and the inheriting element according to the order of execution after the satisfaction of the pre-condition.