for (int j = 0; j < parents.size(); j++) {
SSBNNode parent = parents.get(j);
ResidentNode parentResident = parent.getResident();
// ignore continuous parent
if (!(parentResident instanceof ContinuousResidentNode)) {
Entity val = currentIteratorValue.get(j);
if (cpsIfClause.length() > 0) {
// there are other boolean expressions. Combine using &&
cpsIfClause += " && ";
}
cpsIfClause += parent.getProbNode().getName() + " == " + val.getName();
map.get(parentResident.getName()).add(new EntityAndArguments(val,new ArrayList<OVInstance>(parent.getArguments())));
}
}
if (cpsIfClause.length() > 0) {
// only start if-clause if there are discrete parents