private void postorderSubInorderPass(Schedule sched, Term visit, int visitI, Visits mode,
HashMap<AGEval.Class, Vector<SingleVisitRaw> > res, HashSet<AGEval.Class> bus, HashSet<AGEval.Class> buInorders) {
Term visitO = visit.arg(2).arg(2).arg(2).arg(2);
HashSet<AGEval.Class> postorderClasses = new HashSet<AGEval.Class>();
HashSet<AGEval.Class> inorderWithPostorderParentClasses = new HashSet<AGEval.Class>();
for (Term bu : visitO.arg(1).arg(1).toTermArray())
postorderClasses.add(plNameToClass(sched, bu.toString()));
for (Term buInorder : visitO.arg(2).arg(2).arg(1).toTermArray())
inorderWithPostorderParentClasses.add(plNameToClass(sched, buInorder.toString()));
HashSet<AGEval.Class> inorderWithInorderParentClasses = new HashSet<AGEval.Class>(ast.classes);
inorderWithInorderParentClasses.removeAll(postorderClasses);
inorderWithInorderParentClasses.removeAll(inorderWithPostorderParentClasses);
for (AGEval.Class cls : ast.classes)
res.get(cls).add(new SingleVisitRaw(cls, postorderClasses.contains(cls.toString().toLowerCase()) ? Visits.POSTORDER : Visits.RECURSIVE));
handleMixed(sched, visitI, postorderClasses, visitO.arg(2).arg(1), res);
bus.addAll(postorderClasses);
handleMixed(sched, visitI, inorderWithPostorderParentClasses, visitO.arg(2).arg(2).arg(2).arg(1), res);
buInorders.addAll(inorderWithPostorderParentClasses);
handleMixed(sched, visitI, inorderWithInorderParentClasses, visitO.arg(2).arg(2).arg(2).arg(2), res);
}