CVC3

LFSCConvert.h

Go to the documentation of this file.
00001 #ifndef LFSC_CONVERT_H_
00002 #define LFSC_CONVERT_H_
00003 
00004 #include "TReturn.h"
00005 
00006 class LFSCConvert : public LFSCObj
00007 {
00008 private:
00009   //the converted LFSCProof
00010   RefPtr< LFSCProof > pfinal;
00011   // translations of proofs for cvc3_to_lfsc : if a proof has already been done,
00012   // return the TReturn store for it
00013   ExprMap<bool> d_th_trans;
00014   ExprMap<TReturn*> d_th_trans_map[2];
00015   // these are the current TReturns we need to make into lambdas
00016   std::map<TReturn*, bool> d_th_trans_lam[2];
00017   //counts for theory/non-theory
00018   int nodeCount;
00019   int nodeCountTh;
00020   int unodeCount;
00021   int unodeCountTh;
00022   //whether to ignore theory lemmas
00023   bool ignore_theory_lemmas;
00024 
00025   // other helper methods
00026   bool isTrivialTheoryAxiom(const Expr& expr, bool checkBody = false );
00027   bool isTrivialBooleanAxiom(const Expr& expr);
00028   bool isIgnoredRule(const Expr& expr);
00029 
00030   // main method to implement T transformation:
00031   // cvc3 proof syntax tree to lfsc proof syntax tree
00032   // beneath_lc is whether you are beneath a learned clause
00033   // rev_pol is whether you should prove ~psi2 V psi1 in the provesY = 2 case (reverse the implication)
00034   TReturn* cvc3_to_lfsc(const Expr& pf, bool beneath_lc = false, bool rev_pol=false);
00035   TReturn* cvc3_to_lfsc_h(const Expr& pf, bool beneath_lc = false, bool rev_pol=false);
00036   //do basic subst op procedure
00037   TReturn* do_bso( const Expr& pf, bool beneath_lc, bool rev_pol, TReturn* t1, TReturn* t2, ostringstream& ose );
00038   //get proof type
00039   int get_proof_pattern( const Expr& pf, Expr& modE );
00040   //make the let proof
00041   LFSCProof* make_let_proof( LFSCProof* p );
00042   //make trusted
00043   TReturn* make_trusted( const Expr& pf );
00044 
00045   virtual ~LFSCConvert(){}
00046 public:
00047   LFSCConvert( int lfscm );
00048   //main conversion function
00049   void convert( const Expr& pf );
00050   //get the results
00051   LFSCProof* getLFSCProof() { return pfinal.get(); }
00052 };
00053 
00054 #endif