private List <WFF> IdentityDecompose(Identity i, AtomicWFF f) { if (f is Predicate) { return(IdentityDecompose(i, (Predicate)f)); } else if (f is Identity) { return(IdentityDecompose(i, (Identity)f)); } throw new NotImplementedException(f.GetType().ToString()); }
public static int SortOrder(this AtomicWFF f) { if (f is Predicate) { return(0); } else if (f is Identity) { return(int.MaxValue - 1); } else if (f is Contradiction) { return(0); } throw new NotImplementedException(f.GetType().ToString()); }
private Decomposition DecomposeWFF(AtomicWFF f) { if (f is Predicate) { return(null); } else if (f is Identity) { return(DecomposeWFF((Identity)f)); } else if (f is Contradiction) { return(null); } throw new NotImplementedException(f.GetType().ToString()); }
public static bool Decomposable(this AtomicWFF f) { if (f is Predicate) { return(false); } else if (f is Identity) { Identity i = (Identity)f; return(!i.left.Equals(i.right)); } else if (f is Contradiction) { return(false); } throw new NotImplementedException(f.GetType().ToString()); }