Esempio n. 1
0
        private List <WFF> IdentityDecompose(Identity i, Connective f)
        {
            if (f is Biconditional)
            {
                return(IdentityDecompose(i, (Biconditional)f));
            }
            else if (f is Conditional)
            {
                return(IdentityDecompose(i, (Conditional)f));
            }
            else if (f is Conjunction)
            {
                return(IdentityDecompose(i, (Conjunction)f));
            }
            else if (f is Disjunction)
            {
                return(IdentityDecompose(i, (Disjunction)f));
            }
            else if (f is Negation)
            {
                return(IdentityDecompose(i, (Negation)f));
            }

            throw new NotImplementedException(f.GetType().ToString());
        }
Esempio n. 2
0
        private Decomposition DecomposeWFF(Connective f)
        {
            if (f is Biconditional)
            {
                return(DecomposeWFF((Biconditional)f));
            }
            else if (f is Conditional)
            {
                return(DecomposeWFF((Conditional)f));
            }
            else if (f is Conjunction)
            {
                return(DecomposeWFF((Conjunction)f));
            }
            else if (f is Disjunction)
            {
                return(DecomposeWFF((Disjunction)f));
            }
            else if (f is Negation)
            {
                return(DecomposeWFF((Negation)f));
            }

            throw new NotImplementedException(f.GetType().ToString());
        }
Esempio n. 3
0
 public static int SortOrder(this Connective f)
 {
     if (f is Biconditional)
     {
         return(2);
     }
     else if (f is Conditional)
     {
         return(2);
     }
     else if (f is Conjunction)
     {
         return(1);
     }
     else if (f is Disjunction)
     {
         return(((Disjunction)f).arity);
     }
     else if (f is Negation)
     {
         return(SortOrder((Negation)f));
     }
     throw new NotImplementedException(f.GetType().ToString());
 }
Esempio n. 4
0
 public static bool Decomposable(this Connective f)
 {
     if (f is Biconditional)
     {
         return(true);
     }
     else if (f is Conditional)
     {
         return(true);
     }
     else if (f is Conjunction)
     {
         return(true);
     }
     else if (f is Disjunction)
     {
         return(true);
     }
     else if (f is Negation)
     {
         return(Decomposable((Negation)f));
     }
     throw new NotImplementedException(f.GetType().ToString());
 }