Tools for inferring the types of inputs and outputs for functions and expressions