public Type type_check(Table<Type> t_env,Table<Dec> v_env,boolean in_loop,ErrorList e){
		/* 1.first check the type_id's name */
		Type a_type = t_env.get(id);
		if(a_type==null){//no such tid name
			e.add_error("Undeclared type name "+id, line, column, "typing");
			the_type = Type.THE_ERROR_STATE;
			return the_type;
		}
		else if(!(a_type.actual() instanceof RECORD)){
			e.add_error("Wrong type "+id+" which is not record type", line, column, "typing");
			the_type = Type.THE_ERROR_STATE;
			return the_type;
		}
		/* 2.check the fields */
		RECORD r = (RECORD)(a_type.actual());
		Map<Zsymbol,Type> m = r.fie;
		for(Field f : list.list){
			Type tmp = m.get(f.sym);
			if(tmp==null)
				e.add_error("No such field "+f.sym+" in struct "+id, f.line, f.column, "typing");
			else if(!f.expr.type_check(t_env, v_env, false, e).coerceTo(tmp))
				e.add_error("Type mismatch in field "+f.sym+" in struct "+id, f.line, f.column, "typing");
		}
		the_type = r;
		return the_type;
	}