Smt2::Smt2(ExprManager* exprManager, Input* input, bool strictMode, bool parseOnly) : Parser(exprManager,input,strictMode,parseOnly), d_logicSet(false) { if( !strictModeEnabled() ) { addTheory(Smt2::THEORY_CORE); } }
Tptp::Tptp(ExprManager* exprManager, Input* input, bool strictMode, bool parseOnly) : Parser(exprManager, input, strictMode, parseOnly), d_cnf(false), d_fof(false) { addTheory(Tptp::THEORY_CORE); /* Try to find TPTP dir */ // From tptp4x FileUtilities //----Try the TPTP directory, and TPTP variations char* home = getenv("TPTP"); if(home == NULL) { home = getenv("TPTP_HOME"); // //----If no TPTP_HOME, try the tptp user (aaargh) // if(home == NULL && (PasswdEntry = getpwnam("tptp")) != NULL) { // home = PasswdEntry->pw_dir; // } //----Now look in the TPTP directory from there if(home != NULL) { d_tptpDir = home; d_tptpDir.append("/TPTP/"); } } else { d_tptpDir = home; //add trailing "/" if(d_tptpDir[d_tptpDir.size() - 1] != '/') { d_tptpDir.append("/"); } } d_hasConjecture = false; }
void Smt2::setLogic(const std::string& name) { d_logicSet = true; if(logicIsForced()) { d_logic = getForcedLogic(); } else { d_logic = name; } // Core theory belongs to every logic addTheory(THEORY_CORE); if(d_logic.isTheoryEnabled(theory::THEORY_UF)) { addTheory(THEORY_UF); } if(d_logic.isTheoryEnabled(theory::THEORY_ARITH)) { if(d_logic.areIntegersUsed()) { if(d_logic.areRealsUsed()) { addTheory(THEORY_REALS_INTS); } else { addTheory(THEORY_INTS); } } else if(d_logic.areRealsUsed()) { addTheory(THEORY_REALS); } } if(d_logic.isTheoryEnabled(theory::THEORY_ARRAY)) { addTheory(THEORY_ARRAYS); } if(d_logic.isTheoryEnabled(theory::THEORY_BV)) { addTheory(THEORY_BITVECTORS); } if(d_logic.isTheoryEnabled(theory::THEORY_DATATYPES)) { addTheory(THEORY_DATATYPES); } if(d_logic.isTheoryEnabled(theory::THEORY_SETS)) { addTheory(THEORY_SETS); } if(d_logic.isTheoryEnabled(theory::THEORY_STRINGS)) { addTheory(THEORY_STRINGS); } if(d_logic.isQuantified()) { addTheory(THEORY_QUANTIFIERS); } }/* Smt2::setLogic() */