# CVCL::TheoryArith Class Reference [Theories]

This theory handles basic linear arithmetic. More...

`#include <theory_arith.h>`

Inheritance diagram for CVCL::TheoryArith:

[legend]
Collaboration diagram for CVCL::TheoryArith:

[legend]
List of all members.

## Detailed Description

This theory handles basic linear arithmetic.

Author: Clark Barrett

Created: Sat Feb 8 14:44:32 2003

Definition at line 84 of file theory_arith.h.

## Constructor & Destructor Documentation

 TheoryArith::TheoryArith ( VCL * vcl, TheoryCore * core )

 TheoryArith::~TheoryArith ( )
 Definition at line 1667 of file theory_arith.cpp.

## Member Function Documentation

 Theorem TheoryArith::isIntegerThm ( const Expr & e ) ` [private]`
 Check the term t for integrality. Returns:a theorem of IS_INTEGER(t) or Null. Definition at line 75 of file theory_arith.cpp.

 Theorem TheoryArith::isIntegerDerive ( const Expr & isIntE, const Theorem & thm ) ` [private]`
 A helper method for isIntegerThm(). Check if IS_INTEGER(e) is easily derivable from the given 'thm' Definition at line 83 of file theory_arith.cpp. Referenced by isIntegerThm(), and rewrite().

 bool CVCL::TheoryArith::isInteger ( const Expr & e ) ` [inline, private]`
 Check the term t for integrality (return bool). Definition at line 193 of file theory_arith.h. References isIntegerThm(), and CVCL::Theorem::isNull().

 const Rational & TheoryArith::freeConstIneq ( const Expr & ineq, bool varOnRHS ) ` [private]`
 Extract the free constant from an inequality. Definition at line 100 of file theory_arith.cpp. Referenced by isStale().

 const TheoryArith::FreeConst & TheoryArith::updateSubsumptionDB ( const Expr & ineq, bool varOnRHS, bool & subsumed ) ` [private]`
 Update the free constant subsumption database with new inequality. Returns:a reference to the max/min constant. Also, sets 'subsumed' argument to true if the inequality is subsumed by an existing inequality. Definition at line 118 of file theory_arith.cpp. Referenced by projectInequalities().

 bool TheoryArith::kidsCanonical ( const Expr & e ) ` [private]`
 Check if the kids of e are fully simplified and canonized (for debugging). Definition at line 187 of file theory_arith.cpp. Referenced by canon(), and canonSimplify().

 Theorem TheoryArith::canon ( const Expr & e ) ` [private]`
 Canonize the expression e, assuming all children are canonical. Definition at line 219 of file theory_arith.cpp.

 Theorem TheoryArith::canonRec ( const Expr & e ) ` [private]`
 Canonize the expression e recursively. Definition at line 367 of file theory_arith.cpp. Referenced by rewriteToDiff().

 Theorem CVCL::TheoryArith::canon ( const Theorem & thm ) ` [inline, private]`
 Composition of canon(const Expr&) by transitivity: take e0 = e1, canonize e1 to e2, return e0 = e2. Definition at line 212 of file theory_arith.h. References canon(), CVCL::Theorem::getRHS(), and CVCL::Theory::transitivityRule().

 Theorem TheoryArith::canonSimplify ( const Expr & e ) ` [private]`
 Canonize and reduce e w.r.t. union-find database; assume all children are canonical. Definition at line 391 of file theory_arith.cpp. Referenced by canonPred(), canonPredEquiv(), and canonSimplify().

 Theorem CVCL::TheoryArith::canonSimplify ( const Theorem & thm ) ` [inline, private]`
 Composition of canonSimplify(const Expr&) by transitivity: take e0 = e1, canonize and simplify e1 to e2, return e0 = e2. Definition at line 221 of file theory_arith.h.

 Theorem TheoryArith::canonPred ( const Theorem & thm ) ` [private]`
 Canonize predicate (x = y, x < y, etc.). accepts a theorem, canonizes it, applies iffMP and substituvity to derive the canonized thm Definition at line 420 of file theory_arith.cpp.

 Theorem TheoryArith::canonPredEquiv ( const Theorem & thm ) ` [private]`
 Canonize predicate like canonPred except that the input theorem is an equivalent transformation. Definition at line 434 of file theory_arith.cpp. Referenced by normalize(), and rewrite().

 Theorem TheoryArith::doSolve ( const Theorem & thm ) ` [private]`
 Solve an equation and return an equivalent Theorem in the solved form. Psuedo-code for doSolve. (Input is an equation) (output is a Theorem) translate e to the form e' = 0if (e'.isRational()) then {if e' != 0 return false else true}a for loop checks if all the variables are integers. if not isolate a suitable real variable and call processRealEq().if all variables are integers then isolate suitable variable and call processIntEq(). Definition at line 462 of file theory_arith.cpp. Referenced by solve().

 Theorem TheoryArith::canonConjunctionEquiv ( const Theorem & thm ) ` [private]`
 takes in a conjunction equivalence Thm and canonizes it. accepts an equivalence theorem whose RHS is a conjunction, canonizes it, applies iffMP and substituvity to derive the canonized thm Definition at line 449 of file theory_arith.cpp.

 Expr TheoryArith::pickIntEqMonomial ( const Expr & right ) ` [private]`
 picks the monomial with the smallest abs(coeff) from the input pick a monomial for the input equation. This function is used only if the equation is an integer equation. Choose the monomial with the smallest absolute value of coefficient. Definition at line 519 of file theory_arith.cpp. Referenced by processSimpleIntEq().

 Theorem TheoryArith::processRealEq ( const Theorem & eqn ) ` [private]`
 processes equalities with 1 or more vars of type REAL input is e1=e2<==>0=e' Theorem and some of the vars in e' are of type REAL. isolate one of them and send back to framework. output is "e1=e2 <==> var = e''" Theorem. Definition at line 551 of file theory_arith.cpp. Referenced by doSolve().

 Theorem TheoryArith::processIntEq ( const Theorem & eqn ) ` [private]`
 processes equalities whose vars are all of type INT input is e1=e2<==>0=e' Theorem and all of the vars in e' are of type INT. isolate one of them and send back to framework. output is "e1=e2 <==> var = e''" Theorem and some associated equations in solved form. Definition at line 773 of file theory_arith.cpp. Referenced by doSolve().

 Theorem TheoryArith::processSimpleIntEq ( const Theorem & eqn ) ` [private]`

One step of INT equality processing (aux. method for processIntEq()).

Parameters:
 eqn is a single equation 0 = e
Returns:
an equivalent Theorem (x = t AND 0 = e'), or just x = t

Definition at line 638 of file theory_arith.cpp.

Referenced by processIntEq().

 void TheoryArith::processBuffer ( ) ` [private]`
 Process inequalities in the buffer. Definition at line 936 of file theory_arith.cpp. Referenced by assertFact(), and checkSat().

 Theorem TheoryArith::isolateVariable ( const Theorem & inputThm, bool & e1 ) ` [private]`
 Take an inequality and isolate a variable. Definition at line 1006 of file theory_arith.cpp. Referenced by processBuffer().

 void TheoryArith::updateStats ( const Rational & c, const Expr & var ) ` [private]`
 Update the statistics counters for the variable with a coeff. c. Definition at line 961 of file theory_arith.cpp. Referenced by addToBuffer(), and updateStats().

 void TheoryArith::updateStats ( const Expr & monomial ) ` [private]`
 Update the statistics counters for the monomial. Definition at line 974 of file theory_arith.cpp. References CVCL::Expr::getRational(), separateMonomial(), and updateStats().

 void TheoryArith::addToBuffer ( const Theorem & thm ) ` [private]`
 Add an inequality to the input buffer. See also d_buffer. Definition at line 982 of file theory_arith.cpp. Referenced by assertFact(), and projectInequalities().

 Expr TheoryArith::computeNormalFactor ( const Expr & rhs ) ` [private]`
 Given a canonized term, compute a factor to make all coefficients integer and relatively prime. Definition at line 1076 of file theory_arith.cpp. Referenced by isolateVariable(), and normalize().

 Theorem TheoryArith::normalize ( const Expr & e ) ` [private]`
 Normalize an equation (make all coefficients rel. prime integers). accepts a rewrite theorem over eqn|ineqn and normalizes it and returns a theorem to that effect. assumes e is non-trivial i.e. e is not '0=const' or 'const=0' or '0 <= const' etc. Definition at line 2102 of file theory_arith.cpp. Referenced by doSolve(), normalize(), and rewrite().

 Theorem TheoryArith::normalize ( const Theorem & thm ) ` [private]`
 Normalize an equation (make all coefficients rel. prime integers). accepts a rewrite theorem over eqn|ineqn and normalizes it and returns a theorem to that effect. Definition at line 2163 of file theory_arith.cpp. References CVCL::Theorem::getRHS(), normalize(), and CVCL::Theory::transitivityRule().

 Expr TheoryArith::pickMonomial ( const Expr & right ) ` [private]`

 void TheoryArith::separateMonomial ( const Expr & e, Expr & c, Expr & var )
 Separate monomial e = c*p1*...*pn into c and 1*p1*...*pn. Definition at line 1176 of file theory_arith.cpp.

 bool TheoryArith::lessThanVar ( const Expr & isolatedVar, const Expr & var2 ) ` [private]`
 Definition at line 1118 of file theory_arith.cpp. References CVCL::isRational(), separateMonomial(), and CVCL::Expr::toString(). Referenced by pickMonomial().

 bool TheoryArith::isStale ( const Expr & e ) ` [private]`
 Check if the term expression is "stale". "Stale" means it contains non-simplified subexpressions. For terms, it checks the expression's find pointer; for formulas it checks the children recursively (no caching!). So, apply it with caution, and only to simple atomic formulas (like inequality). Definition at line 1134 of file theory_arith.cpp. Referenced by isStale(), processBuffer(), and projectInequalities().

 bool TheoryArith::isStale ( const Ineq & ineq ) ` [private]`
 Check if the inequality is "stale" or subsumed. Definition at line 1146 of file theory_arith.cpp.

 void TheoryArith::projectInequalities ( const Theorem & theInequality, bool isolatedVarOnRHS ) ` [private]`

 void TheoryArith::assignVariables ( std::vector< Expr > & v ) ` [private]`
 Definition at line 2031 of file theory_arith.cpp. Referenced by computeModelBasic().

 void TheoryArith::findRationalBound ( const Expr & varSide, const Expr & ratSide, const Expr & var, Rational & r ) ` [private]`
 Definition at line 1962 of file theory_arith.cpp. Referenced by findBounds().

 bool TheoryArith::findBounds ( const Expr & e, Rational & lub, Rational & glb ) ` [private]`
 Definition at line 1980 of file theory_arith.cpp. Referenced by assignVariables().

 Theorem TheoryArith::normalizeProjectIneqs ( const Theorem & ineqThm1, const Theorem & ineqThm2 ) ` [private]`

 Theorem CVCL::TheoryArith::solvedForm ( const std::vector< Theorem > & solvedEqs ) ` [private]`
 Take a system of equations and turn it into a solved form. Referenced by processIntEq().

 Theorem TheoryArith::substAndCanonize ( const Expr & t, ExprMap< Theorem > & subst ) ` [private]`
 Substitute all vars in term 't' according to the substitution 'subst' and canonize the result. ASSUMPTION: 't' is a fully canonized arithmetic term, and every element of subst is a fully canonized equation of the form x=e, indexed by the LHS variable. Definition at line 864 of file theory_arith.cpp. Referenced by substAndCanonize().

 Theorem TheoryArith::substAndCanonize ( const Theorem & eq, ExprMap< Theorem > & subst ) ` [private]`
 Substitute all vars in the RHS of the equation 'eq' of the form (x = t) according to the substitution 'subst', and canonize the result. ASSUMPTION: 't' is a fully canonized equation of the form x = t, and so is every element of subst, indexed by the LHS variable. Definition at line 915 of file theory_arith.cpp.

 void CVCL::TheoryArith::collectVars ( const Expr & e, std::vector< Expr > & vars, std::set< Expr > & cache ) ` [private]`
 Traverse 'e' and push all the i-leaves into 'vars' vector.

 void TheoryArith::processFiniteInterval ( const Theorem & alphaLEax, const Theorem & bxLEbeta ) ` [private]`
 Check if alpha <= ax & bx <= beta is a finite interval for integer var 'x', and assert the corresponding constraint. Definition at line 1691 of file theory_arith.cpp. Referenced by normalizeProjectIneqs(), and processFiniteIntervals().

 void TheoryArith::processFiniteIntervals ( const Expr & x ) ` [private]`
 For an integer var 'x', find and process all constraints A <= ax <= A+c. Definition at line 1749 of file theory_arith.cpp.

 void TheoryArith::setupRec ( const Expr & e ) ` [private]`
 Recursive setup for isolated inequalities (and other new expressions). This function recursively decends expression tree without caching until it hits a node that is already setup. Be careful on what expressions you are calling it. Definition at line 1775 of file theory_arith.cpp. Referenced by projectInequalities().

 bool TheoryArith::isSyntacticRational ( const Expr & e, Rational & r ) ` [private]`
 Return whether e is syntactically identical to a rational constant. Definition at line 2681 of file theory_arith.cpp. Referenced by print(), printMinus(), and printPlus().

 void TheoryArith::printRational ( ExprStream & os, const Expr & parent, const Expr & e, const Rational & r, bool checkLhs = `true` ) ` [private]`
 Print a rational in SMT-LIB format. Definition at line 2709 of file theory_arith.cpp. Referenced by print().

 bool TheoryArith::isSyntacticUMinusVar ( const Expr & e, Expr & var ) ` [private]`
 Return whether e is syntactically identical to unary minus of a var. Definition at line 2763 of file theory_arith.cpp. Referenced by printPlus().

 void TheoryArith::printPlus ( ExprStream & os, const Expr & parent, const Expr & e ) ` [private]`
 Print a PLUS expression in SMT-LIB format. Definition at line 2794 of file theory_arith.cpp. Referenced by print(), and printRational().

 void TheoryArith::printMinus ( ExprStream & os, const Expr & parent, const Expr & e ) ` [private]`
 Print a MINUS expression in SMT-LIB format. Definition at line 2841 of file theory_arith.cpp. Referenced by print(), and printRational().

 void TheoryArith::printLhs ( ExprStream & os, const Expr & e ) ` [private]`
 Print left hand side of an arithmetic atom, converting to DIFF logic if possible. Definition at line 2863 of file theory_arith.cpp. Referenced by print().

 bool TheoryArith::isAtomicArithTerm ( const Expr & e ) ` [private]`
 Whether any ite's appear in the arithmetic part of the term e. Definition at line 2966 of file theory_arith.cpp. Referenced by isAtomicArithFormula().

 bool CVCL::TheoryArith::realUsed ( ) ` [inline]`
 Return whether Reals are used. Definition at line 326 of file theory_arith.h. References d_realUsed.

 bool CVCL::TheoryArith::intUsed ( ) ` [inline]`
 Return whether Ints are used. Definition at line 328 of file theory_arith.h. References d_intConstUsed, d_intUsed, and d_realUsed.

 ArithLang CVCL::TheoryArith::getLangUsed ( ) ` [inline]`
 Return which subset of arithmetic is used. Definition at line 330 of file theory_arith.h. References d_langUsed.

 bool CVCL::TheoryArith::theoryUsed ( ) ` [inline, virtual]`
 Theory is used if any component is used. Reimplemented from CVCL::Theory. Definition at line 332 of file theory_arith.h. References d_intConstUsed, d_intUsed, d_langUsed, d_realUsed, and CVCL::NOT_USED.

 Expr TheoryArith::rewriteToDiff ( const Expr & e )
 Rewrite an atom to look like x - y op c if possible--for smtlib translation. Definition at line 2895 of file theory_arith.cpp. Referenced by CVCL::Translator::preprocessRec().

 bool TheoryArith::isAtomicArithFormula ( const Expr & e )
 Whether any ite's appear in the arithmetic part of the formula e. Definition at line 2994 of file theory_arith.cpp. References CVCL::EQ, CVCL::GE, CVCL::Expr::getKind(), CVCL::GT, isAtomicArithTerm(), CVCL::LE, and CVCL::LT. Referenced by CVCL::Translator::preprocessRec(), and print().

 ArithProofRules * TheoryArith::createProofRules ( )
 Definition at line 50 of file arith_theorem_producer.cpp. References CVCL::Theory::theoryCore(). Referenced by TheoryArith().

 void TheoryArith::addSharedTerm ( const Expr & e ) ` [virtual]`
 Keep track of all finitely bounded integer variables in shared terms. When a new shared term t is reported, all of its variables x1...xn are added to the set d_sharedVars. For each newly added variable x, check all of its opposing inequalities, find out all the finite bounds and assert the corresponding GRAY_SHADOW constraints. When projecting integer inequalities, the database d_sharedVars is consulted, and if the variable is in it, check the shadows for being a finite interval, and produce the additional GRAY_SHADOW constraints. Reimplemented from CVCL::Theory. Definition at line 1804 of file theory_arith.cpp. References d_sharedTerms.

 void TheoryArith::assertFact ( const Theorem & e ) ` [virtual]`
 Assert a new fact to the decision procedure. Each fact that makes it into the core framework is assigned to exactly one theory: the theory associated with that fact. assertFact is called to inform the theory that a new fact has been assigned to the theory. Implements CVCL::Theory. Definition at line 1821 of file theory_arith.cpp.

 void TheoryArith::refineCounterExample ( ) ` [virtual]`
 Process disequalities from the arrangement for model generation. Reimplemented from CVCL::Theory. Definition at line 1931 of file theory_arith.cpp.

 void TheoryArith::computeModelBasic ( const std::vector< Expr > & v ) ` [virtual]`
 Assign concrete values to basic-type variables in v. Reimplemented from CVCL::Theory. Definition at line 2065 of file theory_arith.cpp. References assignVariables(), d_inModelCreation, CVCL::Theory::findExpr(), and CVCL::TRACE.

 void CVCL::TheoryArith::computeModel ( const Expr & e, std::vector< Expr > & vars ) ` [virtual]`

Compute the value of a compound variable from the more primitive ones.

The more primitive variables for e are already assigned concrete values, and are available through getModelValue().

The new value for e must be assigned using assignValue() method.

Parameters:
 e is the compound type expression to assign a value; vars are the variables actually assigned. Normally, 'e' is the only element of vars. However, e.g. in the case of uninterpreted functions, assigning 'f' means assigning all relevant applications of 'f' to constant values (f(0), f(5), etc.). Such applications might not be known before the model is constructed (they may be of the form f(x), f(y+z), etc., where x,y,z are still unassigned).
Populating 'vars' is an opportunity for a DP to change the set of top-level "variables" to assign, if needed. In particular, it may drop 'e' from the model entirely, if it is already a concrete value by itself.

Reimplemented from CVCL::Theory.

 void TheoryArith::checkSat ( bool fullEffort ) ` [virtual]`

Check for satisfiability in the theory.

Parameters:
 fullEffort when it is false, checkSat can do as much or as little work as it likes, though simple inferences and checks for consistency should be done to increase efficiency. If fullEffort is true, checkSat must check whether the set of facts given by assertFact together with the arrangement of shared terms (provided by addSharedTerm) induced by the global find database equivalence relation are satisfiable. If satisfiable, checkSat does nothing.
If satisfiability can be acheived by merging some of the shared terms, a new fact must be enqueued using enqueueFact (this fact need not be a literal). If there is no way to make things satisfiable, setInconsistent must be called.

Implements CVCL::Theory.

Definition at line 1909 of file theory_arith.cpp.

 Theorem TheoryArith::rewrite ( const Expr & e ) ` [virtual]`
 Theory-specific rewrite rules. By default, rewrite just returns a reflexive theorem stating that the input expression is equivalent to itself. However, rewrite is allowed to return any theorem which describes how the input expression is equivalent to some new expression. rewrite should be used to perform simplifications, normalization, and any other preprocessing on theory-specific expressions that needs to be done. Reimplemented from CVCL::Theory. Definition at line 2168 of file theory_arith.cpp. Referenced by update().

 void TheoryArith::setup ( const Expr & e ) ` [virtual]`
 Set up the term e for call-backs when e or its children change. setup is called once for each expression associated with the theory. It is typically used to setup theory-specific data for an expression and to add call-back information for use with update. See also:update Reimplemented from CVCL::Theory. Definition at line 2296 of file theory_arith.cpp. Referenced by setupRec().

 void TheoryArith::update ( const Theorem & e, const Expr & d ) ` [virtual]`
 Notify a theory of a new equality. update is a call-back used by the notify mechanism of the core theory. It works as follows. When an equation t1 = t2 makes it into the core framework, the two find equivalence classes for t1 and t2 are merged. The result is that t2 is the new equivalence class representative and t1 is no longer an equivalence class representative. When this happens, the notify list of t1 is traversed. Notify list entries consist of a theory and an expression d. For each entry (i,d), i->update(e, d) is called, where e is the theorem corresponding to the equality t1=t2. To add the entry (i,d) to a term t1's notify list, a call must be made to t1.addNotify(i,d). This is typically done in setup. See also:setup Reimplemented from CVCL::Theory. Definition at line 2318 of file theory_arith.cpp.

 Theorem TheoryArith::solve ( const Theorem & thm ) ` [virtual]`
 An optional solver. The solve method can be used to implement a Shostak-style solver. Since solvers do not in general combine, the following technique is used. One theory is designated as the primary solver (in our case, it is the theory of arithmetic). For each equation that enters the core framework, the primary solver is called to ensure that the equation is in solved form with respect to the primary theory. After the primary solver, the solver for the theory associated with the equation is called. This solver can do whatever it likes, as long as the result is still in solved form with respect to the primary solver. This is a slight generalization of what is described in my (Clark)'s PhD thesis. Reimplemented from CVCL::Theory. Definition at line 2367 of file theory_arith.cpp.

 void TheoryArith::checkType ( const Expr & e ) ` [virtual]`
 Check that e is a valid Type expr. Reimplemented from CVCL::Theory. Definition at line 2440 of file theory_arith.cpp.

 void TheoryArith::computeType ( const Expr & e ) ` [virtual]`

Compute and store the type of e.

Parameters:
 e is the expression whose type is computed.
This function computes the type of the top-level operator of e, and recurses into children using getType(), if necessary.

Reimplemented from CVCL::Theory.

Definition at line 2464 of file theory_arith.cpp.

 Type TheoryArith::computeBaseType ( const Type & t ) ` [virtual]`
 Compute the base type of the top-level operator of an arbitrary type. Reimplemented from CVCL::Theory. Definition at line 2544 of file theory_arith.cpp.

 void TheoryArith::computeModelTerm ( const Expr & e, std::vector< Expr > & v ) ` [virtual]`
 Add variables from 'e' to 'v' for constructing a concrete model. If e is already of primitive type, do NOT add it to v. Reimplemented from CVCL::Theory. Definition at line 2394 of file theory_arith.cpp.

 Expr TheoryArith::computeTypePred ( const Type & t, const Expr & e ) ` [virtual]`
 Theory specific computation of the subtyping predicate for type t applied to the expression e. By default returns true. Each theory needs to compute subtype predicates for the types associated with it. So, for example, the theory of records will take a record type [# f1: T1, f2: T2 #] and an expression e and will return the subtyping predicate for e, namely: computeTypePred(T1, e.f1) AND computeTypePred(T2, e.f2) Reimplemented from CVCL::Theory. Definition at line 2422 of file theory_arith.cpp.

 Expr TheoryArith::computeTCC ( const Expr & e ) ` [virtual]`

Compute and cache the TCC of e.

Parameters:
 e is an expression (term or formula). This function computes the TCC of e which is true iff the expression is defined.
This function computes the TCC or predicate of the top-level operator of e, and recurses into children using getTCC(), if necessary.

The default implementation is to compute TCCs recursively for all children, and return their conjunction.

Reimplemented from CVCL::Theory.

Definition at line 2553 of file theory_arith.cpp.

References CVCL::Expr::andExpr(), CVCL::Theory::computeTCC(), CVCL::DIVIDE, and rat().

 ExprStream & TheoryArith::print ( ExprStream & os, const Expr & e ) ` [virtual]`
 Theory-specific pretty-printing. By default, print the top node in AST, and resume pretty-printing the children. The same call e.print(os) can be used in DP-specific printers to use AST printing for the given node. In fact, it is strongly recommended to add e.print(os) as the default for all the cases/kinds that are not handled by the particular pretty-printer. Reimplemented from CVCL::Theory. Definition at line 3009 of file theory_arith.cpp.

 Expr TheoryArith::parseExprOp ( const Expr & e ) ` [virtual]`
 Theory-specific parsing implemented by the DP. Reimplemented from CVCL::Theory. Definition at line 2569 of file theory_arith.cpp.

 Type CVCL::TheoryArith::realType ( ) ` [inline]`
 Definition at line 364 of file theory_arith.h. References d_realType.

 Type CVCL::TheoryArith::intType ( ) ` [inline]`
 Definition at line 365 of file theory_arith.h. References d_intType. Referenced by CVCL::VCL::intType(), and CVCL::ArithTheoremProducer::intType().

 Type CVCL::TheoryArith::subrangeType ( const Expr & l, const Expr & r ) ` [inline]`
 Definition at line 366 of file theory_arith.h. References CVCL::SUBRANGE. Referenced by CVCL::VCL::subrangeType().

 Expr CVCL::TheoryArith::rat ( Rational r ) ` [inline]`
 Definition at line 368 of file theory_arith.h. References CVCL::Theory::getEM(), and CVCL::ExprManager::newRatExpr().

 Expr CVCL::TheoryArith::darkShadow ( const Expr & lhs, const Expr & rhs ) ` [inline]`
 Construct the dark shadow expression representing lhs <= rhs. Definition at line 371 of file theory_arith.h. References CVCL::DARK_SHADOW. Referenced by CVCL::ArithTheoremProducer::darkShadow().

 Expr CVCL::TheoryArith::grayShadow ( const Expr & v, const Expr & e, const Rational & c1, const Rational & c2 ) ` [inline]`
 Construct the gray shadow expression representing c1 <= v - e <= c2. Alternatively, v = e + i for some i s.t. c1 <= i <= c2 Definition at line 377 of file theory_arith.h. References CVCL::GRAY_SHADOW, and rat(). Referenced by CVCL::ArithTheoremProducer::grayShadow().

## Friends And Related Function Documentation

 std::ostream& operator<< ( std::ostream & os, const FreeConst & fc ) ` [friend]`
 Printing.

 std::ostream& operator<< ( std::ostream & os, const Ineq & ineq ) ` [friend]`
 Printing.

## Member Data Documentation

 Type CVCL::TheoryArith::d_realType` [private]`
 Definition at line 85 of file theory_arith.h. Referenced by computeType(), realType(), and TheoryArith().

 Type CVCL::TheoryArith::d_intType` [private]`
 Definition at line 86 of file theory_arith.h. Referenced by computeType(), intType(), and TheoryArith().

 CDList CVCL::TheoryArith::d_diseq` [private]`
 Definition at line 87 of file theory_arith.h. Referenced by assertFact(), checkSat(), and TheoryArith().

 CDO CVCL::TheoryArith::d_diseqIdx` [private]`
 Definition at line 88 of file theory_arith.h. Referenced by checkSat().

 ArithProofRules* CVCL::TheoryArith::d_rules` [private]`
 Definition at line 89 of file theory_arith.h.

 CDO CVCL::TheoryArith::d_inModelCreation` [private]`
 Definition at line 90 of file theory_arith.h. Referenced by assertFact(), checkSat(), computeModelBasic(), and refineCounterExample().

 bool CVCL::TheoryArith::d_realUsed` [private]`
 Definition at line 91 of file theory_arith.h. Referenced by intUsed(), print(), printRational(), realUsed(), and theoryUsed().

 bool CVCL::TheoryArith::d_intUsed` [private]`
 Definition at line 92 of file theory_arith.h. Referenced by intUsed(), print(), and theoryUsed().

 bool CVCL::TheoryArith::d_intConstUsed` [private]`
 Definition at line 93 of file theory_arith.h. Referenced by intUsed(), printRational(), and theoryUsed().

 ArithLang CVCL::TheoryArith::d_langUsed` [private]`
 Definition at line 94 of file theory_arith.h. Referenced by getLangUsed(), print(), printMinus(), printPlus(), printRational(), and theoryUsed().

 std::string CVCL::TheoryArith::d_convertToDiff` [private]`
 Definition at line 95 of file theory_arith.h. Referenced by printLhs(), printRational(), rewriteToDiff(), and TheoryArith().

 Expr CVCL::TheoryArith::d_zeroVar` [private]`
 Definition at line 96 of file theory_arith.h. Referenced by printLhs(), rewriteToDiff(), and TheoryArith().

 ExprMap *> CVCL::TheoryArith::d_inequalitiesRightDB` [private]`
 Database of inequalities with a variable isolated on the right. Definition at line 137 of file theory_arith.h. Referenced by findBounds(), processFiniteIntervals(), projectInequalities(), and ~TheoryArith().

 ExprMap *> CVCL::TheoryArith::d_inequalitiesLeftDB` [private]`
 Database of inequalities with a variable isolated on the left. Definition at line 139 of file theory_arith.h. Referenced by findBounds(), processFiniteIntervals(), projectInequalities(), and ~TheoryArith().

 CDMap CVCL::TheoryArith::d_freeConstDB` [private]`
 Mapping of inequalities to the largest/smallest free constant. The Expr is the original inequality with the free constant removed and inequality converted to non-strict (for indexing purposes). I.e. ax, the smallest (largest for c+t

 CDList CVCL::TheoryArith::d_buffer` [private]`
 Buffer of input inequalities. Definition at line 150 of file theory_arith.h. Referenced by addToBuffer(), assertFact(), checkSat(), processBuffer(), and TheoryArith().

 CDO CVCL::TheoryArith::d_bufferIdx` [private]`
 Buffer index of the next unprocessed inequality. Definition at line 151 of file theory_arith.h. Referenced by assertFact(), checkSat(), processBuffer(), and TheoryArith().

 const int* CVCL::TheoryArith::d_bufferThres` [private]`
 Threshold when the buffer must be processed. Definition at line 152 of file theory_arith.h. Referenced by assertFact().

 CDMap CVCL::TheoryArith::d_countRight` [private]`
 Mapping of a variable to the number of inequalities where the variable would be isolated on the right. Definition at line 156 of file theory_arith.h. Referenced by pickMonomial(), and updateStats().

 CDMap CVCL::TheoryArith::d_countLeft` [private]`
 Mapping of a variable to the number of inequalities where the variable would be isolated on the left. Definition at line 159 of file theory_arith.h. Referenced by pickMonomial(), and updateStats().

 CDMap CVCL::TheoryArith::d_sharedTerms` [private]`
 Set of shared terms (for counterexample generation). Definition at line 161 of file theory_arith.h. Referenced by addSharedTerm(), and refineCounterExample().

 CDMap CVCL::TheoryArith::d_sharedVars` [private]`
 Set of shared integer variables (i-leaves). Definition at line 163 of file theory_arith.h.

 VarOrderGraph CVCL::TheoryArith::d_graph` [private]`
 Definition at line 183 of file theory_arith.h. Referenced by assignVariables(), and pickMonomial().

The documentation for this class was generated from the following files:
Generated on Thu Apr 13 16:57:44 2006 for CVC Lite by  1.4.4