private ArrayList buildPredicates() throws Exception {

    ArrayList predicates = new ArrayList(); /* The result. */
    Predicate predicate;
    Attribute attr;
    Enumeration attributes = m_instances.enumerateAttributes();
    boolean individual = (m_parts != null); /* Individual-based learning ? */

    /* Attributes. */
    while (attributes.hasMoreElements()) {
      attr = (Attribute) attributes.nextElement();
      /* Identifiers do not appear in rules in individual-based learning. */
      if (!(individual && attr.name().equals("id"))) {
	predicate = buildPredicate(m_instances, attr, false);
	predicates.add(predicate);
      }
    }
    /* Class attribute. */
    attr = m_instances.classAttribute();
    /* Identifiers do not appear in rules. */
    if (!(individual && attr.name().equals("id"))) {
      predicate = buildPredicate(m_instances, attr, true);
      predicates.add(predicate);
    }

    /* Attributes of the parts in individual-based learning. */
    if (individual) {
      attributes = m_parts.enumerateAttributes();
      while (attributes.hasMoreElements()) {
	attr = (Attribute) attributes.nextElement();
	/* Identifiers do not appear in rules. */
	if (!attr.name().equals("id")) {
	  predicate = buildPredicate(m_parts, attr, false);
	  predicates.add(predicate);
	}
      }
    }
	
    return predicates;
  }