Ejemplo n.º 1
0
        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());
        }
Ejemplo n.º 2
0
        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());
        }
Ejemplo n.º 3
0
        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());
        }
Ejemplo n.º 4
0
        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());
        }