10. At least one non-transitory, tangible computer-readable storage medium, comprising computer-executable instructions that when executed on a processor implement a compiler for a source language, comprise: type inference rules that perform type inference in accordance for types specified for the source language, the source language being a dynamic language, the source language including one or more methods and one or more user-defined types, each method accepting input values and producing output values, the output values of a predefined type or a user-defined type; and a type inference engine that accesses a user-defined mapping, separate from the compiler, to perform type inference for each output value of a method having a user-defined element, the user-defined mapping associates a method with a set of one or more types for input values for the method to a type for each of one or more output values.
12. The at least one non-transitory, tangible computer-readable storage medium, of claim 10 , wherein: the method having a user-defined element is a user-defined method.