00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 #ifndef _CVC_lite__common_theorem_producer_h_
00039 #define _CVC_lite__common_theorem_producer_h_
00040
00041 #include "common_proof_rules.h"
00042 #include "theorem_producer.h"
00043 #include "theorem.h"
00044 #include "cdmap.h"
00045
00046 namespace CVCL {
00047
00048 class CommonTheoremProducer: public CommonProofRules, public TheoremProducer {
00049 private:
00050
00051
00052
00053
00054 std::vector<Theorem> d_skolem_axioms;
00055
00056
00057
00058 CDMap<Expr, Theorem> d_skolemized_thms;
00059
00060
00061 CDMap<Expr, Theorem> d_skolemVars;
00062
00063 public:
00064 CommonTheoremProducer(TheoremManager* tm);
00065 virtual ~CommonTheoremProducer() { }
00066
00067 Theorem assumpRule(const Expr& a, int scope = -1);
00068 Theorem reflexivityRule(const Expr& a);
00069 Theorem rewriteReflexivity(const Expr& t);
00070 Theorem symmetryRule(const Theorem& a1_eq_a2);
00071 Theorem rewriteUsingSymmetry(const Expr& a1_eq_a2);
00072 Theorem transitivityRule(const Theorem& a1_eq_a2,
00073 const Theorem& a2_eq_a3);
00074 Theorem substitutivityRule(const Op& op,
00075 const std::vector<Theorem>& thms);
00076 Theorem substitutivityRule(const Expr& e,
00077 const std::vector<unsigned>& changed,
00078 const std::vector<Theorem>& thms);
00079 Theorem contradictionRule(const Theorem& e, const Theorem& not_e);
00080 Theorem iffTrue(const Theorem& e);
00081 Theorem iffNotFalse(const Theorem& e);
00082 Theorem iffTrueElim(const Theorem& e);
00083 Theorem iffFalseElim(const Theorem& e);
00084 Theorem iffContrapositive(const Theorem& thm);
00085 Theorem notNotElim(const Theorem& e);
00086 Theorem iffMP(const Theorem& e1, const Theorem& e1_iff_e2);
00087 Theorem implMP(const Theorem& e1, const Theorem& e1_impl_e2);
00088 Theorem andElim(const Theorem& e, int i);
00089 Theorem andIntro(const Theorem& e1, const Theorem& e2);
00090 Theorem andIntro(const std::vector<Theorem>& es);
00091 Theorem implIntro(const Theorem& phi, const std::vector<Expr>& assump);
00092 Theorem implContrapositive(const Theorem& thm);
00093 Theorem notToIff(const Theorem& not_e);
00094 Theorem rewriteIff(const Expr& e);
00095 Theorem rewriteAnd(const Expr& e);
00096 Theorem rewriteOr(const Expr& e);
00097 Theorem rewriteNotTrue(const Expr& e);
00098 Theorem rewriteNotFalse(const Expr& e);
00099 Theorem rewriteNotNot(const Expr& e);
00100 Theorem rewriteNotForall(const Expr& forallExpr);
00101 Theorem rewriteNotExists(const Expr& existsExpr);
00102 Expr skolemize(const Expr& e);
00103 Theorem skolemizeRewrite(const Expr& e);
00104 Theorem skolemizeRewriteVar(const Expr& e);
00105 Theorem varIntroRule(const Expr& e);
00106 Theorem skolemize(const Theorem& thm);
00107 Theorem varIntroSkolem(const Expr& e);
00108 Theorem trueTheorem();
00109 Theorem rewriteAnd(const Theorem& e);
00110 Theorem rewriteOr(const Theorem& e);
00111
00112 std::vector<Theorem>& getSkolemAxioms() { return d_skolem_axioms; }
00113 void clearSkolemAxioms() { d_skolem_axioms.clear(); }
00114
00115 };
00116
00117 }
00118
00119 #endif