is_type_mapped
while (is_type_mapped(d, type_id) && d->map[type_id] != type_id)
is_type_mapped(d, c_id) &&
!is_type_mapped(d, t_id)) {