Exemplo n.º 1
0
 public boolean runTest(IEnv env) {
   try {
     TermSystem general = TermWare.getInstance().getRoot().resolveSystem("general");
     Term t = TermWare.getInstance().getTermFactory().createParsedTerm("neq(p(x),p(x))");
     Term r = general.reduce(t);
     if (!(r.isBoolean() && r.getBoolean() == false)) {
       System.out.println("r1=" + TermHelper.termToString(r));
       return false;
     }
     t = TermWare.getInstance().getTermFactory().createParsedTerm("neq(p(\"x\"),p(\"x\"))");
     r = general.reduce(t);
     if (r.isBoolean()) {
       if (r.getBoolean() == false) {
         return true;
       } else {
         return false;
       }
     } else {
       System.out.println("r2=" + TermHelper.termToString(r));
       return false;
     }
   } catch (TermWareException ex) {
     ex.printStackTrace();
     return false;
   }
 }