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 #ifndef _CVC_lite__records_theorem_producer_h_
00029 #define _CVC_lite__records_theorem_producer_h_
00030
00031 #include "records_proof_rules.h"
00032 #include "theorem_producer.h"
00033 #include "theory_records.h"
00034
00035 namespace CVCL {
00036
00037 class RecordsTheoremProducer: public RecordsProofRules,
00038 public TheoremProducer {
00039 TheoryRecords* d_theoryRecords;
00040
00041 public:
00042
00043 RecordsTheoremProducer(TheoremManager* tm, TheoryRecords* t):
00044 TheoremProducer(tm), d_theoryRecords(t) { }
00045 Theorem rewriteLitSelect(const Expr &e);
00046 Theorem rewriteUpdateSelect(const Expr& e);
00047 Theorem rewriteLitUpdate(const Expr& e);
00048 Theorem expandEq(const Theorem& eqThrm);
00049 Theorem expandNeq(const Theorem& neqThrm);
00050 Theorem expandRecord(const Expr& e);
00051 Theorem expandTuple(const Expr& e);
00052
00053
00054
00055 bool isRecordType(const Expr& e)
00056 { return d_theoryRecords->isRecordType(e); }
00057
00058 bool isRecordType(const Type& t)
00059 { return d_theoryRecords->isRecordType(t); }
00060
00061 bool isRecordAccess(const Expr& e)
00062 { return d_theoryRecords->isRecordAccess(e); }
00063
00064 Expr recordExpr(const std::vector<std::string>& fields,
00065 const std::vector<Expr>& kids)
00066 { return d_theoryRecords->recordExpr(fields, kids); }
00067
00068 Expr recordExpr(const std::vector<Expr>& fields,
00069 const std::vector<Expr>& kids)
00070 { return d_theoryRecords->recordExpr(fields, kids); }
00071
00072 Type recordType(const std::vector<std::string>& fields,
00073 const std::vector<Type>& types)
00074 { return d_theoryRecords->recordType(fields, types); }
00075
00076 Type recordType(const std::vector<std::string>& fields,
00077 const std::vector<Expr>& types)
00078 { return d_theoryRecords->recordType(fields, types); }
00079
00080 Expr recordSelect(const Expr& r, const std::string& field)
00081 { return d_theoryRecords->recordSelect(r, field); }
00082
00083 Expr recordUpdate(const Expr& r, const std::string& field,
00084 const Expr& val)
00085 { return d_theoryRecords->recordUpdate(r, field, val); }
00086
00087 const std::vector<Expr>& getFields(const Expr& r)
00088 { return d_theoryRecords->getFields(r); }
00089
00090 const std::string& getField(const Expr& e, int i)
00091 { return d_theoryRecords->getField(e, i); }
00092
00093
00094 int getFieldIndex(const Expr& e, const std::string& field)
00095 { return d_theoryRecords->getFieldIndex(e, field); }
00096
00097 const std::string& getField(const Expr& e)
00098 { return d_theoryRecords->getField(e); }
00099
00100 Expr tupleExpr(const std::vector<Expr>& kids)
00101 { return d_theoryRecords->tupleExpr(kids); }
00102
00103 Type tupleType(const std::vector<Type>& types)
00104 { return d_theoryRecords->tupleType(types); }
00105
00106 Type tupleType(const std::vector<Expr>& types)
00107 { return d_theoryRecords->tupleType(types); }
00108
00109 Expr tupleSelect(const Expr& tup, int i)
00110 { return d_theoryRecords->tupleSelect(tup, i); }
00111
00112 Expr tupleUpdate(const Expr& tup, int i, const Expr& val)
00113 { return d_theoryRecords->tupleUpdate(tup, i, val); }
00114
00115 int getIndex(const Expr& e)
00116 { return d_theoryRecords->getIndex(e); }
00117
00118 bool isTupleAccess(const Expr& e)
00119 { return d_theoryRecords->isTupleAccess(e); }
00120 };
00121
00122 }
00123
00124 #endif