예제 #1
0
  /**
   * Appends a string representation of this term to the buffer given as argument.
   *
   * @param buffer the buffer to which a string represention of this term is appended.
   */
  @Override
  public void toStringBuilder(java.lang.StringBuilder buffer) {
    buffer.append("RelExpMoreEqual(");
    _a5.toStringBuilder(buffer);

    buffer.append(")");
  }
예제 #2
0
 /**
  * Apply a conversion on the ATerm contained in the String and returns a parser.rec.types.RelExp
  * from it
  *
  * @param trm ATerm to convert into a Gom term
  * @param atConv ATerm Converter used to convert the ATerm
  * @return the Gom term
  */
 public static parser.rec.types.RelExp fromTerm(
     aterm.ATerm trm, tom.library.utils.ATermConverter atConv) {
   trm = atConv.convert(trm);
   if (trm instanceof aterm.ATermAppl) {
     aterm.ATermAppl appl = (aterm.ATermAppl) trm;
     if (symbolName.equals(appl.getName()) && !appl.getAFun().isQuoted()) {
       return make(parser.rec.types.AritExp.fromTerm(appl.getArgument(0), atConv));
     }
   }
   return null;
 }
예제 #3
0
  /**
   * Compute a hashcode for this term. (for internal use)
   *
   * @return a hash value
   */
  protected int hashFunction() {
    int a, b, c;
    /* Set up the internal state */
    a = 0x9e3779b9; /* the golden ratio; an arbitrary value */
    b = (774025562 << 8);
    c = getArity();
    /* -------------------------------------- handle most of the key */
    /* ------------------------------------ handle the last 11 bytes */
    a += (_a5.hashCode());

    a -= b;
    a -= c;
    a ^= (c >> 13);
    b -= c;
    b -= a;
    b ^= (a << 8);
    c -= a;
    c -= b;
    c ^= (b >> 13);
    a -= b;
    a -= c;
    a ^= (c >> 12);
    b -= c;
    b -= a;
    b ^= (a << 16);
    c -= a;
    c -= b;
    c ^= (b >> 5);
    a -= b;
    a -= c;
    a ^= (c >> 3);
    b -= c;
    b -= a;
    b ^= (a << 10);
    c -= a;
    c -= b;
    c ^= (b >> 15);
    /* ------------------------------------------- report the result */
    return c;
  }