public Type type_check(Table<Type> t_env,Table<Dec> v_env,boolean in_loop,ErrorList e){
		/* 1.check the predicate expr, which must be integer */
		Type num_type = e1.type_check(t_env, v_env, false, e);
		if(!(num_type.actual() instanceof INT)){
			e.add_error("Type of if predicate should be integer", e1.line, e1.column, "typing");
		}
		/* 2.check the rest two */
		Type t2 = e2.type_check(t_env, v_env, false, e);
		Type t3 = e3.type_check(t_env, v_env, false, e);
		if(!t2.coerceTo(t3)){
			e.add_error("Type of branches of then/else mismatch", line, column, "typing");
			the_type = Type.THE_ERROR_STATE;
		}
		else{
			the_type = t2;
		}
		return the_type;
	}