protected void changeIndexWindow(Dependency d) { try { if (d.IsFormula()) { IEnumerator e = ((Formula)d).GetDependencies(); while (e.MoveNext()) { changeIndexWindow((Dependency)e.Current); } } else if (d is StateDependency) { StateDependency sd = (StateDependency)d; changeIndexWindow(sd.StateWindow); if (sd is StateValueDependency && ((StateValueDependency)sd).IsReference) { changeIndexWindow(((StateValueDependency)sd).ReferenceWindow); } } } catch (NullReferenceException e) { throw new PUC.Parsers.SpecParseException(d.LineNumber, "A dependency within an apply-over block does not refer to a variable within the referenced list group.", e); } }
/* * Member Methods */ public override PUC.Dependency.Comparison Compare(StateDependency d) { if (d.State != State) { return(Comparison.Disjoint); } return(d.CompareLessThan(this)); }
/* * Member Methods */ public override PUC.Dependency.Comparison Compare(StateDependency d) { if (d.State == State && d is UndefinedDependency) { return(Dependency.Comparison.Same); } return(Dependency.Comparison.Disjoint); }
public override StateDependency Merge(StateDependency d) { if (d.Compare(this) == Dependency.Comparison.Same) { return(this); } else { return(null); } }
public override StateDependency Merge(StateDependency d) { Dependency.Comparison r = Compare(d); switch (r) { case Comparison.Disjoint: return(null); default: return(d); } }
public override Dependency.Comparison Compare(StateDependency d) { if (d.State != State || d is UndefinedDependency) { return(Dependency.Comparison.Disjoint); } if (d is WholeSetDependency) { return(Dependency.Comparison.Same); } return(Dependency.Comparison.Overlap); }
public override StateDependency Merge(StateDependency d) { Comparison r = Compare(d); switch (r) { case Comparison.Same: return(d); case Comparison.Overlap: if (d is EqualsDependency) { return(this); } else if (d is GreaterThanDependency) { return(new WholeSetDependency(State)); } else if (d is WholeSetDependency) { return(d); } else if (d is LessThanDependency) { if (State.Type.ValueSpace.CompareValues(((LessThanDependency)d).Value, this.Value) == -1) { return(d); } else { return(this); } } else { return(null); } default: return(null); } }
public abstract StateDependency Merge(StateDependency d);
/* * Abstract Methods */ public abstract Dependency.Comparison Compare(StateDependency d);