* @return boolean
   */
  public static boolean logicModuleP(Module self) {
    { boolean testValue000 = false;

      if (self == Logic.$PL_KERNEL_MODULE$) {
        testValue000 = true;
      }
      else {
        {
          { boolean foundP000 = false;

            { Module m = null;
              Cons iter000 = self.parentModules.theConsList;

              loop000 : for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
                m = ((Module)(iter000.value));
                if (Logic.logicModuleP(m)) {
                  foundP000 = true;
                  break loop000;
                }
              }
            }
            testValue000 = foundP000;
          }
          if (!testValue000) {
            { boolean foundP001 = false;

              { Module m = null;
                Cons iter001 = self.uses.theConsList;

                loop001 : for (;!(iter001 == Stella.NIL); iter001 = iter001.rest) {
                  m = ((Module)(iter001.value));
                  if (Logic.logicModuleP(m)) {
                    foundP001 = true;
                    break loop001;
                  }
                }
              }
              testValue000 = foundP001;
            }
          }
        }
      }
      { boolean value000 = testValue000;

        return (value000);
      }
    }
  }