result = true;
} else {
// Swap out any non-Concept concepts (ie Existentials)
for (int i = 0; !result && i < concepts.length; i++) {
if (!(concepts[i] instanceof Concept)) {
final Concept a = getA(factory, concepts[i]);
gcis[0] = new GCI(concepts[i], a);
final AbstractConcept[] newConcepts = new AbstractConcept[concepts.length];
System.arraycopy(concepts, 0, newConcepts, 0,
concepts.length);
newConcepts[i] = a;
gcis[1] = new GCI(new Conjunction(newConcepts), rhs);
result = true;
}
}
if (!result) {
if (concepts.length > 2) {
// Binarise a conjunction of Concepts (expected/assumed
// by NF1)
result = true;
final AbstractConcept[] newConcepts = new AbstractConcept[concepts.length - 1];
System.arraycopy(concepts, 1, newConcepts, 0,
concepts.length - 1);
final AbstractConcept d = new Conjunction(newConcepts);
final Concept a = getA(factory, d);
final AbstractConcept cAndA = new Conjunction(
new AbstractConcept[] { concepts[0], a });
gcis[0] = new GCI(cAndA, rhs);
gcis[1] = new GCI(d, a);