Type-inference in type-based static verification