Type analysis