7. A system for facilitating the development and execution of a software program, comprising: a compilation manager for the software program; and a runtime system for the software program, wherein the compilation manager and the runtime system are configured to: obtain a type interval for a generic type parameter of an implementation of an overloaded function; select an inference direction for the generic type parameter based on a variance of the generic type parameter, wherein the inference direction is an upward inference direction or a downward inference direction; and use the type interval and the inference direction to perform type inference on the generic type parameter, wherein doing so comprises: propagating one or more limits associated with the type interval through a set of constraints associated with the generic type parameter based on the inference direction; when the type interval is non-empty after the one or more limits are propagated through the set of constraints, choosing a binding for the generic type parameter based on the inference direction; and when the type interval is empty after the one or more limits are propagated through the set of constraints, determining that the implementation is not applicable to a function call associated with the overloaded function and the type interval.
7. A system for facilitating the development and execution of a software program, comprising: a compilation manager for the software program; and a runtime system for the software program, wherein the compilation manager and the runtime system are configured to: obtain a type interval for a generic type parameter of an implementation of an overloaded function; select an inference direction for the generic type parameter based on a variance of the generic type parameter, wherein the inference direction is an upward inference direction or a downward inference direction; and use the type interval and the inference direction to perform type inference on the generic type parameter, wherein doing so comprises: propagating one or more limits associated with the type interval through a set of constraints associated with the generic type parameter based on the inference direction; when the type interval is non-empty after the one or more limits are propagated through the set of constraints, choosing a binding for the generic type parameter based on the inference direction; and when the type interval is empty after the one or more limits are propagated through the set of constraints, determining that the implementation is not applicable to a function call associated with the overloaded function and the type interval. 10. The system of claim 7 , wherein selecting the inference direction based on the variance of the generic type parameter involves: when the variance is covariant or invariant, selecting the downward inference direction for the generic type parameter; and when the variance is contravariant, selecting the upward inference direction for the generic type parameter.