예제 #1
0
파일: Pred.cs 프로젝트: nasa03/Jasonity
 public override Literal MakeVarsAnnon(Unifier un)
 {
     if (annotations != null)
     {
         IListTerm lt = annotations;
         while (!(lt.Count == 0))
         {
             ITerm ta = lt.GetTerm();
             if (ta.IsVar())
             {
                 lt.SetTerm(VarToReplace(ta, un));
             }
             else if (ta.GetType() == typeof(Structure))
             {
                 ((Structure)ta).MakeVarsAnnon(un);
             }
             if (lt.IsTail() && lt.GetNext().IsVar())
             {
                 lt.SetNext(VarToReplace(lt.GetNext(), un));
                 break;
             }
             lt = lt.GetNext();
         }
     }
     return(base.MakeVarsAnnon(un));
 }
예제 #2
0
 public void Dispose()
 {
     if (current != null && nextLT != null)
     {
         current.SetTerm(nextLT.GetTerm());
         current.SetNext(nextLT.GetNext());
         nextLT = current;
     }
 }