public OrIterator(LogExpr logExpr, Agent ag, Unifier un) { this.logExpr = logExpr; this.ag = ag; this.un = un; ileft = (OrIterator <Unifier>)logExpr.GetLHS().LogicalConsequence(ag, un); }
private InternalActionLiteral CheckInternalActionsInContext(ILogicalFormula f, Agent ag) { if (f != null) { if (f.GetType() == typeof(InternalActionLiteral)) { InternalActionLiteral ial = (InternalActionLiteral)f; if (!ial.GetIA(ag).CanBeUsedInContext()) { return(ial); } } else if (f.GetType() == typeof(LogExpr)) { LogExpr le = (LogExpr)f; InternalActionLiteral ial = CheckInternalActionsInContext(le.GetLHS(), ag); if (ial != null) { return(ial); } if (!le.IsUnary()) { return(CheckInternalActionsInContext(le.GetRHS(), ag)); } } } return(null); }