Package jpl

Examples of jpl.Term


          res += "], ";
        }
        //VisitO classes
        {
          if (d.equals("buSubInorder")) {
            Term decomposition = visit.arg(2).arg(2).arg(2).arg(2);
            res += "\n((["; //BU
            {
              Boolean first = true;
              //System.err.println(decomposition.arg(1).arg(1).debugString());
              for (Term t : decomposition.arg(1).arg(1).toTermArray()) {
                if (first) first = false;
                else res += ",";
                res += t.toString();
              }       
            }
            res += "],["; //Inorder
            {
              Boolean first = true;
              //System.err.println(decomposition.arg(1).arg(2).debugString());
              for (Term t : decomposition.arg(1).arg(2).toTermArray()) {
                if (first) first = false;
                else res += ",";
                res += t.toString();
              }       
            }
            res += "]),(_,\n["; //BUInorder (subset of Inorder)
            {
              Boolean first = true;
              //System.err.println(decomposition.arg(2).arg(2).arg(1).debugString());
              for (Term t : decomposition.arg(2).arg(2).arg(1).toTermArray()) {
                if (first) first = false;
                else res += ",";
                res += t.toString();
              }       
            }
View Full Code Here


 
 
  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);
  }
View Full Code Here

TOP

Related Classes of jpl.Term

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.