Basic type inference and obligation generation for the core language