/// <summary>Convert to CNF proposition</summary> /// <exception cref="InvaildPropositionException"></exception> /// <returns>CNF proposition</returns> public static Proposition ToCNF(this Proposition expr) { if (expr.IsCNF()) { return(expr); } if (expr.IsNNF()) { return(logEngine.ConvertToCNF(expr)); } else { return(logEngine.ConvertToCNF(logEngine.ConvertToNNF(expr))); } }