Exemplo n.º 1
0
  public void vizAddConceptRulesToDotNode(LogicObject concept, Module module) {
    {
      VizInfo self = this;

      {
        OutputStream stream = self.stream;
        boolean firstP = true;

        {
          Object old$Module$000 = Stella.$MODULE$.get();
          Object old$Context$000 = Stella.$CONTEXT$.get();

          try {
            Native.setSpecial(Stella.$MODULE$, module);
            Native.setSpecial(Stella.$CONTEXT$, ((Module) (Stella.$MODULE$.get())));
            {
              Object old$PrettyprintlogicalformsP$000 = Logic.$PRETTYPRINTLOGICALFORMSp$.get();

              try {
                Native.setBooleanSpecial(Logic.$PRETTYPRINTLOGICALFORMSp$, true);
                {
                  Proposition rule = null;
                  edu.isi.powerloom.PlIterator iter000 =
                      edu.isi.powerloom.PLI.getRules(concept, module, null);

                  while (iter000.nextP()) {
                    rule = ((Proposition) (iter000.value));
                    if (!Proposition.simpleSubrelationPropositionP(rule)) {
                      if (!(firstP)) {
                        stream.nativeStream.print("\\l");
                      }
                      firstP = false;
                      stream.nativeStream.print(
                          OntosaurusUtil.vizDotString(Native.stringify(rule)));
                    }
                  }
                }

              } finally {
                Logic.$PRETTYPRINTLOGICALFORMSp$.set(old$PrettyprintlogicalformsP$000);
              }
            }

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