printDocReturn("ATtrue if |arg| corresponds to the expected signature, or ATfalse otherwise");
printDocReturn("ATtrue if #arg corresponds to the expected signature, or ATfalse otherwise");
	private void genTypeIsValid(Type type) {		String type_id = StringConversions.makeIdentifier(type.getId());		String type_name = buildTypeName(type);		String decl = "ATbool " + prefix + "isValid" + type_id + "("				+ type_name + " arg)";		printFoldOpen(decl);		hprintln(decl + ";");		printDocHead("Assert whether a " + type_name + " is any of the valid alternatives, or not","This analysis does not go any deeper than the top level");		printDocArg("arg", "input " + type_name);		printDocReturn("ATtrue if |arg| corresponds to the expected signature, or ATfalse otherwise");		printDocTail();		println(decl + " {");		Iterator alts = type.alternativeIterator();		boolean first = true;		while (alts.hasNext()) {			Alternative alt = (Alternative) alts.next();			print("  ");			if (first) {				first = false;			} else {				print("else ");			}			println("if (" + buildIsAltName(type, alt) + "(arg)) {");			println("    return ATtrue;");			println("  }");		}		println("  return ATfalse;");		println("}");		println();		printFoldClose();	}