Ejemplo n.º 1
0
        public static PathCond Make(params PathCond[] conjs)
        {
            HashList <PathCond> result = new HashList <PathCond>();

            foreach (PathCond conj in conjs)
            {
                if (conj.Is(false))
                {
                    return(FALSE);
                }
                else if (!conj.Is(true))
                {
                    result.Add(conj);
                }
            }
            if (result.Count == 0)
            {
                return(TRUE);
            }
            else if (result.Count == 1)
            {
                return(result.Single());
            }
            else
            {
                return(new Conj(result.ToArray()));
            }
        }
Ejemplo n.º 2
0
		public static PathCond Make(params PathCond[] conjs) {
			HashList<PathCond> result = new HashList<PathCond>();
			foreach (PathCond conj in conjs) {
				if (conj.Is(false)) {
					return FALSE;
				}
				else if (!conj.Is(true)) {
					result.Add(conj);
				}
			}
			if (result.Count == 0) {
				return TRUE;
			}
			else if (result.Count == 1) {
				return result.Single();
			}
			else {
				return new Conj(result.ToArray());
			}
		}
Ejemplo n.º 3
0
 public override bool Is(bool b)           // Conj() is TRUE, and Conj(b) is b
 {
     return(b && conds.Count == 0 || conds.Count == 1 && conds.Single().Is(b));
 }
Ejemplo n.º 4
0
 public override bool Is(bool b)           // Disj() is FALSE, and Disj(b) is b
 {
     return(!b && conds.Count == 0 || conds.Count == 1 && conds.Single().Is(b));
 }