* @param arg1
   * @param arg2
   * @param module
   * @param environment
   * @return Proposition
   */
  public static Proposition getBinaryProposition(LogicObject relation, Stella_Object arg1, Stella_Object arg2, Module module, Environment environment) {
    { Module mdl000 = module;
      Context cxt000 = mdl000;

      if (mdl000 == null) {
        mdl000 = ((Module)(Stella.$MODULE$.get()));
        cxt000 = ((Context)(Stella.$CONTEXT$.get()));
      }
      { Object old$Module$000 = Stella.$MODULE$.get();
        Object old$Context$000 = Stella.$CONTEXT$.get();

        try {
          Native.setSpecial(Stella.$MODULE$, mdl000);
          Native.setSpecial(Stella.$CONTEXT$, cxt000);
          environment = environment;
          synchronized (Logic.$POWERLOOM_LOCK$) {
            { LogicObject argumentwithbacklinks = null;

              if ((arg1 != null) &&
                  Stella_Object.isaP(arg1, Logic.SGT_LOGIC_LOGIC_OBJECT)) {
                argumentwithbacklinks = ((LogicObject)(arg1));
              }
              else if ((arg2 != null) &&
                  Stella_Object.isaP(arg2, Logic.SGT_LOGIC_LOGIC_OBJECT)) {
                argumentwithbacklinks = ((LogicObject)(arg2));
              }
              if (argumentwithbacklinks != null) {
                { Proposition p = null;
                  Iterator iter000 = Logic.allTrueDependentPropositions(argumentwithbacklinks, relation.surrogateValueInverse, false);

                  while (iter000.nextP()) {
                    p = ((Proposition)(iter000.value));
                    if (((arg1 == null) ||
                        Stella_Object.eqlP(arg1, Logic.valueOf((p.arguments.theArray)[0]))) &&
                        ((arg2 == null) ||
                         Stella_Object.eqlP(arg2, Logic.valueOf((p.arguments.theArray)[1])))) {
                      return (p);
                    }
                  }
                }
              }
              else {
                return (((Proposition)(PLI.helpGetPropositions(relation, Cons.consList(Cons.cons(arg1, Cons.cons(arg2, Stella.NIL))), 1, module, environment).value)));
              }
              return (null);
            }
          }

        } finally {
          Stella.$CONTEXT$.set(old$Context$000);
          Stella.$MODULE$.set(old$Module$000);
        }
      }
    }
  }