public static int guessLoomDefinitionArity(int arity, Stella_Object definition, Cons constraints) {
    if ((arity == -1) &&
        (definition != null)) {
      arity = Logic.computeLoomDescriptionArity(definition);
    }
    if (arity == -1) {
      { Stella_Object c = null;
        Cons iter000 = constraints;

        loop000 : for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
          c = iter000.value;
          arity = Logic.computeLoomDescriptionArity(c);
          if (arity > 0) {
            break loop000;
          }
        }
      }
    }
    if (arity == -1) {
      arity = 2;
    }
    return (arity);
  }