description = newDescription;
newDescription = new ArrayList<Gdl>();
boolean removeBaseSentences = false;
for (Gdl gdl : description) {
if (gdl instanceof GdlRelation) {
GdlRelation relation = (GdlRelation) gdl;
if (relation.getName() == BASE && relation.arity() != 1) {
removeBaseSentences = true;
break;
}
}
}
//Note that in this case, we have to remove ALL of them or we might
//misinterpret this as being the new kind of "base" relation
for (Gdl gdl : description) {
if (gdl instanceof GdlRelation) {
GdlRelation relation = (GdlRelation) gdl;
if (removeBaseSentences && relation.getName() == BASE) {
//Leave out the relation
} else {
newDescription.add(gdl);
}
} else {