Static Type Checking for Languages with Parametric Types and Polymorphic Procedures