1 /********************* */
2 /*! \file theory_arith.cpp
4 ** Original author: Tim King
5 ** Major contributors: Morgan Deters
6 ** Minor contributors (to current version): Andrew Reynolds, Tianyi Liang, Dejan Jovanovic
7 ** This file is part of the CVC4 project.
8 ** Copyright (c) 2009-2013 New York University and The University of Iowa
9 ** See the file COPYING in the top-level source directory for licensing
10 ** information.\endverbatim
12 ** \brief [[ Add one-line brief description here ]]
14 ** [[ Add lengthier description here ]]
15 ** \todo document this file
18 #include "theory/arith/theory_arith.h"
19 #include "theory/arith/theory_arith_private.h"
22 using namespace CVC4::kind
;
28 TheoryArith::TheoryArith(context::Context
* c
, context::UserContext
* u
, OutputChannel
& out
, Valuation valuation
, const LogicInfo
& logicInfo
)
29 : Theory(THEORY_ARITH
, c
, u
, out
, valuation
, logicInfo
)
30 , d_internal(new TheoryArithPrivate(*this, c
, u
, out
, valuation
, logicInfo
))
33 TheoryArith::~TheoryArith(){
37 void TheoryArith::preRegisterTerm(TNode n
){
38 d_internal
->preRegisterTerm(n
);
41 void TheoryArith::setMasterEqualityEngine(eq::EqualityEngine
* eq
) {
42 d_internal
->setMasterEqualityEngine(eq
);
45 void TheoryArith::setQuantifiersEngine(QuantifiersEngine
* qe
) {
46 this->Theory::setQuantifiersEngine(qe
);
47 d_internal
->setQuantifiersEngine(qe
);
50 void TheoryArith::addSharedTerm(TNode n
){
51 d_internal
->addSharedTerm(n
);
54 Node
TheoryArith::ppRewrite(TNode atom
) {
55 CodeTimer
timer(d_ppRewriteTimer
, /* allow_reentrant = */ true);
56 return d_internal
->ppRewrite(atom
);
59 Theory::PPAssertStatus
TheoryArith::ppAssert(TNode in
, SubstitutionMap
& outSubstitutions
) {
60 return d_internal
->ppAssert(in
, outSubstitutions
);
63 void TheoryArith::ppStaticLearn(TNode n
, NodeBuilder
<>& learned
) {
64 d_internal
->ppStaticLearn(n
, learned
);
67 void TheoryArith::check(Effort effortLevel
){
68 d_internal
->check(effortLevel
);
71 Node
TheoryArith::explain(TNode n
) {
72 return d_internal
->explain(n
);
75 void TheoryArith::propagate(Effort e
) {
76 d_internal
->propagate(e
);
79 void TheoryArith::collectModelInfo( TheoryModel
* m
, bool fullModel
){
80 d_internal
->collectModelInfo(m
, fullModel
);
83 void TheoryArith::notifyRestart(){
84 d_internal
->notifyRestart();
87 void TheoryArith::presolve(){
88 d_internal
->presolve();
91 EqualityStatus
TheoryArith::getEqualityStatus(TNode a
, TNode b
) {
92 return d_internal
->getEqualityStatus(a
,b
);
95 Node
TheoryArith::getModelValue(TNode var
) {
96 return d_internal
->getModelValue( var
);
99 }/* CVC4::theory::arith namespace */
100 }/* CVC4::theory namespace */
101 }/* CVC4 namespace */