From: Mathias Preiner Date: Tue, 29 Mar 2022 23:23:01 +0000 (-0700) Subject: Introduce internal namespace and remove api namespace. (#8443) X-Git-Tag: cvc5-1.0.0~134 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bbcd471ed40c813c48957ced5596471cc0ccebe9;p=cvc5.git Introduce internal namespace and remove api namespace. (#8443) The public cvc5 API now lives in the cvc5 namespace. All internal parts were moved into the (new) internal namespace. The final hierarchy will be as follows: cvc5 ~~ public API ::context ::internal ::parser ::main After this PR it will be: cvc5 ~~ public API ::internal ::context ::main ::parser --- diff --git a/.github/actions/run-tests/action.yml b/.github/actions/run-tests/action.yml index 1498adfcd..ae0ddb55b 100644 --- a/.github/actions/run-tests/action.yml +++ b/.github/actions/run-tests/action.yml @@ -34,7 +34,7 @@ runs: run: | if [[ "${{ inputs.check-install }}" != "true" ]]; then exit 0; fi make -j${{ env.num_proc }} install - echo -e "#include \nint main() { cvc5::api::Solver s; return 0; }" > /tmp/test.cpp + echo -e "#include \nint main() { cvc5::Solver s; return 0; }" > /tmp/test.cpp g++ -std=c++17 /tmp/test.cpp -I install/include -L install/lib -lcvc5 working-directory: ${{ inputs.build-dir }} diff --git a/examples/api/cpp/bitvectors.cpp b/examples/api/cpp/bitvectors.cpp index e6d57d896..653a130d2 100644 --- a/examples/api/cpp/bitvectors.cpp +++ b/examples/api/cpp/bitvectors.cpp @@ -20,7 +20,7 @@ #include using namespace std; -using namespace cvc5::api; +using namespace cvc5; int main() { diff --git a/examples/api/cpp/bitvectors_and_arrays.cpp b/examples/api/cpp/bitvectors_and_arrays.cpp index 5e8d589c0..93a574446 100644 --- a/examples/api/cpp/bitvectors_and_arrays.cpp +++ b/examples/api/cpp/bitvectors_and_arrays.cpp @@ -21,7 +21,7 @@ #include using namespace std; -using namespace cvc5::api; +using namespace cvc5; int main() { diff --git a/examples/api/cpp/combination.cpp b/examples/api/cpp/combination.cpp index d5d031f5c..c3af0c423 100644 --- a/examples/api/cpp/combination.cpp +++ b/examples/api/cpp/combination.cpp @@ -22,7 +22,7 @@ #include using namespace std; -using namespace cvc5::api; +using namespace cvc5; void prefixPrintGetValue(Solver& slv, Term t, int level = 0) { diff --git a/examples/api/cpp/datatypes.cpp b/examples/api/cpp/datatypes.cpp index 2e2bb842e..08346568e 100644 --- a/examples/api/cpp/datatypes.cpp +++ b/examples/api/cpp/datatypes.cpp @@ -17,7 +17,7 @@ #include -using namespace cvc5::api; +using namespace cvc5; void test(Solver& slv, Sort& consListSort) { diff --git a/examples/api/cpp/extract.cpp b/examples/api/cpp/extract.cpp index 5d81d8122..bc5f1e26f 100644 --- a/examples/api/cpp/extract.cpp +++ b/examples/api/cpp/extract.cpp @@ -20,7 +20,7 @@ #include using namespace std; -using namespace cvc5::api; +using namespace cvc5; int main() { diff --git a/examples/api/cpp/floating_point_arith.cpp b/examples/api/cpp/floating_point_arith.cpp index d77cdee3f..bbac66201 100644 --- a/examples/api/cpp/floating_point_arith.cpp +++ b/examples/api/cpp/floating_point_arith.cpp @@ -24,7 +24,7 @@ #include using namespace std; -using namespace cvc5::api; +using namespace cvc5; int main() { diff --git a/examples/api/cpp/helloworld.cpp b/examples/api/cpp/helloworld.cpp index 957cc8937..c89ac8241 100644 --- a/examples/api/cpp/helloworld.cpp +++ b/examples/api/cpp/helloworld.cpp @@ -17,7 +17,7 @@ #include -using namespace cvc5::api; +using namespace cvc5; int main() { diff --git a/examples/api/cpp/linear_arith.cpp b/examples/api/cpp/linear_arith.cpp index a02484534..e169d804b 100644 --- a/examples/api/cpp/linear_arith.cpp +++ b/examples/api/cpp/linear_arith.cpp @@ -19,7 +19,7 @@ #include using namespace std; -using namespace cvc5::api; +using namespace cvc5; int main() { diff --git a/examples/api/cpp/quickstart.cpp b/examples/api/cpp/quickstart.cpp index 309459f73..9a65e405b 100644 --- a/examples/api/cpp/quickstart.cpp +++ b/examples/api/cpp/quickstart.cpp @@ -19,7 +19,7 @@ #include #include -using namespace cvc5::api; +using namespace cvc5; int main() { diff --git a/examples/api/cpp/relations.cpp b/examples/api/cpp/relations.cpp index d19e91cea..b86d4ea2d 100644 --- a/examples/api/cpp/relations.cpp +++ b/examples/api/cpp/relations.cpp @@ -17,7 +17,7 @@ #include -using namespace cvc5::api; +using namespace cvc5; int main() { diff --git a/examples/api/cpp/sequences.cpp b/examples/api/cpp/sequences.cpp index d9ba3c7b1..9ef86678f 100644 --- a/examples/api/cpp/sequences.cpp +++ b/examples/api/cpp/sequences.cpp @@ -17,7 +17,7 @@ #include -using namespace cvc5::api; +using namespace cvc5; int main() { diff --git a/examples/api/cpp/sets.cpp b/examples/api/cpp/sets.cpp index a517ba2e2..d68807f9f 100644 --- a/examples/api/cpp/sets.cpp +++ b/examples/api/cpp/sets.cpp @@ -18,7 +18,7 @@ #include using namespace std; -using namespace cvc5::api; +using namespace cvc5; int main() { diff --git a/examples/api/cpp/strings.cpp b/examples/api/cpp/strings.cpp index 7b374cebd..aed7e4ff8 100644 --- a/examples/api/cpp/strings.cpp +++ b/examples/api/cpp/strings.cpp @@ -17,7 +17,7 @@ #include -using namespace cvc5::api; +using namespace cvc5; int main() { diff --git a/examples/api/cpp/sygus-fun.cpp b/examples/api/cpp/sygus-fun.cpp index 630598cac..895a791d6 100644 --- a/examples/api/cpp/sygus-fun.cpp +++ b/examples/api/cpp/sygus-fun.cpp @@ -54,7 +54,7 @@ #include "utils.h" -using namespace cvc5::api; +using namespace cvc5; int main() { diff --git a/examples/api/cpp/sygus-grammar.cpp b/examples/api/cpp/sygus-grammar.cpp index 4d543039c..a6a1dfede 100644 --- a/examples/api/cpp/sygus-grammar.cpp +++ b/examples/api/cpp/sygus-grammar.cpp @@ -51,7 +51,7 @@ #include "utils.h" -using namespace cvc5::api; +using namespace cvc5; int main() { diff --git a/examples/api/cpp/sygus-inv.cpp b/examples/api/cpp/sygus-inv.cpp index ba7b5ff93..d872ca5fd 100644 --- a/examples/api/cpp/sygus-inv.cpp +++ b/examples/api/cpp/sygus-inv.cpp @@ -42,7 +42,7 @@ #include "utils.h" -using namespace cvc5::api; +using namespace cvc5; int main() { diff --git a/examples/api/cpp/transcendentals.cpp b/examples/api/cpp/transcendentals.cpp index 2b530ae70..c2c57be8b 100644 --- a/examples/api/cpp/transcendentals.cpp +++ b/examples/api/cpp/transcendentals.cpp @@ -18,7 +18,7 @@ #include using namespace std; -using namespace cvc5::api; +using namespace cvc5; int main() { diff --git a/examples/api/cpp/utils.cpp b/examples/api/cpp/utils.cpp index 69676819a..bb2573843 100644 --- a/examples/api/cpp/utils.cpp +++ b/examples/api/cpp/utils.cpp @@ -24,12 +24,11 @@ * @param body the function body * @return a string version of define-fun */ -std::string defineFunToString(const cvc5::api::Term& f, - const std::vector params, - const cvc5::api::Term body) +std::string defineFunToString(const cvc5::Term& f, + const std::vector params, + const cvc5::Term body) { - - cvc5::api::Sort sort = f.getSort(); + cvc5::Sort sort = f.getSort(); if (sort.isFunction()) { sort = sort.getFunctionCodomainSort(); @@ -48,16 +47,16 @@ std::string defineFunToString(const cvc5::api::Term& f, return ss.str(); } -void printSynthSolutions(const std::vector& terms, - const std::vector& sols) +void printSynthSolutions(const std::vector& terms, + const std::vector& sols) { std::cout << '(' << std::endl; for (size_t i = 0, n = terms.size(); i < n; ++i) { - std::vector params; - cvc5::api::Term body; - if (sols[i].getKind() == cvc5::api::LAMBDA) + std::vector params; + cvc5::Term body; + if (sols[i].getKind() == cvc5::LAMBDA) { params.insert(params.end(), sols[i][0].begin(), sols[i][0].end()); body = sols[i][1]; diff --git a/examples/api/cpp/utils.h b/examples/api/cpp/utils.h index 69cddee26..c6393427f 100644 --- a/examples/api/cpp/utils.h +++ b/examples/api/cpp/utils.h @@ -23,7 +23,7 @@ * @param terms the terms for which the synthesis solutions were retrieved * @param sols the synthesis solutions of the given terms */ -void printSynthSolutions(const std::vector& terms, - const std::vector& sols); +void printSynthSolutions(const std::vector& terms, + const std::vector& sols); #endif // CVC5__UTILS_H diff --git a/examples/nra-translate/normalize.cpp b/examples/nra-translate/normalize.cpp index de00cd745..6a116d3d9 100644 --- a/examples/nra-translate/normalize.cpp +++ b/examples/nra-translate/normalize.cpp @@ -41,8 +41,8 @@ int main(int argc, char* argv[]) // Create the expression manager Options options; options.setInputLanguage(language::input::LANG_SMTLIB_V2); - std::unique_ptr solver = - std::unique_ptr(new api::Solver(&options)); + std::unique_ptr solver = + std::unique_ptr(new Solver(&options)); cout << language::SetLanguage(language::output::LANG_SMTLIB_V2) << expr::ExprSetDepth(-1); diff --git a/examples/nra-translate/smt2info.cpp b/examples/nra-translate/smt2info.cpp index 73b7e6f9a..a6a210d02 100644 --- a/examples/nra-translate/smt2info.cpp +++ b/examples/nra-translate/smt2info.cpp @@ -75,8 +75,8 @@ int main(int argc, char* argv[]) // Create the expression manager Options options; options.setInputLanguage(language::input::LANG_SMTLIB_V2); - std::unique_ptr solver = - std::unique_ptr(new api::Solver(&options)); + std::unique_ptr solver = + std::unique_ptr(new Solver(&options)); // Create the parser ParserBuilder parserBuilder(solver.get(), input, options); diff --git a/examples/nra-translate/smt2todreal.cpp b/examples/nra-translate/smt2todreal.cpp index dd4d97c2c..1b3bbdbdb 100644 --- a/examples/nra-translate/smt2todreal.cpp +++ b/examples/nra-translate/smt2todreal.cpp @@ -42,8 +42,8 @@ int main(int argc, char* argv[]) Options options; options.setInputLanguage(language::input::LANG_SMTLIB_V2); options.setOutputLanguage(language::output::LANG_SMTLIB_V2); - std::unique_ptr solver = - std::unique_ptr(new api::Solver(&options)); + std::unique_ptr solver = + std::unique_ptr(new Solver(&options)); cout << expr::ExprDag(0) << expr::ExprSetDepth(-1); diff --git a/examples/nra-translate/smt2toisat.cpp b/examples/nra-translate/smt2toisat.cpp index 9cde61d28..9dfdfde4f 100644 --- a/examples/nra-translate/smt2toisat.cpp +++ b/examples/nra-translate/smt2toisat.cpp @@ -46,8 +46,8 @@ int main(int argc, char* argv[]) // Create the expression manager Options options; options.setInputLanguage(language::input::LANG_SMTLIB_V2); - std::unique_ptr solver = - std::unique_ptr(new api::Solver(&options)); + std::unique_ptr solver = + std::unique_ptr(new Solver(&options)); // Create the parser ParserBuilder parserBuilder(solver.get(), input, options); diff --git a/examples/nra-translate/smt2tomathematica.cpp b/examples/nra-translate/smt2tomathematica.cpp index de91cb95e..5a2a5ce0a 100644 --- a/examples/nra-translate/smt2tomathematica.cpp +++ b/examples/nra-translate/smt2tomathematica.cpp @@ -45,8 +45,8 @@ int main(int argc, char* argv[]) // Create the expression manager Options options; options.setInputLanguage(language::input::LANG_SMTLIB_V2); - std::unique_ptr solver = - std::unique_ptr(new api::Solver(&options)); + std::unique_ptr solver = + std::unique_ptr(new Solver(&options)); // Create the parser ParserBuilder parserBuilder(solver.get(), input, options); diff --git a/examples/nra-translate/smt2toqepcad.cpp b/examples/nra-translate/smt2toqepcad.cpp index 1fc1a3b47..a35915723 100644 --- a/examples/nra-translate/smt2toqepcad.cpp +++ b/examples/nra-translate/smt2toqepcad.cpp @@ -46,8 +46,8 @@ int main(int argc, char* argv[]) // Create the expression manager Options options; options.setInputLanguage(language::input::LANG_SMTLIB_V2); - std::unique_ptr solver = - std::unique_ptr(new api::Solver(&options)); + std::unique_ptr solver = + std::unique_ptr(new Solver(&options)); // Create the parser ParserBuilder parserBuilder(solver.get(), input, options); diff --git a/examples/nra-translate/smt2toredlog.cpp b/examples/nra-translate/smt2toredlog.cpp index 0d2d536b4..1f7d33902 100644 --- a/examples/nra-translate/smt2toredlog.cpp +++ b/examples/nra-translate/smt2toredlog.cpp @@ -49,8 +49,8 @@ int main(int argc, char* argv[]) // Create the expression manager Options options; options.setInputLanguage(language::input::LANG_SMTLIB_V2); - std::unique_ptr solver = - std::unique_ptr(new api::Solver(&options)); + std::unique_ptr solver = + std::unique_ptr(new Solver(&options)); // Create the parser ParserBuilder parserBuilder(solver.get(), input, options); diff --git a/examples/sets-translate/sets_translate.cpp b/examples/sets-translate/sets_translate.cpp index 0e1b93146..8eac076d2 100644 --- a/examples/sets-translate/sets_translate.cpp +++ b/examples/sets-translate/sets_translate.cpp @@ -265,8 +265,8 @@ int main(int argc, char* argv[]) options.setInputLanguage(language::input::LANG_SMTLIB_V2); cout << language::SetLanguage(language::output::LANG_SMTLIB_V2); // cout << Expr::dag(0); - std::unique_ptr solver = - std::unique_ptr(new api::Solver(&options)); + std::unique_ptr solver = + std::unique_ptr(new Solver(&options)); Mapper m(solver->getExprManager()); diff --git a/examples/simple_vc_cxx.cpp b/examples/simple_vc_cxx.cpp index ad2ad3690..5a711868e 100644 --- a/examples/simple_vc_cxx.cpp +++ b/examples/simple_vc_cxx.cpp @@ -20,7 +20,7 @@ #include -using namespace cvc5::api; +using namespace cvc5; int main() { Solver slv; diff --git a/examples/simple_vc_quant_cxx.cpp b/examples/simple_vc_quant_cxx.cpp index 1b50a141f..2c953b6fb 100644 --- a/examples/simple_vc_quant_cxx.cpp +++ b/examples/simple_vc_quant_cxx.cpp @@ -17,7 +17,7 @@ #include -using namespace cvc5::api; +using namespace cvc5; int main() { Solver slv; diff --git a/examples/translator.cpp b/examples/translator.cpp index dcceca2ae..6a7c8a542 100644 --- a/examples/translator.cpp +++ b/examples/translator.cpp @@ -96,8 +96,7 @@ static void readFile(const char* filename, InputLanguage fromLang, OutputLanguag Options opts; opts.setInputLanguage(fromLang); ExprManager exprMgr(opts); - std::unique_ptr solver = - std::unique_ptr(new api::Solver(&opts)); + std::unique_ptr solver = std::unique_ptr(new Solver(&opts)); ParserBuilder parserBuilder(solver.get(), filename, opts); if(!strcmp(filename, "-")) { parserBuilder.withFilename(""); diff --git a/src/api/cpp/cvc5.cpp b/src/api/cpp/cvc5.cpp index f74955f5f..c4b912825 100644 --- a/src/api/cpp/cvc5.cpp +++ b/src/api/cpp/cvc5.cpp @@ -89,7 +89,6 @@ #include "util/utility.h" namespace cvc5 { -namespace api { /* -------------------------------------------------------------------------- */ /* APIStatistics */ @@ -97,9 +96,9 @@ namespace api { struct APIStatistics { - HistogramStat d_consts; - HistogramStat d_vars; - HistogramStat d_terms; + internal::HistogramStat d_consts; + internal::HistogramStat d_vars; + internal::HistogramStat d_terms; }; /* -------------------------------------------------------------------------- */ @@ -112,592 +111,600 @@ struct APIStatistics } /* Mapping from external (API) kind to internal kind. */ -const static std::unordered_map> +const static std::unordered_map> s_kinds{ - KIND_ENUM(INTERNAL_KIND, cvc5::Kind::UNDEFINED_KIND), - KIND_ENUM(UNDEFINED_KIND, cvc5::Kind::UNDEFINED_KIND), - KIND_ENUM(NULL_TERM, cvc5::Kind::NULL_EXPR), + KIND_ENUM(INTERNAL_KIND, internal::Kind::UNDEFINED_KIND), + KIND_ENUM(UNDEFINED_KIND, internal::Kind::UNDEFINED_KIND), + KIND_ENUM(NULL_TERM, internal::Kind::NULL_EXPR), /* Builtin ---------------------------------------------------------- */ KIND_ENUM(UNINTERPRETED_SORT_VALUE, - cvc5::Kind::UNINTERPRETED_SORT_VALUE), - KIND_ENUM(EQUAL, cvc5::Kind::EQUAL), - KIND_ENUM(DISTINCT, cvc5::Kind::DISTINCT), - KIND_ENUM(CONSTANT, cvc5::Kind::VARIABLE), - KIND_ENUM(VARIABLE, cvc5::Kind::BOUND_VARIABLE), - KIND_ENUM(SEXPR, cvc5::Kind::SEXPR), - KIND_ENUM(LAMBDA, cvc5::Kind::LAMBDA), - KIND_ENUM(WITNESS, cvc5::Kind::WITNESS), + internal::Kind::UNINTERPRETED_SORT_VALUE), + KIND_ENUM(EQUAL, internal::Kind::EQUAL), + KIND_ENUM(DISTINCT, internal::Kind::DISTINCT), + KIND_ENUM(CONSTANT, internal::Kind::VARIABLE), + KIND_ENUM(VARIABLE, internal::Kind::BOUND_VARIABLE), + KIND_ENUM(SEXPR, internal::Kind::SEXPR), + KIND_ENUM(LAMBDA, internal::Kind::LAMBDA), + KIND_ENUM(WITNESS, internal::Kind::WITNESS), /* Boolean ---------------------------------------------------------- */ - KIND_ENUM(CONST_BOOLEAN, cvc5::Kind::CONST_BOOLEAN), - KIND_ENUM(NOT, cvc5::Kind::NOT), - KIND_ENUM(AND, cvc5::Kind::AND), - KIND_ENUM(IMPLIES, cvc5::Kind::IMPLIES), - KIND_ENUM(OR, cvc5::Kind::OR), - KIND_ENUM(XOR, cvc5::Kind::XOR), - KIND_ENUM(ITE, cvc5::Kind::ITE), + KIND_ENUM(CONST_BOOLEAN, internal::Kind::CONST_BOOLEAN), + KIND_ENUM(NOT, internal::Kind::NOT), + KIND_ENUM(AND, internal::Kind::AND), + KIND_ENUM(IMPLIES, internal::Kind::IMPLIES), + KIND_ENUM(OR, internal::Kind::OR), + KIND_ENUM(XOR, internal::Kind::XOR), + KIND_ENUM(ITE, internal::Kind::ITE), /* UF --------------------------------------------------------------- */ - KIND_ENUM(APPLY_UF, cvc5::Kind::APPLY_UF), - KIND_ENUM(CARDINALITY_CONSTRAINT, cvc5::Kind::CARDINALITY_CONSTRAINT), - KIND_ENUM(HO_APPLY, cvc5::Kind::HO_APPLY), + KIND_ENUM(APPLY_UF, internal::Kind::APPLY_UF), + KIND_ENUM(CARDINALITY_CONSTRAINT, + internal::Kind::CARDINALITY_CONSTRAINT), + KIND_ENUM(HO_APPLY, internal::Kind::HO_APPLY), /* Arithmetic ------------------------------------------------------- */ - KIND_ENUM(ADD, cvc5::Kind::ADD), - KIND_ENUM(MULT, cvc5::Kind::MULT), - KIND_ENUM(IAND, cvc5::Kind::IAND), - KIND_ENUM(POW2, cvc5::Kind::POW2), - KIND_ENUM(SUB, cvc5::Kind::SUB), - KIND_ENUM(NEG, cvc5::Kind::NEG), - KIND_ENUM(DIVISION, cvc5::Kind::DIVISION), - KIND_ENUM(INTS_DIVISION, cvc5::Kind::INTS_DIVISION), - KIND_ENUM(INTS_MODULUS, cvc5::Kind::INTS_MODULUS), - KIND_ENUM(ABS, cvc5::Kind::ABS), - KIND_ENUM(DIVISIBLE, cvc5::Kind::DIVISIBLE), - KIND_ENUM(POW, cvc5::Kind::POW), - KIND_ENUM(EXPONENTIAL, cvc5::Kind::EXPONENTIAL), - KIND_ENUM(SINE, cvc5::Kind::SINE), - KIND_ENUM(COSINE, cvc5::Kind::COSINE), - KIND_ENUM(TANGENT, cvc5::Kind::TANGENT), - KIND_ENUM(COSECANT, cvc5::Kind::COSECANT), - KIND_ENUM(SECANT, cvc5::Kind::SECANT), - KIND_ENUM(COTANGENT, cvc5::Kind::COTANGENT), - KIND_ENUM(ARCSINE, cvc5::Kind::ARCSINE), - KIND_ENUM(ARCCOSINE, cvc5::Kind::ARCCOSINE), - KIND_ENUM(ARCTANGENT, cvc5::Kind::ARCTANGENT), - KIND_ENUM(ARCCOSECANT, cvc5::Kind::ARCCOSECANT), - KIND_ENUM(ARCSECANT, cvc5::Kind::ARCSECANT), - KIND_ENUM(ARCCOTANGENT, cvc5::Kind::ARCCOTANGENT), - KIND_ENUM(SQRT, cvc5::Kind::SQRT), - KIND_ENUM(CONST_RATIONAL, cvc5::Kind::CONST_RATIONAL), - KIND_ENUM(LT, cvc5::Kind::LT), - KIND_ENUM(LEQ, cvc5::Kind::LEQ), - KIND_ENUM(GT, cvc5::Kind::GT), - KIND_ENUM(GEQ, cvc5::Kind::GEQ), - KIND_ENUM(IS_INTEGER, cvc5::Kind::IS_INTEGER), - KIND_ENUM(TO_INTEGER, cvc5::Kind::TO_INTEGER), - KIND_ENUM(TO_REAL, cvc5::Kind::TO_REAL), - KIND_ENUM(PI, cvc5::Kind::PI), + KIND_ENUM(ADD, internal::Kind::ADD), + KIND_ENUM(MULT, internal::Kind::MULT), + KIND_ENUM(IAND, internal::Kind::IAND), + KIND_ENUM(POW2, internal::Kind::POW2), + KIND_ENUM(SUB, internal::Kind::SUB), + KIND_ENUM(NEG, internal::Kind::NEG), + KIND_ENUM(DIVISION, internal::Kind::DIVISION), + KIND_ENUM(INTS_DIVISION, internal::Kind::INTS_DIVISION), + KIND_ENUM(INTS_MODULUS, internal::Kind::INTS_MODULUS), + KIND_ENUM(ABS, internal::Kind::ABS), + KIND_ENUM(DIVISIBLE, internal::Kind::DIVISIBLE), + KIND_ENUM(POW, internal::Kind::POW), + KIND_ENUM(EXPONENTIAL, internal::Kind::EXPONENTIAL), + KIND_ENUM(SINE, internal::Kind::SINE), + KIND_ENUM(COSINE, internal::Kind::COSINE), + KIND_ENUM(TANGENT, internal::Kind::TANGENT), + KIND_ENUM(COSECANT, internal::Kind::COSECANT), + KIND_ENUM(SECANT, internal::Kind::SECANT), + KIND_ENUM(COTANGENT, internal::Kind::COTANGENT), + KIND_ENUM(ARCSINE, internal::Kind::ARCSINE), + KIND_ENUM(ARCCOSINE, internal::Kind::ARCCOSINE), + KIND_ENUM(ARCTANGENT, internal::Kind::ARCTANGENT), + KIND_ENUM(ARCCOSECANT, internal::Kind::ARCCOSECANT), + KIND_ENUM(ARCSECANT, internal::Kind::ARCSECANT), + KIND_ENUM(ARCCOTANGENT, internal::Kind::ARCCOTANGENT), + KIND_ENUM(SQRT, internal::Kind::SQRT), + KIND_ENUM(CONST_RATIONAL, internal::Kind::CONST_RATIONAL), + KIND_ENUM(LT, internal::Kind::LT), + KIND_ENUM(LEQ, internal::Kind::LEQ), + KIND_ENUM(GT, internal::Kind::GT), + KIND_ENUM(GEQ, internal::Kind::GEQ), + KIND_ENUM(IS_INTEGER, internal::Kind::IS_INTEGER), + KIND_ENUM(TO_INTEGER, internal::Kind::TO_INTEGER), + KIND_ENUM(TO_REAL, internal::Kind::TO_REAL), + KIND_ENUM(PI, internal::Kind::PI), /* BV --------------------------------------------------------------- */ - KIND_ENUM(CONST_BITVECTOR, cvc5::Kind::CONST_BITVECTOR), - KIND_ENUM(BITVECTOR_CONCAT, cvc5::Kind::BITVECTOR_CONCAT), - KIND_ENUM(BITVECTOR_AND, cvc5::Kind::BITVECTOR_AND), - KIND_ENUM(BITVECTOR_OR, cvc5::Kind::BITVECTOR_OR), - KIND_ENUM(BITVECTOR_XOR, cvc5::Kind::BITVECTOR_XOR), - KIND_ENUM(BITVECTOR_NOT, cvc5::Kind::BITVECTOR_NOT), - KIND_ENUM(BITVECTOR_NAND, cvc5::Kind::BITVECTOR_NAND), - KIND_ENUM(BITVECTOR_NOR, cvc5::Kind::BITVECTOR_NOR), - KIND_ENUM(BITVECTOR_XNOR, cvc5::Kind::BITVECTOR_XNOR), - KIND_ENUM(BITVECTOR_COMP, cvc5::Kind::BITVECTOR_COMP), - KIND_ENUM(BITVECTOR_MULT, cvc5::Kind::BITVECTOR_MULT), - KIND_ENUM(BITVECTOR_ADD, cvc5::Kind::BITVECTOR_ADD), - KIND_ENUM(BITVECTOR_SUB, cvc5::Kind::BITVECTOR_SUB), - KIND_ENUM(BITVECTOR_NEG, cvc5::Kind::BITVECTOR_NEG), - KIND_ENUM(BITVECTOR_UDIV, cvc5::Kind::BITVECTOR_UDIV), - KIND_ENUM(BITVECTOR_UREM, cvc5::Kind::BITVECTOR_UREM), - KIND_ENUM(BITVECTOR_SDIV, cvc5::Kind::BITVECTOR_SDIV), - KIND_ENUM(BITVECTOR_SREM, cvc5::Kind::BITVECTOR_SREM), - KIND_ENUM(BITVECTOR_SMOD, cvc5::Kind::BITVECTOR_SMOD), - KIND_ENUM(BITVECTOR_SHL, cvc5::Kind::BITVECTOR_SHL), - KIND_ENUM(BITVECTOR_LSHR, cvc5::Kind::BITVECTOR_LSHR), - KIND_ENUM(BITVECTOR_ASHR, cvc5::Kind::BITVECTOR_ASHR), - KIND_ENUM(BITVECTOR_ULT, cvc5::Kind::BITVECTOR_ULT), - KIND_ENUM(BITVECTOR_ULE, cvc5::Kind::BITVECTOR_ULE), - KIND_ENUM(BITVECTOR_UGT, cvc5::Kind::BITVECTOR_UGT), - KIND_ENUM(BITVECTOR_UGE, cvc5::Kind::BITVECTOR_UGE), - KIND_ENUM(BITVECTOR_SLT, cvc5::Kind::BITVECTOR_SLT), - KIND_ENUM(BITVECTOR_SLE, cvc5::Kind::BITVECTOR_SLE), - KIND_ENUM(BITVECTOR_SGT, cvc5::Kind::BITVECTOR_SGT), - KIND_ENUM(BITVECTOR_SGE, cvc5::Kind::BITVECTOR_SGE), - KIND_ENUM(BITVECTOR_ULTBV, cvc5::Kind::BITVECTOR_ULTBV), - KIND_ENUM(BITVECTOR_SLTBV, cvc5::Kind::BITVECTOR_SLTBV), - KIND_ENUM(BITVECTOR_ITE, cvc5::Kind::BITVECTOR_ITE), - KIND_ENUM(BITVECTOR_REDOR, cvc5::Kind::BITVECTOR_REDOR), - KIND_ENUM(BITVECTOR_REDAND, cvc5::Kind::BITVECTOR_REDAND), - KIND_ENUM(BITVECTOR_EXTRACT, cvc5::Kind::BITVECTOR_EXTRACT), - KIND_ENUM(BITVECTOR_REPEAT, cvc5::Kind::BITVECTOR_REPEAT), - KIND_ENUM(BITVECTOR_ZERO_EXTEND, cvc5::Kind::BITVECTOR_ZERO_EXTEND), - KIND_ENUM(BITVECTOR_SIGN_EXTEND, cvc5::Kind::BITVECTOR_SIGN_EXTEND), - KIND_ENUM(BITVECTOR_ROTATE_LEFT, cvc5::Kind::BITVECTOR_ROTATE_LEFT), - KIND_ENUM(BITVECTOR_ROTATE_RIGHT, cvc5::Kind::BITVECTOR_ROTATE_RIGHT), - KIND_ENUM(INT_TO_BITVECTOR, cvc5::Kind::INT_TO_BITVECTOR), - KIND_ENUM(BITVECTOR_TO_NAT, cvc5::Kind::BITVECTOR_TO_NAT), + KIND_ENUM(CONST_BITVECTOR, internal::Kind::CONST_BITVECTOR), + KIND_ENUM(BITVECTOR_CONCAT, internal::Kind::BITVECTOR_CONCAT), + KIND_ENUM(BITVECTOR_AND, internal::Kind::BITVECTOR_AND), + KIND_ENUM(BITVECTOR_OR, internal::Kind::BITVECTOR_OR), + KIND_ENUM(BITVECTOR_XOR, internal::Kind::BITVECTOR_XOR), + KIND_ENUM(BITVECTOR_NOT, internal::Kind::BITVECTOR_NOT), + KIND_ENUM(BITVECTOR_NAND, internal::Kind::BITVECTOR_NAND), + KIND_ENUM(BITVECTOR_NOR, internal::Kind::BITVECTOR_NOR), + KIND_ENUM(BITVECTOR_XNOR, internal::Kind::BITVECTOR_XNOR), + KIND_ENUM(BITVECTOR_COMP, internal::Kind::BITVECTOR_COMP), + KIND_ENUM(BITVECTOR_MULT, internal::Kind::BITVECTOR_MULT), + KIND_ENUM(BITVECTOR_ADD, internal::Kind::BITVECTOR_ADD), + KIND_ENUM(BITVECTOR_SUB, internal::Kind::BITVECTOR_SUB), + KIND_ENUM(BITVECTOR_NEG, internal::Kind::BITVECTOR_NEG), + KIND_ENUM(BITVECTOR_UDIV, internal::Kind::BITVECTOR_UDIV), + KIND_ENUM(BITVECTOR_UREM, internal::Kind::BITVECTOR_UREM), + KIND_ENUM(BITVECTOR_SDIV, internal::Kind::BITVECTOR_SDIV), + KIND_ENUM(BITVECTOR_SREM, internal::Kind::BITVECTOR_SREM), + KIND_ENUM(BITVECTOR_SMOD, internal::Kind::BITVECTOR_SMOD), + KIND_ENUM(BITVECTOR_SHL, internal::Kind::BITVECTOR_SHL), + KIND_ENUM(BITVECTOR_LSHR, internal::Kind::BITVECTOR_LSHR), + KIND_ENUM(BITVECTOR_ASHR, internal::Kind::BITVECTOR_ASHR), + KIND_ENUM(BITVECTOR_ULT, internal::Kind::BITVECTOR_ULT), + KIND_ENUM(BITVECTOR_ULE, internal::Kind::BITVECTOR_ULE), + KIND_ENUM(BITVECTOR_UGT, internal::Kind::BITVECTOR_UGT), + KIND_ENUM(BITVECTOR_UGE, internal::Kind::BITVECTOR_UGE), + KIND_ENUM(BITVECTOR_SLT, internal::Kind::BITVECTOR_SLT), + KIND_ENUM(BITVECTOR_SLE, internal::Kind::BITVECTOR_SLE), + KIND_ENUM(BITVECTOR_SGT, internal::Kind::BITVECTOR_SGT), + KIND_ENUM(BITVECTOR_SGE, internal::Kind::BITVECTOR_SGE), + KIND_ENUM(BITVECTOR_ULTBV, internal::Kind::BITVECTOR_ULTBV), + KIND_ENUM(BITVECTOR_SLTBV, internal::Kind::BITVECTOR_SLTBV), + KIND_ENUM(BITVECTOR_ITE, internal::Kind::BITVECTOR_ITE), + KIND_ENUM(BITVECTOR_REDOR, internal::Kind::BITVECTOR_REDOR), + KIND_ENUM(BITVECTOR_REDAND, internal::Kind::BITVECTOR_REDAND), + KIND_ENUM(BITVECTOR_EXTRACT, internal::Kind::BITVECTOR_EXTRACT), + KIND_ENUM(BITVECTOR_REPEAT, internal::Kind::BITVECTOR_REPEAT), + KIND_ENUM(BITVECTOR_ZERO_EXTEND, internal::Kind::BITVECTOR_ZERO_EXTEND), + KIND_ENUM(BITVECTOR_SIGN_EXTEND, internal::Kind::BITVECTOR_SIGN_EXTEND), + KIND_ENUM(BITVECTOR_ROTATE_LEFT, internal::Kind::BITVECTOR_ROTATE_LEFT), + KIND_ENUM(BITVECTOR_ROTATE_RIGHT, + internal::Kind::BITVECTOR_ROTATE_RIGHT), + KIND_ENUM(INT_TO_BITVECTOR, internal::Kind::INT_TO_BITVECTOR), + KIND_ENUM(BITVECTOR_TO_NAT, internal::Kind::BITVECTOR_TO_NAT), /* FP --------------------------------------------------------------- */ - KIND_ENUM(CONST_FLOATINGPOINT, cvc5::Kind::CONST_FLOATINGPOINT), - KIND_ENUM(CONST_ROUNDINGMODE, cvc5::Kind::CONST_ROUNDINGMODE), - KIND_ENUM(FLOATINGPOINT_FP, cvc5::Kind::FLOATINGPOINT_FP), - KIND_ENUM(FLOATINGPOINT_EQ, cvc5::Kind::FLOATINGPOINT_EQ), - KIND_ENUM(FLOATINGPOINT_ABS, cvc5::Kind::FLOATINGPOINT_ABS), - KIND_ENUM(FLOATINGPOINT_NEG, cvc5::Kind::FLOATINGPOINT_NEG), - KIND_ENUM(FLOATINGPOINT_ADD, cvc5::Kind::FLOATINGPOINT_ADD), - KIND_ENUM(FLOATINGPOINT_SUB, cvc5::Kind::FLOATINGPOINT_SUB), - KIND_ENUM(FLOATINGPOINT_MULT, cvc5::Kind::FLOATINGPOINT_MULT), - KIND_ENUM(FLOATINGPOINT_DIV, cvc5::Kind::FLOATINGPOINT_DIV), - KIND_ENUM(FLOATINGPOINT_FMA, cvc5::Kind::FLOATINGPOINT_FMA), - KIND_ENUM(FLOATINGPOINT_SQRT, cvc5::Kind::FLOATINGPOINT_SQRT), - KIND_ENUM(FLOATINGPOINT_REM, cvc5::Kind::FLOATINGPOINT_REM), - KIND_ENUM(FLOATINGPOINT_RTI, cvc5::Kind::FLOATINGPOINT_RTI), - KIND_ENUM(FLOATINGPOINT_MIN, cvc5::Kind::FLOATINGPOINT_MIN), - KIND_ENUM(FLOATINGPOINT_MAX, cvc5::Kind::FLOATINGPOINT_MAX), - KIND_ENUM(FLOATINGPOINT_LEQ, cvc5::Kind::FLOATINGPOINT_LEQ), - KIND_ENUM(FLOATINGPOINT_LT, cvc5::Kind::FLOATINGPOINT_LT), - KIND_ENUM(FLOATINGPOINT_GEQ, cvc5::Kind::FLOATINGPOINT_GEQ), - KIND_ENUM(FLOATINGPOINT_GT, cvc5::Kind::FLOATINGPOINT_GT), - KIND_ENUM(FLOATINGPOINT_IS_NORMAL, cvc5::Kind::FLOATINGPOINT_IS_NORMAL), + KIND_ENUM(CONST_FLOATINGPOINT, internal::Kind::CONST_FLOATINGPOINT), + KIND_ENUM(CONST_ROUNDINGMODE, internal::Kind::CONST_ROUNDINGMODE), + KIND_ENUM(FLOATINGPOINT_FP, internal::Kind::FLOATINGPOINT_FP), + KIND_ENUM(FLOATINGPOINT_EQ, internal::Kind::FLOATINGPOINT_EQ), + KIND_ENUM(FLOATINGPOINT_ABS, internal::Kind::FLOATINGPOINT_ABS), + KIND_ENUM(FLOATINGPOINT_NEG, internal::Kind::FLOATINGPOINT_NEG), + KIND_ENUM(FLOATINGPOINT_ADD, internal::Kind::FLOATINGPOINT_ADD), + KIND_ENUM(FLOATINGPOINT_SUB, internal::Kind::FLOATINGPOINT_SUB), + KIND_ENUM(FLOATINGPOINT_MULT, internal::Kind::FLOATINGPOINT_MULT), + KIND_ENUM(FLOATINGPOINT_DIV, internal::Kind::FLOATINGPOINT_DIV), + KIND_ENUM(FLOATINGPOINT_FMA, internal::Kind::FLOATINGPOINT_FMA), + KIND_ENUM(FLOATINGPOINT_SQRT, internal::Kind::FLOATINGPOINT_SQRT), + KIND_ENUM(FLOATINGPOINT_REM, internal::Kind::FLOATINGPOINT_REM), + KIND_ENUM(FLOATINGPOINT_RTI, internal::Kind::FLOATINGPOINT_RTI), + KIND_ENUM(FLOATINGPOINT_MIN, internal::Kind::FLOATINGPOINT_MIN), + KIND_ENUM(FLOATINGPOINT_MAX, internal::Kind::FLOATINGPOINT_MAX), + KIND_ENUM(FLOATINGPOINT_LEQ, internal::Kind::FLOATINGPOINT_LEQ), + KIND_ENUM(FLOATINGPOINT_LT, internal::Kind::FLOATINGPOINT_LT), + KIND_ENUM(FLOATINGPOINT_GEQ, internal::Kind::FLOATINGPOINT_GEQ), + KIND_ENUM(FLOATINGPOINT_GT, internal::Kind::FLOATINGPOINT_GT), + KIND_ENUM(FLOATINGPOINT_IS_NORMAL, + internal::Kind::FLOATINGPOINT_IS_NORMAL), KIND_ENUM(FLOATINGPOINT_IS_SUBNORMAL, - cvc5::Kind::FLOATINGPOINT_IS_SUBNORMAL), - KIND_ENUM(FLOATINGPOINT_IS_ZERO, cvc5::Kind::FLOATINGPOINT_IS_ZERO), - KIND_ENUM(FLOATINGPOINT_IS_INF, cvc5::Kind::FLOATINGPOINT_IS_INF), - KIND_ENUM(FLOATINGPOINT_IS_NAN, cvc5::Kind::FLOATINGPOINT_IS_NAN), - KIND_ENUM(FLOATINGPOINT_IS_NEG, cvc5::Kind::FLOATINGPOINT_IS_NEG), - KIND_ENUM(FLOATINGPOINT_IS_POS, cvc5::Kind::FLOATINGPOINT_IS_POS), + internal::Kind::FLOATINGPOINT_IS_SUBNORMAL), + KIND_ENUM(FLOATINGPOINT_IS_ZERO, internal::Kind::FLOATINGPOINT_IS_ZERO), + KIND_ENUM(FLOATINGPOINT_IS_INF, internal::Kind::FLOATINGPOINT_IS_INF), + KIND_ENUM(FLOATINGPOINT_IS_NAN, internal::Kind::FLOATINGPOINT_IS_NAN), + KIND_ENUM(FLOATINGPOINT_IS_NEG, internal::Kind::FLOATINGPOINT_IS_NEG), + KIND_ENUM(FLOATINGPOINT_IS_POS, internal::Kind::FLOATINGPOINT_IS_POS), KIND_ENUM(FLOATINGPOINT_TO_FP_FROM_FP, - cvc5::Kind::FLOATINGPOINT_TO_FP_FROM_FP), + internal::Kind::FLOATINGPOINT_TO_FP_FROM_FP), KIND_ENUM(FLOATINGPOINT_TO_FP_FROM_IEEE_BV, - cvc5::Kind::FLOATINGPOINT_TO_FP_FROM_IEEE_BV), + internal::Kind::FLOATINGPOINT_TO_FP_FROM_IEEE_BV), KIND_ENUM(FLOATINGPOINT_TO_FP_FROM_REAL, - cvc5::Kind::FLOATINGPOINT_TO_FP_FROM_REAL), + internal::Kind::FLOATINGPOINT_TO_FP_FROM_REAL), KIND_ENUM(FLOATINGPOINT_TO_FP_FROM_SBV, - cvc5::Kind::FLOATINGPOINT_TO_FP_FROM_SBV), + internal::Kind::FLOATINGPOINT_TO_FP_FROM_SBV), KIND_ENUM(FLOATINGPOINT_TO_FP_FROM_UBV, - cvc5::Kind::FLOATINGPOINT_TO_FP_FROM_UBV), - KIND_ENUM(FLOATINGPOINT_TO_UBV, cvc5::Kind::FLOATINGPOINT_TO_UBV), - KIND_ENUM(FLOATINGPOINT_TO_SBV, cvc5::Kind::FLOATINGPOINT_TO_SBV), - KIND_ENUM(FLOATINGPOINT_TO_REAL, cvc5::Kind::FLOATINGPOINT_TO_REAL), + internal::Kind::FLOATINGPOINT_TO_FP_FROM_UBV), + KIND_ENUM(FLOATINGPOINT_TO_UBV, internal::Kind::FLOATINGPOINT_TO_UBV), + KIND_ENUM(FLOATINGPOINT_TO_SBV, internal::Kind::FLOATINGPOINT_TO_SBV), + KIND_ENUM(FLOATINGPOINT_TO_REAL, internal::Kind::FLOATINGPOINT_TO_REAL), /* Arrays ----------------------------------------------------------- */ - KIND_ENUM(SELECT, cvc5::Kind::SELECT), - KIND_ENUM(STORE, cvc5::Kind::STORE), - KIND_ENUM(CONST_ARRAY, cvc5::Kind::STORE_ALL), - KIND_ENUM(EQ_RANGE, cvc5::Kind::EQ_RANGE), + KIND_ENUM(SELECT, internal::Kind::SELECT), + KIND_ENUM(STORE, internal::Kind::STORE), + KIND_ENUM(CONST_ARRAY, internal::Kind::STORE_ALL), + KIND_ENUM(EQ_RANGE, internal::Kind::EQ_RANGE), /* Datatypes -------------------------------------------------------- */ - KIND_ENUM(APPLY_SELECTOR, cvc5::Kind::APPLY_SELECTOR), - KIND_ENUM(APPLY_CONSTRUCTOR, cvc5::Kind::APPLY_CONSTRUCTOR), - KIND_ENUM(APPLY_TESTER, cvc5::Kind::APPLY_TESTER), - KIND_ENUM(APPLY_UPDATER, cvc5::Kind::APPLY_UPDATER), - KIND_ENUM(DT_SIZE, cvc5::Kind::DT_SIZE), - KIND_ENUM(MATCH, cvc5::Kind::MATCH), - KIND_ENUM(MATCH_CASE, cvc5::Kind::MATCH_CASE), - KIND_ENUM(MATCH_BIND_CASE, cvc5::Kind::MATCH_BIND_CASE), - KIND_ENUM(TUPLE_PROJECT, cvc5::Kind::TUPLE_PROJECT), + KIND_ENUM(APPLY_SELECTOR, internal::Kind::APPLY_SELECTOR), + KIND_ENUM(APPLY_CONSTRUCTOR, internal::Kind::APPLY_CONSTRUCTOR), + KIND_ENUM(APPLY_TESTER, internal::Kind::APPLY_TESTER), + KIND_ENUM(APPLY_UPDATER, internal::Kind::APPLY_UPDATER), + KIND_ENUM(DT_SIZE, internal::Kind::DT_SIZE), + KIND_ENUM(MATCH, internal::Kind::MATCH), + KIND_ENUM(MATCH_CASE, internal::Kind::MATCH_CASE), + KIND_ENUM(MATCH_BIND_CASE, internal::Kind::MATCH_BIND_CASE), + KIND_ENUM(TUPLE_PROJECT, internal::Kind::TUPLE_PROJECT), /* Separation Logic ------------------------------------------------- */ - KIND_ENUM(SEP_NIL, cvc5::Kind::SEP_NIL), - KIND_ENUM(SEP_EMP, cvc5::Kind::SEP_EMP), - KIND_ENUM(SEP_PTO, cvc5::Kind::SEP_PTO), - KIND_ENUM(SEP_STAR, cvc5::Kind::SEP_STAR), - KIND_ENUM(SEP_WAND, cvc5::Kind::SEP_WAND), + KIND_ENUM(SEP_NIL, internal::Kind::SEP_NIL), + KIND_ENUM(SEP_EMP, internal::Kind::SEP_EMP), + KIND_ENUM(SEP_PTO, internal::Kind::SEP_PTO), + KIND_ENUM(SEP_STAR, internal::Kind::SEP_STAR), + KIND_ENUM(SEP_WAND, internal::Kind::SEP_WAND), /* Sets ------------------------------------------------------------- */ - KIND_ENUM(SET_EMPTY, cvc5::Kind::SET_EMPTY), - KIND_ENUM(SET_UNION, cvc5::Kind::SET_UNION), - KIND_ENUM(SET_INTER, cvc5::Kind::SET_INTER), - KIND_ENUM(SET_MINUS, cvc5::Kind::SET_MINUS), - KIND_ENUM(SET_SUBSET, cvc5::Kind::SET_SUBSET), - KIND_ENUM(SET_MEMBER, cvc5::Kind::SET_MEMBER), - KIND_ENUM(SET_SINGLETON, cvc5::Kind::SET_SINGLETON), - KIND_ENUM(SET_INSERT, cvc5::Kind::SET_INSERT), - KIND_ENUM(SET_CARD, cvc5::Kind::SET_CARD), - KIND_ENUM(SET_COMPLEMENT, cvc5::Kind::SET_COMPLEMENT), - KIND_ENUM(SET_UNIVERSE, cvc5::Kind::SET_UNIVERSE), - KIND_ENUM(SET_COMPREHENSION, cvc5::Kind::SET_COMPREHENSION), - KIND_ENUM(SET_CHOOSE, cvc5::Kind::SET_CHOOSE), - KIND_ENUM(SET_IS_SINGLETON, cvc5::Kind::SET_IS_SINGLETON), - KIND_ENUM(SET_MAP, cvc5::Kind::SET_MAP), + KIND_ENUM(SET_EMPTY, internal::Kind::SET_EMPTY), + KIND_ENUM(SET_UNION, internal::Kind::SET_UNION), + KIND_ENUM(SET_INTER, internal::Kind::SET_INTER), + KIND_ENUM(SET_MINUS, internal::Kind::SET_MINUS), + KIND_ENUM(SET_SUBSET, internal::Kind::SET_SUBSET), + KIND_ENUM(SET_MEMBER, internal::Kind::SET_MEMBER), + KIND_ENUM(SET_SINGLETON, internal::Kind::SET_SINGLETON), + KIND_ENUM(SET_INSERT, internal::Kind::SET_INSERT), + KIND_ENUM(SET_CARD, internal::Kind::SET_CARD), + KIND_ENUM(SET_COMPLEMENT, internal::Kind::SET_COMPLEMENT), + KIND_ENUM(SET_UNIVERSE, internal::Kind::SET_UNIVERSE), + KIND_ENUM(SET_COMPREHENSION, internal::Kind::SET_COMPREHENSION), + KIND_ENUM(SET_CHOOSE, internal::Kind::SET_CHOOSE), + KIND_ENUM(SET_IS_SINGLETON, internal::Kind::SET_IS_SINGLETON), + KIND_ENUM(SET_MAP, internal::Kind::SET_MAP), /* Relations -------------------------------------------------------- */ - KIND_ENUM(RELATION_JOIN, cvc5::Kind::RELATION_JOIN), - KIND_ENUM(RELATION_PRODUCT, cvc5::Kind::RELATION_PRODUCT), - KIND_ENUM(RELATION_TRANSPOSE, cvc5::Kind::RELATION_TRANSPOSE), - KIND_ENUM(RELATION_TCLOSURE, cvc5::Kind::RELATION_TCLOSURE), - KIND_ENUM(RELATION_JOIN_IMAGE, cvc5::Kind::RELATION_JOIN_IMAGE), - KIND_ENUM(RELATION_IDEN, cvc5::Kind::RELATION_IDEN), + KIND_ENUM(RELATION_JOIN, internal::Kind::RELATION_JOIN), + KIND_ENUM(RELATION_PRODUCT, internal::Kind::RELATION_PRODUCT), + KIND_ENUM(RELATION_TRANSPOSE, internal::Kind::RELATION_TRANSPOSE), + KIND_ENUM(RELATION_TCLOSURE, internal::Kind::RELATION_TCLOSURE), + KIND_ENUM(RELATION_JOIN_IMAGE, internal::Kind::RELATION_JOIN_IMAGE), + KIND_ENUM(RELATION_IDEN, internal::Kind::RELATION_IDEN), /* Bags ------------------------------------------------------------- */ - KIND_ENUM(BAG_UNION_MAX, cvc5::Kind::BAG_UNION_MAX), - KIND_ENUM(BAG_UNION_DISJOINT, cvc5::Kind::BAG_UNION_DISJOINT), - KIND_ENUM(BAG_INTER_MIN, cvc5::Kind::BAG_INTER_MIN), - KIND_ENUM(BAG_DIFFERENCE_SUBTRACT, cvc5::Kind::BAG_DIFFERENCE_SUBTRACT), - KIND_ENUM(BAG_DIFFERENCE_REMOVE, cvc5::Kind::BAG_DIFFERENCE_REMOVE), - KIND_ENUM(BAG_SUBBAG, cvc5::Kind::BAG_SUBBAG), - KIND_ENUM(BAG_COUNT, cvc5::Kind::BAG_COUNT), - KIND_ENUM(BAG_MEMBER, cvc5::Kind::BAG_MEMBER), - KIND_ENUM(BAG_DUPLICATE_REMOVAL, cvc5::Kind::BAG_DUPLICATE_REMOVAL), - KIND_ENUM(BAG_MAKE, cvc5::Kind::BAG_MAKE), - KIND_ENUM(BAG_EMPTY, cvc5::Kind::BAG_EMPTY), - KIND_ENUM(BAG_CARD, cvc5::Kind::BAG_CARD), - KIND_ENUM(BAG_CHOOSE, cvc5::Kind::BAG_CHOOSE), - KIND_ENUM(BAG_IS_SINGLETON, cvc5::Kind::BAG_IS_SINGLETON), - KIND_ENUM(BAG_FROM_SET, cvc5::Kind::BAG_FROM_SET), - KIND_ENUM(BAG_TO_SET, cvc5::Kind::BAG_TO_SET), - KIND_ENUM(BAG_MAP, cvc5::Kind::BAG_MAP), - KIND_ENUM(BAG_FILTER, cvc5::Kind::BAG_FILTER), - KIND_ENUM(BAG_FOLD, cvc5::Kind::BAG_FOLD), - KIND_ENUM(TABLE_PRODUCT, cvc5::Kind::TABLE_PRODUCT), + KIND_ENUM(BAG_UNION_MAX, internal::Kind::BAG_UNION_MAX), + KIND_ENUM(BAG_UNION_DISJOINT, internal::Kind::BAG_UNION_DISJOINT), + KIND_ENUM(BAG_INTER_MIN, internal::Kind::BAG_INTER_MIN), + KIND_ENUM(BAG_DIFFERENCE_SUBTRACT, + internal::Kind::BAG_DIFFERENCE_SUBTRACT), + KIND_ENUM(BAG_DIFFERENCE_REMOVE, internal::Kind::BAG_DIFFERENCE_REMOVE), + KIND_ENUM(BAG_SUBBAG, internal::Kind::BAG_SUBBAG), + KIND_ENUM(BAG_COUNT, internal::Kind::BAG_COUNT), + KIND_ENUM(BAG_MEMBER, internal::Kind::BAG_MEMBER), + KIND_ENUM(BAG_DUPLICATE_REMOVAL, internal::Kind::BAG_DUPLICATE_REMOVAL), + KIND_ENUM(BAG_MAKE, internal::Kind::BAG_MAKE), + KIND_ENUM(BAG_EMPTY, internal::Kind::BAG_EMPTY), + KIND_ENUM(BAG_CARD, internal::Kind::BAG_CARD), + KIND_ENUM(BAG_CHOOSE, internal::Kind::BAG_CHOOSE), + KIND_ENUM(BAG_IS_SINGLETON, internal::Kind::BAG_IS_SINGLETON), + KIND_ENUM(BAG_FROM_SET, internal::Kind::BAG_FROM_SET), + KIND_ENUM(BAG_TO_SET, internal::Kind::BAG_TO_SET), + KIND_ENUM(BAG_MAP, internal::Kind::BAG_MAP), + KIND_ENUM(BAG_FILTER, internal::Kind::BAG_FILTER), + KIND_ENUM(BAG_FOLD, internal::Kind::BAG_FOLD), + KIND_ENUM(TABLE_PRODUCT, internal::Kind::TABLE_PRODUCT), /* Strings ---------------------------------------------------------- */ - KIND_ENUM(STRING_CONCAT, cvc5::Kind::STRING_CONCAT), - KIND_ENUM(STRING_IN_REGEXP, cvc5::Kind::STRING_IN_REGEXP), - KIND_ENUM(STRING_LENGTH, cvc5::Kind::STRING_LENGTH), - KIND_ENUM(STRING_SUBSTR, cvc5::Kind::STRING_SUBSTR), - KIND_ENUM(STRING_UPDATE, cvc5::Kind::STRING_UPDATE), - KIND_ENUM(STRING_CHARAT, cvc5::Kind::STRING_CHARAT), - KIND_ENUM(STRING_CONTAINS, cvc5::Kind::STRING_CONTAINS), - KIND_ENUM(STRING_INDEXOF, cvc5::Kind::STRING_INDEXOF), - KIND_ENUM(STRING_INDEXOF_RE, cvc5::Kind::STRING_INDEXOF_RE), - KIND_ENUM(STRING_REPLACE, cvc5::Kind::STRING_REPLACE), - KIND_ENUM(STRING_REPLACE_ALL, cvc5::Kind::STRING_REPLACE_ALL), - KIND_ENUM(STRING_REPLACE_RE, cvc5::Kind::STRING_REPLACE_RE), - KIND_ENUM(STRING_REPLACE_RE_ALL, cvc5::Kind::STRING_REPLACE_RE_ALL), - KIND_ENUM(STRING_TO_LOWER, cvc5::Kind::STRING_TO_LOWER), - KIND_ENUM(STRING_TO_UPPER, cvc5::Kind::STRING_TO_UPPER), - KIND_ENUM(STRING_REV, cvc5::Kind::STRING_REV), - KIND_ENUM(STRING_FROM_CODE, cvc5::Kind::STRING_FROM_CODE), - KIND_ENUM(STRING_TO_CODE, cvc5::Kind::STRING_TO_CODE), - KIND_ENUM(STRING_LT, cvc5::Kind::STRING_LT), - KIND_ENUM(STRING_LEQ, cvc5::Kind::STRING_LEQ), - KIND_ENUM(STRING_PREFIX, cvc5::Kind::STRING_PREFIX), - KIND_ENUM(STRING_SUFFIX, cvc5::Kind::STRING_SUFFIX), - KIND_ENUM(STRING_IS_DIGIT, cvc5::Kind::STRING_IS_DIGIT), - KIND_ENUM(STRING_FROM_INT, cvc5::Kind::STRING_ITOS), - KIND_ENUM(STRING_TO_INT, cvc5::Kind::STRING_STOI), - KIND_ENUM(CONST_STRING, cvc5::Kind::CONST_STRING), - KIND_ENUM(STRING_TO_REGEXP, cvc5::Kind::STRING_TO_REGEXP), - KIND_ENUM(REGEXP_CONCAT, cvc5::Kind::REGEXP_CONCAT), - KIND_ENUM(REGEXP_UNION, cvc5::Kind::REGEXP_UNION), - KIND_ENUM(REGEXP_INTER, cvc5::Kind::REGEXP_INTER), - KIND_ENUM(REGEXP_DIFF, cvc5::Kind::REGEXP_DIFF), - KIND_ENUM(REGEXP_STAR, cvc5::Kind::REGEXP_STAR), - KIND_ENUM(REGEXP_PLUS, cvc5::Kind::REGEXP_PLUS), - KIND_ENUM(REGEXP_OPT, cvc5::Kind::REGEXP_OPT), - KIND_ENUM(REGEXP_RANGE, cvc5::Kind::REGEXP_RANGE), - KIND_ENUM(REGEXP_REPEAT, cvc5::Kind::REGEXP_REPEAT), - KIND_ENUM(REGEXP_LOOP, cvc5::Kind::REGEXP_LOOP), - KIND_ENUM(REGEXP_NONE, cvc5::Kind::REGEXP_NONE), - KIND_ENUM(REGEXP_ALL, cvc5::Kind::REGEXP_ALL), - KIND_ENUM(REGEXP_ALLCHAR, cvc5::Kind::REGEXP_ALLCHAR), - KIND_ENUM(REGEXP_COMPLEMENT, cvc5::Kind::REGEXP_COMPLEMENT), + KIND_ENUM(STRING_CONCAT, internal::Kind::STRING_CONCAT), + KIND_ENUM(STRING_IN_REGEXP, internal::Kind::STRING_IN_REGEXP), + KIND_ENUM(STRING_LENGTH, internal::Kind::STRING_LENGTH), + KIND_ENUM(STRING_SUBSTR, internal::Kind::STRING_SUBSTR), + KIND_ENUM(STRING_UPDATE, internal::Kind::STRING_UPDATE), + KIND_ENUM(STRING_CHARAT, internal::Kind::STRING_CHARAT), + KIND_ENUM(STRING_CONTAINS, internal::Kind::STRING_CONTAINS), + KIND_ENUM(STRING_INDEXOF, internal::Kind::STRING_INDEXOF), + KIND_ENUM(STRING_INDEXOF_RE, internal::Kind::STRING_INDEXOF_RE), + KIND_ENUM(STRING_REPLACE, internal::Kind::STRING_REPLACE), + KIND_ENUM(STRING_REPLACE_ALL, internal::Kind::STRING_REPLACE_ALL), + KIND_ENUM(STRING_REPLACE_RE, internal::Kind::STRING_REPLACE_RE), + KIND_ENUM(STRING_REPLACE_RE_ALL, internal::Kind::STRING_REPLACE_RE_ALL), + KIND_ENUM(STRING_TO_LOWER, internal::Kind::STRING_TO_LOWER), + KIND_ENUM(STRING_TO_UPPER, internal::Kind::STRING_TO_UPPER), + KIND_ENUM(STRING_REV, internal::Kind::STRING_REV), + KIND_ENUM(STRING_FROM_CODE, internal::Kind::STRING_FROM_CODE), + KIND_ENUM(STRING_TO_CODE, internal::Kind::STRING_TO_CODE), + KIND_ENUM(STRING_LT, internal::Kind::STRING_LT), + KIND_ENUM(STRING_LEQ, internal::Kind::STRING_LEQ), + KIND_ENUM(STRING_PREFIX, internal::Kind::STRING_PREFIX), + KIND_ENUM(STRING_SUFFIX, internal::Kind::STRING_SUFFIX), + KIND_ENUM(STRING_IS_DIGIT, internal::Kind::STRING_IS_DIGIT), + KIND_ENUM(STRING_FROM_INT, internal::Kind::STRING_ITOS), + KIND_ENUM(STRING_TO_INT, internal::Kind::STRING_STOI), + KIND_ENUM(CONST_STRING, internal::Kind::CONST_STRING), + KIND_ENUM(STRING_TO_REGEXP, internal::Kind::STRING_TO_REGEXP), + KIND_ENUM(REGEXP_CONCAT, internal::Kind::REGEXP_CONCAT), + KIND_ENUM(REGEXP_UNION, internal::Kind::REGEXP_UNION), + KIND_ENUM(REGEXP_INTER, internal::Kind::REGEXP_INTER), + KIND_ENUM(REGEXP_DIFF, internal::Kind::REGEXP_DIFF), + KIND_ENUM(REGEXP_STAR, internal::Kind::REGEXP_STAR), + KIND_ENUM(REGEXP_PLUS, internal::Kind::REGEXP_PLUS), + KIND_ENUM(REGEXP_OPT, internal::Kind::REGEXP_OPT), + KIND_ENUM(REGEXP_RANGE, internal::Kind::REGEXP_RANGE), + KIND_ENUM(REGEXP_REPEAT, internal::Kind::REGEXP_REPEAT), + KIND_ENUM(REGEXP_LOOP, internal::Kind::REGEXP_LOOP), + KIND_ENUM(REGEXP_NONE, internal::Kind::REGEXP_NONE), + KIND_ENUM(REGEXP_ALL, internal::Kind::REGEXP_ALL), + KIND_ENUM(REGEXP_ALLCHAR, internal::Kind::REGEXP_ALLCHAR), + KIND_ENUM(REGEXP_COMPLEMENT, internal::Kind::REGEXP_COMPLEMENT), // maps to the same kind as the string versions - KIND_ENUM(SEQ_CONCAT, cvc5::Kind::STRING_CONCAT), - KIND_ENUM(SEQ_LENGTH, cvc5::Kind::STRING_LENGTH), - KIND_ENUM(SEQ_EXTRACT, cvc5::Kind::STRING_SUBSTR), - KIND_ENUM(SEQ_UPDATE, cvc5::Kind::STRING_UPDATE), - KIND_ENUM(SEQ_AT, cvc5::Kind::STRING_CHARAT), - KIND_ENUM(SEQ_CONTAINS, cvc5::Kind::STRING_CONTAINS), - KIND_ENUM(SEQ_INDEXOF, cvc5::Kind::STRING_INDEXOF), - KIND_ENUM(SEQ_REPLACE, cvc5::Kind::STRING_REPLACE), - KIND_ENUM(SEQ_REPLACE_ALL, cvc5::Kind::STRING_REPLACE_ALL), - KIND_ENUM(SEQ_REV, cvc5::Kind::STRING_REV), - KIND_ENUM(SEQ_PREFIX, cvc5::Kind::STRING_PREFIX), - KIND_ENUM(SEQ_SUFFIX, cvc5::Kind::STRING_SUFFIX), - KIND_ENUM(CONST_SEQUENCE, cvc5::Kind::CONST_SEQUENCE), - KIND_ENUM(SEQ_UNIT, cvc5::Kind::SEQ_UNIT), - KIND_ENUM(SEQ_NTH, cvc5::Kind::SEQ_NTH), + KIND_ENUM(SEQ_CONCAT, internal::Kind::STRING_CONCAT), + KIND_ENUM(SEQ_LENGTH, internal::Kind::STRING_LENGTH), + KIND_ENUM(SEQ_EXTRACT, internal::Kind::STRING_SUBSTR), + KIND_ENUM(SEQ_UPDATE, internal::Kind::STRING_UPDATE), + KIND_ENUM(SEQ_AT, internal::Kind::STRING_CHARAT), + KIND_ENUM(SEQ_CONTAINS, internal::Kind::STRING_CONTAINS), + KIND_ENUM(SEQ_INDEXOF, internal::Kind::STRING_INDEXOF), + KIND_ENUM(SEQ_REPLACE, internal::Kind::STRING_REPLACE), + KIND_ENUM(SEQ_REPLACE_ALL, internal::Kind::STRING_REPLACE_ALL), + KIND_ENUM(SEQ_REV, internal::Kind::STRING_REV), + KIND_ENUM(SEQ_PREFIX, internal::Kind::STRING_PREFIX), + KIND_ENUM(SEQ_SUFFIX, internal::Kind::STRING_SUFFIX), + KIND_ENUM(CONST_SEQUENCE, internal::Kind::CONST_SEQUENCE), + KIND_ENUM(SEQ_UNIT, internal::Kind::SEQ_UNIT), + KIND_ENUM(SEQ_NTH, internal::Kind::SEQ_NTH), /* Quantifiers ------------------------------------------------------ */ - KIND_ENUM(FORALL, cvc5::Kind::FORALL), - KIND_ENUM(EXISTS, cvc5::Kind::EXISTS), - KIND_ENUM(VARIABLE_LIST, cvc5::Kind::BOUND_VAR_LIST), - KIND_ENUM(INST_PATTERN, cvc5::Kind::INST_PATTERN), - KIND_ENUM(INST_NO_PATTERN, cvc5::Kind::INST_NO_PATTERN), - KIND_ENUM(INST_POOL, cvc5::Kind::INST_POOL), - KIND_ENUM(INST_ADD_TO_POOL, cvc5::Kind::INST_ADD_TO_POOL), - KIND_ENUM(SKOLEM_ADD_TO_POOL, cvc5::Kind::SKOLEM_ADD_TO_POOL), - KIND_ENUM(INST_ATTRIBUTE, cvc5::Kind::INST_ATTRIBUTE), - KIND_ENUM(INST_PATTERN_LIST, cvc5::Kind::INST_PATTERN_LIST), - KIND_ENUM(LAST_KIND, cvc5::Kind::LAST_KIND), + KIND_ENUM(FORALL, internal::Kind::FORALL), + KIND_ENUM(EXISTS, internal::Kind::EXISTS), + KIND_ENUM(VARIABLE_LIST, internal::Kind::BOUND_VAR_LIST), + KIND_ENUM(INST_PATTERN, internal::Kind::INST_PATTERN), + KIND_ENUM(INST_NO_PATTERN, internal::Kind::INST_NO_PATTERN), + KIND_ENUM(INST_POOL, internal::Kind::INST_POOL), + KIND_ENUM(INST_ADD_TO_POOL, internal::Kind::INST_ADD_TO_POOL), + KIND_ENUM(SKOLEM_ADD_TO_POOL, internal::Kind::SKOLEM_ADD_TO_POOL), + KIND_ENUM(INST_ATTRIBUTE, internal::Kind::INST_ATTRIBUTE), + KIND_ENUM(INST_PATTERN_LIST, internal::Kind::INST_PATTERN_LIST), + KIND_ENUM(LAST_KIND, internal::Kind::LAST_KIND), }; /* Mapping from internal kind to external (API) kind. */ -const static std::unordered_map +const static std::unordered_map s_kinds_internal{ - {cvc5::Kind::UNDEFINED_KIND, UNDEFINED_KIND}, - {cvc5::Kind::NULL_EXPR, NULL_TERM}, + {internal::Kind::UNDEFINED_KIND, UNDEFINED_KIND}, + {internal::Kind::NULL_EXPR, NULL_TERM}, /* Builtin --------------------------------------------------------- */ - {cvc5::Kind::UNINTERPRETED_SORT_VALUE, UNINTERPRETED_SORT_VALUE}, - {cvc5::Kind::EQUAL, EQUAL}, - {cvc5::Kind::DISTINCT, DISTINCT}, - {cvc5::Kind::VARIABLE, CONSTANT}, - {cvc5::Kind::BOUND_VARIABLE, VARIABLE}, - {cvc5::Kind::SEXPR, SEXPR}, - {cvc5::Kind::LAMBDA, LAMBDA}, - {cvc5::Kind::WITNESS, WITNESS}, + {internal::Kind::UNINTERPRETED_SORT_VALUE, UNINTERPRETED_SORT_VALUE}, + {internal::Kind::EQUAL, EQUAL}, + {internal::Kind::DISTINCT, DISTINCT}, + {internal::Kind::VARIABLE, CONSTANT}, + {internal::Kind::BOUND_VARIABLE, VARIABLE}, + {internal::Kind::SEXPR, SEXPR}, + {internal::Kind::LAMBDA, LAMBDA}, + {internal::Kind::WITNESS, WITNESS}, /* Boolean --------------------------------------------------------- */ - {cvc5::Kind::CONST_BOOLEAN, CONST_BOOLEAN}, - {cvc5::Kind::NOT, NOT}, - {cvc5::Kind::AND, AND}, - {cvc5::Kind::IMPLIES, IMPLIES}, - {cvc5::Kind::OR, OR}, - {cvc5::Kind::XOR, XOR}, - {cvc5::Kind::ITE, ITE}, + {internal::Kind::CONST_BOOLEAN, CONST_BOOLEAN}, + {internal::Kind::NOT, NOT}, + {internal::Kind::AND, AND}, + {internal::Kind::IMPLIES, IMPLIES}, + {internal::Kind::OR, OR}, + {internal::Kind::XOR, XOR}, + {internal::Kind::ITE, ITE}, /* UF -------------------------------------------------------------- */ - {cvc5::Kind::APPLY_UF, APPLY_UF}, - {cvc5::Kind::CARDINALITY_CONSTRAINT, CARDINALITY_CONSTRAINT}, - {cvc5::Kind::HO_APPLY, HO_APPLY}, + {internal::Kind::APPLY_UF, APPLY_UF}, + {internal::Kind::CARDINALITY_CONSTRAINT, CARDINALITY_CONSTRAINT}, + {internal::Kind::HO_APPLY, HO_APPLY}, /* Arithmetic ------------------------------------------------------ */ - {cvc5::Kind::ADD, ADD}, - {cvc5::Kind::MULT, MULT}, - {cvc5::Kind::IAND, IAND}, - {cvc5::Kind::POW2, POW2}, - {cvc5::Kind::SUB, SUB}, - {cvc5::Kind::NEG, NEG}, - {cvc5::Kind::DIVISION, DIVISION}, - {cvc5::Kind::DIVISION_TOTAL, INTERNAL_KIND}, - {cvc5::Kind::INTS_DIVISION, INTS_DIVISION}, - {cvc5::Kind::INTS_DIVISION_TOTAL, INTERNAL_KIND}, - {cvc5::Kind::INTS_MODULUS, INTS_MODULUS}, - {cvc5::Kind::INTS_MODULUS_TOTAL, INTERNAL_KIND}, - {cvc5::Kind::ABS, ABS}, - {cvc5::Kind::DIVISIBLE, DIVISIBLE}, - {cvc5::Kind::POW, POW}, - {cvc5::Kind::EXPONENTIAL, EXPONENTIAL}, - {cvc5::Kind::SINE, SINE}, - {cvc5::Kind::COSINE, COSINE}, - {cvc5::Kind::TANGENT, TANGENT}, - {cvc5::Kind::COSECANT, COSECANT}, - {cvc5::Kind::SECANT, SECANT}, - {cvc5::Kind::COTANGENT, COTANGENT}, - {cvc5::Kind::ARCSINE, ARCSINE}, - {cvc5::Kind::ARCCOSINE, ARCCOSINE}, - {cvc5::Kind::ARCTANGENT, ARCTANGENT}, - {cvc5::Kind::ARCCOSECANT, ARCCOSECANT}, - {cvc5::Kind::ARCSECANT, ARCSECANT}, - {cvc5::Kind::ARCCOTANGENT, ARCCOTANGENT}, - {cvc5::Kind::SQRT, SQRT}, - {cvc5::Kind::DIVISIBLE_OP, DIVISIBLE}, - {cvc5::Kind::CONST_RATIONAL, CONST_RATIONAL}, - {cvc5::Kind::LT, LT}, - {cvc5::Kind::LEQ, LEQ}, - {cvc5::Kind::GT, GT}, - {cvc5::Kind::GEQ, GEQ}, - {cvc5::Kind::IS_INTEGER, IS_INTEGER}, - {cvc5::Kind::TO_INTEGER, TO_INTEGER}, - {cvc5::Kind::TO_REAL, TO_REAL}, - {cvc5::Kind::PI, PI}, - {cvc5::Kind::IAND_OP, IAND}, + {internal::Kind::ADD, ADD}, + {internal::Kind::MULT, MULT}, + {internal::Kind::IAND, IAND}, + {internal::Kind::POW2, POW2}, + {internal::Kind::SUB, SUB}, + {internal::Kind::NEG, NEG}, + {internal::Kind::DIVISION, DIVISION}, + {internal::Kind::DIVISION_TOTAL, INTERNAL_KIND}, + {internal::Kind::INTS_DIVISION, INTS_DIVISION}, + {internal::Kind::INTS_DIVISION_TOTAL, INTERNAL_KIND}, + {internal::Kind::INTS_MODULUS, INTS_MODULUS}, + {internal::Kind::INTS_MODULUS_TOTAL, INTERNAL_KIND}, + {internal::Kind::ABS, ABS}, + {internal::Kind::DIVISIBLE, DIVISIBLE}, + {internal::Kind::POW, POW}, + {internal::Kind::EXPONENTIAL, EXPONENTIAL}, + {internal::Kind::SINE, SINE}, + {internal::Kind::COSINE, COSINE}, + {internal::Kind::TANGENT, TANGENT}, + {internal::Kind::COSECANT, COSECANT}, + {internal::Kind::SECANT, SECANT}, + {internal::Kind::COTANGENT, COTANGENT}, + {internal::Kind::ARCSINE, ARCSINE}, + {internal::Kind::ARCCOSINE, ARCCOSINE}, + {internal::Kind::ARCTANGENT, ARCTANGENT}, + {internal::Kind::ARCCOSECANT, ARCCOSECANT}, + {internal::Kind::ARCSECANT, ARCSECANT}, + {internal::Kind::ARCCOTANGENT, ARCCOTANGENT}, + {internal::Kind::SQRT, SQRT}, + {internal::Kind::DIVISIBLE_OP, DIVISIBLE}, + {internal::Kind::CONST_RATIONAL, CONST_RATIONAL}, + {internal::Kind::LT, LT}, + {internal::Kind::LEQ, LEQ}, + {internal::Kind::GT, GT}, + {internal::Kind::GEQ, GEQ}, + {internal::Kind::IS_INTEGER, IS_INTEGER}, + {internal::Kind::TO_INTEGER, TO_INTEGER}, + {internal::Kind::TO_REAL, TO_REAL}, + {internal::Kind::PI, PI}, + {internal::Kind::IAND_OP, IAND}, /* BV -------------------------------------------------------------- */ - {cvc5::Kind::CONST_BITVECTOR, CONST_BITVECTOR}, - {cvc5::Kind::BITVECTOR_CONCAT, BITVECTOR_CONCAT}, - {cvc5::Kind::BITVECTOR_AND, BITVECTOR_AND}, - {cvc5::Kind::BITVECTOR_OR, BITVECTOR_OR}, - {cvc5::Kind::BITVECTOR_XOR, BITVECTOR_XOR}, - {cvc5::Kind::BITVECTOR_NOT, BITVECTOR_NOT}, - {cvc5::Kind::BITVECTOR_NAND, BITVECTOR_NAND}, - {cvc5::Kind::BITVECTOR_NOR, BITVECTOR_NOR}, - {cvc5::Kind::BITVECTOR_XNOR, BITVECTOR_XNOR}, - {cvc5::Kind::BITVECTOR_COMP, BITVECTOR_COMP}, - {cvc5::Kind::BITVECTOR_MULT, BITVECTOR_MULT}, - {cvc5::Kind::BITVECTOR_ADD, BITVECTOR_ADD}, - {cvc5::Kind::BITVECTOR_SUB, BITVECTOR_SUB}, - {cvc5::Kind::BITVECTOR_NEG, BITVECTOR_NEG}, - {cvc5::Kind::BITVECTOR_UDIV, BITVECTOR_UDIV}, - {cvc5::Kind::BITVECTOR_UREM, BITVECTOR_UREM}, - {cvc5::Kind::BITVECTOR_SDIV, BITVECTOR_SDIV}, - {cvc5::Kind::BITVECTOR_SREM, BITVECTOR_SREM}, - {cvc5::Kind::BITVECTOR_SMOD, BITVECTOR_SMOD}, - {cvc5::Kind::BITVECTOR_SHL, BITVECTOR_SHL}, - {cvc5::Kind::BITVECTOR_LSHR, BITVECTOR_LSHR}, - {cvc5::Kind::BITVECTOR_ASHR, BITVECTOR_ASHR}, - {cvc5::Kind::BITVECTOR_ULT, BITVECTOR_ULT}, - {cvc5::Kind::BITVECTOR_ULE, BITVECTOR_ULE}, - {cvc5::Kind::BITVECTOR_UGT, BITVECTOR_UGT}, - {cvc5::Kind::BITVECTOR_UGE, BITVECTOR_UGE}, - {cvc5::Kind::BITVECTOR_SLT, BITVECTOR_SLT}, - {cvc5::Kind::BITVECTOR_SLE, BITVECTOR_SLE}, - {cvc5::Kind::BITVECTOR_SGT, BITVECTOR_SGT}, - {cvc5::Kind::BITVECTOR_SGE, BITVECTOR_SGE}, - {cvc5::Kind::BITVECTOR_ULTBV, BITVECTOR_ULTBV}, - {cvc5::Kind::BITVECTOR_SLTBV, BITVECTOR_SLTBV}, - {cvc5::Kind::BITVECTOR_ITE, BITVECTOR_ITE}, - {cvc5::Kind::BITVECTOR_REDOR, BITVECTOR_REDOR}, - {cvc5::Kind::BITVECTOR_REDAND, BITVECTOR_REDAND}, - {cvc5::Kind::BITVECTOR_EXTRACT_OP, BITVECTOR_EXTRACT}, - {cvc5::Kind::BITVECTOR_REPEAT_OP, BITVECTOR_REPEAT}, - {cvc5::Kind::BITVECTOR_ZERO_EXTEND_OP, BITVECTOR_ZERO_EXTEND}, - {cvc5::Kind::BITVECTOR_SIGN_EXTEND_OP, BITVECTOR_SIGN_EXTEND}, - {cvc5::Kind::BITVECTOR_ROTATE_LEFT_OP, BITVECTOR_ROTATE_LEFT}, - {cvc5::Kind::BITVECTOR_ROTATE_RIGHT_OP, BITVECTOR_ROTATE_RIGHT}, - {cvc5::Kind::BITVECTOR_EXTRACT, BITVECTOR_EXTRACT}, - {cvc5::Kind::BITVECTOR_REPEAT, BITVECTOR_REPEAT}, - {cvc5::Kind::BITVECTOR_ZERO_EXTEND, BITVECTOR_ZERO_EXTEND}, - {cvc5::Kind::BITVECTOR_SIGN_EXTEND, BITVECTOR_SIGN_EXTEND}, - {cvc5::Kind::BITVECTOR_ROTATE_LEFT, BITVECTOR_ROTATE_LEFT}, - {cvc5::Kind::BITVECTOR_ROTATE_RIGHT, BITVECTOR_ROTATE_RIGHT}, - {cvc5::Kind::INT_TO_BITVECTOR_OP, INT_TO_BITVECTOR}, - {cvc5::Kind::INT_TO_BITVECTOR, INT_TO_BITVECTOR}, - {cvc5::Kind::BITVECTOR_TO_NAT, BITVECTOR_TO_NAT}, + {internal::Kind::CONST_BITVECTOR, CONST_BITVECTOR}, + {internal::Kind::BITVECTOR_CONCAT, BITVECTOR_CONCAT}, + {internal::Kind::BITVECTOR_AND, BITVECTOR_AND}, + {internal::Kind::BITVECTOR_OR, BITVECTOR_OR}, + {internal::Kind::BITVECTOR_XOR, BITVECTOR_XOR}, + {internal::Kind::BITVECTOR_NOT, BITVECTOR_NOT}, + {internal::Kind::BITVECTOR_NAND, BITVECTOR_NAND}, + {internal::Kind::BITVECTOR_NOR, BITVECTOR_NOR}, + {internal::Kind::BITVECTOR_XNOR, BITVECTOR_XNOR}, + {internal::Kind::BITVECTOR_COMP, BITVECTOR_COMP}, + {internal::Kind::BITVECTOR_MULT, BITVECTOR_MULT}, + {internal::Kind::BITVECTOR_ADD, BITVECTOR_ADD}, + {internal::Kind::BITVECTOR_SUB, BITVECTOR_SUB}, + {internal::Kind::BITVECTOR_NEG, BITVECTOR_NEG}, + {internal::Kind::BITVECTOR_UDIV, BITVECTOR_UDIV}, + {internal::Kind::BITVECTOR_UREM, BITVECTOR_UREM}, + {internal::Kind::BITVECTOR_SDIV, BITVECTOR_SDIV}, + {internal::Kind::BITVECTOR_SREM, BITVECTOR_SREM}, + {internal::Kind::BITVECTOR_SMOD, BITVECTOR_SMOD}, + {internal::Kind::BITVECTOR_SHL, BITVECTOR_SHL}, + {internal::Kind::BITVECTOR_LSHR, BITVECTOR_LSHR}, + {internal::Kind::BITVECTOR_ASHR, BITVECTOR_ASHR}, + {internal::Kind::BITVECTOR_ULT, BITVECTOR_ULT}, + {internal::Kind::BITVECTOR_ULE, BITVECTOR_ULE}, + {internal::Kind::BITVECTOR_UGT, BITVECTOR_UGT}, + {internal::Kind::BITVECTOR_UGE, BITVECTOR_UGE}, + {internal::Kind::BITVECTOR_SLT, BITVECTOR_SLT}, + {internal::Kind::BITVECTOR_SLE, BITVECTOR_SLE}, + {internal::Kind::BITVECTOR_SGT, BITVECTOR_SGT}, + {internal::Kind::BITVECTOR_SGE, BITVECTOR_SGE}, + {internal::Kind::BITVECTOR_ULTBV, BITVECTOR_ULTBV}, + {internal::Kind::BITVECTOR_SLTBV, BITVECTOR_SLTBV}, + {internal::Kind::BITVECTOR_ITE, BITVECTOR_ITE}, + {internal::Kind::BITVECTOR_REDOR, BITVECTOR_REDOR}, + {internal::Kind::BITVECTOR_REDAND, BITVECTOR_REDAND}, + {internal::Kind::BITVECTOR_EXTRACT_OP, BITVECTOR_EXTRACT}, + {internal::Kind::BITVECTOR_REPEAT_OP, BITVECTOR_REPEAT}, + {internal::Kind::BITVECTOR_ZERO_EXTEND_OP, BITVECTOR_ZERO_EXTEND}, + {internal::Kind::BITVECTOR_SIGN_EXTEND_OP, BITVECTOR_SIGN_EXTEND}, + {internal::Kind::BITVECTOR_ROTATE_LEFT_OP, BITVECTOR_ROTATE_LEFT}, + {internal::Kind::BITVECTOR_ROTATE_RIGHT_OP, BITVECTOR_ROTATE_RIGHT}, + {internal::Kind::BITVECTOR_EXTRACT, BITVECTOR_EXTRACT}, + {internal::Kind::BITVECTOR_REPEAT, BITVECTOR_REPEAT}, + {internal::Kind::BITVECTOR_ZERO_EXTEND, BITVECTOR_ZERO_EXTEND}, + {internal::Kind::BITVECTOR_SIGN_EXTEND, BITVECTOR_SIGN_EXTEND}, + {internal::Kind::BITVECTOR_ROTATE_LEFT, BITVECTOR_ROTATE_LEFT}, + {internal::Kind::BITVECTOR_ROTATE_RIGHT, BITVECTOR_ROTATE_RIGHT}, + {internal::Kind::INT_TO_BITVECTOR_OP, INT_TO_BITVECTOR}, + {internal::Kind::INT_TO_BITVECTOR, INT_TO_BITVECTOR}, + {internal::Kind::BITVECTOR_TO_NAT, BITVECTOR_TO_NAT}, /* FP -------------------------------------------------------------- */ - {cvc5::Kind::CONST_FLOATINGPOINT, CONST_FLOATINGPOINT}, - {cvc5::Kind::CONST_ROUNDINGMODE, CONST_ROUNDINGMODE}, - {cvc5::Kind::FLOATINGPOINT_FP, FLOATINGPOINT_FP}, - {cvc5::Kind::FLOATINGPOINT_EQ, FLOATINGPOINT_EQ}, - {cvc5::Kind::FLOATINGPOINT_ABS, FLOATINGPOINT_ABS}, - {cvc5::Kind::FLOATINGPOINT_NEG, FLOATINGPOINT_NEG}, - {cvc5::Kind::FLOATINGPOINT_ADD, FLOATINGPOINT_ADD}, - {cvc5::Kind::FLOATINGPOINT_SUB, FLOATINGPOINT_SUB}, - {cvc5::Kind::FLOATINGPOINT_MULT, FLOATINGPOINT_MULT}, - {cvc5::Kind::FLOATINGPOINT_DIV, FLOATINGPOINT_DIV}, - {cvc5::Kind::FLOATINGPOINT_FMA, FLOATINGPOINT_FMA}, - {cvc5::Kind::FLOATINGPOINT_SQRT, FLOATINGPOINT_SQRT}, - {cvc5::Kind::FLOATINGPOINT_REM, FLOATINGPOINT_REM}, - {cvc5::Kind::FLOATINGPOINT_RTI, FLOATINGPOINT_RTI}, - {cvc5::Kind::FLOATINGPOINT_MIN, FLOATINGPOINT_MIN}, - {cvc5::Kind::FLOATINGPOINT_MAX, FLOATINGPOINT_MAX}, - {cvc5::Kind::FLOATINGPOINT_LEQ, FLOATINGPOINT_LEQ}, - {cvc5::Kind::FLOATINGPOINT_LT, FLOATINGPOINT_LT}, - {cvc5::Kind::FLOATINGPOINT_GEQ, FLOATINGPOINT_GEQ}, - {cvc5::Kind::FLOATINGPOINT_GT, FLOATINGPOINT_GT}, - {cvc5::Kind::FLOATINGPOINT_IS_NORMAL, FLOATINGPOINT_IS_NORMAL}, - {cvc5::Kind::FLOATINGPOINT_IS_SUBNORMAL, FLOATINGPOINT_IS_SUBNORMAL}, - {cvc5::Kind::FLOATINGPOINT_IS_ZERO, FLOATINGPOINT_IS_ZERO}, - {cvc5::Kind::FLOATINGPOINT_IS_INF, FLOATINGPOINT_IS_INF}, - {cvc5::Kind::FLOATINGPOINT_IS_NAN, FLOATINGPOINT_IS_NAN}, - {cvc5::Kind::FLOATINGPOINT_IS_NEG, FLOATINGPOINT_IS_NEG}, - {cvc5::Kind::FLOATINGPOINT_IS_POS, FLOATINGPOINT_IS_POS}, - {cvc5::Kind::FLOATINGPOINT_TO_FP_FROM_IEEE_BV_OP, + {internal::Kind::CONST_FLOATINGPOINT, CONST_FLOATINGPOINT}, + {internal::Kind::CONST_ROUNDINGMODE, CONST_ROUNDINGMODE}, + {internal::Kind::FLOATINGPOINT_FP, FLOATINGPOINT_FP}, + {internal::Kind::FLOATINGPOINT_EQ, FLOATINGPOINT_EQ}, + {internal::Kind::FLOATINGPOINT_ABS, FLOATINGPOINT_ABS}, + {internal::Kind::FLOATINGPOINT_NEG, FLOATINGPOINT_NEG}, + {internal::Kind::FLOATINGPOINT_ADD, FLOATINGPOINT_ADD}, + {internal::Kind::FLOATINGPOINT_SUB, FLOATINGPOINT_SUB}, + {internal::Kind::FLOATINGPOINT_MULT, FLOATINGPOINT_MULT}, + {internal::Kind::FLOATINGPOINT_DIV, FLOATINGPOINT_DIV}, + {internal::Kind::FLOATINGPOINT_FMA, FLOATINGPOINT_FMA}, + {internal::Kind::FLOATINGPOINT_SQRT, FLOATINGPOINT_SQRT}, + {internal::Kind::FLOATINGPOINT_REM, FLOATINGPOINT_REM}, + {internal::Kind::FLOATINGPOINT_RTI, FLOATINGPOINT_RTI}, + {internal::Kind::FLOATINGPOINT_MIN, FLOATINGPOINT_MIN}, + {internal::Kind::FLOATINGPOINT_MAX, FLOATINGPOINT_MAX}, + {internal::Kind::FLOATINGPOINT_LEQ, FLOATINGPOINT_LEQ}, + {internal::Kind::FLOATINGPOINT_LT, FLOATINGPOINT_LT}, + {internal::Kind::FLOATINGPOINT_GEQ, FLOATINGPOINT_GEQ}, + {internal::Kind::FLOATINGPOINT_GT, FLOATINGPOINT_GT}, + {internal::Kind::FLOATINGPOINT_IS_NORMAL, FLOATINGPOINT_IS_NORMAL}, + {internal::Kind::FLOATINGPOINT_IS_SUBNORMAL, + FLOATINGPOINT_IS_SUBNORMAL}, + {internal::Kind::FLOATINGPOINT_IS_ZERO, FLOATINGPOINT_IS_ZERO}, + {internal::Kind::FLOATINGPOINT_IS_INF, FLOATINGPOINT_IS_INF}, + {internal::Kind::FLOATINGPOINT_IS_NAN, FLOATINGPOINT_IS_NAN}, + {internal::Kind::FLOATINGPOINT_IS_NEG, FLOATINGPOINT_IS_NEG}, + {internal::Kind::FLOATINGPOINT_IS_POS, FLOATINGPOINT_IS_POS}, + {internal::Kind::FLOATINGPOINT_TO_FP_FROM_IEEE_BV_OP, FLOATINGPOINT_TO_FP_FROM_IEEE_BV}, - {cvc5::Kind::FLOATINGPOINT_TO_FP_FROM_IEEE_BV, + {internal::Kind::FLOATINGPOINT_TO_FP_FROM_IEEE_BV, FLOATINGPOINT_TO_FP_FROM_IEEE_BV}, - {cvc5::Kind::FLOATINGPOINT_TO_FP_FROM_FP_OP, + {internal::Kind::FLOATINGPOINT_TO_FP_FROM_FP_OP, FLOATINGPOINT_TO_FP_FROM_FP}, - {cvc5::Kind::FLOATINGPOINT_TO_FP_FROM_FP, FLOATINGPOINT_TO_FP_FROM_FP}, - {cvc5::Kind::FLOATINGPOINT_TO_FP_FROM_REAL_OP, + {internal::Kind::FLOATINGPOINT_TO_FP_FROM_FP, + FLOATINGPOINT_TO_FP_FROM_FP}, + {internal::Kind::FLOATINGPOINT_TO_FP_FROM_REAL_OP, FLOATINGPOINT_TO_FP_FROM_REAL}, - {cvc5::Kind::FLOATINGPOINT_TO_FP_FROM_REAL, + {internal::Kind::FLOATINGPOINT_TO_FP_FROM_REAL, FLOATINGPOINT_TO_FP_FROM_REAL}, - {cvc5::Kind::FLOATINGPOINT_TO_FP_FROM_SBV_OP, + {internal::Kind::FLOATINGPOINT_TO_FP_FROM_SBV_OP, FLOATINGPOINT_TO_FP_FROM_SBV}, - {cvc5::Kind::FLOATINGPOINT_TO_FP_FROM_SBV, + {internal::Kind::FLOATINGPOINT_TO_FP_FROM_SBV, FLOATINGPOINT_TO_FP_FROM_SBV}, - {cvc5::Kind::FLOATINGPOINT_TO_FP_FROM_UBV_OP, + {internal::Kind::FLOATINGPOINT_TO_FP_FROM_UBV_OP, FLOATINGPOINT_TO_FP_FROM_UBV}, - {cvc5::Kind::FLOATINGPOINT_TO_FP_FROM_UBV, + {internal::Kind::FLOATINGPOINT_TO_FP_FROM_UBV, FLOATINGPOINT_TO_FP_FROM_UBV}, - {cvc5::Kind::FLOATINGPOINT_TO_UBV_OP, FLOATINGPOINT_TO_UBV}, - {cvc5::Kind::FLOATINGPOINT_TO_UBV, FLOATINGPOINT_TO_UBV}, - {cvc5::Kind::FLOATINGPOINT_TO_UBV_TOTAL_OP, INTERNAL_KIND}, - {cvc5::Kind::FLOATINGPOINT_TO_UBV_TOTAL, INTERNAL_KIND}, - {cvc5::Kind::FLOATINGPOINT_TO_SBV_OP, FLOATINGPOINT_TO_SBV}, - {cvc5::Kind::FLOATINGPOINT_TO_SBV, FLOATINGPOINT_TO_SBV}, - {cvc5::Kind::FLOATINGPOINT_TO_SBV_TOTAL_OP, INTERNAL_KIND}, - {cvc5::Kind::FLOATINGPOINT_TO_SBV_TOTAL, INTERNAL_KIND}, - {cvc5::Kind::FLOATINGPOINT_TO_REAL, FLOATINGPOINT_TO_REAL}, - {cvc5::Kind::FLOATINGPOINT_TO_REAL_TOTAL, INTERNAL_KIND}, + {internal::Kind::FLOATINGPOINT_TO_UBV_OP, FLOATINGPOINT_TO_UBV}, + {internal::Kind::FLOATINGPOINT_TO_UBV, FLOATINGPOINT_TO_UBV}, + {internal::Kind::FLOATINGPOINT_TO_UBV_TOTAL_OP, INTERNAL_KIND}, + {internal::Kind::FLOATINGPOINT_TO_UBV_TOTAL, INTERNAL_KIND}, + {internal::Kind::FLOATINGPOINT_TO_SBV_OP, FLOATINGPOINT_TO_SBV}, + {internal::Kind::FLOATINGPOINT_TO_SBV, FLOATINGPOINT_TO_SBV}, + {internal::Kind::FLOATINGPOINT_TO_SBV_TOTAL_OP, INTERNAL_KIND}, + {internal::Kind::FLOATINGPOINT_TO_SBV_TOTAL, INTERNAL_KIND}, + {internal::Kind::FLOATINGPOINT_TO_REAL, FLOATINGPOINT_TO_REAL}, + {internal::Kind::FLOATINGPOINT_TO_REAL_TOTAL, INTERNAL_KIND}, /* Arrays ---------------------------------------------------------- */ - {cvc5::Kind::SELECT, SELECT}, - {cvc5::Kind::STORE, STORE}, - {cvc5::Kind::STORE_ALL, CONST_ARRAY}, + {internal::Kind::SELECT, SELECT}, + {internal::Kind::STORE, STORE}, + {internal::Kind::STORE_ALL, CONST_ARRAY}, /* Datatypes ------------------------------------------------------- */ - {cvc5::Kind::APPLY_SELECTOR, APPLY_SELECTOR}, - {cvc5::Kind::APPLY_CONSTRUCTOR, APPLY_CONSTRUCTOR}, - {cvc5::Kind::APPLY_TESTER, APPLY_TESTER}, - {cvc5::Kind::APPLY_UPDATER, APPLY_UPDATER}, - {cvc5::Kind::DT_SIZE, DT_SIZE}, - {cvc5::Kind::MATCH, MATCH}, - {cvc5::Kind::MATCH_CASE, MATCH_CASE}, - {cvc5::Kind::MATCH_BIND_CASE, MATCH_BIND_CASE}, - {cvc5::Kind::TUPLE_PROJECT, TUPLE_PROJECT}, - {cvc5::Kind::TUPLE_PROJECT_OP, TUPLE_PROJECT}, + {internal::Kind::APPLY_SELECTOR, APPLY_SELECTOR}, + {internal::Kind::APPLY_CONSTRUCTOR, APPLY_CONSTRUCTOR}, + {internal::Kind::APPLY_TESTER, APPLY_TESTER}, + {internal::Kind::APPLY_UPDATER, APPLY_UPDATER}, + {internal::Kind::DT_SIZE, DT_SIZE}, + {internal::Kind::MATCH, MATCH}, + {internal::Kind::MATCH_CASE, MATCH_CASE}, + {internal::Kind::MATCH_BIND_CASE, MATCH_BIND_CASE}, + {internal::Kind::TUPLE_PROJECT, TUPLE_PROJECT}, + {internal::Kind::TUPLE_PROJECT_OP, TUPLE_PROJECT}, /* Separation Logic ------------------------------------------------ */ - {cvc5::Kind::SEP_NIL, SEP_NIL}, - {cvc5::Kind::SEP_EMP, SEP_EMP}, - {cvc5::Kind::SEP_PTO, SEP_PTO}, - {cvc5::Kind::SEP_STAR, SEP_STAR}, - {cvc5::Kind::SEP_WAND, SEP_WAND}, + {internal::Kind::SEP_NIL, SEP_NIL}, + {internal::Kind::SEP_EMP, SEP_EMP}, + {internal::Kind::SEP_PTO, SEP_PTO}, + {internal::Kind::SEP_STAR, SEP_STAR}, + {internal::Kind::SEP_WAND, SEP_WAND}, /* Sets ------------------------------------------------------------ */ - {cvc5::Kind::SET_EMPTY, SET_EMPTY}, - {cvc5::Kind::SET_UNION, SET_UNION}, - {cvc5::Kind::SET_INTER, SET_INTER}, - {cvc5::Kind::SET_MINUS, SET_MINUS}, - {cvc5::Kind::SET_SUBSET, SET_SUBSET}, - {cvc5::Kind::SET_MEMBER, SET_MEMBER}, - {cvc5::Kind::SET_SINGLETON, SET_SINGLETON}, - {cvc5::Kind::SET_INSERT, SET_INSERT}, - {cvc5::Kind::SET_CARD, SET_CARD}, - {cvc5::Kind::SET_COMPLEMENT, SET_COMPLEMENT}, - {cvc5::Kind::SET_UNIVERSE, SET_UNIVERSE}, - {cvc5::Kind::SET_COMPREHENSION, SET_COMPREHENSION}, - {cvc5::Kind::SET_CHOOSE, SET_CHOOSE}, - {cvc5::Kind::SET_IS_SINGLETON, SET_IS_SINGLETON}, - {cvc5::Kind::SET_MAP, SET_MAP}, + {internal::Kind::SET_EMPTY, SET_EMPTY}, + {internal::Kind::SET_UNION, SET_UNION}, + {internal::Kind::SET_INTER, SET_INTER}, + {internal::Kind::SET_MINUS, SET_MINUS}, + {internal::Kind::SET_SUBSET, SET_SUBSET}, + {internal::Kind::SET_MEMBER, SET_MEMBER}, + {internal::Kind::SET_SINGLETON, SET_SINGLETON}, + {internal::Kind::SET_INSERT, SET_INSERT}, + {internal::Kind::SET_CARD, SET_CARD}, + {internal::Kind::SET_COMPLEMENT, SET_COMPLEMENT}, + {internal::Kind::SET_UNIVERSE, SET_UNIVERSE}, + {internal::Kind::SET_COMPREHENSION, SET_COMPREHENSION}, + {internal::Kind::SET_CHOOSE, SET_CHOOSE}, + {internal::Kind::SET_IS_SINGLETON, SET_IS_SINGLETON}, + {internal::Kind::SET_MAP, SET_MAP}, /* Relations ------------------------------------------------------- */ - {cvc5::Kind::RELATION_JOIN, RELATION_JOIN}, - {cvc5::Kind::RELATION_PRODUCT, RELATION_PRODUCT}, - {cvc5::Kind::RELATION_TRANSPOSE, RELATION_TRANSPOSE}, - {cvc5::Kind::RELATION_TCLOSURE, RELATION_TCLOSURE}, - {cvc5::Kind::RELATION_JOIN_IMAGE, RELATION_JOIN_IMAGE}, - {cvc5::Kind::RELATION_IDEN, RELATION_IDEN}, + {internal::Kind::RELATION_JOIN, RELATION_JOIN}, + {internal::Kind::RELATION_PRODUCT, RELATION_PRODUCT}, + {internal::Kind::RELATION_TRANSPOSE, RELATION_TRANSPOSE}, + {internal::Kind::RELATION_TCLOSURE, RELATION_TCLOSURE}, + {internal::Kind::RELATION_JOIN_IMAGE, RELATION_JOIN_IMAGE}, + {internal::Kind::RELATION_IDEN, RELATION_IDEN}, /* Bags ------------------------------------------------------------ */ - {cvc5::Kind::BAG_UNION_MAX, BAG_UNION_MAX}, - {cvc5::Kind::BAG_UNION_DISJOINT, BAG_UNION_DISJOINT}, - {cvc5::Kind::BAG_INTER_MIN, BAG_INTER_MIN}, - {cvc5::Kind::BAG_DIFFERENCE_SUBTRACT, BAG_DIFFERENCE_SUBTRACT}, - {cvc5::Kind::BAG_DIFFERENCE_REMOVE, BAG_DIFFERENCE_REMOVE}, - {cvc5::Kind::BAG_SUBBAG, BAG_SUBBAG}, - {cvc5::Kind::BAG_COUNT, BAG_COUNT}, - {cvc5::Kind::BAG_MEMBER, BAG_MEMBER}, - {cvc5::Kind::BAG_DUPLICATE_REMOVAL, BAG_DUPLICATE_REMOVAL}, - {cvc5::Kind::BAG_MAKE, BAG_MAKE}, - {cvc5::Kind::BAG_EMPTY, BAG_EMPTY}, - {cvc5::Kind::BAG_CARD, BAG_CARD}, - {cvc5::Kind::BAG_CHOOSE, BAG_CHOOSE}, - {cvc5::Kind::BAG_IS_SINGLETON, BAG_IS_SINGLETON}, - {cvc5::Kind::BAG_FROM_SET, BAG_FROM_SET}, - {cvc5::Kind::BAG_TO_SET, BAG_TO_SET}, - {cvc5::Kind::BAG_MAP, BAG_MAP}, - {cvc5::Kind::BAG_FILTER, BAG_FILTER}, - {cvc5::Kind::BAG_FOLD, BAG_FOLD}, - {cvc5::Kind::TABLE_PRODUCT, TABLE_PRODUCT}, + {internal::Kind::BAG_UNION_MAX, BAG_UNION_MAX}, + {internal::Kind::BAG_UNION_DISJOINT, BAG_UNION_DISJOINT}, + {internal::Kind::BAG_INTER_MIN, BAG_INTER_MIN}, + {internal::Kind::BAG_DIFFERENCE_SUBTRACT, BAG_DIFFERENCE_SUBTRACT}, + {internal::Kind::BAG_DIFFERENCE_REMOVE, BAG_DIFFERENCE_REMOVE}, + {internal::Kind::BAG_SUBBAG, BAG_SUBBAG}, + {internal::Kind::BAG_COUNT, BAG_COUNT}, + {internal::Kind::BAG_MEMBER, BAG_MEMBER}, + {internal::Kind::BAG_DUPLICATE_REMOVAL, BAG_DUPLICATE_REMOVAL}, + {internal::Kind::BAG_MAKE, BAG_MAKE}, + {internal::Kind::BAG_EMPTY, BAG_EMPTY}, + {internal::Kind::BAG_CARD, BAG_CARD}, + {internal::Kind::BAG_CHOOSE, BAG_CHOOSE}, + {internal::Kind::BAG_IS_SINGLETON, BAG_IS_SINGLETON}, + {internal::Kind::BAG_FROM_SET, BAG_FROM_SET}, + {internal::Kind::BAG_TO_SET, BAG_TO_SET}, + {internal::Kind::BAG_MAP, BAG_MAP}, + {internal::Kind::BAG_FILTER, BAG_FILTER}, + {internal::Kind::BAG_FOLD, BAG_FOLD}, + {internal::Kind::TABLE_PRODUCT, TABLE_PRODUCT}, /* Strings --------------------------------------------------------- */ - {cvc5::Kind::STRING_CONCAT, STRING_CONCAT}, - {cvc5::Kind::STRING_IN_REGEXP, STRING_IN_REGEXP}, - {cvc5::Kind::STRING_LENGTH, STRING_LENGTH}, - {cvc5::Kind::STRING_SUBSTR, STRING_SUBSTR}, - {cvc5::Kind::STRING_UPDATE, STRING_UPDATE}, - {cvc5::Kind::STRING_CHARAT, STRING_CHARAT}, - {cvc5::Kind::STRING_CONTAINS, STRING_CONTAINS}, - {cvc5::Kind::STRING_INDEXOF, STRING_INDEXOF}, - {cvc5::Kind::STRING_INDEXOF_RE, STRING_INDEXOF_RE}, - {cvc5::Kind::STRING_REPLACE, STRING_REPLACE}, - {cvc5::Kind::STRING_REPLACE_ALL, STRING_REPLACE_ALL}, - {cvc5::Kind::STRING_REPLACE_RE, STRING_REPLACE_RE}, - {cvc5::Kind::STRING_REPLACE_RE_ALL, STRING_REPLACE_RE_ALL}, - {cvc5::Kind::STRING_TO_LOWER, STRING_TO_LOWER}, - {cvc5::Kind::STRING_TO_UPPER, STRING_TO_UPPER}, - {cvc5::Kind::STRING_REV, STRING_REV}, - {cvc5::Kind::STRING_FROM_CODE, STRING_FROM_CODE}, - {cvc5::Kind::STRING_TO_CODE, STRING_TO_CODE}, - {cvc5::Kind::STRING_LT, STRING_LT}, - {cvc5::Kind::STRING_LEQ, STRING_LEQ}, - {cvc5::Kind::STRING_PREFIX, STRING_PREFIX}, - {cvc5::Kind::STRING_SUFFIX, STRING_SUFFIX}, - {cvc5::Kind::STRING_IS_DIGIT, STRING_IS_DIGIT}, - {cvc5::Kind::STRING_ITOS, STRING_FROM_INT}, - {cvc5::Kind::STRING_STOI, STRING_TO_INT}, - {cvc5::Kind::CONST_STRING, CONST_STRING}, - {cvc5::Kind::STRING_TO_REGEXP, STRING_TO_REGEXP}, - {cvc5::Kind::REGEXP_CONCAT, REGEXP_CONCAT}, - {cvc5::Kind::REGEXP_UNION, REGEXP_UNION}, - {cvc5::Kind::REGEXP_INTER, REGEXP_INTER}, - {cvc5::Kind::REGEXP_DIFF, REGEXP_DIFF}, - {cvc5::Kind::REGEXP_STAR, REGEXP_STAR}, - {cvc5::Kind::REGEXP_PLUS, REGEXP_PLUS}, - {cvc5::Kind::REGEXP_OPT, REGEXP_OPT}, - {cvc5::Kind::REGEXP_RANGE, REGEXP_RANGE}, - {cvc5::Kind::REGEXP_REPEAT, REGEXP_REPEAT}, - {cvc5::Kind::REGEXP_REPEAT_OP, REGEXP_REPEAT}, - {cvc5::Kind::REGEXP_LOOP, REGEXP_LOOP}, - {cvc5::Kind::REGEXP_LOOP_OP, REGEXP_LOOP}, - {cvc5::Kind::REGEXP_NONE, REGEXP_NONE}, - {cvc5::Kind::REGEXP_ALL, REGEXP_ALL}, - {cvc5::Kind::REGEXP_ALLCHAR, REGEXP_ALLCHAR}, - {cvc5::Kind::REGEXP_COMPLEMENT, REGEXP_COMPLEMENT}, - {cvc5::Kind::CONST_SEQUENCE, CONST_SEQUENCE}, - {cvc5::Kind::SEQ_UNIT, SEQ_UNIT}, - {cvc5::Kind::SEQ_NTH, SEQ_NTH}, + {internal::Kind::STRING_CONCAT, STRING_CONCAT}, + {internal::Kind::STRING_IN_REGEXP, STRING_IN_REGEXP}, + {internal::Kind::STRING_LENGTH, STRING_LENGTH}, + {internal::Kind::STRING_SUBSTR, STRING_SUBSTR}, + {internal::Kind::STRING_UPDATE, STRING_UPDATE}, + {internal::Kind::STRING_CHARAT, STRING_CHARAT}, + {internal::Kind::STRING_CONTAINS, STRING_CONTAINS}, + {internal::Kind::STRING_INDEXOF, STRING_INDEXOF}, + {internal::Kind::STRING_INDEXOF_RE, STRING_INDEXOF_RE}, + {internal::Kind::STRING_REPLACE, STRING_REPLACE}, + {internal::Kind::STRING_REPLACE_ALL, STRING_REPLACE_ALL}, + {internal::Kind::STRING_REPLACE_RE, STRING_REPLACE_RE}, + {internal::Kind::STRING_REPLACE_RE_ALL, STRING_REPLACE_RE_ALL}, + {internal::Kind::STRING_TO_LOWER, STRING_TO_LOWER}, + {internal::Kind::STRING_TO_UPPER, STRING_TO_UPPER}, + {internal::Kind::STRING_REV, STRING_REV}, + {internal::Kind::STRING_FROM_CODE, STRING_FROM_CODE}, + {internal::Kind::STRING_TO_CODE, STRING_TO_CODE}, + {internal::Kind::STRING_LT, STRING_LT}, + {internal::Kind::STRING_LEQ, STRING_LEQ}, + {internal::Kind::STRING_PREFIX, STRING_PREFIX}, + {internal::Kind::STRING_SUFFIX, STRING_SUFFIX}, + {internal::Kind::STRING_IS_DIGIT, STRING_IS_DIGIT}, + {internal::Kind::STRING_ITOS, STRING_FROM_INT}, + {internal::Kind::STRING_STOI, STRING_TO_INT}, + {internal::Kind::CONST_STRING, CONST_STRING}, + {internal::Kind::STRING_TO_REGEXP, STRING_TO_REGEXP}, + {internal::Kind::REGEXP_CONCAT, REGEXP_CONCAT}, + {internal::Kind::REGEXP_UNION, REGEXP_UNION}, + {internal::Kind::REGEXP_INTER, REGEXP_INTER}, + {internal::Kind::REGEXP_DIFF, REGEXP_DIFF}, + {internal::Kind::REGEXP_STAR, REGEXP_STAR}, + {internal::Kind::REGEXP_PLUS, REGEXP_PLUS}, + {internal::Kind::REGEXP_OPT, REGEXP_OPT}, + {internal::Kind::REGEXP_RANGE, REGEXP_RANGE}, + {internal::Kind::REGEXP_REPEAT, REGEXP_REPEAT}, + {internal::Kind::REGEXP_REPEAT_OP, REGEXP_REPEAT}, + {internal::Kind::REGEXP_LOOP, REGEXP_LOOP}, + {internal::Kind::REGEXP_LOOP_OP, REGEXP_LOOP}, + {internal::Kind::REGEXP_NONE, REGEXP_NONE}, + {internal::Kind::REGEXP_ALL, REGEXP_ALL}, + {internal::Kind::REGEXP_ALLCHAR, REGEXP_ALLCHAR}, + {internal::Kind::REGEXP_COMPLEMENT, REGEXP_COMPLEMENT}, + {internal::Kind::CONST_SEQUENCE, CONST_SEQUENCE}, + {internal::Kind::SEQ_UNIT, SEQ_UNIT}, + {internal::Kind::SEQ_NTH, SEQ_NTH}, /* Quantifiers ----------------------------------------------------- */ - {cvc5::Kind::FORALL, FORALL}, - {cvc5::Kind::EXISTS, EXISTS}, - {cvc5::Kind::BOUND_VAR_LIST, VARIABLE_LIST}, - {cvc5::Kind::INST_PATTERN, INST_PATTERN}, - {cvc5::Kind::INST_NO_PATTERN, INST_NO_PATTERN}, - {cvc5::Kind::INST_POOL, INST_POOL}, - {cvc5::Kind::INST_ADD_TO_POOL, INST_ADD_TO_POOL}, - {cvc5::Kind::SKOLEM_ADD_TO_POOL, SKOLEM_ADD_TO_POOL}, - {cvc5::Kind::INST_ATTRIBUTE, INST_ATTRIBUTE}, - {cvc5::Kind::INST_PATTERN_LIST, INST_PATTERN_LIST}, + {internal::Kind::FORALL, FORALL}, + {internal::Kind::EXISTS, EXISTS}, + {internal::Kind::BOUND_VAR_LIST, VARIABLE_LIST}, + {internal::Kind::INST_PATTERN, INST_PATTERN}, + {internal::Kind::INST_NO_PATTERN, INST_NO_PATTERN}, + {internal::Kind::INST_POOL, INST_POOL}, + {internal::Kind::INST_ADD_TO_POOL, INST_ADD_TO_POOL}, + {internal::Kind::SKOLEM_ADD_TO_POOL, SKOLEM_ADD_TO_POOL}, + {internal::Kind::INST_ATTRIBUTE, INST_ATTRIBUTE}, + {internal::Kind::INST_PATTERN_LIST, INST_PATTERN_LIST}, /* ----------------------------------------------------------------- */ - {cvc5::Kind::LAST_KIND, LAST_KIND}, + {internal::Kind::LAST_KIND, LAST_KIND}, }; /* Set of kinds for indexed operators */ @@ -723,47 +730,54 @@ const static std::unordered_set s_indexed_kinds( /* Rounding Mode for Floating Points */ /* -------------------------------------------------------------------------- */ -const static std::unordered_map s_rmodes{ - {ROUND_NEAREST_TIES_TO_EVEN, - cvc5::RoundingMode::ROUND_NEAREST_TIES_TO_EVEN}, - {ROUND_TOWARD_POSITIVE, cvc5::RoundingMode::ROUND_TOWARD_POSITIVE}, - {ROUND_TOWARD_NEGATIVE, cvc5::RoundingMode::ROUND_TOWARD_NEGATIVE}, - {ROUND_TOWARD_ZERO, cvc5::RoundingMode::ROUND_TOWARD_ZERO}, - {ROUND_NEAREST_TIES_TO_AWAY, - cvc5::RoundingMode::ROUND_NEAREST_TIES_TO_AWAY}, -}; +const static std::unordered_map + s_rmodes{ + {ROUND_NEAREST_TIES_TO_EVEN, + cvc5::internal::RoundingMode::ROUND_NEAREST_TIES_TO_EVEN}, + {ROUND_TOWARD_POSITIVE, + cvc5::internal::RoundingMode::ROUND_TOWARD_POSITIVE}, + {ROUND_TOWARD_NEGATIVE, + cvc5::internal::RoundingMode::ROUND_TOWARD_NEGATIVE}, + {ROUND_TOWARD_ZERO, cvc5::internal::RoundingMode::ROUND_TOWARD_ZERO}, + {ROUND_NEAREST_TIES_TO_AWAY, + cvc5::internal::RoundingMode::ROUND_NEAREST_TIES_TO_AWAY}, + }; -const static std::unordered_map +const static std::unordered_map s_rmodes_internal{ - {cvc5::RoundingMode::ROUND_NEAREST_TIES_TO_EVEN, + {cvc5::internal::RoundingMode::ROUND_NEAREST_TIES_TO_EVEN, ROUND_NEAREST_TIES_TO_EVEN}, - {cvc5::RoundingMode::ROUND_TOWARD_POSITIVE, ROUND_TOWARD_POSITIVE}, - {cvc5::RoundingMode::ROUND_TOWARD_NEGATIVE, ROUND_TOWARD_NEGATIVE}, - {cvc5::RoundingMode::ROUND_TOWARD_ZERO, ROUND_TOWARD_ZERO}, - {cvc5::RoundingMode::ROUND_NEAREST_TIES_TO_AWAY, + {cvc5::internal::RoundingMode::ROUND_TOWARD_POSITIVE, + ROUND_TOWARD_POSITIVE}, + {cvc5::internal::RoundingMode::ROUND_TOWARD_NEGATIVE, + ROUND_TOWARD_NEGATIVE}, + {cvc5::internal::RoundingMode::ROUND_TOWARD_ZERO, ROUND_TOWARD_ZERO}, + {cvc5::internal::RoundingMode::ROUND_NEAREST_TIES_TO_AWAY, ROUND_NEAREST_TIES_TO_AWAY}, }; namespace { -/** Convert a cvc5::Kind (internal) to a cvc5::api::Kind (external). */ -cvc5::api::Kind intToExtKind(cvc5::Kind k) +/** Convert a internal::Kind (internal) to a cvc5::Kind (external). + */ +cvc5::Kind intToExtKind(internal::Kind k) { - auto it = api::s_kinds_internal.find(k); - if (it == api::s_kinds_internal.end()) + auto it = s_kinds_internal.find(k); + if (it == s_kinds_internal.end()) { - return api::INTERNAL_KIND; + return INTERNAL_KIND; } return it->second; } -/** Convert a cvc5::api::Kind (external) to a cvc5::Kind (internal). */ -cvc5::Kind extToIntKind(cvc5::api::Kind k) +/** Convert a cvc5::Kind (external) to a internal::Kind (internal). + */ +internal::Kind extToIntKind(cvc5::Kind k) { - auto it = api::s_kinds.find(k); - if (it == api::s_kinds.end()) + auto it = s_kinds.find(k); + if (it == s_kinds.end()) { - return cvc5::Kind::UNDEFINED_KIND; + return internal::Kind::UNDEFINED_KIND; } return it->second.first; } @@ -778,18 +792,20 @@ bool isDefinedKind(Kind k) { return k > UNDEFINED_KIND && k < LAST_KIND; } * as datatype constructors/selectors/testers as terms * but interally they are not */ -bool isApplyKind(cvc5::Kind k) +bool isApplyKind(internal::Kind k) { - return (k == cvc5::Kind::APPLY_UF || k == cvc5::Kind::APPLY_CONSTRUCTOR - || k == cvc5::Kind::APPLY_SELECTOR || k == cvc5::Kind::APPLY_TESTER - || k == cvc5::Kind::APPLY_UPDATER); + return (k == internal::Kind::APPLY_UF + || k == internal::Kind::APPLY_CONSTRUCTOR + || k == internal::Kind::APPLY_SELECTOR + || k == internal::Kind::APPLY_TESTER + || k == internal::Kind::APPLY_UPDATER); } #ifdef CVC5_ASSERTIONS /** Return true if given kind is a defined internal kind. */ -bool isDefinedIntKind(cvc5::Kind k) +bool isDefinedIntKind(internal::Kind k) { - return k != cvc5::Kind::UNDEFINED_KIND && k != cvc5::Kind::LAST_KIND; + return k != internal::Kind::UNDEFINED_KIND && k != internal::Kind::LAST_KIND; } #endif @@ -798,7 +814,7 @@ uint32_t minArity(Kind k) { Assert(isDefinedKind(k)); Assert(isDefinedIntKind(extToIntKind(k))); - uint32_t min = cvc5::kind::metakind::getMinArityForKind(extToIntKind(k)); + uint32_t min = internal::kind::metakind::getMinArityForKind(extToIntKind(k)); // At the API level, we treat functions/constructors/selectors/testers as // normal terms instead of making them part of the operator @@ -814,7 +830,7 @@ uint32_t maxArity(Kind k) { Assert(isDefinedKind(k)); Assert(isDefinedIntKind(extToIntKind(k))); - uint32_t max = cvc5::kind::metakind::getMaxArityForKind(extToIntKind(k)); + uint32_t max = internal::kind::metakind::getMaxArityForKind(extToIntKind(k)); // At the API level, we treat functions/constructors/selectors/testers as // normal terms instead of making them part of the operator @@ -916,17 +932,20 @@ class CVC5ApiUnsupportedExceptionStream #define CVC5_API_TRY_CATCH_BEGIN \ try \ { -#define CVC5_API_TRY_CATCH_END \ - } \ - catch (const OptionException& e) \ - { \ - throw CVC5ApiOptionException(e.getMessage()); \ - } \ - catch (const cvc5::RecoverableModalException& e) \ - { \ - throw CVC5ApiRecoverableException(e.getMessage()); \ - } \ - catch (const cvc5::Exception& e) { throw CVC5ApiException(e.getMessage()); } \ +#define CVC5_API_TRY_CATCH_END \ + } \ + catch (const internal::OptionException& e) \ + { \ + throw CVC5ApiOptionException(e.getMessage()); \ + } \ + catch (const internal::RecoverableModalException& e) \ + { \ + throw CVC5ApiRecoverableException(e.getMessage()); \ + } \ + catch (const internal::Exception& e) \ + { \ + throw CVC5ApiException(e.getMessage()); \ + } \ catch (const std::invalid_argument& e) { throw CVC5ApiException(e.what()); } } // namespace @@ -935,28 +954,28 @@ class CVC5ApiUnsupportedExceptionStream /* Result */ /* -------------------------------------------------------------------------- */ -Result::Result(const cvc5::Result& r) : d_result(new cvc5::Result(r)) {} +Result::Result(const internal::Result& r) : d_result(new internal::Result(r)) {} -Result::Result() : d_result(new cvc5::Result()) {} +Result::Result() : d_result(new internal::Result()) {} bool Result::isNull() const { - return d_result->getStatus() == cvc5::Result::NONE; + return d_result->getStatus() == internal::Result::NONE; } bool Result::isSat(void) const { - return d_result->getStatus() == cvc5::Result::SAT; + return d_result->getStatus() == internal::Result::SAT; } bool Result::isUnsat(void) const { - return d_result->getStatus() == cvc5::Result::UNSAT; + return d_result->getStatus() == internal::Result::UNSAT; } bool Result::isUnknown(void) const { - return d_result->getStatus() == cvc5::Result::UNKNOWN; + return d_result->getStatus() == internal::Result::UNKNOWN; } bool Result::operator==(const Result& r) const @@ -971,18 +990,18 @@ bool Result::operator!=(const Result& r) const Result::UnknownExplanation Result::getUnknownExplanation(void) const { - cvc5::Result::UnknownExplanation expl = d_result->getUnknownExplanation(); + internal::Result::UnknownExplanation expl = d_result->getUnknownExplanation(); switch (expl) { - case cvc5::Result::REQUIRES_FULL_CHECK: return REQUIRES_FULL_CHECK; - case cvc5::Result::INCOMPLETE: return INCOMPLETE; - case cvc5::Result::TIMEOUT: return TIMEOUT; - case cvc5::Result::RESOURCEOUT: return RESOURCEOUT; - case cvc5::Result::MEMOUT: return MEMOUT; - case cvc5::Result::INTERRUPTED: return INTERRUPTED; - case cvc5::Result::NO_STATUS: return NO_STATUS; - case cvc5::Result::UNSUPPORTED: return UNSUPPORTED; - case cvc5::Result::OTHER: return OTHER; + case internal::Result::REQUIRES_FULL_CHECK: return REQUIRES_FULL_CHECK; + case internal::Result::INCOMPLETE: return INCOMPLETE; + case internal::Result::TIMEOUT: return TIMEOUT; + case internal::Result::RESOURCEOUT: return RESOURCEOUT; + case internal::Result::MEMOUT: return MEMOUT; + case internal::Result::INTERRUPTED: return INTERRUPTED; + case internal::Result::NO_STATUS: return NO_STATUS; + case internal::Result::UNSUPPORTED: return UNSUPPORTED; + case internal::Result::OTHER: return OTHER; default: return UNKNOWN_REASON; } return UNKNOWN_REASON; @@ -1019,36 +1038,36 @@ std::ostream& operator<<(std::ostream& out, enum Result::UnknownExplanation e) /* SynthResult */ /* -------------------------------------------------------------------------- */ -SynthResult::SynthResult(const cvc5::SynthResult& r) - : d_result(new cvc5::SynthResult(r)) +SynthResult::SynthResult(const internal::SynthResult& r) + : d_result(new internal::SynthResult(r)) { } -SynthResult::SynthResult() : d_result(new cvc5::SynthResult()) {} +SynthResult::SynthResult() : d_result(new internal::SynthResult()) {} bool SynthResult::isNull() const { - return d_result->getStatus() == cvc5::SynthResult::NONE; + return d_result->getStatus() == internal::SynthResult::NONE; } bool SynthResult::hasSolution(void) const { - return d_result->getStatus() == cvc5::SynthResult::SOLUTION; + return d_result->getStatus() == internal::SynthResult::SOLUTION; } bool SynthResult::hasNoSolution() const { - return d_result->getStatus() == cvc5::SynthResult::NO_SOLUTION; + return d_result->getStatus() == internal::SynthResult::NO_SOLUTION; } bool SynthResult::isUnknown() const { - return d_result->getStatus() == cvc5::SynthResult::UNKNOWN; + return d_result->getStatus() == internal::SynthResult::UNKNOWN; } std::string SynthResult::toString(void) const { return d_result->toString(); } -std::ostream& operator<<(std::ostream& out, const SynthResult& sr) +std::ostream& operator<<(std::ostream& out, const internal::SynthResult& sr) { out << sr.toString(); return out; @@ -1058,12 +1077,12 @@ std::ostream& operator<<(std::ostream& out, const SynthResult& sr) /* Sort */ /* -------------------------------------------------------------------------- */ -Sort::Sort(const Solver* slv, const cvc5::TypeNode& t) - : d_solver(slv), d_type(new cvc5::TypeNode(t)) +Sort::Sort(const Solver* slv, const internal::TypeNode& t) + : d_solver(slv), d_type(new internal::TypeNode(t)) { } -Sort::Sort() : d_solver(nullptr), d_type(new cvc5::TypeNode()) {} +Sort::Sort() : d_solver(nullptr), d_type(new internal::TypeNode()) {} Sort::~Sort() { @@ -1073,9 +1092,10 @@ Sort::~Sort() } } -std::set Sort::sortSetToTypeNodes(const std::set& sorts) +std::set Sort::sortSetToTypeNodes( + const std::set& sorts) { - std::set types; + std::set types; for (const Sort& s : sorts) { types.insert(s.getTypeNode()); @@ -1083,10 +1103,10 @@ std::set Sort::sortSetToTypeNodes(const std::set& sorts) return types; } -std::vector Sort::sortVectorToTypeNodes( +std::vector Sort::sortVectorToTypeNodes( const std::vector& sorts) { - std::vector typeNodes; + std::vector typeNodes; for (const Sort& sort : sorts) { typeNodes.push_back(sort.getTypeNode()); @@ -1095,7 +1115,7 @@ std::vector Sort::sortVectorToTypeNodes( } std::vector Sort::typeNodeVectorToSorts( - const Solver* slv, const std::vector& types) + const Solver* slv, const std::vector& types) { std::vector sorts; for (size_t i = 0, tsize = types.size(); i < tsize; i++) @@ -1164,7 +1184,7 @@ bool Sort::hasSymbol() const CVC5_API_TRY_CATCH_BEGIN; CVC5_API_CHECK_NOT_NULL; //////// all checks before this line - return d_type->hasAttribute(expr::VarNameAttr()); + return d_type->hasAttribute(internal::expr::VarNameAttr()); //////// CVC5_API_TRY_CATCH_END; } @@ -1173,11 +1193,11 @@ std::string Sort::getSymbol() const { CVC5_API_TRY_CATCH_BEGIN; CVC5_API_CHECK_NOT_NULL; - CVC5_API_CHECK(d_type->hasAttribute(expr::VarNameAttr())) + CVC5_API_CHECK(d_type->hasAttribute(internal::expr::VarNameAttr())) << "Invalid call to '" << __PRETTY_FUNCTION__ << "', expected the sort to have a symbol."; //////// all checks before this line - return d_type->getAttribute(expr::VarNameAttr()); + return d_type->getAttribute(internal::expr::VarNameAttr()); //////// CVC5_API_TRY_CATCH_END; } @@ -1434,7 +1454,7 @@ Sort Sort::instantiate(const std::vector& params) const || d_type->getSortConstructorArity() == params.size()) << "Arity mismatch for instantiated sort constructor"; //////// all checks before this line - std::vector tparams = sortVectorToTypeNodes(params); + std::vector tparams = sortVectorToTypeNodes(params); if (d_type->isDatatype()) { return Sort(d_solver, d_type->instantiateParametricDatatype(tparams)); @@ -1480,9 +1500,9 @@ Sort Sort::substitute(const std::vector& sorts, CVC5_API_CHECK_SORTS(replacements); //////// all checks before this line - std::vector tSorts = sortVectorToTypeNodes(sorts), - tReplacements = - sortVectorToTypeNodes(replacements); + std::vector tSorts = sortVectorToTypeNodes(sorts), + tReplacements = + sortVectorToTypeNodes(replacements); return Sort(d_solver, d_type->substitute(tSorts.begin(), tSorts.end(), @@ -1501,7 +1521,7 @@ std::string Sort::toString() const CVC5_API_TRY_CATCH_END; } -const cvc5::TypeNode& Sort::getTypeNode(void) const { return *d_type; } +const internal::TypeNode& Sort::getTypeNode(void) const { return *d_type; } /* Constructor sort ------------------------------------------------------- */ @@ -1791,15 +1811,15 @@ bool Sort::isNullHelper() const { return d_type->isNull(); } /* Op */ /* -------------------------------------------------------------------------- */ -Op::Op() : d_solver(nullptr), d_kind(NULL_TERM), d_node(new cvc5::Node()) {} +Op::Op() : d_solver(nullptr), d_kind(NULL_TERM), d_node(new internal::Node()) {} Op::Op(const Solver* slv, const Kind k) - : d_solver(slv), d_kind(k), d_node(new cvc5::Node()) + : d_solver(slv), d_kind(k), d_node(new internal::Node()) { } -Op::Op(const Solver* slv, const Kind k, const cvc5::Node& n) - : d_solver(slv), d_kind(k), d_node(new cvc5::Node(n)) +Op::Op(const Solver* slv, const Kind k, const internal::Node& n) + : d_solver(slv), d_kind(k), d_node(new internal::Node(n)) { } @@ -1905,7 +1925,7 @@ size_t Op::getNumIndicesHelper() const case FLOATINGPOINT_TO_FP_FROM_UBV: size = 2; break; case REGEXP_LOOP: size = 2; break; case TUPLE_PROJECT: - size = d_node->getConst().getIndices().size(); + size = d_node->getConst().getIndices().size(); break; default: CVC5_API_CHECK(false) << "Unhandled kind " << kindToString(k); } @@ -1931,79 +1951,82 @@ Term Op::getIndexHelper(size_t index) const case DIVISIBLE: { t = d_solver->mkRationalValHelper( - Rational(d_node->getConst().k)); + internal::Rational(d_node->getConst().k)); break; } case BITVECTOR_REPEAT: { t = d_solver->mkRationalValHelper( - d_node->getConst().d_repeatAmount); + d_node->getConst().d_repeatAmount); break; } case BITVECTOR_ZERO_EXTEND: { t = d_solver->mkRationalValHelper( - d_node->getConst().d_zeroExtendAmount); + d_node->getConst().d_zeroExtendAmount); break; } case BITVECTOR_SIGN_EXTEND: { t = d_solver->mkRationalValHelper( - d_node->getConst().d_signExtendAmount); + d_node->getConst().d_signExtendAmount); break; } case BITVECTOR_ROTATE_LEFT: { t = d_solver->mkRationalValHelper( - d_node->getConst().d_rotateLeftAmount); + d_node->getConst().d_rotateLeftAmount); break; } case BITVECTOR_ROTATE_RIGHT: { t = d_solver->mkRationalValHelper( - d_node->getConst().d_rotateRightAmount); + d_node->getConst() + .d_rotateRightAmount); break; } case INT_TO_BITVECTOR: { t = d_solver->mkRationalValHelper( - d_node->getConst().d_size); + d_node->getConst().d_size); break; } case IAND: { - t = d_solver->mkRationalValHelper(d_node->getConst().d_size); + t = d_solver->mkRationalValHelper( + d_node->getConst().d_size); break; } case FLOATINGPOINT_TO_UBV: { t = d_solver->mkRationalValHelper( - d_node->getConst().d_bv_size.d_size); + d_node->getConst().d_bv_size.d_size); break; } case FLOATINGPOINT_TO_SBV: { t = d_solver->mkRationalValHelper( - d_node->getConst().d_bv_size.d_size); + d_node->getConst().d_bv_size.d_size); break; } case REGEXP_REPEAT: { t = d_solver->mkRationalValHelper( - d_node->getConst().d_repeatAmount); + d_node->getConst().d_repeatAmount); break; } case BITVECTOR_EXTRACT: { - cvc5::BitVectorExtract ext = d_node->getConst(); + internal::BitVectorExtract ext = + d_node->getConst(); t = index == 0 ? d_solver->mkRationalValHelper(ext.d_high) : d_solver->mkRationalValHelper(ext.d_low); break; } case FLOATINGPOINT_TO_FP_FROM_IEEE_BV: { - cvc5::FloatingPointToFPIEEEBitVector ext = - d_node->getConst(); + internal::FloatingPointToFPIEEEBitVector ext = + d_node->getConst(); t = index == 0 ? d_solver->mkRationalValHelper(ext.getSize().exponentWidth()) @@ -2012,8 +2035,8 @@ Term Op::getIndexHelper(size_t index) const } case FLOATINGPOINT_TO_FP_FROM_FP: { - cvc5::FloatingPointToFPFloatingPoint ext = - d_node->getConst(); + internal::FloatingPointToFPFloatingPoint ext = + d_node->getConst(); t = index == 0 ? d_solver->mkRationalValHelper(ext.getSize().exponentWidth()) : d_solver->mkRationalValHelper(ext.getSize().significandWidth()); @@ -2021,8 +2044,8 @@ Term Op::getIndexHelper(size_t index) const } case FLOATINGPOINT_TO_FP_FROM_REAL: { - cvc5::FloatingPointToFPReal ext = - d_node->getConst(); + internal::FloatingPointToFPReal ext = + d_node->getConst(); t = index == 0 ? d_solver->mkRationalValHelper(ext.getSize().exponentWidth()) @@ -2031,8 +2054,8 @@ Term Op::getIndexHelper(size_t index) const } case FLOATINGPOINT_TO_FP_FROM_SBV: { - cvc5::FloatingPointToFPSignedBitVector ext = - d_node->getConst(); + internal::FloatingPointToFPSignedBitVector ext = + d_node->getConst(); t = index == 0 ? d_solver->mkRationalValHelper(ext.getSize().exponentWidth()) : d_solver->mkRationalValHelper(ext.getSize().significandWidth()); @@ -2040,8 +2063,8 @@ Term Op::getIndexHelper(size_t index) const } case FLOATINGPOINT_TO_FP_FROM_UBV: { - cvc5::FloatingPointToFPUnsignedBitVector ext = - d_node->getConst(); + internal::FloatingPointToFPUnsignedBitVector ext = + d_node->getConst(); t = index == 0 ? d_solver->mkRationalValHelper(ext.getSize().exponentWidth()) : d_solver->mkRationalValHelper(ext.getSize().significandWidth()); @@ -2049,7 +2072,7 @@ Term Op::getIndexHelper(size_t index) const } case REGEXP_LOOP: { - cvc5::RegExpLoop ext = d_node->getConst(); + internal::RegExpLoop ext = d_node->getConst(); t = index == 0 ? d_solver->mkRationalValHelper(ext.d_loopMinOcc) : d_solver->mkRationalValHelper(ext.d_loopMaxOcc); @@ -2059,7 +2082,7 @@ Term Op::getIndexHelper(size_t index) const case TUPLE_PROJECT: { const std::vector& projectionIndices = - d_node->getConst().getIndices(); + d_node->getConst().getIndices(); t = d_solver->mkRationalValHelper(projectionIndices[index]); break; } @@ -2121,11 +2144,11 @@ bool Op::isIndexedHelper() const { return !d_node->isNull(); } /* Term */ /* -------------------------------------------------------------------------- */ -Term::Term() : d_solver(nullptr), d_node(new cvc5::Node()) {} +Term::Term() : d_solver(nullptr), d_node(new internal::Node()) {} -Term::Term(const Solver* slv, const cvc5::Node& n) : d_solver(slv) +Term::Term(const Solver* slv, const internal::Node& n) : d_solver(slv) { - d_node.reset(new cvc5::Node(n)); + d_node.reset(new internal::Node(n)); } Term::~Term() @@ -2277,9 +2300,9 @@ Term Term::substitute(const Term& term, const Term& replacement) const CVC5_API_CHECK(term.getSort() == replacement.getSort()) << "Expecting terms of the same sort in substitute"; //////// all checks before this line - return Term( - d_solver, - d_node->substitute(TNode(*term.d_node), TNode(*replacement.d_node))); + return Term(d_solver, + d_node->substitute(internal::TNode(*term.d_node), + internal::TNode(*replacement.d_node))); //////// CVC5_API_TRY_CATCH_END; } @@ -2293,8 +2316,9 @@ Term Term::substitute(const std::vector& terms, << "Expecting vectors of the same arity in substitute"; CVC5_API_TERM_CHECK_TERMS_WITH_TERMS_SORT_EQUAL_TO(terms, replacements); //////// all checks before this line - std::vector nodes = Term::termVectorToNodes(terms); - std::vector nodeReplacements = Term::termVectorToNodes(replacements); + std::vector nodes = Term::termVectorToNodes(terms); + std::vector nodeReplacements = + Term::termVectorToNodes(replacements); return Term(d_solver, d_node->substitute(nodes.begin(), nodes.end(), @@ -2331,11 +2355,11 @@ Op Term::getOp() const { return Op(d_solver, intToExtKind(d_node->getKind())); } - else if (d_node->getMetaKind() == kind::metakind::PARAMETERIZED) + else if (d_node->getMetaKind() == internal::kind::metakind::PARAMETERIZED) { // it's an indexed operator // so we should return the indexed op - cvc5::Node op = d_node->getOperator(); + internal::Node op = d_node->getOperator(); return Op(d_solver, intToExtKind(d_node->getKind()), op); } // Notice this is the only case where getKindHelper is used, since the @@ -2350,7 +2374,7 @@ bool Term::hasSymbol() const CVC5_API_TRY_CATCH_BEGIN; CVC5_API_CHECK_NOT_NULL; //////// all checks before this line - return d_node->hasAttribute(expr::VarNameAttr()); + return d_node->hasAttribute(internal::expr::VarNameAttr()); //////// CVC5_API_TRY_CATCH_END; } @@ -2359,11 +2383,11 @@ std::string Term::getSymbol() const { CVC5_API_TRY_CATCH_BEGIN; CVC5_API_CHECK_NOT_NULL; - CVC5_API_CHECK(d_node->hasAttribute(expr::VarNameAttr())) + CVC5_API_CHECK(d_node->hasAttribute(internal::expr::VarNameAttr())) << "Invalid call to '" << __PRETTY_FUNCTION__ << "', expected the term to have a symbol."; //////// all checks before this line - return d_node->getAttribute(expr::VarNameAttr()); + return d_node->getAttribute(internal::expr::VarNameAttr()); //////// CVC5_API_TRY_CATCH_END; } @@ -2382,7 +2406,7 @@ Term Term::notTerm() const CVC5_API_TRY_CATCH_BEGIN; CVC5_API_CHECK_NOT_NULL; //////// all checks before this line - Node res = d_node->notNode(); + internal::Node res = d_node->notNode(); (void)res.getType(true); /* kick off type checking */ return Term(d_solver, res); //////// @@ -2395,7 +2419,7 @@ Term Term::andTerm(const Term& t) const CVC5_API_CHECK_NOT_NULL; CVC5_API_CHECK_TERM(t); //////// all checks before this line - Node res = d_node->andNode(*t.d_node); + internal::Node res = d_node->andNode(*t.d_node); (void)res.getType(true); /* kick off type checking */ return Term(d_solver, res); //////// @@ -2408,7 +2432,7 @@ Term Term::orTerm(const Term& t) const CVC5_API_CHECK_NOT_NULL; CVC5_API_CHECK_TERM(t); //////// all checks before this line - Node res = d_node->orNode(*t.d_node); + internal::Node res = d_node->orNode(*t.d_node); (void)res.getType(true); /* kick off type checking */ return Term(d_solver, res); //////// @@ -2421,7 +2445,7 @@ Term Term::xorTerm(const Term& t) const CVC5_API_CHECK_NOT_NULL; CVC5_API_CHECK_TERM(t); //////// all checks before this line - Node res = d_node->xorNode(*t.d_node); + internal::Node res = d_node->xorNode(*t.d_node); (void)res.getType(true); /* kick off type checking */ return Term(d_solver, res); //////// @@ -2434,7 +2458,7 @@ Term Term::eqTerm(const Term& t) const CVC5_API_CHECK_NOT_NULL; CVC5_API_CHECK_TERM(t); //////// all checks before this line - Node res = d_node->eqNode(*t.d_node); + internal::Node res = d_node->eqNode(*t.d_node); (void)res.getType(true); /* kick off type checking */ return Term(d_solver, res); //////// @@ -2447,7 +2471,7 @@ Term Term::impTerm(const Term& t) const CVC5_API_CHECK_NOT_NULL; CVC5_API_CHECK_TERM(t); //////// all checks before this line - Node res = d_node->impNode(*t.d_node); + internal::Node res = d_node->impNode(*t.d_node); (void)res.getType(true); /* kick off type checking */ return Term(d_solver, res); //////// @@ -2461,7 +2485,7 @@ Term Term::iteTerm(const Term& then_t, const Term& else_t) const CVC5_API_CHECK_TERM(then_t); CVC5_API_CHECK_TERM(else_t); //////// all checks before this line - Node res = d_node->iteNode(*then_t.d_node, *else_t.d_node); + internal::Node res = d_node->iteNode(*then_t.d_node, *else_t.d_node); (void)res.getType(true); /* kick off type checking */ return Term(d_solver, res); //////// @@ -2483,7 +2507,7 @@ Term::const_iterator::const_iterator() } Term::const_iterator::const_iterator(const Solver* slv, - const std::shared_ptr& n, + const std::shared_ptr& n, uint32_t p) : d_solver(slv), d_origNode(n), d_pos(p) { @@ -2584,73 +2608,75 @@ Term::const_iterator Term::end() const return Term::const_iterator(d_solver, d_node, endpos); } -const cvc5::Node& Term::getNode(void) const { return *d_node; } +const internal::Node& Term::getNode(void) const { return *d_node; } namespace detail { -const Rational& getRational(const cvc5::Node& node) +const internal::Rational& getRational(const internal::Node& node) { switch (node.getKind()) { - case cvc5::Kind::CAST_TO_REAL: return node[0].getConst(); - case cvc5::Kind::CONST_RATIONAL: return node.getConst(); + case internal::Kind::CAST_TO_REAL: + return node[0].getConst(); + case internal::Kind::CONST_RATIONAL: + return node.getConst(); default: CVC5_API_CHECK(false) << "Node is not a rational."; - return node.getConst(); + return node.getConst(); } } -Integer getInteger(const cvc5::Node& node) +internal::Integer getInteger(const internal::Node& node) { - return node.getConst().getNumerator(); + return node.getConst().getNumerator(); } template -bool checkIntegerBounds(const Integer& i) +bool checkIntegerBounds(const internal::Integer& i) { return i >= std::numeric_limits::min() && i <= std::numeric_limits::max(); } -bool checkReal32Bounds(const Rational& r) +bool checkReal32Bounds(const internal::Rational& r) { return checkIntegerBounds(r.getNumerator()) && checkIntegerBounds(r.getDenominator()); } -bool checkReal64Bounds(const Rational& r) +bool checkReal64Bounds(const internal::Rational& r) { return checkIntegerBounds(r.getNumerator()) && checkIntegerBounds(r.getDenominator()); } -bool isReal(const Node& node) +bool isReal(const internal::Node& node) { - return node.getKind() == cvc5::Kind::CONST_RATIONAL - || node.getKind() == cvc5::Kind::CAST_TO_REAL; + return node.getKind() == internal::Kind::CONST_RATIONAL + || node.getKind() == internal::Kind::CAST_TO_REAL; } -bool isReal32(const Node& node) +bool isReal32(const internal::Node& node) { return isReal(node) && checkReal32Bounds(getRational(node)); } -bool isReal64(const Node& node) +bool isReal64(const internal::Node& node) { return isReal(node) && checkReal64Bounds(getRational(node)); } -bool isInteger(const Node& node) +bool isInteger(const internal::Node& node) { - return node.getKind() == cvc5::Kind::CONST_RATIONAL - && node.getConst().isIntegral(); + return node.getKind() == internal::Kind::CONST_RATIONAL + && node.getConst().isIntegral(); } -bool isInt32(const Node& node) +bool isInt32(const internal::Node& node) { return isInteger(node) && checkIntegerBounds(getInteger(node)); } -bool isUInt32(const Node& node) +bool isUInt32(const internal::Node& node) { return isInteger(node) && checkIntegerBounds(getInteger(node)); } -bool isInt64(const Node& node) +bool isInt64(const internal::Node& node) { return isInteger(node) && checkIntegerBounds(getInteger(node)); } -bool isUInt64(const Node& node) +bool isUInt64(const internal::Node& node) { return isInteger(node) && checkIntegerBounds(getInteger(node)); } @@ -2661,7 +2687,7 @@ int32_t Term::getRealOrIntegerValueSign() const CVC5_API_TRY_CATCH_BEGIN; CVC5_API_CHECK_NOT_NULL; //////// all checks before this line - const Rational& r = detail::getRational(*d_node); + const internal::Rational& r = detail::getRational(*d_node); return static_cast(r.sgn()); //////// CVC5_API_TRY_CATCH_END; @@ -2781,7 +2807,7 @@ bool Term::isStringValue() const CVC5_API_TRY_CATCH_BEGIN; CVC5_API_CHECK_NOT_NULL; //////// all checks before this line - return d_node->getKind() == cvc5::Kind::CONST_STRING; + return d_node->getKind() == internal::Kind::CONST_STRING; //////// CVC5_API_TRY_CATCH_END; } @@ -2790,18 +2816,19 @@ std::wstring Term::getStringValue() const { CVC5_API_TRY_CATCH_BEGIN; CVC5_API_CHECK_NOT_NULL; - CVC5_API_ARG_CHECK_EXPECTED(d_node->getKind() == cvc5::Kind::CONST_STRING, + CVC5_API_ARG_CHECK_EXPECTED(d_node->getKind() == internal::Kind::CONST_STRING, *d_node) << "Term to be a string value when calling getStringValue()"; //////// all checks before this line - return d_node->getConst().toWString(); + return d_node->getConst().toWString(); //////// CVC5_API_TRY_CATCH_END; } -std::vector Term::termVectorToNodes(const std::vector& terms) +std::vector Term::termVectorToNodes( + const std::vector& terms) { - std::vector res; + std::vector res; for (const Term& t : terms) { res.push_back(t.getNode()); @@ -2809,11 +2836,11 @@ std::vector Term::termVectorToNodes(const std::vector& terms) return res; } -std::vector Term::nodeVectorToTerms(const Solver* slv, - const std::vector& nodes) +std::vector Term::nodeVectorToTerms( + const Solver* slv, const std::vector& nodes) { std::vector res; - for (const Node& n : nodes) + for (const internal::Node& n : nodes) { res.push_back(Term(slv, n)); } @@ -2836,7 +2863,7 @@ std::pair Term::getReal32Value() const CVC5_API_ARG_CHECK_EXPECTED(detail::isReal32(*d_node), *d_node) << "Term to be a 32-bit rational value when calling getReal32Value()"; //////// all checks before this line - const Rational& r = detail::getRational(*d_node); + const internal::Rational& r = detail::getRational(*d_node); return std::make_pair(r.getNumerator().getSignedInt(), r.getDenominator().getUnsignedInt()); //////// @@ -2858,7 +2885,7 @@ std::pair Term::getReal64Value() const CVC5_API_ARG_CHECK_EXPECTED(detail::isReal64(*d_node), *d_node) << "Term to be a 64-bit rational value when calling getReal64Value()"; //////// all checks before this line - const Rational& r = detail::getRational(*d_node); + const internal::Rational& r = detail::getRational(*d_node); return std::make_pair(r.getNumerator().getSigned64(), r.getDenominator().getUnsigned64()); //////// @@ -2880,7 +2907,7 @@ std::string Term::getRealValue() const CVC5_API_ARG_CHECK_EXPECTED(detail::isReal(*d_node), *d_node) << "Term to be a rational value when calling getRealValue()"; //////// all checks before this line - const Rational& rat = detail::getRational(*d_node); + const internal::Rational& rat = detail::getRational(*d_node); std::string res = rat.toString(); if (rat.isIntegral()) { @@ -2896,7 +2923,7 @@ bool Term::isConstArray() const CVC5_API_TRY_CATCH_BEGIN; CVC5_API_CHECK_NOT_NULL; //////// all checks before this line - return d_node->getKind() == cvc5::Kind::STORE_ALL; + return d_node->getKind() == internal::Kind::STORE_ALL; //////// CVC5_API_TRY_CATCH_END; } @@ -2904,11 +2931,11 @@ Term Term::getConstArrayBase() const { CVC5_API_TRY_CATCH_BEGIN; CVC5_API_CHECK_NOT_NULL; - CVC5_API_ARG_CHECK_EXPECTED(d_node->getKind() == cvc5::Kind::STORE_ALL, + CVC5_API_ARG_CHECK_EXPECTED(d_node->getKind() == internal::Kind::STORE_ALL, *d_node) << "Term to be a constant array when calling getConstArrayBase()"; //////// all checks before this line - const auto& ar = d_node->getConst(); + const auto& ar = d_node->getConst(); return Term(d_solver, ar.getValue()); //////// CVC5_API_TRY_CATCH_END; @@ -2919,7 +2946,7 @@ bool Term::isBooleanValue() const CVC5_API_TRY_CATCH_BEGIN; CVC5_API_CHECK_NOT_NULL; //////// all checks before this line - return d_node->getKind() == cvc5::Kind::CONST_BOOLEAN; + return d_node->getKind() == internal::Kind::CONST_BOOLEAN; //////// CVC5_API_TRY_CATCH_END; } @@ -2927,8 +2954,8 @@ bool Term::getBooleanValue() const { CVC5_API_TRY_CATCH_BEGIN; CVC5_API_CHECK_NOT_NULL; - CVC5_API_ARG_CHECK_EXPECTED(d_node->getKind() == cvc5::Kind::CONST_BOOLEAN, - *d_node) + CVC5_API_ARG_CHECK_EXPECTED( + d_node->getKind() == internal::Kind::CONST_BOOLEAN, *d_node) << "Term to be a Boolean value when calling getBooleanValue()"; //////// all checks before this line return d_node->getConst(); @@ -2941,7 +2968,7 @@ bool Term::isBitVectorValue() const CVC5_API_TRY_CATCH_BEGIN; CVC5_API_CHECK_NOT_NULL; //////// all checks before this line - return d_node->getKind() == cvc5::Kind::CONST_BITVECTOR; + return d_node->getKind() == internal::Kind::CONST_BITVECTOR; //////// CVC5_API_TRY_CATCH_END; } @@ -2949,11 +2976,11 @@ std::string Term::getBitVectorValue(std::uint32_t base) const { CVC5_API_TRY_CATCH_BEGIN; CVC5_API_CHECK_NOT_NULL; - CVC5_API_ARG_CHECK_EXPECTED(d_node->getKind() == cvc5::Kind::CONST_BITVECTOR, - *d_node) + CVC5_API_ARG_CHECK_EXPECTED( + d_node->getKind() == internal::Kind::CONST_BITVECTOR, *d_node) << "Term to be a bit-vector value when calling getBitVectorValue()"; //////// all checks before this line - return d_node->getConst().toString(base); + return d_node->getConst().toString(base); //////// CVC5_API_TRY_CATCH_END; } @@ -2963,7 +2990,7 @@ bool Term::isUninterpretedSortValue() const CVC5_API_TRY_CATCH_BEGIN; CVC5_API_CHECK_NOT_NULL; //////// all checks before this line - return d_node->getKind() == cvc5::Kind::UNINTERPRETED_SORT_VALUE; + return d_node->getKind() == internal::Kind::UNINTERPRETED_SORT_VALUE; //////// CVC5_API_TRY_CATCH_END; } @@ -2972,12 +2999,12 @@ std::string Term::getUninterpretedSortValue() const CVC5_API_TRY_CATCH_BEGIN; CVC5_API_CHECK_NOT_NULL; CVC5_API_ARG_CHECK_EXPECTED( - d_node->getKind() == cvc5::Kind::UNINTERPRETED_SORT_VALUE, *d_node) + d_node->getKind() == internal::Kind::UNINTERPRETED_SORT_VALUE, *d_node) << "Term to be an abstract value when calling " "getUninterpretedSortValue()"; //////// all checks before this line std::stringstream ss; - ss << d_node->getConst(); + ss << d_node->getConst(); return ss.str(); //////// CVC5_API_TRY_CATCH_END; @@ -2988,8 +3015,8 @@ bool Term::isTupleValue() const CVC5_API_TRY_CATCH_BEGIN; CVC5_API_CHECK_NOT_NULL; //////// all checks before this line - return d_node->getKind() == cvc5::Kind::APPLY_CONSTRUCTOR && d_node->isConst() - && d_node->getType().getDType().isTuple(); + return d_node->getKind() == internal::Kind::APPLY_CONSTRUCTOR + && d_node->isConst() && d_node->getType().getDType().isTuple(); //////// CVC5_API_TRY_CATCH_END; } @@ -2997,10 +3024,10 @@ std::vector Term::getTupleValue() const { CVC5_API_TRY_CATCH_BEGIN; CVC5_API_CHECK_NOT_NULL; - CVC5_API_ARG_CHECK_EXPECTED(d_node->getKind() == cvc5::Kind::APPLY_CONSTRUCTOR - && d_node->isConst() - && d_node->getType().getDType().isTuple(), - *d_node) + CVC5_API_ARG_CHECK_EXPECTED( + d_node->getKind() == internal::Kind::APPLY_CONSTRUCTOR + && d_node->isConst() && d_node->getType().getDType().isTuple(), + *d_node) << "Term to be a tuple value when calling getTupleValue()"; //////// all checks before this line std::vector res; @@ -3018,7 +3045,7 @@ bool Term::isRoundingModeValue() const CVC5_API_TRY_CATCH_BEGIN; CVC5_API_CHECK_NOT_NULL; //////// all checks before this line - return d_node->getKind() == cvc5::Kind::CONST_ROUNDINGMODE; + return d_node->getKind() == internal::Kind::CONST_ROUNDINGMODE; //////// CVC5_API_TRY_CATCH_END; } @@ -3027,11 +3054,11 @@ RoundingMode Term::getRoundingModeValue() const CVC5_API_TRY_CATCH_BEGIN; CVC5_API_CHECK_NOT_NULL; CVC5_API_ARG_CHECK_EXPECTED( - d_node->getKind() == cvc5::Kind::CONST_ROUNDINGMODE, *d_node) + d_node->getKind() == internal::Kind::CONST_ROUNDINGMODE, *d_node) << "Term to be a floating-point rounding mode value when calling " "getRoundingModeValue()"; //////// all checks before this line - return s_rmodes_internal.at(d_node->getConst()); + return s_rmodes_internal.at(d_node->getConst()); //////// CVC5_API_TRY_CATCH_END; } @@ -3041,9 +3068,9 @@ bool Term::isFloatingPointPosZero() const CVC5_API_TRY_CATCH_BEGIN; CVC5_API_CHECK_NOT_NULL; //////// all checks before this line - if (d_node->getKind() == cvc5::Kind::CONST_FLOATINGPOINT) + if (d_node->getKind() == internal::Kind::CONST_FLOATINGPOINT) { - const auto& fp = d_node->getConst(); + const auto& fp = d_node->getConst(); return fp.isZero() && fp.isPositive(); } return false; @@ -3055,9 +3082,9 @@ bool Term::isFloatingPointNegZero() const CVC5_API_TRY_CATCH_BEGIN; CVC5_API_CHECK_NOT_NULL; //////// all checks before this line - if (d_node->getKind() == cvc5::Kind::CONST_FLOATINGPOINT) + if (d_node->getKind() == internal::Kind::CONST_FLOATINGPOINT) { - const auto& fp = d_node->getConst(); + const auto& fp = d_node->getConst(); return fp.isZero() && fp.isNegative(); } return false; @@ -3069,9 +3096,9 @@ bool Term::isFloatingPointPosInf() const CVC5_API_TRY_CATCH_BEGIN; CVC5_API_CHECK_NOT_NULL; //////// all checks before this line - if (d_node->getKind() == cvc5::Kind::CONST_FLOATINGPOINT) + if (d_node->getKind() == internal::Kind::CONST_FLOATINGPOINT) { - const auto& fp = d_node->getConst(); + const auto& fp = d_node->getConst(); return fp.isInfinite() && fp.isPositive(); } return false; @@ -3083,9 +3110,9 @@ bool Term::isFloatingPointNegInf() const CVC5_API_TRY_CATCH_BEGIN; CVC5_API_CHECK_NOT_NULL; //////// all checks before this line - if (d_node->getKind() == cvc5::Kind::CONST_FLOATINGPOINT) + if (d_node->getKind() == internal::Kind::CONST_FLOATINGPOINT) { - const auto& fp = d_node->getConst(); + const auto& fp = d_node->getConst(); return fp.isInfinite() && fp.isNegative(); } return false; @@ -3097,8 +3124,8 @@ bool Term::isFloatingPointNaN() const CVC5_API_TRY_CATCH_BEGIN; CVC5_API_CHECK_NOT_NULL; //////// all checks before this line - return d_node->getKind() == cvc5::Kind::CONST_FLOATINGPOINT - && d_node->getConst().isNaN(); + return d_node->getKind() == internal::Kind::CONST_FLOATINGPOINT + && d_node->getConst().isNaN(); //////// CVC5_API_TRY_CATCH_END; } @@ -3107,7 +3134,7 @@ bool Term::isFloatingPointValue() const CVC5_API_TRY_CATCH_BEGIN; CVC5_API_CHECK_NOT_NULL; //////// all checks before this line - return d_node->getKind() == cvc5::Kind::CONST_FLOATINGPOINT; + return d_node->getKind() == internal::Kind::CONST_FLOATINGPOINT; //////// CVC5_API_TRY_CATCH_END; } @@ -3117,11 +3144,11 @@ std::tuple Term::getFloatingPointValue() CVC5_API_TRY_CATCH_BEGIN; CVC5_API_CHECK_NOT_NULL; CVC5_API_ARG_CHECK_EXPECTED( - d_node->getKind() == cvc5::Kind::CONST_FLOATINGPOINT, *d_node) + d_node->getKind() == internal::Kind::CONST_FLOATINGPOINT, *d_node) << "Term to be a floating-point value when calling " "getFloatingPointValue()"; //////// all checks before this line - const auto& fp = d_node->getConst(); + const auto& fp = d_node->getConst(); return std::make_tuple(fp.getSize().exponentWidth(), fp.getSize().significandWidth(), d_solver->mkValHelper(fp.pack())); @@ -3140,16 +3167,16 @@ bool Term::isSetValue() const } void Term::collectSet(std::set& set, - const cvc5::Node& node, + const internal::Node& node, const Solver* slv) { // We asserted that node has a set type, and node.isConst() // Thus, node only contains of SET_EMPTY, SET_UNION and SET_SINGLETON. switch (node.getKind()) { - case cvc5::Kind::SET_EMPTY: break; - case cvc5::Kind::SET_SINGLETON: set.emplace(Term(slv, node[0])); break; - case cvc5::Kind::SET_UNION: + case internal::Kind::SET_EMPTY: break; + case internal::Kind::SET_SINGLETON: set.emplace(Term(slv, node[0])); break; + case internal::Kind::SET_UNION: { for (const auto& sub : node) { @@ -3184,7 +3211,7 @@ bool Term::isSequenceValue() const CVC5_API_TRY_CATCH_BEGIN; CVC5_API_CHECK_NOT_NULL; //////// all checks before this line - return d_node->getKind() == cvc5::Kind::CONST_SEQUENCE; + return d_node->getKind() == internal::Kind::CONST_SEQUENCE; //////// CVC5_API_TRY_CATCH_END; } @@ -3192,12 +3219,12 @@ std::vector Term::getSequenceValue() const { CVC5_API_TRY_CATCH_BEGIN; CVC5_API_CHECK_NOT_NULL; - CVC5_API_ARG_CHECK_EXPECTED(d_node->getKind() == cvc5::Kind::CONST_SEQUENCE, - *d_node) + CVC5_API_ARG_CHECK_EXPECTED( + d_node->getKind() == internal::Kind::CONST_SEQUENCE, *d_node) << "Term to be a sequence value when calling getSequenceValue()"; //////// all checks before this line std::vector res; - const Sequence& seq = d_node->getConst(); + const internal::Sequence& seq = d_node->getConst(); for (const auto& node: seq.getVec()) { res.emplace_back(Term(d_solver, node)); @@ -3212,7 +3239,7 @@ bool Term::isCardinalityConstraint() const CVC5_API_TRY_CATCH_BEGIN; CVC5_API_CHECK_NOT_NULL; //////// all checks before this line - return d_node->getKind() == cvc5::Kind::CARDINALITY_CONSTRAINT; + return d_node->getKind() == internal::Kind::CARDINALITY_CONSTRAINT; //////// CVC5_API_TRY_CATCH_END; } @@ -3222,19 +3249,20 @@ std::pair Term::getCardinalityConstraint() const CVC5_API_TRY_CATCH_BEGIN; CVC5_API_CHECK_NOT_NULL; CVC5_API_ARG_CHECK_EXPECTED( - d_node->getKind() == cvc5::Kind::CARDINALITY_CONSTRAINT, *d_node) + d_node->getKind() == internal::Kind::CARDINALITY_CONSTRAINT, *d_node) << "Term to be a cardinality constraint when calling " "getCardinalityConstraint()"; // this should never happen since we restrict what the user can create - CVC5_API_ARG_CHECK_EXPECTED(detail::checkIntegerBounds( - d_node->getOperator() - .getConst() - .getUpperBound()), - *d_node) + CVC5_API_ARG_CHECK_EXPECTED( + detail::checkIntegerBounds( + d_node->getOperator() + .getConst() + .getUpperBound()), + *d_node) << "Upper bound for cardinality constraint does not fit uint32_t"; //////// all checks before this line - const CardinalityConstraint& cc = - d_node->getOperator().getConst(); + const internal::CardinalityConstraint& cc = + d_node->getOperator().getConst(); return std::make_pair(Sort(d_solver, cc.getType()), cc.getUpperBound().getUnsignedInt()); //////// @@ -3249,27 +3277,27 @@ std::ostream& operator<<(std::ostream& out, const Term& t) std::ostream& operator<<(std::ostream& out, const std::vector& vector) { - container_to_stream(out, vector); + internal::container_to_stream(out, vector); return out; } std::ostream& operator<<(std::ostream& out, const std::set& set) { - container_to_stream(out, set); + internal::container_to_stream(out, set); return out; } std::ostream& operator<<(std::ostream& out, const std::unordered_set& unordered_set) { - container_to_stream(out, unordered_set); + internal::container_to_stream(out, unordered_set); return out; } template std::ostream& operator<<(std::ostream& out, const std::map& map) { - container_to_stream(out, map); + internal::container_to_stream(out, map); return out; } @@ -3277,7 +3305,7 @@ template std::ostream& operator<<(std::ostream& out, const std::unordered_map& unordered_map) { - container_to_stream(out, unordered_map); + internal::container_to_stream(out, unordered_map); return out; } @@ -3303,18 +3331,18 @@ Kind Term::getKindHelper() const { switch (d_node->getKind()) { - case cvc5::Kind::STRING_CONCAT: return SEQ_CONCAT; - case cvc5::Kind::STRING_LENGTH: return SEQ_LENGTH; - case cvc5::Kind::STRING_SUBSTR: return SEQ_EXTRACT; - case cvc5::Kind::STRING_UPDATE: return SEQ_UPDATE; - case cvc5::Kind::STRING_CHARAT: return SEQ_AT; - case cvc5::Kind::STRING_CONTAINS: return SEQ_CONTAINS; - case cvc5::Kind::STRING_INDEXOF: return SEQ_INDEXOF; - case cvc5::Kind::STRING_REPLACE: return SEQ_REPLACE; - case cvc5::Kind::STRING_REPLACE_ALL: return SEQ_REPLACE_ALL; - case cvc5::Kind::STRING_REV: return SEQ_REV; - case cvc5::Kind::STRING_PREFIX: return SEQ_PREFIX; - case cvc5::Kind::STRING_SUFFIX: return SEQ_SUFFIX; + case internal::Kind::STRING_CONCAT: return SEQ_CONCAT; + case internal::Kind::STRING_LENGTH: return SEQ_LENGTH; + case internal::Kind::STRING_SUBSTR: return SEQ_EXTRACT; + case internal::Kind::STRING_UPDATE: return SEQ_UPDATE; + case internal::Kind::STRING_CHARAT: return SEQ_AT; + case internal::Kind::STRING_CONTAINS: return SEQ_CONTAINS; + case internal::Kind::STRING_INDEXOF: return SEQ_INDEXOF; + case internal::Kind::STRING_REPLACE: return SEQ_REPLACE; + case internal::Kind::STRING_REPLACE_ALL: return SEQ_REPLACE_ALL; + case internal::Kind::STRING_REV: return SEQ_REV; + case internal::Kind::STRING_PREFIX: return SEQ_PREFIX; + case internal::Kind::STRING_SUFFIX: return SEQ_SUFFIX; default: // fall through to conversion below break; @@ -3331,7 +3359,7 @@ Kind Term::getKindHelper() const bool Term::isCastedReal() const { - if (d_node->getKind() == kind::CAST_TO_REAL) + if (d_node->getKind() == internal::kind::CAST_TO_REAL) { return (*d_node)[0].isConst() && (*d_node)[0].getType().isInteger(); } @@ -3351,7 +3379,7 @@ DatatypeConstructorDecl::DatatypeConstructorDecl() DatatypeConstructorDecl::DatatypeConstructorDecl(const Solver* slv, const std::string& name) - : d_solver(slv), d_ctor(new cvc5::DTypeConstructor(name)) + : d_solver(slv), d_ctor(new internal::DTypeConstructor(name)) { } DatatypeConstructorDecl::~DatatypeConstructorDecl() @@ -3416,7 +3444,7 @@ std::ostream& operator<<(std::ostream& out, std::ostream& operator<<(std::ostream& out, const std::vector& vector) { - container_to_stream(out, vector); + internal::container_to_stream(out, vector); return out; } @@ -3434,7 +3462,7 @@ DatatypeDecl::DatatypeDecl() : d_solver(nullptr), d_dtype(nullptr) {} DatatypeDecl::DatatypeDecl(const Solver* slv, const std::string& name, bool isCoDatatype) - : d_solver(slv), d_dtype(new cvc5::DType(name, isCoDatatype)) + : d_solver(slv), d_dtype(new internal::DType(name, isCoDatatype)) { } @@ -3443,8 +3471,8 @@ DatatypeDecl::DatatypeDecl(const Solver* slv, const Sort& param, bool isCoDatatype) : d_solver(slv), - d_dtype(new cvc5::DType( - name, std::vector{*param.d_type}, isCoDatatype)) + d_dtype(new internal::DType( + name, std::vector{*param.d_type}, isCoDatatype)) { } @@ -3454,9 +3482,9 @@ DatatypeDecl::DatatypeDecl(const Solver* slv, bool isCoDatatype) : d_solver(slv) { - std::vector tparams = Sort::sortVectorToTypeNodes(params); - d_dtype = std::shared_ptr( - new cvc5::DType(name, tparams, isCoDatatype)); + std::vector tparams = Sort::sortVectorToTypeNodes(params); + d_dtype = std::shared_ptr( + new internal::DType(name, tparams, isCoDatatype)); } bool DatatypeDecl::isNullHelper() const { return !d_dtype; } @@ -3538,15 +3566,15 @@ std::ostream& operator<<(std::ostream& out, const DatatypeDecl& dtdecl) return out; } -cvc5::DType& DatatypeDecl::getDatatype(void) const { return *d_dtype; } +internal::DType& DatatypeDecl::getDatatype(void) const { return *d_dtype; } /* DatatypeSelector --------------------------------------------------------- */ DatatypeSelector::DatatypeSelector() : d_solver(nullptr), d_stor(nullptr) {} DatatypeSelector::DatatypeSelector(const Solver* slv, - const cvc5::DTypeSelector& stor) - : d_solver(slv), d_stor(new cvc5::DTypeSelector(stor)) + const internal::DTypeSelector& stor) + : d_solver(slv), d_stor(new internal::DTypeSelector(stor)) { CVC5_API_CHECK(d_stor->isResolved()) << "Expected resolved datatype selector"; } @@ -3633,8 +3661,8 @@ DatatypeConstructor::DatatypeConstructor() : d_solver(nullptr), d_ctor(nullptr) } DatatypeConstructor::DatatypeConstructor(const Solver* slv, - const cvc5::DTypeConstructor& ctor) - : d_solver(slv), d_ctor(new cvc5::DTypeConstructor(ctor)) + const internal::DTypeConstructor& ctor) + : d_solver(slv), d_ctor(new internal::DTypeConstructor(ctor)) { CVC5_API_CHECK(d_ctor->isResolved()) << "Expected resolved datatype constructor"; @@ -3679,10 +3707,10 @@ Term DatatypeConstructor::getInstantiatedConstructorTerm( << "Cannot get specialized constructor type for non-datatype type " << retSort; //////// all checks before this line - Node ret = d_ctor->getInstantiatedConstructor(*retSort.d_type); + internal::Node ret = d_ctor->getInstantiatedConstructor(*retSort.d_type); (void)ret.getType(true); /* kick off type checking */ // apply type ascription to the operator - Term sctor = api::Term(d_solver, ret); + Term sctor = Term(d_solver, ret); return sctor; //////// CVC5_API_TRY_CATCH_END; @@ -3759,14 +3787,14 @@ DatatypeConstructor::const_iterator DatatypeConstructor::end() const } DatatypeConstructor::const_iterator::const_iterator( - const Solver* slv, const cvc5::DTypeConstructor& ctor, bool begin) + const Solver* slv, const internal::DTypeConstructor& ctor, bool begin) { d_solver = slv; d_int_stors = &ctor.getArgs(); - const std::vector>& sels = + const std::vector>& sels = ctor.getArgs(); - for (const std::shared_ptr& s : sels) + for (const std::shared_ptr& s : sels) { /* Can not use emplace_back here since constructor is private. */ d_stors.push_back(DatatypeSelector(d_solver, *s.get())); @@ -3886,8 +3914,8 @@ std::ostream& operator<<(std::ostream& out, const DatatypeConstructor& ctor) /* Datatype ----------------------------------------------------------------- */ -Datatype::Datatype(const Solver* slv, const cvc5::DType& dtype) - : d_solver(slv), d_dtype(new cvc5::DType(dtype)) +Datatype::Datatype(const Solver* slv, const internal::DType& dtype) + : d_solver(slv), d_dtype(new internal::DType(dtype)) { CVC5_API_CHECK(d_dtype->isResolved()) << "Expected resolved datatype"; } @@ -3979,7 +4007,7 @@ std::vector Datatype::getParameters() const CVC5_API_CHECK_NOT_NULL; CVC5_API_CHECK(isParametric()) << "Expected parametric datatype"; //////// all checks before this line - std::vector params = d_dtype->getParameters(); + std::vector params = d_dtype->getParameters(); return Sort::typeNodeVectorToSorts(d_solver, params); //////// CVC5_API_TRY_CATCH_END; @@ -4132,13 +4160,13 @@ DatatypeSelector Datatype::getSelectorForName(const std::string& name) const } Datatype::const_iterator::const_iterator(const Solver* slv, - const cvc5::DType& dtype, + const internal::DType& dtype, bool begin) : d_solver(slv), d_int_ctors(&dtype.getConstructors()) { - const std::vector>& cons = + const std::vector>& cons = dtype.getConstructors(); - for (const std::shared_ptr& c : cons) + for (const std::shared_ptr& c : cons) { /* Can not use emplace_back here since constructor is private. */ d_ctors.push_back(DatatypeConstructor(d_solver, *c.get())); @@ -4396,10 +4424,10 @@ Sort Grammar::resolve() if (!d_sygusVars.empty()) { - bvl = Term( - d_solver, - d_solver->getNodeManager()->mkNode( - cvc5::kind::BOUND_VAR_LIST, Term::termVectorToNodes(d_sygusVars))); + bvl = Term(d_solver, + d_solver->getNodeManager()->mkNode( + internal::kind::BOUND_VAR_LIST, + Term::termVectorToNodes(d_sygusVars))); } std::unordered_map ntsToUnres(d_ntSyms.size()); @@ -4412,8 +4440,8 @@ Sort Grammar::resolve() Sort(d_solver, d_solver->getNodeManager()->mkSort(ntsymbol.toString())); } - std::vector datatypes; - std::set unresTypes; + std::vector datatypes; + std::set unresTypes; datatypes.reserve(d_ntSyms.size()); @@ -4434,7 +4462,7 @@ Sort Grammar::resolve() } bool aci = d_allowConst.find(ntSym) != d_allowConst.end(); - TypeNode btt = ntSym.d_node->getType(); + internal::TypeNode btt = ntSym.d_node->getType(); dtDecl.d_dtype->setSygus(btt, *bvl.d_node, aci, false); // We can be in a case where the only rule specified was (Variable T) @@ -4448,9 +4476,11 @@ Sort Grammar::resolve() unresTypes.insert(*ntsToUnres[ntSym].d_type); } - std::vector datatypeTypes = + std::vector datatypeTypes = d_solver->getNodeManager()->mkMutualDatatypeTypes( - datatypes, unresTypes, NodeManager::DATATYPE_FLAG_PLACEHOLDER); + datatypes, + unresTypes, + internal::NodeManager::DATATYPE_FLAG_PLACEHOLDER); // return is the first datatype return Sort(d_solver, datatypeTypes[0]); @@ -4486,14 +4516,14 @@ void Grammar::addSygusConstructorTerm( { Term lbvl = Term(d_solver, - d_solver->getNodeManager()->mkNode(cvc5::kind::BOUND_VAR_LIST, + d_solver->getNodeManager()->mkNode(internal::kind::BOUND_VAR_LIST, Term::termVectorToNodes(args))); // its operator is a lambda op = Term(d_solver, d_solver->getNodeManager()->mkNode( - cvc5::kind::LAMBDA, *lbvl.d_node, *op.d_node)); + internal::kind::LAMBDA, *lbvl.d_node, *op.d_node)); } - std::vector cargst = Sort::sortVectorToTypeNodes(cargs); + std::vector cargst = Sort::sortVectorToTypeNodes(cargs); dt.d_dtype->addSygusConstructor(*op.d_node, ssCName.str(), cargst); //////// CVC5_API_TRY_CATCH_END; @@ -4536,12 +4566,12 @@ Term Grammar::purifySygusGTerm( return term; } - Node nret; + internal::Node nret; - if (term.d_node->getMetaKind() == kind::metakind::PARAMETERIZED) + if (term.d_node->getMetaKind() == internal::kind::metakind::PARAMETERIZED) { // it's an indexed operator so we should provide the op - NodeBuilder nb(term.d_node->getKind()); + internal::NodeBuilder nb(term.d_node->getKind()); nb << term.d_node->getOperator(); nb.append(Term::termVectorToNodes(pchildren)); nret = nb.constructNode(); @@ -4573,7 +4603,7 @@ void Grammar::addSygusConstructorVariables(DatatypeDecl& dt, { std::stringstream ss; ss << v; - std::vector cargs; + std::vector cargs; dt.d_dtype->addSygusConstructor(*v.d_node, ss.str(), cargs); } } @@ -4584,7 +4614,7 @@ void Grammar::addSygusConstructorVariables(DatatypeDecl& dt, bool Grammar::containsFreeVariables(const Term& rule) const { // we allow the argument list and non-terminal symbols to be in scope - std::unordered_set scope; + std::unordered_set scope; for (const Term& sygusVar : d_sygusVars) { @@ -4596,7 +4626,7 @@ bool Grammar::containsFreeVariables(const Term& rule) const scope.emplace(*ntsymbol.d_node); } - return expr::hasFreeVariablesScope(*rule.d_node, scope); + return internal::expr::hasFreeVariablesScope(*rule.d_node, scope); } std::ostream& operator<<(std::ostream& out, const Grammar& grammar) @@ -4629,7 +4659,7 @@ std::ostream& DriverOptions::out() const struct Stat::StatData { - cvc5::StatExportData data; + internal::StatExportData data; template StatData(T&& t) : data(std::forward(t)) { @@ -4720,7 +4750,7 @@ Stat::Stat(bool internal, bool defaulted, StatData&& sd) std::ostream& operator<<(std::ostream& os, const Stat& sv) { - return cvc5::detail::print(os, sv.d_data->data); + return internal::detail::print(os, sv.d_data->data); } Statistics::BaseType::const_reference Statistics::iterator::operator*() const @@ -4811,7 +4841,7 @@ Statistics::iterator Statistics::end() const return iterator(d_stats.end(), d_stats, false, false); } -Statistics::Statistics(const StatisticsRegistry& reg) +Statistics::Statistics(const internal::StatisticsRegistry& reg) { for (const auto& svp : reg) { @@ -4835,29 +4865,29 @@ std::ostream& operator<<(std::ostream& out, const Statistics& stats) /* Solver */ /* -------------------------------------------------------------------------- */ -Solver::Solver(std::unique_ptr&& original) +Solver::Solver(std::unique_ptr&& original) { - d_nodeMgr = NodeManager::currentNM(); + d_nodeMgr = internal::NodeManager::currentNM(); d_nodeMgr->init(); d_originalOptions = std::move(original); - d_slv.reset(new SolverEngine(d_nodeMgr, d_originalOptions.get())); + d_slv.reset(new internal::SolverEngine(d_nodeMgr, d_originalOptions.get())); d_slv->setSolver(this); - d_rng.reset(new Random(d_slv->getOptions().driver.seed)); + d_rng.reset(new internal::Random(d_slv->getOptions().driver.seed)); resetStatistics(); } -Solver::Solver() : Solver(std::make_unique()) {} +Solver::Solver() : Solver(std::make_unique()) {} Solver::~Solver() {} /* Helpers and private functions */ /* -------------------------------------------------------------------------- */ -NodeManager* Solver::getNodeManager(void) const { return d_nodeMgr; } +internal::NodeManager* Solver::getNodeManager(void) const { return d_nodeMgr; } void Solver::increment_term_stats(Kind kind) const { - if constexpr (configuration::isStatisticsBuild()) + if constexpr (internal::configuration::isStatisticsBuild()) { d_stats->d_terms << kind; } @@ -4865,12 +4895,12 @@ void Solver::increment_term_stats(Kind kind) const void Solver::increment_vars_consts_stats(const Sort& sort, bool is_var) const { - if constexpr (configuration::isStatisticsBuild()) + if constexpr (internal::configuration::isStatisticsBuild()) { - const TypeNode tn = sort.getTypeNode(); - TypeConstant tc = tn.getKind() == cvc5::kind::TYPE_CONSTANT - ? tn.getConst() - : LAST_TYPE; + const internal::TypeNode tn = sort.getTypeNode(); + internal::TypeConstant tc = tn.getKind() == internal::kind::TYPE_CONSTANT + ? tn.getConst() + : internal::LAST_TYPE; if (is_var) { d_stats->d_vars << tc; @@ -4889,7 +4919,7 @@ template Op Solver::mkOpHelper(Kind kind, const T& t) const { //////// all checks before this line - Node res = getNodeManager()->mkConst(t); + internal::Node res = getNodeManager()->mkConst(t); static_cast(res.getType(true)); /* kick off type checking */ return Op(this, kind, res); } @@ -4898,18 +4928,18 @@ template Term Solver::mkValHelper(const T& t) const { //////// all checks before this line - Node res = getNodeManager()->mkConst(t); + internal::Node res = getNodeManager()->mkConst(t); (void)res.getType(true); /* kick off type checking */ return Term(this, res); } -Term Solver::mkRationalValHelper(const Rational& r, bool isInt) const +Term Solver::mkRationalValHelper(const internal::Rational& r, bool isInt) const { //////// all checks before this line - NodeManager* nm = getNodeManager(); - Node res = isInt ? nm->mkConstInt(r) : nm->mkConstReal(r); + internal::NodeManager* nm = getNodeManager(); + internal::Node res = isInt ? nm->mkConstInt(r) : nm->mkConstReal(r); (void)res.getType(true); /* kick off type checking */ - api::Term t = Term(this, res); + Term t = Term(this, res); // NOTE: this block will be eliminated when arithmetic subtyping is eliminated if (!isInt) { @@ -4924,9 +4954,9 @@ Term Solver::mkRealOrIntegerFromStrHelper(const std::string& s, //////// all checks before this line try { - cvc5::Rational r = s.find('/') != std::string::npos - ? cvc5::Rational(s) - : cvc5::Rational::fromDecimal(s); + internal::Rational r = s.find('/') != std::string::npos + ? internal::Rational(s) + : internal::Rational::fromDecimal(s); return mkRationalValHelper(r, isInt); } catch (const std::invalid_argument& e) @@ -4944,7 +4974,7 @@ Term Solver::mkBVFromIntHelper(uint32_t size, uint64_t val) const { CVC5_API_ARG_CHECK_EXPECTED(size > 0, size) << "a bit-width > 0"; //////// all checks before this line - return mkValHelper(cvc5::BitVector(size, val)); + return mkValHelper(internal::BitVector(size, val)); } Term Solver::mkBVFromStrHelper(uint32_t size, @@ -4957,11 +4987,11 @@ Term Solver::mkBVFromStrHelper(uint32_t size, << "base 2, 10, or 16"; //////// all checks before this line - Integer val(s, base); + internal::Integer val(s, base); if (val.strictlyNegative()) { - CVC5_API_CHECK(val >= -Integer(2).pow(size - 1)) + CVC5_API_CHECK(val >= -internal::Integer(2).pow(size - 1)) << "Overflow in bitvector construction (specified bitvector size " << size << " too small to hold value " << s << ")"; } @@ -4971,7 +5001,7 @@ Term Solver::mkBVFromStrHelper(uint32_t size, << "Overflow in bitvector construction (specified bitvector size " << size << " too small to hold value " << s << ")"; } - return mkValHelper(cvc5::BitVector(size, val)); + return mkValHelper(internal::BitVector(size, val)); } Term Solver::getValueHelper(const Term& term) const @@ -4979,15 +5009,15 @@ Term Solver::getValueHelper(const Term& term) const // Note: Term is checked in the caller to avoid double checks bool wasShadow = false; bool freeOrShadowedVar = - expr::hasFreeOrShadowedVar(term.getNode(), wasShadow); + internal::expr::hasFreeOrShadowedVar(term.getNode(), wasShadow); CVC5_API_RECOVERABLE_CHECK(!freeOrShadowedVar) << "Cannot get value of term containing " << (wasShadow ? "shadowed" : "free") << " variables"; //////// all checks before this line - Node value = d_slv->getValue(*term.d_node); + internal::Node value = d_slv->getValue(*term.d_node); Term res = Term(this, value); // May need to wrap in real cast so that user know this is a real. - TypeNode tn = (*term.d_node).getType(); + internal::TypeNode tn = (*term.d_node).getType(); if (!tn.isInteger() && value.getType().isInteger()) { return ensureRealSort(res); @@ -4999,7 +5029,8 @@ Sort Solver::mkTupleSortHelper(const std::vector& sorts) const { // Note: Sorts are checked in the caller to avoid double checks //////// all checks before this line - std::vector typeNodes = Sort::sortVectorToTypeNodes(sorts); + std::vector typeNodes = + Sort::sortVectorToTypeNodes(sorts); return Sort(this, getNodeManager()->mkTupleType(typeNodes)); } @@ -5011,12 +5042,12 @@ Term Solver::mkTermFromKind(Kind kind) const kind) << "PI, REGEXP_NONE, REGEXP_ALL, REGEXP_ALLCHAR or SEP_EMP"; //////// all checks before this line - Node res; - cvc5::Kind k = extToIntKind(kind); + internal::Node res; + internal::Kind k = extToIntKind(kind); if (kind == REGEXP_NONE || kind == REGEXP_ALL || kind == REGEXP_ALLCHAR) { Assert(isDefinedIntKind(k)); - res = d_nodeMgr->mkNode(k, std::vector()); + res = d_nodeMgr->mkNode(k, std::vector()); } else if (kind == SEP_EMP) { @@ -5040,9 +5071,9 @@ Term Solver::mkTermHelper(Kind kind, const std::vector& children) const { return mkTermFromKind(kind); } - std::vector echildren = Term::termVectorToNodes(children); - cvc5::Kind k = extToIntKind(kind); - Node res; + std::vector echildren = Term::termVectorToNodes(children); + internal::Kind k = extToIntKind(kind); + internal::Node res; if (echildren.size() > 2) { if (kind == INTS_DIVISION || kind == XOR || kind == SUB || kind == DIVISION @@ -5062,7 +5093,7 @@ Term Solver::mkTermHelper(Kind kind, const std::vector& children) const // "chainable", but cvc5 internally only supports 2 args res = d_nodeMgr->mkChain(k, echildren); } - else if (kind::isAssociative(k)) + else if (internal::kind::isAssociative(k)) { // mkAssociative has special treatment for associative operators with lots // of children @@ -5075,7 +5106,7 @@ Term Solver::mkTermHelper(Kind kind, const std::vector& children) const res = d_nodeMgr->mkNode(k, echildren); } } - else if (kind::isAssociative(k)) + else if (internal::kind::isAssociative(k)) { // associative case, same as above checkMkTerm(kind, children.size()); @@ -5085,11 +5116,11 @@ Term Solver::mkTermHelper(Kind kind, const std::vector& children) const { // default case, same as above checkMkTerm(kind, children.size()); - if (kind == api::SET_SINGLETON) + if (kind == SET_SINGLETON) { // the type of the term is the same as the type of the internal node // see Term::getSort() - TypeNode type = children[0].d_node->getType(); + internal::TypeNode type = children[0].d_node->getType(); // Internally NodeManager::mkSingleton needs a type argument // to construct a singleton, since there is no difference between // integers and reals (both are Rationals). @@ -5097,11 +5128,11 @@ Term Solver::mkTermHelper(Kind kind, const std::vector& children) const // element type can be used safely here. res = getNodeManager()->mkSingleton(type, *children[0].d_node); } - else if (kind == api::BAG_MAKE) + else if (kind == BAG_MAKE) { // the type of the term is the same as the type of the internal node // see Term::getSort() - TypeNode type = children[0].d_node->getType(); + internal::TypeNode type = children[0].d_node->getType(); // Internally NodeManager::mkBag needs a type argument // to construct a bag, since there is no difference between // integers and reals (both are Rationals). @@ -5110,11 +5141,11 @@ Term Solver::mkTermHelper(Kind kind, const std::vector& children) const res = getNodeManager()->mkBag( type, *children[0].d_node, *children[1].d_node); } - else if (kind == api::SEQ_UNIT) + else if (kind == SEQ_UNIT) { // the type of the term is the same as the type of the internal node // see Term::getSort() - TypeNode type = children[0].d_node->getType(); + internal::TypeNode type = children[0].d_node->getType(); res = getNodeManager()->mkSeqUnit(type, *children[0].d_node); } else @@ -5139,13 +5170,13 @@ Term Solver::mkTermHelper(const Op& op, const std::vector& children) const checkMkTerm(op.d_kind, children.size()); //////// all checks before this line - const cvc5::Kind int_kind = extToIntKind(op.d_kind); - std::vector echildren = Term::termVectorToNodes(children); + const internal::Kind int_kind = extToIntKind(op.d_kind); + std::vector echildren = Term::termVectorToNodes(children); - NodeBuilder nb(int_kind); + internal::NodeBuilder nb(int_kind); nb << *op.d_node; nb.append(echildren); - Node res = nb.constructNode(); + internal::Node res = nb.constructNode(); (void)res.getType(true); /* kick off type checking */ return Term(this, res); @@ -5159,14 +5190,15 @@ std::vector Solver::mkDatatypeSortsInternal( // double checks //////// all checks before this line - std::vector datatypes; + std::vector datatypes; for (size_t i = 0, ndts = dtypedecls.size(); i < ndts; ++i) { datatypes.push_back(dtypedecls[i].getDatatype()); } - std::set utypes = Sort::sortSetToTypeNodes(unresolvedSorts); - std::vector dtypes = + std::set utypes = + Sort::sortSetToTypeNodes(unresolvedSorts); + std::vector dtypes = getNodeManager()->mkMutualDatatypeTypes(datatypes, utypes); std::vector retTypes = Sort::typeNodeVectorToSorts(this, dtypes); return retTypes; @@ -5180,7 +5212,7 @@ Term Solver::synthFunHelper(const std::string& symbol, { // Note: boundVars, sort and grammar are checked in the caller to avoid // double checks. - std::vector varTypes; + std::vector varTypes; for (const auto& bv : boundVars) { if (grammar) @@ -5194,14 +5226,15 @@ Term Solver::synthFunHelper(const std::string& symbol, } //////// all checks before this line - TypeNode funType = varTypes.empty() ? *sort.d_type - : getNodeManager()->mkFunctionType( - varTypes, *sort.d_type); + internal::TypeNode funType = + varTypes.empty() + ? *sort.d_type + : getNodeManager()->mkFunctionType(varTypes, *sort.d_type); - Node fun = getNodeManager()->mkBoundVar(symbol, funType); + internal::Node fun = getNodeManager()->mkBoundVar(symbol, funType); (void)fun.getType(true); /* kick off type checking */ - std::vector bvns = Term::termVectorToNodes(boundVars); + std::vector bvns = Term::termVectorToNodes(boundVars); d_slv->declareSynthFun( fun, @@ -5235,11 +5268,12 @@ Term Solver::ensureTermSort(const Term& term, const Sort& sort) const // constructors. We do this cast using division with 1. This has the // advantage wrt using TO_REAL since (constant) division is always included // in the theory. - res = Term(this, - d_nodeMgr->mkNode(extToIntKind(DIVISION), - *res.d_node, - d_nodeMgr->mkConst(kind::CONST_RATIONAL, - cvc5::Rational(1)))); + res = Term( + this, + d_nodeMgr->mkNode(extToIntKind(DIVISION), + *res.d_node, + d_nodeMgr->mkConst(internal::kind::CONST_RATIONAL, + internal::Rational(1)))); } Assert(res.getSort() == sort); return res; @@ -5255,7 +5289,8 @@ Term Solver::ensureRealSort(const Term& t) const //////// all checks before this line if (t.getSort() == getIntegerSort()) { - Node n = getNodeManager()->mkNode(kind::CAST_TO_REAL, *t.d_node); + internal::Node n = + getNodeManager()->mkNode(internal::kind::CAST_TO_REAL, *t.d_node); return Term(this, n); } return t; @@ -5306,7 +5341,7 @@ void Solver::ensureWellFormedTerm(const Term& t) const if (d_slv->getOptions().expr.wellFormedChecking) { bool wasShadow = false; - if (expr::hasFreeOrShadowedVar(*t.d_node, wasShadow)) + if (internal::expr::hasFreeOrShadowedVar(*t.d_node, wasShadow)) { std::stringstream se; se << "Cannot process term with " << (wasShadow ? "shadowed" : "free") @@ -5330,14 +5365,14 @@ void Solver::ensureWellFormedTerms(const std::vector& ts) const void Solver::resetStatistics() { - if constexpr (configuration::isStatisticsBuild()) + if constexpr (internal::configuration::isStatisticsBuild()) { d_stats.reset(new APIStatistics{ - d_slv->getStatisticsRegistry().registerHistogram( - "api::CONSTANT"), - d_slv->getStatisticsRegistry().registerHistogram( - "api::VARIABLE"), - d_slv->getStatisticsRegistry().registerHistogram("api::TERM"), + d_slv->getStatisticsRegistry() + .registerHistogram("cvc5::CONSTANT"), + d_slv->getStatisticsRegistry() + .registerHistogram("cvc5::VARIABLE"), + d_slv->getStatisticsRegistry().registerHistogram("cvc5::TERM"), }); } } @@ -5354,10 +5389,11 @@ void Solver::checkMkTerm(Kind kind, uint32_t nchildren) const { CVC5_API_KIND_CHECK(kind); Assert(isDefinedIntKind(extToIntKind(kind))); - const cvc5::kind::MetaKind mk = kind::metaKindOf(extToIntKind(kind)); - CVC5_API_KIND_CHECK_EXPECTED( - mk == kind::metakind::PARAMETERIZED || mk == kind::metakind::OPERATOR, - kind) + const internal::kind::MetaKind mk = + internal::kind::metaKindOf(extToIntKind(kind)); + CVC5_API_KIND_CHECK_EXPECTED(mk == internal::kind::metakind::PARAMETERIZED + || mk == internal::kind::metakind::OPERATOR, + kind) << "Only operator-style terms are created with mkTerm(), " "to create variables, constants and values see mkVar(), mkConst() " "and the respective theory-specific functions to create values, " @@ -5376,7 +5412,7 @@ Sort Solver::getNullSort(void) const { CVC5_API_TRY_CATCH_BEGIN; //////// all checks before this line - return Sort(this, TypeNode()); + return Sort(this, internal::TypeNode()); //////// CVC5_API_TRY_CATCH_END; } @@ -5525,7 +5561,7 @@ Sort Solver::mkFunctionSort(const std::vector& sorts, CVC5_API_SOLVER_CHECK_DOMAIN_SORTS(sorts); CVC5_API_SOLVER_CHECK_CODOMAIN_SORT(codomain); //////// all checks before this line - std::vector argTypes = Sort::sortVectorToTypeNodes(sorts); + std::vector argTypes = Sort::sortVectorToTypeNodes(sorts); return Sort(this, getNodeManager()->mkFunctionType(argTypes, *codomain.d_type)); //////// @@ -5536,9 +5572,9 @@ Sort Solver::mkParamSort(const std::string& symbol) const { CVC5_API_TRY_CATCH_BEGIN; //////// all checks before this line - return Sort( - this, - getNodeManager()->mkSort(symbol, NodeManager::SORT_FLAG_PLACEHOLDER)); + return Sort(this, + getNodeManager()->mkSort( + symbol, internal::NodeManager::SORT_FLAG_PLACEHOLDER)); //////// CVC5_API_TRY_CATCH_END; } @@ -5561,7 +5597,7 @@ Sort Solver::mkRecordSort( const std::vector>& fields) const { CVC5_API_TRY_CATCH_BEGIN; - std::vector> f; + std::vector> f; for (size_t i = 0, size = fields.size(); i < size; ++i) { const auto& p = fields[i]; @@ -5685,8 +5721,8 @@ Term Solver::mkPi() const { CVC5_API_TRY_CATCH_BEGIN; //////// all checks before this line - Node res = - d_nodeMgr->mkNullaryOperator(d_nodeMgr->realType(), cvc5::kind::PI); + internal::Node res = + d_nodeMgr->mkNullaryOperator(d_nodeMgr->realType(), internal::kind::PI); (void)res.getType(true); /* kick off type checking */ return Term(this, res); //////// @@ -5710,7 +5746,7 @@ Term Solver::mkInteger(int64_t val) const { CVC5_API_TRY_CATCH_BEGIN; //////// all checks before this line - Term integer = mkRationalValHelper(cvc5::Rational(val)); + Term integer = mkRationalValHelper(internal::Rational(val)); Assert(integer.getSort() == getIntegerSort()); return integer; //////// @@ -5735,7 +5771,7 @@ Term Solver::mkReal(int64_t val) const { CVC5_API_TRY_CATCH_BEGIN; //////// all checks before this line - return mkRationalValHelper(cvc5::Rational(val), false); + return mkRationalValHelper(internal::Rational(val), false); //////// CVC5_API_TRY_CATCH_END; } @@ -5744,7 +5780,7 @@ Term Solver::mkReal(int64_t num, int64_t den) const { CVC5_API_TRY_CATCH_BEGIN; //////// all checks before this line - return mkRationalValHelper(cvc5::Rational(num, den), false); + return mkRationalValHelper(internal::Rational(num, den), false); //////// CVC5_API_TRY_CATCH_END; } @@ -5753,8 +5789,8 @@ Term Solver::mkRegexpAll() const { CVC5_API_TRY_CATCH_BEGIN; //////// all checks before this line - Node res = - d_nodeMgr->mkNode(cvc5::kind::REGEXP_ALL, std::vector()); + internal::Node res = d_nodeMgr->mkNode(internal::kind::REGEXP_ALL, + std::vector()); (void)res.getType(true); /* kick off type checking */ return Term(this, res); //////// @@ -5765,8 +5801,8 @@ Term Solver::mkRegexpNone() const { CVC5_API_TRY_CATCH_BEGIN; //////// all checks before this line - Node res = - d_nodeMgr->mkNode(cvc5::kind::REGEXP_NONE, std::vector()); + internal::Node res = d_nodeMgr->mkNode(internal::kind::REGEXP_NONE, + std::vector()); (void)res.getType(true); /* kick off type checking */ return Term(this, res); //////// @@ -5777,8 +5813,8 @@ Term Solver::mkRegexpAllchar() const { CVC5_API_TRY_CATCH_BEGIN; //////// all checks before this line - Node res = - d_nodeMgr->mkNode(cvc5::kind::REGEXP_ALLCHAR, std::vector()); + internal::Node res = d_nodeMgr->mkNode(internal::kind::REGEXP_ALLCHAR, + std::vector()); (void)res.getType(true); /* kick off type checking */ return Term(this, res); //////// @@ -5793,7 +5829,7 @@ Term Solver::mkEmptySet(const Sort& sort) const CVC5_API_ARG_CHECK_EXPECTED(sort.isNull() || this == sort.d_solver, sort) << "set sort associated with this solver object"; //////// all checks before this line - return mkValHelper(cvc5::EmptySet(*sort.d_type)); + return mkValHelper(internal::EmptySet(*sort.d_type)); //////// CVC5_API_TRY_CATCH_END; } @@ -5806,7 +5842,7 @@ Term Solver::mkEmptyBag(const Sort& sort) const CVC5_API_ARG_CHECK_EXPECTED(sort.isNull() || this == sort.d_solver, sort) << "bag sort associated with this solver object"; //////// all checks before this line - return mkValHelper(cvc5::EmptyBag(*sort.d_type)); + return mkValHelper(internal::EmptyBag(*sort.d_type)); //////// CVC5_API_TRY_CATCH_END; } @@ -5815,8 +5851,8 @@ Term Solver::mkSepEmp() const { CVC5_API_TRY_CATCH_BEGIN; //////// all checks before this line - Node res = getNodeManager()->mkNullaryOperator(d_nodeMgr->booleanType(), - cvc5::Kind::SEP_EMP); + internal::Node res = getNodeManager()->mkNullaryOperator( + d_nodeMgr->booleanType(), internal::Kind::SEP_EMP); (void)res.getType(true); /* kick off type checking */ return Term(this, res); //////// @@ -5828,8 +5864,8 @@ Term Solver::mkSepNil(const Sort& sort) const CVC5_API_TRY_CATCH_BEGIN; CVC5_API_SOLVER_CHECK_SORT(sort); //////// all checks before this line - Node res = - getNodeManager()->mkNullaryOperator(*sort.d_type, cvc5::kind::SEP_NIL); + internal::Node res = getNodeManager()->mkNullaryOperator( + *sort.d_type, internal::kind::SEP_NIL); (void)res.getType(true); /* kick off type checking */ return Term(this, res); //////// @@ -5840,7 +5876,7 @@ Term Solver::mkString(const std::string& s, bool useEscSequences) const { CVC5_API_TRY_CATCH_BEGIN; //////// all checks before this line - return mkValHelper(cvc5::String(s, useEscSequences)); + return mkValHelper(internal::String(s, useEscSequences)); //////// CVC5_API_TRY_CATCH_END; } @@ -5849,7 +5885,7 @@ Term Solver::mkString(const std::wstring& s) const { CVC5_API_TRY_CATCH_BEGIN; //////// all checks before this line - return mkValHelper(cvc5::String(s)); + return mkValHelper(internal::String(s)); //////// CVC5_API_TRY_CATCH_END; } @@ -5859,8 +5895,9 @@ Term Solver::mkEmptySequence(const Sort& sort) const CVC5_API_TRY_CATCH_BEGIN; CVC5_API_SOLVER_CHECK_SORT(sort); //////// all checks before this line - std::vector seq; - Node res = d_nodeMgr->mkConst(Sequence(*sort.d_type, seq)); + std::vector seq; + internal::Node res = + d_nodeMgr->mkConst(internal::Sequence(*sort.d_type, seq)); return Term(this, res); //////// CVC5_API_TRY_CATCH_END; @@ -5872,8 +5909,8 @@ Term Solver::mkUniverseSet(const Sort& sort) const CVC5_API_SOLVER_CHECK_SORT(sort); //////// all checks before this line - Node res = getNodeManager()->mkNullaryOperator(*sort.d_type, - cvc5::kind::SET_UNIVERSE); + internal::Node res = getNodeManager()->mkNullaryOperator( + *sort.d_type, internal::kind::SET_UNIVERSE); // TODO(#2771): Reenable? // (void)res->getType(true); /* kick off type checking */ return Term(this, res); @@ -5912,13 +5949,13 @@ Term Solver::mkConstArray(const Sort& sort, const Term& val) const //////// all checks before this line // handle the special case of (CAST_TO_REAL n) where n is an integer - Node n = *val.d_node; + internal::Node n = *val.d_node; if (val.isCastedReal()) { // this is safe because the constant array stores its type n = n[0]; } - Term res = mkValHelper(cvc5::ArrayStoreAll(*sort.d_type, n)); + Term res = mkValHelper(internal::ArrayStoreAll(*sort.d_type, n)); return res; //////// CVC5_API_TRY_CATCH_END; @@ -5928,8 +5965,8 @@ Term Solver::mkFloatingPointPosInf(uint32_t exp, uint32_t sig) const { CVC5_API_TRY_CATCH_BEGIN; //////// all checks before this line - return mkValHelper( - FloatingPoint::makeInf(FloatingPointSize(exp, sig), false)); + return mkValHelper(internal::FloatingPoint::makeInf( + internal::FloatingPointSize(exp, sig), false)); //////// CVC5_API_TRY_CATCH_END; } @@ -5938,7 +5975,8 @@ Term Solver::mkFloatingPointNegInf(uint32_t exp, uint32_t sig) const { CVC5_API_TRY_CATCH_BEGIN; //////// all checks before this line - return mkValHelper(FloatingPoint::makeInf(FloatingPointSize(exp, sig), true)); + return mkValHelper(internal::FloatingPoint::makeInf( + internal::FloatingPointSize(exp, sig), true)); //////// CVC5_API_TRY_CATCH_END; } @@ -5947,7 +5985,8 @@ Term Solver::mkFloatingPointNaN(uint32_t exp, uint32_t sig) const { CVC5_API_TRY_CATCH_BEGIN; //////// all checks before this line - return mkValHelper(FloatingPoint::makeNaN(FloatingPointSize(exp, sig))); + return mkValHelper( + internal::FloatingPoint::makeNaN(internal::FloatingPointSize(exp, sig))); //////// CVC5_API_TRY_CATCH_END; } @@ -5956,8 +5995,8 @@ Term Solver::mkFloatingPointPosZero(uint32_t exp, uint32_t sig) const { CVC5_API_TRY_CATCH_BEGIN; //////// all checks before this line - return mkValHelper( - FloatingPoint::makeZero(FloatingPointSize(exp, sig), false)); + return mkValHelper(internal::FloatingPoint::makeZero( + internal::FloatingPointSize(exp, sig), false)); //////// CVC5_API_TRY_CATCH_END; } @@ -5966,8 +6005,8 @@ Term Solver::mkFloatingPointNegZero(uint32_t exp, uint32_t sig) const { CVC5_API_TRY_CATCH_BEGIN; //////// all checks before this line - return mkValHelper( - FloatingPoint::makeZero(FloatingPointSize(exp, sig), true)); + return mkValHelper(internal::FloatingPoint::makeZero( + internal::FloatingPointSize(exp, sig), true)); //////// CVC5_API_TRY_CATCH_END; } @@ -5995,8 +6034,8 @@ Term Solver::mkFloatingPoint(uint32_t exp, uint32_t sig, Term val) const val.d_node->getType().isBitVector() && val.d_node->isConst(), val) << "bit-vector constant"; //////// all checks before this line - return mkValHelper( - cvc5::FloatingPoint(exp, sig, val.d_node->getConst())); + return mkValHelper(internal::FloatingPoint( + exp, sig, val.d_node->getConst())); //////// CVC5_API_TRY_CATCH_END; } @@ -6009,9 +6048,10 @@ Term Solver::mkCardinalityConstraint(const Sort& sort, uint32_t upperBound) cons << "an uninterpreted sort"; CVC5_API_ARG_CHECK_EXPECTED(upperBound > 0, upperBound) << "a value > 0"; //////// all checks before this line - Node cco = - d_nodeMgr->mkConst(cvc5::CardinalityConstraint(*sort.d_type, upperBound)); - Node cc = d_nodeMgr->mkNode(cvc5::Kind::CARDINALITY_CONSTRAINT, cco); + internal::Node cco = d_nodeMgr->mkConst( + internal::CardinalityConstraint(*sort.d_type, upperBound)); + internal::Node cc = + d_nodeMgr->mkNode(internal::Kind::CARDINALITY_CONSTRAINT, cco); return Term(this, cc); //////// CVC5_API_TRY_CATCH_END; @@ -6025,7 +6065,7 @@ Term Solver::mkConst(const Sort& sort, const std::string& symbol) const CVC5_API_TRY_CATCH_BEGIN; CVC5_API_SOLVER_CHECK_SORT(sort); //////// all checks before this line - Node res = d_nodeMgr->mkVar(symbol, *sort.d_type); + internal::Node res = d_nodeMgr->mkVar(symbol, *sort.d_type); (void)res.getType(true); /* kick off type checking */ increment_vars_consts_stats(sort, false); return Term(this, res); @@ -6038,7 +6078,7 @@ Term Solver::mkConst(const Sort& sort) const CVC5_API_TRY_CATCH_BEGIN; CVC5_API_SOLVER_CHECK_SORT(sort); //////// all checks before this line - Node res = d_nodeMgr->mkVar(*sort.d_type); + internal::Node res = d_nodeMgr->mkVar(*sort.d_type); (void)res.getType(true); /* kick off type checking */ increment_vars_consts_stats(sort, false); return Term(this, res); @@ -6054,8 +6094,9 @@ Term Solver::mkVar(const Sort& sort, const std::string& symbol) const CVC5_API_TRY_CATCH_BEGIN; CVC5_API_SOLVER_CHECK_SORT(sort); //////// all checks before this line - Node res = symbol.empty() ? d_nodeMgr->mkBoundVar(*sort.d_type) - : d_nodeMgr->mkBoundVar(symbol, *sort.d_type); + internal::Node res = symbol.empty() + ? d_nodeMgr->mkBoundVar(*sort.d_type) + : d_nodeMgr->mkBoundVar(symbol, *sort.d_type); (void)res.getType(true); /* kick off type checking */ increment_vars_consts_stats(sort, true); return Term(this, res); @@ -6146,7 +6187,7 @@ Term Solver::mkTuple(const std::vector& sorts, CVC5_API_SOLVER_CHECK_SORTS(sorts); CVC5_API_SOLVER_CHECK_TERMS(terms); //////// all checks before this line - std::vector args; + std::vector args; for (size_t i = 0, size = sorts.size(); i < size; i++) { args.push_back(*(ensureTermSort(terms[i], sorts[i])).d_node); @@ -6154,10 +6195,10 @@ Term Solver::mkTuple(const std::vector& sorts, Sort s = mkTupleSortHelper(sorts); Datatype dt = s.getDatatype(); - NodeBuilder nb(extToIntKind(APPLY_CONSTRUCTOR)); + internal::NodeBuilder nb(extToIntKind(APPLY_CONSTRUCTOR)); nb << *dt[0].getConstructorTerm().d_node; nb.append(args); - Node res = nb.constructNode(); + internal::Node res = nb.constructNode(); (void)res.getType(true); /* kick off type checking */ return Term(this, res); //////// @@ -6179,82 +6220,82 @@ Op Solver::mkOp(Kind kind, const std::vector& args) const { case BITVECTOR_EXTRACT: CVC5_API_OP_CHECK_ARITY(nargs, 2, kind); - res = mkOpHelper(kind, cvc5::BitVectorExtract(args[0], args[1])); + res = mkOpHelper(kind, internal::BitVectorExtract(args[0], args[1])); break; case BITVECTOR_REPEAT: CVC5_API_OP_CHECK_ARITY(nargs, 1, kind); - res = mkOpHelper(kind, cvc5::BitVectorRepeat(args[0])); + res = mkOpHelper(kind, internal::BitVectorRepeat(args[0])); break; case BITVECTOR_ROTATE_LEFT: CVC5_API_OP_CHECK_ARITY(nargs, 1, kind); - res = mkOpHelper(kind, cvc5::BitVectorRotateLeft(args[0])); + res = mkOpHelper(kind, internal::BitVectorRotateLeft(args[0])); break; case BITVECTOR_ROTATE_RIGHT: CVC5_API_OP_CHECK_ARITY(nargs, 1, kind); - res = mkOpHelper(kind, cvc5::BitVectorRotateRight(args[0])); + res = mkOpHelper(kind, internal::BitVectorRotateRight(args[0])); break; case BITVECTOR_SIGN_EXTEND: CVC5_API_OP_CHECK_ARITY(nargs, 1, kind); - res = mkOpHelper(kind, cvc5::BitVectorSignExtend(args[0])); + res = mkOpHelper(kind, internal::BitVectorSignExtend(args[0])); break; case BITVECTOR_ZERO_EXTEND: CVC5_API_OP_CHECK_ARITY(nargs, 1, kind); - res = mkOpHelper(kind, cvc5::BitVectorZeroExtend(args[0])); + res = mkOpHelper(kind, internal::BitVectorZeroExtend(args[0])); break; case DIVISIBLE: CVC5_API_OP_CHECK_ARITY(nargs, 1, kind); - res = mkOpHelper(kind, cvc5::Divisible(args[0])); + res = mkOpHelper(kind, internal::Divisible(args[0])); break; case FLOATINGPOINT_TO_SBV: CVC5_API_OP_CHECK_ARITY(nargs, 1, kind); - res = mkOpHelper(kind, cvc5::FloatingPointToSBV(args[0])); + res = mkOpHelper(kind, internal::FloatingPointToSBV(args[0])); break; case FLOATINGPOINT_TO_UBV: CVC5_API_OP_CHECK_ARITY(nargs, 1, kind); - res = mkOpHelper(kind, cvc5::FloatingPointToUBV(args[0])); + res = mkOpHelper(kind, internal::FloatingPointToUBV(args[0])); break; case FLOATINGPOINT_TO_FP_FROM_IEEE_BV: CVC5_API_OP_CHECK_ARITY(nargs, 2, kind); - res = mkOpHelper(kind, - cvc5::FloatingPointToFPIEEEBitVector(args[0], args[1])); + res = mkOpHelper( + kind, internal::FloatingPointToFPIEEEBitVector(args[0], args[1])); break; case FLOATINGPOINT_TO_FP_FROM_FP: CVC5_API_OP_CHECK_ARITY(nargs, 2, kind); - res = mkOpHelper(kind, - cvc5::FloatingPointToFPFloatingPoint(args[0], args[1])); + res = mkOpHelper( + kind, internal::FloatingPointToFPFloatingPoint(args[0], args[1])); break; case FLOATINGPOINT_TO_FP_FROM_REAL: CVC5_API_OP_CHECK_ARITY(nargs, 2, kind); - res = mkOpHelper(kind, cvc5::FloatingPointToFPReal(args[0], args[1])); + res = mkOpHelper(kind, internal::FloatingPointToFPReal(args[0], args[1])); break; case FLOATINGPOINT_TO_FP_FROM_SBV: CVC5_API_OP_CHECK_ARITY(nargs, 2, kind); res = mkOpHelper( - kind, cvc5::FloatingPointToFPSignedBitVector(args[0], args[1])); + kind, internal::FloatingPointToFPSignedBitVector(args[0], args[1])); break; case FLOATINGPOINT_TO_FP_FROM_UBV: CVC5_API_OP_CHECK_ARITY(nargs, 2, kind); res = mkOpHelper( - kind, cvc5::FloatingPointToFPUnsignedBitVector(args[0], args[1])); + kind, internal::FloatingPointToFPUnsignedBitVector(args[0], args[1])); break; case IAND: CVC5_API_OP_CHECK_ARITY(nargs, 1, kind); - res = mkOpHelper(kind, cvc5::IntAnd(args[0])); + res = mkOpHelper(kind, internal::IntAnd(args[0])); break; case INT_TO_BITVECTOR: CVC5_API_OP_CHECK_ARITY(nargs, 1, kind); - res = mkOpHelper(kind, cvc5::IntToBitVector(args[0])); + res = mkOpHelper(kind, internal::IntToBitVector(args[0])); break; case REGEXP_REPEAT: CVC5_API_OP_CHECK_ARITY(nargs, 1, kind); - res = mkOpHelper(kind, cvc5::RegExpRepeat(args[0])); + res = mkOpHelper(kind, internal::RegExpRepeat(args[0])); break; case REGEXP_LOOP: CVC5_API_OP_CHECK_ARITY(nargs, 2, kind); - res = mkOpHelper(kind, cvc5::RegExpLoop(args[0], args[1])); + res = mkOpHelper(kind, internal::RegExpLoop(args[0], args[1])); break; case TUPLE_PROJECT: - res = mkOpHelper(kind, cvc5::TupleProjectOp(args)); + res = mkOpHelper(kind, internal::TupleProjectOp(args)); break; default: if (nargs == 0) @@ -6292,7 +6333,7 @@ Op Solver::mkOp(Kind kind, const std::string& arg) const * as invalid. */ CVC5_API_ARG_CHECK_EXPECTED(arg != ".", arg) << "a string representing an integer, real or rational value."; - res = mkOpHelper(kind, cvc5::Divisible(cvc5::Integer(arg))); + res = mkOpHelper(kind, internal::Divisible(internal::Integer(arg))); return res; //////// CVC5_API_TRY_CATCH_END; @@ -6370,7 +6411,8 @@ Result Solver::checkSatAssuming(const std::vector& assumptions) const { CVC5_API_SOLVER_CHECK_TERM(term); } - std::vector eassumptions = Term::termVectorToNodes(assumptions); + std::vector eassumptions = + Term::termVectorToNodes(assumptions); return d_slv->checkSat(eassumptions); //////// CVC5_API_TRY_CATCH_END; @@ -6409,10 +6451,10 @@ Term Solver::declareFun(const std::string& symbol, CVC5_API_SOLVER_CHECK_CODOMAIN_SORT(sort); //////// all checks before this line - TypeNode type = *sort.d_type; + internal::TypeNode type = *sort.d_type; if (!sorts.empty()) { - std::vector types = Sort::sortVectorToTypeNodes(sorts); + std::vector types = Sort::sortVectorToTypeNodes(sorts); type = getNodeManager()->mkFunctionType(types, type); } return Term(this, d_nodeMgr->mkVar(symbol, type)); @@ -6479,7 +6521,8 @@ Term Solver::defineFunRec(const std::string& symbol, CVC5_API_CHECK(d_slv->getUserLogicInfo().isQuantified()) << "recursive function definitions require a logic with quantifiers"; - CVC5_API_CHECK(d_slv->getUserLogicInfo().isTheoryEnabled(theory::THEORY_UF)) + CVC5_API_CHECK( + d_slv->getUserLogicInfo().isTheoryEnabled(internal::theory::THEORY_UF)) << "recursive function definitions require a logic with uninterpreted " "functions"; @@ -6522,7 +6565,8 @@ Term Solver::defineFunRec(const Term& fun, CVC5_API_CHECK(d_slv->getUserLogicInfo().isQuantified()) << "recursive function definitions require a logic with quantifiers"; - CVC5_API_CHECK(d_slv->getUserLogicInfo().isTheoryEnabled(theory::THEORY_UF)) + CVC5_API_CHECK( + d_slv->getUserLogicInfo().isTheoryEnabled(internal::theory::THEORY_UF)) << "recursive function definitions require a logic with uninterpreted " "functions"; @@ -6545,7 +6589,7 @@ Term Solver::defineFunRec(const Term& fun, } //////// all checks before this line - std::vector ebound_vars = Term::termVectorToNodes(bound_vars); + std::vector ebound_vars = Term::termVectorToNodes(bound_vars); d_slv->defineFunctionRec(*fun.d_node, ebound_vars, *term.d_node, global); return fun; //////// @@ -6561,7 +6605,8 @@ void Solver::defineFunsRec(const std::vector& funs, CVC5_API_CHECK(d_slv->getUserLogicInfo().isQuantified()) << "recursive function definitions require a logic with quantifiers"; - CVC5_API_CHECK(d_slv->getUserLogicInfo().isTheoryEnabled(theory::THEORY_UF)) + CVC5_API_CHECK( + d_slv->getUserLogicInfo().isTheoryEnabled(internal::theory::THEORY_UF)) << "recursive function definitions require a logic with uninterpreted " "functions"; CVC5_API_SOLVER_CHECK_TERMS(funs); @@ -6603,13 +6648,13 @@ void Solver::defineFunsRec(const std::vector& funs, } } //////// all checks before this line - std::vector efuns = Term::termVectorToNodes(funs); - std::vector> ebound_vars; + std::vector efuns = Term::termVectorToNodes(funs); + std::vector> ebound_vars; for (const auto& v : bound_vars) { ebound_vars.push_back(Term::termVectorToNodes(v)); } - std::vector nodes = Term::termVectorToNodes(terms); + std::vector nodes = Term::termVectorToNodes(terms); d_slv->defineFunctionsRec(efuns, ebound_vars, nodes, global); //////// CVC5_API_TRY_CATCH_END; @@ -6619,7 +6664,7 @@ std::vector Solver::getAssertions(void) const { CVC5_API_TRY_CATCH_BEGIN; //////// all checks before this line - std::vector assertions = d_slv->getAssertions(); + std::vector assertions = d_slv->getAssertions(); /* Can not use * return std::vector(assertions.begin(), assertions.end()); * here since constructor is private */ @@ -6645,7 +6690,7 @@ std::string Solver::getOption(const std::string& option) const { return d_slv->getOption(option); } - catch (OptionException& e) + catch (internal::OptionException& e) { throw CVC5ApiUnsupportedException(e.getMessage()); } @@ -6720,7 +6765,7 @@ std::ostream& operator<<(std::ostream& os, const OptionInfo& oi) } if (!oi.aliases.empty()) { - container_to_stream(os, oi.aliases, ", ", "", ", "); + internal::container_to_stream(os, oi.aliases, ", ", "", ", "); } auto printNum = [&os](const std::string& type, const auto& vi) { os << " | " << type << " | " << vi.currentValue << " | default " @@ -6761,7 +6806,7 @@ std::ostream& operator<<(std::ostream& os, const OptionInfo& oi) [&os](const OptionInfo::ModeInfo& vi) { os << " | mode | " << vi.currentValue << " | default " << vi.defaultValue << " | modes: "; - container_to_stream(os, vi.modes, "", "", ", "); + internal::container_to_stream(os, vi.modes, "", "", ", "); }, }, oi.valueInfo); @@ -6773,7 +6818,7 @@ std::vector Solver::getOptionNames() const { CVC5_API_TRY_CATCH_BEGIN; //////// all checks before this line - return options::getNames(); + return internal::options::getNames(); //////// CVC5_API_TRY_CATCH_END; } @@ -6782,32 +6827,34 @@ OptionInfo Solver::getOptionInfo(const std::string& option) const { CVC5_API_TRY_CATCH_BEGIN; //////// all checks before this line - auto info = options::getInfo(d_slv->getOptions(), option); + auto info = internal::options::getInfo(d_slv->getOptions(), option); CVC5_API_CHECK(info.name != "") << "Querying invalid or unknown option " << option; return std::visit( overloaded{ - [&info](const options::OptionInfo::VoidInfo& vi) { + [&info](const internal::options::OptionInfo::VoidInfo& vi) { return OptionInfo{info.name, info.aliases, info.setByUser, OptionInfo::VoidInfo{}}; }, - [&info](const options::OptionInfo::ValueInfo& vi) { + [&info](const internal::options::OptionInfo::ValueInfo& vi) { return OptionInfo{ info.name, info.aliases, info.setByUser, OptionInfo::ValueInfo{vi.defaultValue, vi.currentValue}}; }, - [&info](const options::OptionInfo::ValueInfo& vi) { + [&info]( + const internal::options::OptionInfo::ValueInfo& vi) { return OptionInfo{info.name, info.aliases, info.setByUser, OptionInfo::ValueInfo{ vi.defaultValue, vi.currentValue}}; }, - [&info](const options::OptionInfo::NumberInfo& vi) { + [&info]( + const internal::options::OptionInfo::NumberInfo& vi) { return OptionInfo{ info.name, info.aliases, @@ -6815,7 +6862,8 @@ OptionInfo Solver::getOptionInfo(const std::string& option) const OptionInfo::NumberInfo{ vi.defaultValue, vi.currentValue, vi.minimum, vi.maximum}}; }, - [&info](const options::OptionInfo::NumberInfo& vi) { + [&info]( + const internal::options::OptionInfo::NumberInfo& vi) { return OptionInfo{ info.name, info.aliases, @@ -6823,7 +6871,7 @@ OptionInfo Solver::getOptionInfo(const std::string& option) const OptionInfo::NumberInfo{ vi.defaultValue, vi.currentValue, vi.minimum, vi.maximum}}; }, - [&info](const options::OptionInfo::NumberInfo& vi) { + [&info](const internal::options::OptionInfo::NumberInfo& vi) { return OptionInfo{ info.name, info.aliases, @@ -6831,7 +6879,7 @@ OptionInfo Solver::getOptionInfo(const std::string& option) const OptionInfo::NumberInfo{ vi.defaultValue, vi.currentValue, vi.minimum, vi.maximum}}; }, - [&info](const options::OptionInfo::ModeInfo& vi) { + [&info](const internal::options::OptionInfo::ModeInfo& vi) { return OptionInfo{info.name, info.aliases, info.setByUser, @@ -6855,16 +6903,16 @@ std::vector Solver::getUnsatAssumptions(void) const CVC5_API_CHECK(d_slv->getOptions().smt.unsatAssumptions) << "Cannot get unsat assumptions unless explicitly enabled " "(try --produce-unsat-assumptions)"; - CVC5_API_CHECK(d_slv->getSmtMode() == SmtMode::UNSAT) + CVC5_API_CHECK(d_slv->getSmtMode() == internal::SmtMode::UNSAT) << "Cannot get unsat assumptions unless in unsat mode."; //////// all checks before this line - std::vector uassumptions = d_slv->getUnsatAssumptions(); + std::vector uassumptions = d_slv->getUnsatAssumptions(); /* Can not use * return std::vector(uassumptions.begin(), uassumptions.end()); * here since constructor is private */ std::vector res; - for (const Node& n : uassumptions) + for (const internal::Node& n : uassumptions) { res.push_back(Term(this, n)); } @@ -6879,15 +6927,15 @@ std::vector Solver::getUnsatCore(void) const CVC5_API_CHECK(d_slv->getOptions().smt.unsatCores) << "Cannot get unsat core unless explicitly enabled " "(try --produce-unsat-cores)"; - CVC5_API_RECOVERABLE_CHECK(d_slv->getSmtMode() == SmtMode::UNSAT) + CVC5_API_RECOVERABLE_CHECK(d_slv->getSmtMode() == internal::SmtMode::UNSAT) << "Cannot get unsat core unless in unsat mode."; //////// all checks before this line - UnsatCore core = d_slv->getUnsatCore(); + internal::UnsatCore core = d_slv->getUnsatCore(); /* Can not use * return std::vector(core.begin(), core.end()); * here since constructor is private */ std::vector res; - for (const Node& e : core) + for (const internal::Node& e : core) { res.push_back(Term(this, e)); } @@ -6899,15 +6947,16 @@ std::vector Solver::getUnsatCore(void) const std::map Solver::getDifficulty() const { CVC5_API_TRY_CATCH_BEGIN; - CVC5_API_RECOVERABLE_CHECK(d_slv->getSmtMode() == SmtMode::UNSAT - || d_slv->getSmtMode() == SmtMode::SAT - || d_slv->getSmtMode() == SmtMode::SAT_UNKNOWN) + CVC5_API_RECOVERABLE_CHECK(d_slv->getSmtMode() == internal::SmtMode::UNSAT + || d_slv->getSmtMode() == internal::SmtMode::SAT + || d_slv->getSmtMode() + == internal::SmtMode::SAT_UNKNOWN) << "Cannot get difficulty unless after a UNSAT, SAT or UNKNOWN response."; //////// all checks before this line std::map res; - std::map dmap; + std::map dmap; d_slv->getDifficultyMap(dmap); - for (const std::pair& d : dmap) + for (const std::pair& d : dmap) { res[Term(this, d.first)] = Term(this, d.second); } @@ -6921,7 +6970,7 @@ std::string Solver::getProof(void) const CVC5_API_TRY_CATCH_BEGIN; CVC5_API_CHECK(d_slv->getOptions().smt.produceProofs) << "Cannot get proof unless proofs are enabled (try --produce-proofs)"; - CVC5_API_RECOVERABLE_CHECK(d_slv->getSmtMode() == SmtMode::UNSAT) + CVC5_API_RECOVERABLE_CHECK(d_slv->getSmtMode() == internal::SmtMode::UNSAT) << "Cannot get proof unless in unsat mode."; return d_slv->getProof(); CVC5_API_TRY_CATCH_END; @@ -6933,13 +6982,14 @@ std::vector Solver::getLearnedLiterals(void) const CVC5_API_CHECK(d_slv->getOptions().smt.produceLearnedLiterals) << "Cannot get learned literals unless enabled (try " "--produce-learned-literals)"; - CVC5_API_RECOVERABLE_CHECK(d_slv->getSmtMode() == SmtMode::UNSAT - || d_slv->getSmtMode() == SmtMode::SAT - || d_slv->getSmtMode() == SmtMode::SAT_UNKNOWN) + CVC5_API_RECOVERABLE_CHECK(d_slv->getSmtMode() == internal::SmtMode::UNSAT + || d_slv->getSmtMode() == internal::SmtMode::SAT + || d_slv->getSmtMode() + == internal::SmtMode::SAT_UNKNOWN) << "Cannot get learned literals unless after a UNSAT, SAT or UNKNOWN " "response."; //////// all checks before this line - std::vector lits = d_slv->getLearnedLiterals(); + std::vector lits = d_slv->getLearnedLiterals(); return Term::nodeVectorToTerms(this, lits); //////// CVC5_API_TRY_CATCH_END; @@ -7011,8 +7061,9 @@ std::vector Solver::getModelDomainElements(const Sort& s) const "getModelDomainElements."; //////// all checks before this line std::vector res; - std::vector elements = d_slv->getModelDomainElements(s.getTypeNode()); - for (const Node& n : elements) + std::vector elements = + d_slv->getModelDomainElements(s.getTypeNode()); + for (const internal::Node& n : elements) { res.push_back(Term(this, n)); } @@ -7093,7 +7144,8 @@ void Solver::declareSepHeap(const Sort& locSort, const Sort& dataSort) const CVC5_API_TRY_CATCH_BEGIN; CVC5_API_SOLVER_CHECK_SORT(locSort); CVC5_API_SOLVER_CHECK_SORT(dataSort); - CVC5_API_CHECK(d_slv->getLogicInfo().isTheoryEnabled(theory::THEORY_SEP)) + CVC5_API_CHECK( + d_slv->getLogicInfo().isTheoryEnabled(internal::theory::THEORY_SEP)) << "Cannot obtain separation logic expressions if not using the " "separation logic theory."; //////// all checks before this line @@ -7105,7 +7157,8 @@ void Solver::declareSepHeap(const Sort& locSort, const Sort& dataSort) const Term Solver::getValueSepHeap() const { CVC5_API_TRY_CATCH_BEGIN; - CVC5_API_CHECK(d_slv->getLogicInfo().isTheoryEnabled(theory::THEORY_SEP)) + CVC5_API_CHECK( + d_slv->getLogicInfo().isTheoryEnabled(internal::theory::THEORY_SEP)) << "Cannot obtain separation logic expressions if not using the " "separation logic theory."; CVC5_API_CHECK(d_slv->getOptions().smt.produceModels) @@ -7122,7 +7175,8 @@ Term Solver::getValueSepHeap() const Term Solver::getValueSepNil() const { CVC5_API_TRY_CATCH_BEGIN; - CVC5_API_CHECK(d_slv->getLogicInfo().isTheoryEnabled(theory::THEORY_SEP)) + CVC5_API_CHECK( + d_slv->getLogicInfo().isTheoryEnabled(internal::theory::THEORY_SEP)) << "Cannot obtain separation logic expressions if not using the " "separation logic theory."; CVC5_API_CHECK(d_slv->getOptions().smt.produceModels) @@ -7144,9 +7198,9 @@ Term Solver::declarePool(const std::string& symbol, CVC5_API_SOLVER_CHECK_SORT(sort); CVC5_API_SOLVER_CHECK_TERMS(initValue); //////// all checks before this line - TypeNode setType = getNodeManager()->mkSetType(*sort.d_type); - Node pool = getNodeManager()->mkBoundVar(symbol, setType); - std::vector initv = Term::termVectorToNodes(initValue); + internal::TypeNode setType = getNodeManager()->mkSetType(*sort.d_type); + internal::Node pool = getNodeManager()->mkBoundVar(symbol, setType); + std::vector initv = Term::termVectorToNodes(initValue); d_slv->declarePool(pool, initv); return Term(this, pool); //////// @@ -7177,8 +7231,8 @@ Term Solver::getInterpolant(const Term& conj) const << "Cannot get interpolant unless interpolants are enabled (try " "--produce-interpolants)"; //////// all checks before this line - TypeNode nullType; - Node result = d_slv->getInterpolant(*conj.d_node, nullType); + internal::TypeNode nullType; + internal::Node result = d_slv->getInterpolant(*conj.d_node, nullType); return Term(this, result); //////// CVC5_API_TRY_CATCH_END; @@ -7192,7 +7246,8 @@ Term Solver::getInterpolant(const Term& conj, Grammar& grammar) const << "Cannot get interpolant unless interpolants are enabled (try " "--produce-interpolants)"; //////// all checks before this line - Node result = d_slv->getInterpolant(*conj.d_node, *grammar.resolve().d_type); + internal::Node result = + d_slv->getInterpolant(*conj.d_node, *grammar.resolve().d_type); return Term(this, result); //////// CVC5_API_TRY_CATCH_END; @@ -7208,7 +7263,7 @@ Term Solver::getInterpolantNext() const << "Cannot get next interpolant when not solving incrementally (try " "--incremental)"; //////// all checks before this line - Node result = d_slv->getInterpolantNext(); + internal::Node result = d_slv->getInterpolantNext(); return Term(this, result); //////// CVC5_API_TRY_CATCH_END; @@ -7221,8 +7276,8 @@ Term Solver::getAbduct(const Term& conj) const CVC5_API_CHECK(d_slv->getOptions().smt.produceAbducts) << "Cannot get abduct unless abducts are enabled (try --produce-abducts)"; //////// all checks before this line - TypeNode nullType; - Node result = d_slv->getAbduct(*conj.d_node, nullType); + internal::TypeNode nullType; + internal::Node result = d_slv->getAbduct(*conj.d_node, nullType); return Term(this, result); //////// CVC5_API_TRY_CATCH_END; @@ -7235,7 +7290,8 @@ Term Solver::getAbduct(const Term& conj, Grammar& grammar) const CVC5_API_CHECK(d_slv->getOptions().smt.produceAbducts) << "Cannot get abduct unless abducts are enabled (try --produce-abducts)"; //////// all checks before this line - Node result = d_slv->getAbduct(*conj.d_node, *grammar.resolve().d_type); + internal::Node result = + d_slv->getAbduct(*conj.d_node, *grammar.resolve().d_type); return Term(this, result); //////// CVC5_API_TRY_CATCH_END; @@ -7251,7 +7307,7 @@ Term Solver::getAbductNext() const << "Cannot get next abduct when not solving incrementally (try " "--incremental)"; //////// all checks before this line - Node result = d_slv->getAbductNext(); + internal::Node result = d_slv->getAbductNext(); return Term(this, result); //////// CVC5_API_TRY_CATCH_END; @@ -7355,7 +7411,7 @@ void Solver::setLogic(const std::string& logic) const CVC5_API_TRY_CATCH_BEGIN; CVC5_API_CHECK(!d_slv->isFullyInited()) << "Invalid call to 'setLogic', solver is already fully initialized"; - cvc5::LogicInfo logic_info(logic); + internal::LogicInfo logic_info(logic); //////// all checks before this line d_slv->setLogic(logic_info); //////// @@ -7366,7 +7422,7 @@ void Solver::setOption(const std::string& option, const std::string& value) const { CVC5_API_TRY_CATCH_BEGIN; - std::vector options = options::getNames(); + std::vector options = internal::options::getNames(); CVC5_API_UNSUPPORTED_CHECK( option.find("command-verbosity") != std::string::npos || std::find(options.cbegin(), options.cend(), option) != options.cend()) @@ -7396,7 +7452,7 @@ Term Solver::declareSygusVar(const Sort& sort, const std::string& symbol) const CVC5_API_CHECK(d_slv->getOptions().quantifiers.sygus) << "Cannot call declareSygusVar unless sygus is enabled (use --sygus)"; //////// all checks before this line - Node res = getNodeManager()->mkBoundVar(symbol, *sort.d_type); + internal::Node res = getNodeManager()->mkBoundVar(symbol, *sort.d_type); (void)res.getType(true); /* kick off type checking */ d_slv->declareSygusVar(res); @@ -7527,7 +7583,7 @@ void Solver::addSygusInvConstraint(Term inv, CVC5_API_ARG_CHECK_EXPECTED(inv.d_node->getType().isFunction(), inv) << "a function"; - TypeNode invType = inv.d_node->getType(); + internal::TypeNode invType = inv.d_node->getType(); CVC5_API_ARG_CHECK_EXPECTED(invType.getRangeType().isBoolean(), inv) << "boolean range"; @@ -7541,9 +7597,9 @@ void Solver::addSygusInvConstraint(Term inv, << "Cannot addSygusInvConstraint unless sygus is enabled (use --sygus)"; //////// all checks before this line - const std::vector& invArgTypes = invType.getArgTypes(); + const std::vector& invArgTypes = invType.getArgTypes(); - std::vector expectedTypes; + std::vector expectedTypes; expectedTypes.reserve(2 * invArgTypes.size() + 1); for (size_t i = 0, n = invArgTypes.size(); i < 2 * n; i += 2) @@ -7553,7 +7609,8 @@ void Solver::addSygusInvConstraint(Term inv, } expectedTypes.push_back(invType.getRangeType()); - TypeNode expectedTransType = getNodeManager()->mkFunctionType(expectedTypes); + internal::TypeNode expectedTransType = + getNodeManager()->mkFunctionType(expectedTypes); CVC5_API_CHECK(trans.d_node->getType() == expectedTransType) << "Expected trans's sort to be " << invType; @@ -7594,12 +7651,13 @@ Term Solver::getSynthSolution(Term term) const CVC5_API_TRY_CATCH_BEGIN; CVC5_API_SOLVER_CHECK_TERM(term); - std::map map; + std::map map; CVC5_API_CHECK(d_slv->getSynthSolutions(map)) << "The solver is not in a state immediately preceded by a " "successful call to checkSynth"; - std::map::const_iterator it = map.find(*term.d_node); + std::map::const_iterator it = + map.find(*term.d_node); CVC5_API_CHECK(it != map.cend()) << "Synth solution not found for given term"; //////// all checks before this line @@ -7615,7 +7673,7 @@ std::vector Solver::getSynthSolutions( CVC5_API_ARG_SIZE_CHECK_EXPECTED(!terms.empty(), terms) << "non-empty vector"; CVC5_API_SOLVER_CHECK_TERMS(terms); - std::map map; + std::map map; CVC5_API_CHECK(d_slv->getSynthSolutions(map)) << "The solver is not in a state immediately preceded by a " "successful call to checkSynth"; @@ -7626,7 +7684,7 @@ std::vector Solver::getSynthSolutions( for (size_t i = 0, n = terms.size(); i < n; ++i) { - std::map::const_iterator it = + std::map::const_iterator it = map.find(*terms[i].d_node); CVC5_API_CHECK(it != map.cend()) @@ -7654,7 +7712,7 @@ bool Solver::isOutputOn(const std::string& tag) const { return d_slv->getEnv().isOutputOn(tag); } - catch (const cvc5::Exception& e) + catch (const internal::Exception& e) { throw CVC5ApiException("Invalid output tag " + tag); } @@ -7669,43 +7727,41 @@ std::ostream& Solver::getOutput(const std::string& tag) const { return d_slv->getEnv().output(tag); } - catch (const cvc5::Exception& e) + catch (const internal::Exception& e) { throw CVC5ApiException("Invalid output tag " + tag); } } -} // namespace api - } // namespace cvc5 namespace std { -size_t hash::operator()(cvc5::api::Kind k) const +size_t hash::operator()(cvc5::Kind k) const { return static_cast(k); } -size_t hash::operator()(const cvc5::api::Op& t) const +size_t hash::operator()(const cvc5::Op& t) const { if (t.isIndexedHelper()) { - return std::hash()(*t.d_node); + return std::hash()(*t.d_node); } else { - return std::hash()(t.d_kind); + return std::hash()(t.d_kind); } } -size_t std::hash::operator()(const cvc5::api::Sort& s) const +size_t std::hash::operator()(const cvc5::Sort& s) const { - return std::hash()(*s.d_type); + return std::hash()(*s.d_type); } -size_t std::hash::operator()(const cvc5::api::Term& t) const +size_t std::hash::operator()(const cvc5::Term& t) const { - return std::hash()(*t.d_node); + return std::hash()(*t.d_node); } } // namespace std diff --git a/src/api/cpp/cvc5.h b/src/api/cpp/cvc5.h index 14e81897e..622af563b 100644 --- a/src/api/cpp/cvc5.h +++ b/src/api/cpp/cvc5.h @@ -34,13 +34,16 @@ namespace cvc5 { +class Command; + +namespace internal { + #ifndef DOXYGEN_SKIP template class NodeTemplate; typedef NodeTemplate Node; #endif -class Command; class DType; class DTypeConstructor; class DTypeSelector; @@ -56,9 +59,8 @@ class StatisticsRegistry; namespace main { class CommandExecutor; -} - -namespace api { +} // namespace main +} // namespace internal class Solver; class Statistics; @@ -257,15 +259,15 @@ class CVC5_EXPORT Result * @param r the internal result that is to be wrapped by this result * @return the Result */ - Result(const cvc5::Result& r); + Result(const internal::Result& r); /** * The internal result wrapped by this result. * * @note This is a ``std::shared_ptr`` rather than a ``std::unique_ptr`` - * since ``cvc5::Result`` is not ref counted. + * since ``internal::Result`` is not ref counted. */ - std::shared_ptr d_result; + std::shared_ptr d_result; }; /** @@ -341,14 +343,14 @@ class CVC5_EXPORT SynthResult * result * @return the SynthResult */ - SynthResult(const cvc5::SynthResult& r); + SynthResult(const internal::SynthResult& r); /** * The internal result wrapped by this result. * * @note This is a `std::shared_ptr` rather than a `std::unique_ptr` - * since `cvc5::SynthResult` is not ref counted. + * since `internal::SynthResult` is not ref counted. */ - std::shared_ptr d_result; + std::shared_ptr d_result; }; /** @@ -826,16 +828,17 @@ class CVC5_EXPORT Sort private: /** @return the internal wrapped TypeNode of this sort. */ - const cvc5::TypeNode& getTypeNode(void) const; + const internal::TypeNode& getTypeNode(void) const; /** Helper to convert a set of Sorts to internal TypeNodes. */ - std::set static sortSetToTypeNodes(const std::set& sorts); + std::set static sortSetToTypeNodes( + const std::set& sorts); /** Helper to convert a vector of Sorts to internal TypeNodes. */ - std::vector static sortVectorToTypeNodes( + std::vector static sortVectorToTypeNodes( const std::vector& sorts); /** Helper to convert a vector of internal TypeNodes to Sorts. */ std::vector static typeNodeVectorToSorts( - const Solver* slv, const std::vector& types); + const Solver* slv, const std::vector& types); /** * Constructor. @@ -843,7 +846,7 @@ class CVC5_EXPORT Sort * @param t the internal type that is to be wrapped by this sort * @return the Sort */ - Sort(const Solver* slv, const cvc5::TypeNode& t); + Sort(const Solver* slv, const internal::TypeNode& t); /** * Helper for isNull checks. This prevents calling an API function with @@ -860,10 +863,10 @@ class CVC5_EXPORT Sort * The internal type wrapped by this sort. * * @note This is a ``std::shared_ptr`` rather than a ``std::unique_ptr`` to - * avoid overhead due to memory allocation (``cvc5::Type`` is already - * ref counted, so this could be a ``std::unique_ptr`` instead). + * avoid overhead due to memory allocation (``internal::Type`` is + * already ref counted, so this could be a ``std::unique_ptr`` instead). */ - std::shared_ptr d_type; + std::shared_ptr d_type; }; /** @@ -874,7 +877,6 @@ class CVC5_EXPORT Sort */ std::ostream& operator<<(std::ostream& out, const Sort& s) CVC5_EXPORT; -} // namespace api } // namespace cvc5 namespace std { @@ -883,21 +885,19 @@ namespace std { * Hash function for Sorts. */ template <> -struct CVC5_EXPORT hash +struct CVC5_EXPORT hash { - size_t operator()(const cvc5::api::Sort& s) const; + size_t operator()(const cvc5::Sort& s) const; }; } // namespace std -namespace cvc5::api { +namespace cvc5 { /* -------------------------------------------------------------------------- */ /* Op */ /* -------------------------------------------------------------------------- */ -class Term; - /** * A cvc5 operator. * An operator is a term that represents certain operators, instantiated @@ -985,7 +985,7 @@ class CVC5_EXPORT Op * @param n the internal node that is to be wrapped by this term * @return the Term */ - Op(const Solver* slv, const Kind k, const cvc5::Node& n); + Op(const Solver* slv, const Kind k, const internal::Node& n); /** * Helper for isNull checks. This prevents calling an API function with @@ -1028,10 +1028,10 @@ class CVC5_EXPORT Op * The internal node wrapped by this operator. * * @note This is a ``std::shared_ptr`` rather than a ``std::unique_ptr`` to - * avoid overhead due to memory allocation (``cvc5::Node`` is already - * ref counted, so this could be a ``std::unique_ptr`` instead). + * avoid overhead due to memory allocation (``internal::Node`` is + * already ref counted, so this could be a ``std::unique_ptr`` instead). */ - std::shared_ptr d_node; + std::shared_ptr d_node; }; /** @@ -1042,20 +1042,20 @@ class CVC5_EXPORT Op */ std::ostream& operator<<(std::ostream& out, const Op& t) CVC5_EXPORT; -} // namespace cvc5::api +} // namespace cvc5 namespace std { /** * Hash function for Ops. */ template <> -struct CVC5_EXPORT hash +struct CVC5_EXPORT hash { - size_t operator()(const cvc5::api::Op& t) const; + size_t operator()(const cvc5::Op& t) const; }; } // namespace std -namespace cvc5::api { +namespace cvc5 { /* -------------------------------------------------------------------------- */ /* Term */ /* -------------------------------------------------------------------------- */ @@ -1302,7 +1302,7 @@ class CVC5_EXPORT Term * @param p the position of the iterator (e.g. which child it's on) */ const_iterator(const Solver* slv, - const std::shared_ptr& e, + const std::shared_ptr& e, uint32_t p); /** @@ -1355,7 +1355,7 @@ class CVC5_EXPORT Term */ const Solver* d_solver; /** The original node to be iterated over. */ - std::shared_ptr d_origNode; + std::shared_ptr d_origNode; /** Keeps track of the iteration position. */ uint32_t d_pos; }; @@ -1619,18 +1619,19 @@ class CVC5_EXPORT Term private: /** Helper to convert a vector of Terms to internal Nodes. */ - std::vector static termVectorToNodes(const std::vector& terms); + std::vector static termVectorToNodes( + const std::vector& terms); /** Helper to convert a vector of internal Nodes to Terms. */ - std::vector static nodeVectorToTerms(const Solver* slv, - const std::vector& nodes); + std::vector static nodeVectorToTerms( + const Solver* slv, const std::vector& nodes); /** Helper method to collect all elements of a set. */ static void collectSet(std::set& set, - const cvc5::Node& node, + const internal::Node& node, const Solver* slv); /** Helper method to collect all elements of a sequence. */ static void collectSequence(std::vector& seq, - const cvc5::Node& node, + const internal::Node& node, const Solver* slv); /** @@ -1639,10 +1640,10 @@ class CVC5_EXPORT Term * @param n the internal node that is to be wrapped by this term * @return the Term */ - Term(const Solver* slv, const cvc5::Node& n); + Term(const Solver* slv, const internal::Node& n); /** @return the internal wrapped Node of this term. */ - const cvc5::Node& getNode(void) const; + const internal::Node& getNode(void) const; /** * Helper for isNull checks. This prevents calling an API function with @@ -1665,10 +1666,10 @@ class CVC5_EXPORT Term /** * The internal node wrapped by this term. * @note This is a ``std::shared_ptr`` rather than a ``std::unique_ptr`` to - * avoid overhead due to memory allocation (``cvc5::Node`` is already - * ref counted, so this could be a ``std::unique_ptr`` instead). + * avoid overhead due to memory allocation (``internal::Node`` is + * already ref counted, so this could be a ``std::unique_ptr`` instead). */ - std::shared_ptr d_node; + std::shared_ptr d_node; }; /** @@ -1731,20 +1732,20 @@ std::ostream& operator<<(std::ostream& out, const std::unordered_map& unordered_map) CVC5_EXPORT; -} // namespace cvc5::api +} // namespace cvc5 namespace std { /** * Hash function for Terms. */ template <> -struct CVC5_EXPORT hash +struct CVC5_EXPORT hash { - size_t operator()(const cvc5::api::Term& t) const; + size_t operator()(const cvc5::Term& t) const; }; } // namespace std -namespace cvc5::api { +namespace cvc5 { /* -------------------------------------------------------------------------- */ /* Datatypes */ @@ -1823,9 +1824,9 @@ class CVC5_EXPORT DatatypeConstructorDecl * The internal (intermediate) datatype constructor wrapped by this * datatype constructor declaration. * @note This is a ``std::shared_ptr`` rather than a ``std::unique_ptr`` - * since ``cvc5::DTypeConstructor`` is not ref counted. + * since ``internal::DTypeConstructor`` is not ref counted. */ - std::shared_ptr d_ctor; + std::shared_ptr d_ctor; }; class Solver; @@ -1912,7 +1913,7 @@ class CVC5_EXPORT DatatypeDecl bool isCoDatatype = false); /** @return the internal wrapped Dtype of this datatype declaration. */ - cvc5::DType& getDatatype(void) const; + internal::DType& getDatatype(void) const; /** * Helper for isNull checks. This prevents calling an API function with @@ -1929,9 +1930,9 @@ class CVC5_EXPORT DatatypeDecl * The internal (intermediate) datatype wrapped by this datatype * declaration. * @note This is a ``std::shared_ptr`` rather than a ``std::unique_ptr`` - * since ``cvc5::DType`` is not ref counted. + * since ``internal::DType`` is not ref counted. */ - std::shared_ptr d_dtype; + std::shared_ptr d_dtype; }; /** @@ -1989,7 +1990,7 @@ class CVC5_EXPORT DatatypeSelector * @param stor the internal datatype selector to be wrapped * @return the DatatypeSelector */ - DatatypeSelector(const Solver* slv, const cvc5::DTypeSelector& stor); + DatatypeSelector(const Solver* slv, const internal::DTypeSelector& stor); /** * Helper for isNull checks. This prevents calling an API function with @@ -2005,9 +2006,9 @@ class CVC5_EXPORT DatatypeSelector /** * The internal datatype selector wrapped by this datatype selector. * @note This is a ``std::shared_ptr`` rather than a ``std::unique_ptr`` - * since ``cvc5::DType`` is not ref counted. + * since ``internal::DType`` is not ref counted. */ - std::shared_ptr d_stor; + std::shared_ptr d_stor; }; /** @@ -2203,7 +2204,7 @@ class CVC5_EXPORT DatatypeConstructor * @param begin true if this is a begin() iterator */ const_iterator(const Solver* slv, - const cvc5::DTypeConstructor& ctor, + const internal::DTypeConstructor& ctor, bool begin); /** @@ -2242,7 +2243,8 @@ class CVC5_EXPORT DatatypeConstructor * @param ctor the internal datatype constructor to be wrapped * @return the DatatypeConstructor */ - DatatypeConstructor(const Solver* slv, const cvc5::DTypeConstructor& ctor); + DatatypeConstructor(const Solver* slv, + const internal::DTypeConstructor& ctor); /** * Return selector for name. @@ -2265,9 +2267,9 @@ class CVC5_EXPORT DatatypeConstructor /** * The internal datatype constructor wrapped by this datatype constructor. * @note This is a ``std::shared_ptr`` rather than a ``std::unique_ptr`` - * since ``cvc5::DType`` is not ref counted. + * since ``internal::DType`` is not ref counted. */ - std::shared_ptr d_ctor; + std::shared_ptr d_ctor; }; /** @@ -2459,7 +2461,7 @@ class CVC5_EXPORT Datatype * @param dtype the internal datatype to iterate over * @param begin true if this is a begin() iterator */ - const_iterator(const Solver* slv, const cvc5::DType& dtype, bool begin); + const_iterator(const Solver* slv, const internal::DType& dtype, bool begin); /** * The associated solver object. @@ -2497,7 +2499,7 @@ class CVC5_EXPORT Datatype * @param dtype the internal datatype to be wrapped * @return the Datatype */ - Datatype(const Solver* slv, const cvc5::DType& dtype); + Datatype(const Solver* slv, const internal::DType& dtype); /** * Return constructor for name. @@ -2527,9 +2529,9 @@ class CVC5_EXPORT Datatype /** * The internal datatype wrapped by this datatype. * @note This is a ``std::shared_ptr`` rather than a ``std::unique_ptr`` - * since ``cvc5::DType`` is not ref counted. + * since ``internal::DType`` is not ref counted. */ - std::shared_ptr d_dtype; + std::shared_ptr d_dtype; }; /** @@ -3020,7 +3022,7 @@ class CVC5_EXPORT Statistics iterator end() const; private: - Statistics(const StatisticsRegistry& reg); + Statistics(const internal::StatisticsRegistry& reg); /** Internal data */ BaseType d_stats; }; @@ -3045,7 +3047,7 @@ class CVC5_EXPORT Solver friend class Grammar; friend class Op; friend class cvc5::Command; - friend class cvc5::main::CommandExecutor; + friend class internal::main::CommandExecutor; friend class Sort; friend class Term; @@ -3054,7 +3056,7 @@ class CVC5_EXPORT Solver * Constructs a solver with the given original options. This should only be * used internally when the Solver is reset. */ - Solver(std::unique_ptr&& original); + Solver(std::unique_ptr&& original); public: /* .................................................................... */ @@ -3337,11 +3339,11 @@ class CVC5_EXPORT Solver * - #INT_TO_BITVECTOR * - #TUPLE_PROJECT * - * See cvc5::api::Kind for a description of the parameters. + * See cvc5::Kind for a description of the parameters. * @param kind the kind of the operator * @param args the arguments (indices) of the operator * - * @note If ``args`` is empty, the Op simply wraps the cvc5::api::Kind. The + * @note If ``args`` is empty, the Op simply wraps the cvc5::Kind. The * Kind can be used in Solver::mkTerm directly without creating an Op * first. */ @@ -3356,7 +3358,7 @@ class CVC5_EXPORT Solver /** * Create operator of kind: * - DIVISIBLE (to support arbitrary precision integers) - * See cvc5::api::Kind for a description of the parameters. + * See cvc5::Kind for a description of the parameters. * @param kind the kind of the operator * @param arg the string argument to this operator */ @@ -4835,7 +4837,7 @@ class CVC5_EXPORT Solver private: /** @return the node manager of this solver */ - NodeManager* getNodeManager(void) const; + internal::NodeManager* getNodeManager(void) const; /** Reset the API statistics */ void resetStatistics(); @@ -4854,7 +4856,8 @@ class CVC5_EXPORT Solver template Term mkValHelper(const T& t) const; /** Helper for making rational values. */ - Term mkRationalValHelper(const Rational& r, bool isInt = true) const; + Term mkRationalValHelper(const internal::Rational& r, + bool isInt = true) const; /** Helper for mkReal functions that take a string as argument. */ Term mkRealOrIntegerFromStrHelper(const std::string& s, bool isInt = true) const; @@ -4969,17 +4972,17 @@ class CVC5_EXPORT Solver void increment_vars_consts_stats(const Sort& sort, bool is_var) const; /** Keep a copy of the original option settings (for resets). */ - std::unique_ptr d_originalOptions; + std::unique_ptr d_originalOptions; /** The node manager of this solver. */ - NodeManager* d_nodeMgr; + internal::NodeManager* d_nodeMgr; /** The statistics collected on the Api level. */ std::unique_ptr d_stats; /** The SMT engine of this solver. */ - std::unique_ptr d_slv; + std::unique_ptr d_slv; /** The random number generator of this solver. */ - std::unique_ptr d_rng; + std::unique_ptr d_rng; }; -} // namespace cvc5::api +} // namespace cvc5 #endif diff --git a/src/api/cpp/cvc5_checks.h b/src/api/cpp/cvc5_checks.h index bbb7e2875..d5cfcbd7a 100644 --- a/src/api/cpp/cvc5_checks.h +++ b/src/api/cpp/cvc5_checks.h @@ -21,7 +21,6 @@ #define CVC5__API__CHECKS_H namespace cvc5 { -namespace api { /* -------------------------------------------------------------------------- */ /* Basic check macros. */ @@ -33,7 +32,8 @@ namespace api { */ #define CVC5_API_CHECK(cond) \ CVC5_PREDICT_TRUE(cond) \ - ? (void)0 : OstreamVoider() & CVC5ApiExceptionStream().ostream() + ? (void)0 \ + : cvc5::internal::OstreamVoider() & CVC5ApiExceptionStream().ostream() /** * The base check macro for throwing recoverable exceptions. @@ -41,7 +41,9 @@ namespace api { */ #define CVC5_API_RECOVERABLE_CHECK(cond) \ CVC5_PREDICT_TRUE(cond) \ - ? (void)0 : OstreamVoider() & CVC5ApiRecoverableExceptionStream().ostream() + ? (void)0 \ + : cvc5::internal::OstreamVoider() \ + & CVC5ApiRecoverableExceptionStream().ostream() /** * The base check macro for throwing unsupported exceptions. @@ -49,7 +51,9 @@ namespace api { */ #define CVC5_API_UNSUPPORTED_CHECK(cond) \ CVC5_PREDICT_TRUE(cond) \ - ? (void)0 : OstreamVoider() & CVC5ApiUnsupportedExceptionStream().ostream() + ? (void)0 \ + : cvc5::internal::OstreamVoider() \ + & CVC5ApiUnsupportedExceptionStream().ostream() /* -------------------------------------------------------------------------- */ /* Not null checks. */ @@ -94,7 +98,7 @@ namespace api { #define CVC5_API_KIND_CHECK_EXPECTED(cond, kind) \ CVC5_PREDICT_TRUE(cond) \ ? (void)0 \ - : OstreamVoider() \ + : cvc5::internal::OstreamVoider() \ & CVC5ApiExceptionStream().ostream() \ << "Invalid kind '" << kindToString(kind) << "', expected " @@ -110,7 +114,7 @@ namespace api { #define CVC5_API_ARG_CHECK_EXPECTED(cond, arg) \ CVC5_PREDICT_TRUE(cond) \ ? (void)0 \ - : OstreamVoider() \ + : cvc5::internal::OstreamVoider() \ & CVC5ApiExceptionStream().ostream() \ << "Invalid argument '" << arg << "' for '" << #arg \ << "', expected " @@ -123,7 +127,7 @@ namespace api { #define CVC5_API_RECOVERABLE_ARG_CHECK_EXPECTED(cond, arg) \ CVC5_PREDICT_TRUE(cond) \ ? (void)0 \ - : OstreamVoider() \ + : cvc5::internal::OstreamVoider() \ & CVC5ApiRecoverableExceptionStream().ostream() \ << "Invalid argument '" << arg << "' for '" << #arg \ << "', expected " @@ -138,7 +142,7 @@ namespace api { #define CVC5_API_ARG_SIZE_CHECK_EXPECTED(cond, arg) \ CVC5_PREDICT_TRUE(cond) \ ? (void)0 \ - : OstreamVoider() \ + : cvc5::internal::OstreamVoider() \ & CVC5ApiExceptionStream().ostream() \ << "Invalid size of argument '" << #arg << "', expected " @@ -154,7 +158,7 @@ namespace api { #define CVC5_API_ARG_AT_INDEX_CHECK_EXPECTED(cond, what, args, idx) \ CVC5_PREDICT_TRUE(cond) \ ? (void)0 \ - : OstreamVoider() \ + : cvc5::internal::OstreamVoider() \ & CVC5ApiExceptionStream().ostream() \ << "Invalid " << (what) << " in '" << #args << "' at index " \ << (idx) << ", expected " @@ -536,7 +540,7 @@ namespace api { this == bv.d_solver, "bound variable", bound_vars, i) \ << "a term associated with this solver object"; \ CVC5_API_ARG_AT_INDEX_CHECK_EXPECTED( \ - bv.d_node->getKind() == cvc5::Kind::BOUND_VARIABLE, \ + bv.d_node->getKind() == cvc5::internal::Kind::BOUND_VARIABLE, \ "bound variable", \ bound_vars, \ i) \ @@ -568,7 +572,7 @@ namespace api { this == bv.d_solver, "bound variable", bound_vars, i) \ << "a term associated with this solver object"; \ CVC5_API_ARG_AT_INDEX_CHECK_EXPECTED( \ - bv.d_node->getKind() == cvc5::Kind::BOUND_VARIABLE, \ + bv.d_node->getKind() == cvc5::internal::Kind::BOUND_VARIABLE, \ "bound variable", \ bound_vars, \ i) \ @@ -675,6 +679,5 @@ namespace api { << "Invalid number of indices for operator " << kind << ". Expected " \ << expected << " but got " << nargs << "." -} // namespace api } // namespace cvc5 #endif diff --git a/src/api/cpp/cvc5_kind.h b/src/api/cpp/cvc5_kind.h index edda9845f..93ac21e11 100644 --- a/src/api/cpp/cvc5_kind.h +++ b/src/api/cpp/cvc5_kind.h @@ -20,7 +20,7 @@ #include -namespace cvc5::api { +namespace cvc5 { /* -------------------------------------------------------------------------- */ /* Kind */ @@ -32,12 +32,12 @@ namespace cvc5::api { * * \internal * - * Note that the API type `cvc5::api::Kind` roughly corresponds to - * `cvc5::Kind`, but is a different type. It hides internal kinds that should + * Note that the API type `cvc5::Kind` roughly corresponds to + * `cvc5::internal::Kind`, but is a different type. It hides internal kinds that should * not be exported to the API, and maps all kinds that we want to export to its - * corresponding internal kinds. The underlying type of `cvc5::api::Kind` must + * corresponding internal kinds. The underlying type of `cvc5::Kind` must * be signed (to enable range checks for validity). The size of this type - * depends on the size of `cvc5::Kind` (`NodeValue::NBITS_KIND`, currently 10 + * depends on the size of `cvc5::internal::Kind` (`NodeValue::NBITS_KIND`, currently 10 * bits, see expr/node_value.h). */ enum Kind : int32_t @@ -4180,20 +4180,20 @@ std::string kindToString(Kind k) CVC5_EXPORT; */ std::ostream& operator<<(std::ostream& out, Kind k) CVC5_EXPORT; -} // namespace cvc5::api +} // namespace cvc5 namespace std { /** * Hash function for Kinds. */ -template<> -struct CVC5_EXPORT hash +template <> +struct CVC5_EXPORT hash { /** * Hashes a Kind to a size_t. */ - size_t operator()(cvc5::api::Kind k) const; + size_t operator()(cvc5::Kind k) const; }; } diff --git a/src/api/cpp/cvc5_types.h b/src/api/cpp/cvc5_types.h index a5cda3d6b..58fb2d08c 100644 --- a/src/api/cpp/cvc5_types.h +++ b/src/api/cpp/cvc5_types.h @@ -18,7 +18,7 @@ #ifndef CVC5__API__CVC5_TYPES_H #define CVC5__API__CVC5_TYPES_H -namespace cvc5::api { +namespace cvc5 { /** * Rounding modes for floating-point numbers. @@ -70,7 +70,7 @@ enum RoundingMode ROUND_NEAREST_TIES_TO_AWAY, }; -} // namespace cvc5::api +} // namespace cvc5 namespace cvc5::modes { diff --git a/src/api/java/CMakeLists.txt b/src/api/java/CMakeLists.txt index bafda8323..bcade92a3 100644 --- a/src/api/java/CMakeLists.txt +++ b/src/api/java/CMakeLists.txt @@ -172,7 +172,7 @@ install_jar(cvc5jar DESTINATION share/java) install_jar_exports( TARGETS cvc5jar - NAMESPACE cvc5:: + NAMESPACE cvc5::internal:: FILE cvc5JavaTargets.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/cvc5 ) diff --git a/src/api/java/genenums.py.in b/src/api/java/genenums.py.in index 3b7260f4d..74e1c4e3f 100644 --- a/src/api/java/genenums.py.in +++ b/src/api/java/genenums.py.in @@ -102,7 +102,7 @@ CPP_JAVA_MAPPING = \ r"\buint32_t\b": "int", r"\buint64_t\b": "long", r"\bunsigned char\b": "byte", - r"cvc5::api::": "cvc5.", + r"cvc5::": "cvc5.", r"Term::Term\(\)": "Solver.getNullTerm()", r"Solver::": "Solver.", r"std::vector": "int[]", @@ -129,7 +129,11 @@ def format_comment(comment): def gen_java(parser: EnumParser, path): for namespace in parser.namespaces: for enum in namespace.enums: - subnamespace = namespace.name.split('::')[1] + subnamespace = namespace.name.split('::')[-1] + # Workaround to make it work without moving the java files. Will be + # done in a subsequent PR by Andres + if subnamespace == 'cvc5': + subnamespace = 'api' filedir = os.path.join(path, subnamespace) if not os.path.exists(filedir): os.mkdir(filedir) diff --git a/src/api/java/jni/datatype.cpp b/src/api/java/jni/datatype.cpp index 1957e94f9..633f0e52e 100644 --- a/src/api/java/jni/datatype.cpp +++ b/src/api/java/jni/datatype.cpp @@ -17,7 +17,7 @@ #include "api_utilities.h" #include "io_github_cvc5_api_Datatype.h" -using namespace cvc5::api; +using namespace cvc5; /* * Class: io_github_cvc5_api_Datatype diff --git a/src/api/java/jni/datatype_constructor.cpp b/src/api/java/jni/datatype_constructor.cpp index de9e4fa4c..c48328b1d 100644 --- a/src/api/java/jni/datatype_constructor.cpp +++ b/src/api/java/jni/datatype_constructor.cpp @@ -17,7 +17,7 @@ #include "api_utilities.h" #include "io_github_cvc5_api_DatatypeConstructor.h" -using namespace cvc5::api; +using namespace cvc5; /* * Class: io_github_cvc5_api_DatatypeConstructor diff --git a/src/api/java/jni/datatype_constructor_decl.cpp b/src/api/java/jni/datatype_constructor_decl.cpp index 75cdb7aca..47b09a883 100644 --- a/src/api/java/jni/datatype_constructor_decl.cpp +++ b/src/api/java/jni/datatype_constructor_decl.cpp @@ -17,7 +17,7 @@ #include "api_utilities.h" #include "io_github_cvc5_api_DatatypeConstructorDecl.h" -using namespace cvc5::api; +using namespace cvc5; /* * Class: io_github_cvc5_api_DatatypeConstructorDecl diff --git a/src/api/java/jni/datatype_decl.cpp b/src/api/java/jni/datatype_decl.cpp index 1940c37e1..2819409fe 100644 --- a/src/api/java/jni/datatype_decl.cpp +++ b/src/api/java/jni/datatype_decl.cpp @@ -17,7 +17,7 @@ #include "api_utilities.h" #include "io_github_cvc5_api_DatatypeDecl.h" -using namespace cvc5::api; +using namespace cvc5; /* * Class: io_github_cvc5_api_DatatypeDecl diff --git a/src/api/java/jni/datatype_selector.cpp b/src/api/java/jni/datatype_selector.cpp index c001d10c7..7f3a92a97 100644 --- a/src/api/java/jni/datatype_selector.cpp +++ b/src/api/java/jni/datatype_selector.cpp @@ -17,7 +17,7 @@ #include "api_utilities.h" #include "io_github_cvc5_api_DatatypeSelector.h" -using namespace cvc5::api; +using namespace cvc5; /* * Class: io_github_cvc5_api_DatatypeSelector diff --git a/src/api/java/jni/grammar.cpp b/src/api/java/jni/grammar.cpp index 751e5ffdd..e9d09e39d 100644 --- a/src/api/java/jni/grammar.cpp +++ b/src/api/java/jni/grammar.cpp @@ -17,7 +17,7 @@ #include "api_utilities.h" #include "io_github_cvc5_api_Grammar.h" -using namespace cvc5::api; +using namespace cvc5; /* * Class: io_github_cvc5_api_Grammar diff --git a/src/api/java/jni/op.cpp b/src/api/java/jni/op.cpp index 7ec481fc6..18cc4d4ab 100644 --- a/src/api/java/jni/op.cpp +++ b/src/api/java/jni/op.cpp @@ -17,7 +17,7 @@ #include "api_utilities.h" #include "io_github_cvc5_api_Op.h" -using namespace cvc5::api; +using namespace cvc5; /* * Class: io_github_cvc5_api_Op diff --git a/src/api/java/jni/option_info.cpp b/src/api/java/jni/option_info.cpp index f889f7e12..81bc11bf9 100644 --- a/src/api/java/jni/option_info.cpp +++ b/src/api/java/jni/option_info.cpp @@ -17,7 +17,7 @@ #include "api_utilities.h" #include "io_github_cvc5_api_OptionInfo.h" -using namespace cvc5::api; +using namespace cvc5; /* * Class: io_github_cvc5_api_OptionInfo diff --git a/src/api/java/jni/result.cpp b/src/api/java/jni/result.cpp index 1825ca3ff..0a7054bb0 100644 --- a/src/api/java/jni/result.cpp +++ b/src/api/java/jni/result.cpp @@ -17,7 +17,7 @@ #include "api_utilities.h" #include "io_github_cvc5_api_Result.h" -using namespace cvc5::api; +using namespace cvc5; /* * Class: io_github_cvc5_api_Result diff --git a/src/api/java/jni/solver.cpp b/src/api/java/jni/solver.cpp index bb7d816fe..b0c52b228 100644 --- a/src/api/java/jni/solver.cpp +++ b/src/api/java/jni/solver.cpp @@ -17,7 +17,7 @@ #include "api_utilities.h" #include "io_github_cvc5_api_Solver.h" -using namespace cvc5::api; +using namespace cvc5; /* * Class: io_github_cvc5_api_Solver diff --git a/src/api/java/jni/sort.cpp b/src/api/java/jni/sort.cpp index d6c02ed4c..0fc9f4574 100644 --- a/src/api/java/jni/sort.cpp +++ b/src/api/java/jni/sort.cpp @@ -17,7 +17,7 @@ #include "api_utilities.h" #include "io_github_cvc5_api_Sort.h" -using namespace cvc5::api; +using namespace cvc5; /* * Class: io_github_cvc5_api_Sort diff --git a/src/api/java/jni/stat.cpp b/src/api/java/jni/stat.cpp index e225988e5..c3282d58a 100644 --- a/src/api/java/jni/stat.cpp +++ b/src/api/java/jni/stat.cpp @@ -17,7 +17,7 @@ #include "api_utilities.h" #include "io_github_cvc5_api_Stat.h" -using namespace cvc5::api; +using namespace cvc5; /* * Class: io_github_cvc5_api_Stat diff --git a/src/api/java/jni/statistics.cpp b/src/api/java/jni/statistics.cpp index f76fd8e46..e6162ed3a 100644 --- a/src/api/java/jni/statistics.cpp +++ b/src/api/java/jni/statistics.cpp @@ -19,7 +19,7 @@ #include "api_utilities.h" #include "io_github_cvc5_api_Statistics.h" -using namespace cvc5::api; +using namespace cvc5; /* * Class: io_github_cvc5_api_Statistics diff --git a/src/api/java/jni/synth_result.cpp b/src/api/java/jni/synth_result.cpp index 6d0ab38d7..731981561 100644 --- a/src/api/java/jni/synth_result.cpp +++ b/src/api/java/jni/synth_result.cpp @@ -17,7 +17,7 @@ #include "api_utilities.h" #include "io_github_cvc5_api_SynthResult.h" -using namespace cvc5::api; +using namespace cvc5; /* * Class: io_github_cvc5_api_SynthResult diff --git a/src/api/java/jni/term.cpp b/src/api/java/jni/term.cpp index e5bb02b22..a49f25d46 100644 --- a/src/api/java/jni/term.cpp +++ b/src/api/java/jni/term.cpp @@ -17,7 +17,7 @@ #include "api_utilities.h" #include "io_github_cvc5_api_Term.h" -using namespace cvc5::api; +using namespace cvc5; /* * Class: io_github_cvc5_api_Term diff --git a/src/api/python/cvc5.pxd b/src/api/python/cvc5.pxd index 4ee50f615..ae92c4a82 100644 --- a/src/api/python/cvc5.pxd +++ b/src/api/python/cvc5.pxd @@ -51,7 +51,7 @@ cdef extern from "api/cpp/cvc5.h" namespace "cvc5": pass -cdef extern from "api/cpp/cvc5.h" namespace "cvc5::api": +cdef extern from "api/cpp/cvc5.h" namespace "cvc5": cdef cppclass Datatype: Datatype() except + DatatypeConstructor operator[](size_t idx) except + @@ -182,7 +182,7 @@ cdef extern from "" namespace "std": bint holds "std::holds_alternative"[T](OptionInfo.OptionInfoVariant v) except + T getVariant "std::get"[T](OptionInfo.OptionInfoVariant v) except + -cdef extern from "api/cpp/cvc5.h" namespace "cvc5::api": +cdef extern from "api/cpp/cvc5.h" namespace "cvc5": cdef cppclass Result: Result() except+ bint isNull() except + @@ -202,7 +202,7 @@ cdef extern from "api/cpp/cvc5.h" namespace "cvc5::api": bint isUnknown() except + string toString() except + - cdef extern from "api/cpp/cvc5.h" namespace "cvc5::api::Result": + cdef extern from "api/cpp/cvc5.h" namespace "cvc5::Result": cdef cppclass UnknownExplanation: pass @@ -528,7 +528,7 @@ cdef extern from "api/cpp/cvc5.h" namespace "cvc5::api": size_t operator()(const Term & t) except + -cdef extern from "api/cpp/cvc5.h" namespace "cvc5::api::Result::UnknownExplanation": +cdef extern from "api/cpp/cvc5.h" namespace "cvc5::Result::UnknownExplanation": cdef UnknownExplanation REQUIRES_FULL_CHECK cdef UnknownExplanation INCOMPLETE cdef UnknownExplanation TIMEOUT diff --git a/src/api/python/cvc5.pxi b/src/api/python/cvc5.pxi index 66f037ad0..a4c85a768 100644 --- a/src/api/python/cvc5.pxi +++ b/src/api/python/cvc5.pxi @@ -103,7 +103,7 @@ cdef c_hash[c_Term] ctermhash = c_hash[c_Term]() cdef class Datatype: """ A cvc5 datatype. - Wrapper class for :cpp:class:`cvc5::api::Datatype`. + Wrapper class for :cpp:class:`cvc5::Datatype`. """ cdef c_Datatype cd cdef Solver solver @@ -132,7 +132,7 @@ cdef class Datatype: def getConstructorTerm(self, str name): """ :param name: the name of the constructor. - :return: the term representing the datatype constructor with the given name (see :cpp:func:`Datatype::getConstructorTerm() `). + :return: the term representing the datatype constructor with the given name (see :cpp:func:`Datatype::getConstructorTerm() `). """ cdef Term term = Term(self.solver) term.cterm = self.cd.getConstructorTerm(name.encode()) @@ -199,7 +199,7 @@ cdef class Datatype: return self.cd.isFinite() def isWellFounded(self): - """:return: True if this datatype is well-founded (see :cpp:func:`Datatype::isWellFounded() `).""" + """:return: True if this datatype is well-founded (see :cpp:func:`Datatype::isWellFounded() `).""" return self.cd.isWellFounded() def isNull(self): @@ -222,7 +222,7 @@ cdef class Datatype: cdef class DatatypeConstructor: """ A cvc5 datatype constructor. - Wrapper class for :cpp:class:`cvc5::api::DatatypeConstructor`. + Wrapper class for :cpp:class:`cvc5::DatatypeConstructor`. """ cdef c_DatatypeConstructor cdc cdef Solver solver @@ -258,7 +258,7 @@ cdef class DatatypeConstructor: """ Specialized method for parametric datatypes (see :cpp:func:`DatatypeConstructor::getInstantiatedConstructorTerm() - `). + `). .. warning:: This method is experimental and may change in future versions. @@ -322,7 +322,7 @@ cdef class DatatypeConstructor: cdef class DatatypeConstructorDecl: """ A cvc5 datatype constructor declaration. - Wrapper class for :cpp:class:`cvc5::api::DatatypeConstructorDecl`. + Wrapper class for :cpp:class:`cvc5::DatatypeConstructorDecl`. """ cdef c_DatatypeConstructorDecl cddc cdef Solver solver @@ -363,7 +363,7 @@ cdef class DatatypeConstructorDecl: cdef class DatatypeDecl: """ A cvc5 datatype declaration. - Wrapper class for :cpp:class:`cvc5::api::DatatypeDecl`. + Wrapper class for :cpp:class:`cvc5::DatatypeDecl`. """ cdef c_DatatypeDecl cdd cdef Solver solver @@ -410,7 +410,7 @@ cdef class DatatypeDecl: cdef class DatatypeSelector: """ A cvc5 datatype selector. - Wrapper class for :cpp:class:`cvc5::api::DatatypeSelector`. + Wrapper class for :cpp:class:`cvc5::DatatypeSelector`. """ cdef c_DatatypeSelector cds cdef Solver solver @@ -465,7 +465,7 @@ cdef class Op: An operator is a term that represents certain operators, instantiated with its required parameters, e.g., a term of kind :cpp:enumerator:`BITVECTOR_EXTRACT`. - Wrapper class for :cpp:class:`cvc5::api::Op`. + Wrapper class for :cpp:class:`cvc5::Op`. """ cdef c_Op cop cdef Solver solver @@ -526,7 +526,7 @@ cdef class Op: cdef class Grammar: """ A Sygus Grammar. - Wrapper class for :cpp:class:`cvc5::api::Grammar`. + Wrapper class for :cpp:class:`cvc5::Grammar`. """ cdef c_Grammar cgrammar cdef Solver solver @@ -574,7 +574,7 @@ cdef class Grammar: cdef class Result: """ Encapsulation of a three-valued solver result, with explanations. - Wrapper class for :cpp:class:`cvc5::api::Result`. + Wrapper class for :cpp:class:`cvc5::Result`. """ cdef c_Result cr def __cinit__(self): @@ -584,25 +584,25 @@ cdef class Result: def isNull(self): """ :return: True if Result is empty, i.e., a nullary Result, and not an actual result returned from a - :cpp:func:`Solver::checkSat() ` (and friends) query. + :cpp:func:`Solver::checkSat() ` (and friends) query. """ return self.cr.isNull() def isSat(self): """ - :return: True if query was a satisfiable :cpp:func:`Solver::checkSat() ` or :cpp:func:`Solver::checkSatAssuming() ` query. + :return: True if query was a satisfiable :cpp:func:`Solver::checkSat() ` or :cpp:func:`Solver::checkSatAssuming() ` query. """ return self.cr.isSat() def isUnsat(self): """ - :return: True if query was an usatisfiable :cpp:func:`Solver::checkSat() ` or :cpp:func:`Solver::checkSatAssuming() ` query. + :return: True if query was an usatisfiable :cpp:func:`Solver::checkSat() ` or :cpp:func:`Solver::checkSatAssuming() ` query. """ return self.cr.isUnsat() def isUnknown(self): """ - :return: True if query was a :cpp:func:`Solver::checkSat() ` or :cpp:func:`Solver::checkSatAssuming() ` query and cvc5 was not able to determine (un)satisfiability. + :return: True if query was a :cpp:func:`Solver::checkSat() ` or :cpp:func:`Solver::checkSatAssuming() ` query and cvc5 was not able to determine (un)satisfiability. """ return self.cr.isUnknown() @@ -671,7 +671,7 @@ cdef class SynthResult: cdef class UnknownExplanation: """ - Wrapper class for :cpp:enum:`cvc5::api::Result::UnknownExplanation`. + Wrapper class for :cpp:enum:`cvc5::Result::UnknownExplanation`. """ cdef c_UnknownExplanation cue cdef str name @@ -697,7 +697,7 @@ cdef class UnknownExplanation: cdef class Solver: - """Wrapper class for :cpp:class:`cvc5::api::Solver`.""" + """Wrapper class for :cpp:class:`cvc5::Solver`.""" cdef c_Solver* csolver def __cinit__(self): @@ -3085,7 +3085,7 @@ cdef class Sort: cdef class Statistics: """ The cvc5 Statistics. - Wrapper class for :cpp:class:`cvc5::api::Statistics`. + Wrapper class for :cpp:class:`cvc5::Statistics`. Obtain a single statistic value using ``stats["name"]`` and a dictionary with all (visible) statistics using ``stats.get(internal=False, defaulted=False)``. """ @@ -3112,7 +3112,7 @@ cdef class Statistics: return self.__stat_to_dict(self.cstats.get(name.encode())) def get(self, bint internal = False, bint defaulted = False): - """Get all statistics. See :cpp:class:`cvc5::api::Statistics::begin()` for more information.""" + """Get all statistics. See :cpp:class:`cvc5::Statistics::begin()` for more information.""" cdef c_Statistics.iterator it = self.cstats.begin(internal, defaulted) cdef pair[string,c_Stat]* s res = {} @@ -3126,7 +3126,7 @@ cdef class Statistics: cdef class Term: """ A cvc5 Term. - Wrapper class for :cpp:class:`cvc5::api::Term`. + Wrapper class for :cpp:class:`cvc5::Term`. """ cdef c_Term cterm cdef Solver solver @@ -3458,7 +3458,7 @@ cdef class Term: (singleton c1) ... (union (singleton c_{n-1}) (singleton c_n)))) where ``c1 ... cn`` are values ordered by id such that - ``c1 > ... > cn`` (see also :cpp:func:`cvc5::api::Term::operator>()`). + ``c1 > ... > cn`` (see also :cpp:func:`cvc5::Term::operator>()`). .. note:: A universe set term ``(kind SET_UNIVERSE)`` is not considered to be diff --git a/src/base/check.cpp b/src/base/check.cpp index e699202a3..8a719dbb5 100644 --- a/src/base/check.cpp +++ b/src/base/check.cpp @@ -18,7 +18,7 @@ #include #include -namespace cvc5 { +namespace cvc5::internal { FatalStream::FatalStream(const char* function, const char* file, int line) { @@ -208,4 +208,4 @@ AssertArgumentException::AssertArgumentException(const char* condStr, line); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/base/check.h b/src/base/check.h index 916d6a6a1..be645f6fe 100644 --- a/src/base/check.h +++ b/src/base/check.h @@ -39,7 +39,7 @@ #include "base/exception.h" #include "cvc5_export.h" -namespace cvc5 { +namespace cvc5::internal { // Implementation notes: // To understand FatalStream and OStreamVoider, it is useful to understand @@ -90,7 +90,7 @@ class OstreamVoider // } // } #define CVC5_FATAL() \ - FatalStream(__PRETTY_FUNCTION__, __FILE__, __LINE__).stream() + internal::FatalStream(__PRETTY_FUNCTION__, __FILE__, __LINE__).stream() /* GCC <= 9.2 ignores CVC5_NO_RETURN of ~FatalStream() if * used in template classes (e.g., CDHashMap::save()). As a workaround we @@ -103,7 +103,9 @@ class OstreamVoider // inserted into. #define CVC5_FATAL_IF(cond, function, file, line) \ CVC5_PREDICT_FALSE(!(cond)) \ - ? (void)0 : OstreamVoider() & FatalStream(function, file, line).stream() + ? (void)0 \ + : cvc5::internal::OstreamVoider() \ + & cvc5::internal::FatalStream(function, file, line).stream() // If `cond` is false, log an error message and abort()'s the process. // Otherwise, does nothing. This leaves a hanging std::ostream& that can be @@ -170,11 +172,11 @@ class AssertArgumentException : public Exception #define InternalError() CVC5_FATAL() << "Internal error detected " #define IllegalArgument(arg, msg...) \ - throw ::cvc5::IllegalArgumentException( \ + throw ::cvc5::internal::IllegalArgumentException( \ "", \ #arg, \ __PRETTY_FUNCTION__, \ - ::cvc5::IllegalArgumentException::formatVariadic(msg).c_str()); + ::cvc5::internal::IllegalArgumentException::formatVariadic(msg).c_str()); // This cannot use check argument directly as this forces // CheckArgument to use a va_list. This is unsupported in Swig. #define PrettyCheckArgument(cond, arg, msg...) \ @@ -182,11 +184,11 @@ class AssertArgumentException : public Exception { \ if (__builtin_expect((!(cond)), false)) \ { \ - throw ::cvc5::IllegalArgumentException( \ + throw ::cvc5::internal::IllegalArgumentException( \ #cond, \ #arg, \ __PRETTY_FUNCTION__, \ - ::cvc5::IllegalArgumentException::formatVariadic(msg).c_str()); \ + ::cvc5::internal::IllegalArgumentException::formatVariadic(msg).c_str()); \ } \ } while (0) #define AlwaysAssertArgument(cond, arg, msg...) \ @@ -194,7 +196,7 @@ class AssertArgumentException : public Exception { \ if (__builtin_expect((!(cond)), false)) \ { \ - throw ::cvc5::AssertArgumentException( \ + throw ::cvc5::internal::AssertArgumentException( \ #cond, #arg, __PRETTY_FUNCTION__, __FILE__, __LINE__, ##msg); \ } \ } while (0) @@ -209,6 +211,6 @@ class AssertArgumentException : public Exception cond, arg, msg...) /*__builtin_expect( ( cond ), true )*/ #endif /* CVC5_ASSERTIONS */ -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__CHECK_H */ diff --git a/src/base/configuration.cpp b/src/base/configuration.cpp index af64c8844..42e6762a9 100644 --- a/src/base/configuration.cpp +++ b/src/base/configuration.cpp @@ -29,7 +29,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { string Configuration::getName() { return CVC5_PACKAGE_NAME; } @@ -272,4 +272,4 @@ std::string Configuration::getCompiledDateTime() { return __DATE__ " " __TIME__; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/base/configuration.h b/src/base/configuration.h index 5afb14090..a254fbdfb 100644 --- a/src/base/configuration.h +++ b/src/base/configuration.h @@ -14,7 +14,7 @@ * about the cvc5 library. * * Eventually, the configuration methods will all be migrated to the - * cvc5::configuration namespace below. This is cleaner and avoids a gcc/10.1.0 + * cvc5::internal::configuration namespace below. This is cleaner and avoids a gcc/10.1.0 * bug. See https://github.com/cvc5/cvc5/pull/7898 for details. */ @@ -28,7 +28,7 @@ #include "cvc5_export.h" -namespace cvc5 { +namespace cvc5::internal { namespace configuration { static constexpr bool isStatisticsBuild() @@ -127,6 +127,6 @@ public: }; /* class Configuration */ -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__CONFIGURATION_H */ diff --git a/src/base/configuration_private.h b/src/base/configuration_private.h index 7399d4412..99085cb5d 100644 --- a/src/base/configuration_private.h +++ b/src/base/configuration_private.h @@ -22,7 +22,7 @@ #include "base/configuration.h" -namespace cvc5 { +namespace cvc5::internal { #ifdef CVC5_DEBUG # define IS_DEBUG_BUILD true @@ -158,6 +158,6 @@ namespace cvc5 { #endif /* __has_feature(thread_sanitizer) */ #endif /* defined(__has_feature) */ -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__CONFIGURATION_PRIVATE_H */ diff --git a/src/base/exception.cpp b/src/base/exception.cpp index da8a56254..ad935be97 100644 --- a/src/base/exception.cpp +++ b/src/base/exception.cpp @@ -27,7 +27,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { std::string Exception::toString() const { @@ -189,4 +189,4 @@ void IllegalArgumentException::construct(const char* header, const char* extra, delete [] buf; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/base/exception.h b/src/base/exception.h index e37b69ec8..9d5ca7c1a 100644 --- a/src/base/exception.h +++ b/src/base/exception.h @@ -24,7 +24,7 @@ #include "cvc5_export.h" -namespace cvc5 { +namespace cvc5::internal { class CVC5_EXPORT Exception : public std::exception { @@ -124,7 +124,7 @@ inline void CheckArgument(bool cond, const char* tail CVC5_UNUSED) { if(__builtin_expect( ( !cond ), false )) { - throw ::cvc5::IllegalArgumentException("", "", tail); + throw ::cvc5::internal::IllegalArgumentException("", "", tail); } } template @@ -133,7 +133,7 @@ template inline void CheckArgument(bool cond, const T& arg CVC5_UNUSED) { if(__builtin_expect( ( !cond ), false )) { - throw ::cvc5::IllegalArgumentException("", "", ""); + throw ::cvc5::internal::IllegalArgumentException("", "", ""); } } @@ -163,6 +163,6 @@ private: static thread_local LastExceptionBuffer* s_currentBuffer; }; /* class LastExceptionBuffer */ -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__EXCEPTION_H */ diff --git a/src/base/listener.cpp b/src/base/listener.cpp index 2c9fc9b22..9d6d36610 100644 --- a/src/base/listener.cpp +++ b/src/base/listener.cpp @@ -15,9 +15,9 @@ #include "base/listener.h" -namespace cvc5 { +namespace cvc5::internal { Listener::Listener(){} Listener::~Listener(){} -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/base/listener.h b/src/base/listener.h index 79de71a31..89d0a5e08 100644 --- a/src/base/listener.h +++ b/src/base/listener.h @@ -20,7 +20,7 @@ #ifndef CVC5__LISTENER_H #define CVC5__LISTENER_H -namespace cvc5 { +namespace cvc5::internal { /** * Listener interface class. @@ -37,6 +37,6 @@ class Listener virtual void notify() = 0; }; -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__LISTENER_H */ diff --git a/src/base/map_util.h b/src/base/map_util.h index d53710708..e23c671b2 100644 --- a/src/base/map_util.h +++ b/src/base/map_util.h @@ -16,8 +16,8 @@ * Supports: * - std::map * - std::unordered_map - * - cvc5::context::CDHashmap - * - cvc5::context::CDInsertHashmap + * - cvc5::internal::context::CDHashmap + * - cvc5::internal::context::CDInsertHashmap * The ContainsKey function is also compatible with std::[unordered_]set. * * Currently implemented classes of functions: @@ -40,7 +40,7 @@ #include "base/check.h" -namespace cvc5 { +namespace cvc5::internal { // Returns true if the `map` contains the `key`. // @@ -92,6 +92,6 @@ const MapMappedTypeT& FindOrDie(const M& map, const MapKeyTypeT& key) return (*it).second; } -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__BASE__MAP_UTIL_H */ diff --git a/src/base/modal_exception.h b/src/base/modal_exception.h index d79d420f1..877a9cd5f 100644 --- a/src/base/modal_exception.h +++ b/src/base/modal_exception.h @@ -22,9 +22,9 @@ #include "base/exception.h" -namespace cvc5 { +namespace cvc5::internal { -class ModalException : public cvc5::Exception +class ModalException : public cvc5::internal::Exception { public: ModalException() : @@ -48,7 +48,7 @@ class ModalException : public cvc5::Exception * TODO(#1108): This exception should not be needed anymore in future versions * of the public API. */ -class RecoverableModalException : public cvc5::ModalException +class RecoverableModalException : public cvc5::internal::ModalException { public: RecoverableModalException(const std::string& msg) : ModalException(msg) {} @@ -56,6 +56,6 @@ class RecoverableModalException : public cvc5::ModalException RecoverableModalException(const char* msg) : ModalException(msg) {} }; /* class RecoverableModalException */ -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__SMT__MODAL_EXCEPTION_H */ diff --git a/src/base/output.cpp b/src/base/output.cpp index 75fbcd60e..ccd8595a8 100644 --- a/src/base/output.cpp +++ b/src/base/output.cpp @@ -17,7 +17,7 @@ #include -namespace cvc5 { +namespace cvc5::internal { /* Definitions of the declared globals from output.h... */ @@ -32,4 +32,4 @@ const int Cvc5ostream::s_indentIosIndex = std::ios_base::xalloc(); WarningC WarningChannel(&std::cerr); TraceC TraceChannel(&std::cout); -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/base/output.h b/src/base/output.h index b0a311241..4f57ed450 100644 --- a/src/base/output.h +++ b/src/base/output.h @@ -29,7 +29,7 @@ #include "cvc5_export.h" -namespace cvc5 { +namespace cvc5::internal { template std::ostream& operator<<(std::ostream& out, const std::pair& p) { @@ -280,27 +280,27 @@ extern TraceC TraceChannel CVC5_EXPORT; #ifdef CVC5_MUZZLE #define Warning \ - ::cvc5::__cvc5_true() ? ::cvc5::nullStream : ::cvc5::WarningChannel + ::cvc5::internal::__cvc5_true() ? ::cvc5::internal::nullStream : ::cvc5::internal::WarningChannel #define WarningOnce \ - ::cvc5::__cvc5_true() ? ::cvc5::nullStream : ::cvc5::WarningChannel -#define TraceIsOn ::cvc5::__cvc5_true() ? false : ::cvc5::TraceChannel.isOn -#define Trace(tag) ::cvc5::__cvc5_true() ? ::cvc5::nullStream : ::cvc5::TraceChannel() + ::cvc5::internal::__cvc5_true() ? ::cvc5::internal::nullStream : ::cvc5::internal::WarningChannel +#define TraceIsOn ::cvc5::internal::__cvc5_true() ? false : ::cvc5::internal::TraceChannel.isOn +#define Trace(tag) ::cvc5::internal::__cvc5_true() ? ::cvc5::internal::nullStream : ::cvc5::internal::TraceChannel() #else /* CVC5_MUZZLE */ #define Warning \ - (!::cvc5::WarningChannel.isOn()) ? ::cvc5::nullStream : ::cvc5::WarningChannel + (!::cvc5::internal::WarningChannel.isOn()) ? ::cvc5::internal::nullStream : ::cvc5::internal::WarningChannel #define WarningOnce \ - (!::cvc5::WarningChannel.isOn() \ - || !::cvc5::WarningChannel.warnOnce(__FILE__, __LINE__)) \ - ? ::cvc5::nullStream \ - : ::cvc5::WarningChannel + (!::cvc5::internal::WarningChannel.isOn() \ + || !::cvc5::internal::WarningChannel.warnOnce(__FILE__, __LINE__)) \ + ? ::cvc5::internal::nullStream \ + : ::cvc5::internal::WarningChannel #ifdef CVC5_TRACING -#define TraceIsOn ::cvc5::TraceChannel.isOn -#define Trace(tag) !::cvc5::TraceChannel.isOn(tag) ? ::cvc5::nullStream : ::cvc5::TraceChannel() +#define TraceIsOn ::cvc5::internal::TraceChannel.isOn +#define Trace(tag) !::cvc5::internal::TraceChannel.isOn(tag) ? ::cvc5::internal::nullStream : ::cvc5::internal::TraceChannel() #else /* CVC5_TRACING */ -#define TraceIsOn ::cvc5::__cvc5_true() ? false : ::cvc5::TraceChannel.isOn -#define Trace(tag) ::cvc5::__cvc5_true() ? ::cvc5::nullStream : ::cvc5::TraceChannel() +#define TraceIsOn ::cvc5::internal::__cvc5_true() ? false : ::cvc5::internal::TraceChannel.isOn +#define Trace(tag) ::cvc5::internal::__cvc5_true() ? ::cvc5::internal::nullStream : ::cvc5::internal::TraceChannel() #endif /* CVC5_TRACING */ #endif /* CVC5_MUZZLE */ @@ -334,6 +334,6 @@ class IndentedScope inline ~IndentedScope() { d_out << pop; } }; /* class IndentedScope */ -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__OUTPUT_H */ diff --git a/src/base/versioninfo.cpp.in b/src/base/versioninfo.cpp.in index af4129f6d..dd8a2ac67 100644 --- a/src/base/versioninfo.cpp.in +++ b/src/base/versioninfo.cpp.in @@ -15,8 +15,8 @@ #include "base/configuration.h" -const bool ::cvc5::Configuration::GIT_BUILD = @GIT_BUILD@; -const bool ::cvc5::Configuration::CVC5_IS_RELEASE = @CVC5_IS_RELEASE@; -const char* const ::cvc5::Configuration::CVC5_VERSION = "@CVC5_VERSION@"; -const char* const ::cvc5::Configuration::CVC5_FULL_VERSION = "@CVC5_FULL_VERSION@"; -const char* const ::cvc5::Configuration::CVC5_GIT_INFO = "@CVC5_GIT_INFO@"; +const bool ::cvc5::internal::Configuration::GIT_BUILD = @GIT_BUILD@; +const bool ::cvc5::internal::Configuration::CVC5_IS_RELEASE = @CVC5_IS_RELEASE@; +const char* const ::cvc5::internal::Configuration::CVC5_VERSION = "@CVC5_VERSION@"; +const char* const ::cvc5::internal::Configuration::CVC5_FULL_VERSION = "@CVC5_FULL_VERSION@"; +const char* const ::cvc5::internal::Configuration::CVC5_GIT_INFO = "@CVC5_GIT_INFO@"; diff --git a/src/context/cdhashmap.h b/src/context/cdhashmap.h index 464547bbb..6a7f37896 100644 --- a/src/context/cdhashmap.h +++ b/src/context/cdhashmap.h @@ -91,7 +91,7 @@ #include "context/cdhashmap_forward.h" #include "context/context.h" -namespace cvc5 { +namespace cvc5::internal { namespace context { // Auxiliary class: almost the same as CDO (see cdo.h) @@ -408,6 +408,6 @@ class CDHashMap : public ContextObj }; /* class CDHashMap<> */ } // namespace context -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__CONTEXT__CDHASHMAP_H */ diff --git a/src/context/cdhashmap_forward.h b/src/context/cdhashmap_forward.h index 4b7a43123..a23180d4a 100644 --- a/src/context/cdhashmap_forward.h +++ b/src/context/cdhashmap_forward.h @@ -28,12 +28,12 @@ /// \cond internals -namespace cvc5 { +namespace cvc5::internal { namespace context { template > class CDHashMap; } // namespace context -} // namespace cvc5 +} // namespace cvc5::internal /// \endcond diff --git a/src/context/cdhashset.h b/src/context/cdhashset.h index cd57d8f76..789532c53 100644 --- a/src/context/cdhashset.h +++ b/src/context/cdhashset.h @@ -22,7 +22,7 @@ #include "context/cdinsert_hashmap.h" #include "context/context.h" -namespace cvc5 { +namespace cvc5::internal { namespace context { template > @@ -152,6 +152,6 @@ public: }; /* class CDHashSet */ } // namespace context -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__CONTEXT__CDHASHSET_H */ diff --git a/src/context/cdhashset_forward.h b/src/context/cdhashset_forward.h index 02475de96..4e5068eb2 100644 --- a/src/context/cdhashset_forward.h +++ b/src/context/cdhashset_forward.h @@ -27,11 +27,11 @@ #include -namespace cvc5 { +namespace cvc5::internal { namespace context { template > class CDHashSet; } // namespace context -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__CONTEXT__CDSET_FORWARD_H */ diff --git a/src/context/cdinsert_hashmap.h b/src/context/cdinsert_hashmap.h index 4df2036e6..308ca6de6 100644 --- a/src/context/cdinsert_hashmap.h +++ b/src/context/cdinsert_hashmap.h @@ -44,7 +44,7 @@ #pragma once -namespace cvc5 { +namespace cvc5::internal { namespace context { @@ -366,4 +366,4 @@ class CDInsertHashMap : public ContextObj { }; } // namespace context -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/context/cdinsert_hashmap_forward.h b/src/context/cdinsert_hashmap_forward.h index 9e00e6dc4..3cf1b8698 100644 --- a/src/context/cdinsert_hashmap_forward.h +++ b/src/context/cdinsert_hashmap_forward.h @@ -28,11 +28,11 @@ #include -namespace cvc5 { +namespace cvc5::internal { namespace context { template > class CDInsertHashMap; } // namespace context -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__CONTEXT__CDINSERT_HASHMAP_FORWARD_H */ diff --git a/src/context/cdlist.h b/src/context/cdlist.h index 574c452b8..faed937ca 100644 --- a/src/context/cdlist.h +++ b/src/context/cdlist.h @@ -30,7 +30,7 @@ #include "context/context.h" #include "context/context_mm.h" -namespace cvc5 { +namespace cvc5::internal { namespace context { /** @@ -438,6 +438,6 @@ class CDList > : public ContextObj { }; } // namespace context -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__CONTEXT__CDLIST_H */ diff --git a/src/context/cdlist_forward.h b/src/context/cdlist_forward.h index 993a48084..685211e28 100644 --- a/src/context/cdlist_forward.h +++ b/src/context/cdlist_forward.h @@ -35,7 +35,7 @@ /// \cond internals -namespace cvc5 { +namespace cvc5::internal { namespace context { template @@ -50,6 +50,6 @@ class CDList; /// \endcond } // namespace context -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__CONTEXT__CDLIST_FORWARD_H */ diff --git a/src/context/cdmaybe.h b/src/context/cdmaybe.h index 904e77ccc..993bf6bd7 100644 --- a/src/context/cdmaybe.h +++ b/src/context/cdmaybe.h @@ -24,7 +24,7 @@ #include "context/cdo.h" #include "context/context.h" -namespace cvc5 { +namespace cvc5::internal { namespace context { class CDRaised { @@ -74,4 +74,4 @@ public: };/* class CDMaybe */ } // namespace context -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/context/cdo.h b/src/context/cdo.h index f239703a9..f7fd4f763 100644 --- a/src/context/cdo.h +++ b/src/context/cdo.h @@ -20,7 +20,7 @@ #include "context/context.h" -namespace cvc5 { +namespace cvc5::internal { namespace context { /** @@ -170,6 +170,6 @@ public: };/* class CDO */ } // namespace context -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__CONTEXT__CDO_H */ diff --git a/src/context/cdqueue.h b/src/context/cdqueue.h index 405553cd9..6472fd5ca 100644 --- a/src/context/cdqueue.h +++ b/src/context/cdqueue.h @@ -28,7 +28,7 @@ #include "context/context.h" #include "context/cdlist.h" -namespace cvc5 { +namespace cvc5::internal { namespace context { template , class Allocator = std::allocator > @@ -156,6 +156,6 @@ public: };/* class CDQueue<> */ } // namespace context -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__CONTEXT__CDQUEUE_H */ diff --git a/src/context/cdtrail_queue.h b/src/context/cdtrail_queue.h index 4240d34c4..bfb5f2a4f 100644 --- a/src/context/cdtrail_queue.h +++ b/src/context/cdtrail_queue.h @@ -25,7 +25,7 @@ #include "context/cdlist.h" #include "context/cdo.h" -namespace cvc5 { +namespace cvc5::internal { namespace context { class Context; @@ -90,6 +90,6 @@ public: };/* class CDTrailQueue<> */ } // namespace context -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__CONTEXT__CDTRAIL_QUEUE_H */ diff --git a/src/context/context.cpp b/src/context/context.cpp index 774d92084..7a5d88252 100644 --- a/src/context/context.cpp +++ b/src/context/context.cpp @@ -20,7 +20,7 @@ #include "base/check.h" #include "context/context.h" -namespace cvc5 { +namespace cvc5::internal { namespace context { @@ -348,4 +348,4 @@ void Scope::enqueueToGarbageCollect(ContextObj* obj) { } } // namespace context -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/context/context.h b/src/context/context.h index 7b59c946e..1b73531f1 100644 --- a/src/context/context.h +++ b/src/context/context.h @@ -28,7 +28,7 @@ #include "base/output.h" #include "context/context_mm.h" -namespace cvc5 { +namespace cvc5::internal { namespace context { class Context; @@ -736,6 +736,6 @@ inline void Scope::addToChain(ContextObj* pContextObj) } } // namespace context -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__CONTEXT__CONTEXT_H */ diff --git a/src/context/context_mm.cpp b/src/context/context_mm.cpp index 24f8879d9..55660edb1 100644 --- a/src/context/context_mm.cpp +++ b/src/context/context_mm.cpp @@ -28,7 +28,7 @@ #include "base/output.h" #include "context/context_mm.h" -namespace cvc5 { +namespace cvc5::internal { namespace context { #ifndef CVC5_DEBUG_CONTEXT_MEMORY_MANAGER @@ -174,4 +174,4 @@ unsigned ContextMemoryManager::getMaxAllocationSize() #endif /* CVC5_DEBUG_CONTEXT_MEMORY_MANAGER */ } // namespace context -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/context/context_mm.h b/src/context/context_mm.h index 10cc7d1c9..0fdb78045 100644 --- a/src/context/context_mm.h +++ b/src/context/context_mm.h @@ -25,7 +25,7 @@ #endif #include -namespace cvc5 { +namespace cvc5::internal { namespace context { #ifndef CVC5_DEBUG_CONTEXT_MEMORY_MANAGER @@ -262,6 +262,6 @@ inline bool operator!=(const ContextMemoryAllocator& a1, } } // namespace context -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__CONTEXT__CONTEXT_MM_H */ diff --git a/src/decision/assertion_list.cpp b/src/decision/assertion_list.cpp index 28c285a8f..2b9a16c8d 100644 --- a/src/decision/assertion_list.cpp +++ b/src/decision/assertion_list.cpp @@ -15,7 +15,7 @@ #include "decision/assertion_list.h" -namespace cvc5 { +namespace cvc5::internal { namespace decision { const char* toString(DecisionStatus s) @@ -132,4 +132,4 @@ void AssertionList::notifyStatus(TNode n, DecisionStatus s) } } // namespace decision -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/decision/assertion_list.h b/src/decision/assertion_list.h index 3e7a1fee8..8ed258902 100644 --- a/src/decision/assertion_list.h +++ b/src/decision/assertion_list.h @@ -26,7 +26,7 @@ #include "context/cdo.h" #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace decision { /** @@ -103,6 +103,6 @@ class AssertionList }; } // namespace decision -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__DECISION__ASSERTION_LIST_H */ diff --git a/src/decision/decision_engine.cpp b/src/decision/decision_engine.cpp index 9fed955cf..90a9099bd 100644 --- a/src/decision/decision_engine.cpp +++ b/src/decision/decision_engine.cpp @@ -16,7 +16,7 @@ #include "util/resource_manager.h" -namespace cvc5 { +namespace cvc5::internal { namespace decision { DecisionEngine::DecisionEngine(Env& env) @@ -51,4 +51,4 @@ prop::SatLiteral DecisionEngineEmpty::getNextInternal(bool& stopSearch) } } // namespace decision -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/decision/decision_engine.h b/src/decision/decision_engine.h index 3755509b8..86ba92402 100644 --- a/src/decision/decision_engine.h +++ b/src/decision/decision_engine.h @@ -24,7 +24,7 @@ #include "prop/sat_solver_types.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { namespace decision { class DecisionEngine : protected EnvObj @@ -101,6 +101,6 @@ class DecisionEngineEmpty : public DecisionEngine }; } // namespace decision -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__DECISION__DECISION_ENGINE_H */ diff --git a/src/decision/justification_strategy.cpp b/src/decision/justification_strategy.cpp index 6c3ddfd04..fe1b8fa70 100644 --- a/src/decision/justification_strategy.cpp +++ b/src/decision/justification_strategy.cpp @@ -17,10 +17,10 @@ #include "prop/skolem_def_manager.h" -using namespace cvc5::kind; -using namespace cvc5::prop; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::prop; -namespace cvc5 { +namespace cvc5::internal { namespace decision { JustificationStrategy::JustificationStrategy(Env& env) @@ -654,4 +654,4 @@ bool JustificationStrategy::isTheoryAtom(TNode n) } } // namespace decision -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/decision/justification_strategy.h b/src/decision/justification_strategy.h index 60446a0e7..1a2556e91 100644 --- a/src/decision/justification_strategy.h +++ b/src/decision/justification_strategy.h @@ -31,7 +31,7 @@ #include "prop/sat_solver.h" #include "prop/sat_solver_types.h" -namespace cvc5 { +namespace cvc5::internal { namespace decision { /** @@ -252,6 +252,6 @@ class JustificationStrategy : public DecisionEngine }; } // namespace decision -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__DECISION__JUSTIFICATION_STRATEGY_H */ diff --git a/src/decision/justify_info.cpp b/src/decision/justify_info.cpp index 8ed3718a3..9ed44944d 100644 --- a/src/decision/justify_info.cpp +++ b/src/decision/justify_info.cpp @@ -15,7 +15,7 @@ #include "decision/justify_info.h" -namespace cvc5 { +namespace cvc5::internal { namespace decision { JustifyInfo::JustifyInfo(context::Context* c) @@ -49,4 +49,4 @@ void JustifyInfo::set(TNode n, prop::SatValue desiredVal) } } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/decision/justify_info.h b/src/decision/justify_info.h index bf8c882b3..d1602d064 100644 --- a/src/decision/justify_info.h +++ b/src/decision/justify_info.h @@ -22,7 +22,7 @@ #include "expr/node.h" #include "prop/sat_solver_types.h" -namespace cvc5 { +namespace cvc5::internal { namespace decision { /** A pair indicating a node and its desired value */ @@ -55,6 +55,6 @@ class JustifyInfo }; } -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__DECISION__JUSTIFY_INFO_H */ diff --git a/src/decision/justify_stack.cpp b/src/decision/justify_stack.cpp index 1d7a85277..12bbffd89 100644 --- a/src/decision/justify_stack.cpp +++ b/src/decision/justify_stack.cpp @@ -15,7 +15,7 @@ #include "decision/justify_stack.h" -namespace cvc5 { +namespace cvc5::internal { namespace decision { JustifyStack::JustifyStack(context::Context* c) @@ -87,4 +87,4 @@ JustifyInfo* JustifyStack::getOrAllocJustifyInfo(size_t i) } } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/decision/justify_stack.h b/src/decision/justify_stack.h index 9a5815a0c..e236e7970 100644 --- a/src/decision/justify_stack.h +++ b/src/decision/justify_stack.h @@ -23,7 +23,7 @@ #include "decision/justify_info.h" #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace decision { /** @@ -76,6 +76,6 @@ class JustifyStack }; } -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__DECISION__JUSTIFY_INFO_H */ diff --git a/src/decision/justify_stats.cpp b/src/decision/justify_stats.cpp index 0240852ce..f059c0474 100644 --- a/src/decision/justify_stats.cpp +++ b/src/decision/justify_stats.cpp @@ -17,7 +17,7 @@ #include "smt/smt_statistics_registry.h" -namespace cvc5 { +namespace cvc5::internal { namespace decision { JustifyStatistics::JustifyStatistics() @@ -39,4 +39,4 @@ JustifyStatistics::JustifyStatistics() JustifyStatistics::~JustifyStatistics() {} } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/decision/justify_stats.h b/src/decision/justify_stats.h index 6e53a83df..cca020bef 100644 --- a/src/decision/justify_stats.h +++ b/src/decision/justify_stats.h @@ -20,7 +20,7 @@ #include "util/statistics_registry.h" -namespace cvc5 { +namespace cvc5::internal { namespace decision { class JustifyStatistics @@ -43,6 +43,6 @@ class JustifyStatistics }; } -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__DECISION__JUSTIFY_STATS_H */ diff --git a/src/expr/algorithm/flatten.h b/src/expr/algorithm/flatten.h index f48194695..015ca1161 100644 --- a/src/expr/algorithm/flatten.h +++ b/src/expr/algorithm/flatten.h @@ -22,7 +22,7 @@ #include "expr/node.h" -namespace cvc5::expr::algorithm { +namespace cvc5::internal::expr::algorithm { /** * Flatten a node into a vector of its (direct or indirect) children. @@ -116,6 +116,6 @@ Node flatten(TNode t, Kinds... kinds) return NodeManager::currentNM()->mkNode(t.getKind(), children); } -} // namespace cvc5::expr +} // namespace cvc5::internal::expr #endif diff --git a/src/expr/annotation_elim_node_converter.cpp b/src/expr/annotation_elim_node_converter.cpp index 6386888d4..73e98a2b2 100644 --- a/src/expr/annotation_elim_node_converter.cpp +++ b/src/expr/annotation_elim_node_converter.cpp @@ -15,9 +15,9 @@ #include "expr/annotation_elim_node_converter.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { AnnotationElimNodeConverter::AnnotationElimNodeConverter() {} @@ -30,4 +30,4 @@ Node AnnotationElimNodeConverter::postConvert(Node n) return n; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/expr/annotation_elim_node_converter.h b/src/expr/annotation_elim_node_converter.h index 094a2dc84..e345d1af1 100644 --- a/src/expr/annotation_elim_node_converter.h +++ b/src/expr/annotation_elim_node_converter.h @@ -20,7 +20,7 @@ #include "expr/node.h" #include "expr/node_converter.h" -namespace cvc5 { +namespace cvc5::internal { /** * This converts a node into one that does not involve annotations for @@ -36,6 +36,6 @@ class AnnotationElimNodeConverter : public NodeConverter Node postConvert(Node n) override; }; -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/expr/array_store_all.cpp b/src/expr/array_store_all.cpp index d97fe1320..fd2029d33 100644 --- a/src/expr/array_store_all.cpp +++ b/src/expr/array_store_all.cpp @@ -24,7 +24,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { ArrayStoreAll::ArrayStoreAll(const TypeNode& type, const Node& value) : d_type(), d_value() @@ -113,4 +113,4 @@ size_t ArrayStoreAllHashFunction::operator()(const ArrayStoreAll& asa) const { * std::hash()(asa.getValue()); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/expr/array_store_all.h b/src/expr/array_store_all.h index 3b94f4f9f..5df0f94ca 100644 --- a/src/expr/array_store_all.h +++ b/src/expr/array_store_all.h @@ -22,7 +22,7 @@ #include #include -namespace cvc5 { +namespace cvc5::internal { template class NodeTemplate; @@ -67,6 +67,6 @@ struct ArrayStoreAllHashFunction size_t operator()(const ArrayStoreAll& asa) const; }; /* struct ArrayStoreAllHashFunction */ -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__ARRAY_STORE_ALL_H */ diff --git a/src/expr/ascription_type.cpp b/src/expr/ascription_type.cpp index 65a686036..e4af57acc 100644 --- a/src/expr/ascription_type.cpp +++ b/src/expr/ascription_type.cpp @@ -19,7 +19,7 @@ #include "expr/type_node.h" -namespace cvc5 { +namespace cvc5::internal { AscriptionType::AscriptionType(TypeNode t) : d_type(new TypeNode(t)) {} @@ -56,4 +56,4 @@ std::ostream& operator<<(std::ostream& out, AscriptionType at) return out; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/expr/ascription_type.h b/src/expr/ascription_type.h index 05874f6e8..91167ce6b 100644 --- a/src/expr/ascription_type.h +++ b/src/expr/ascription_type.h @@ -21,7 +21,7 @@ #include #include -namespace cvc5 { +namespace cvc5::internal { class TypeNode; @@ -59,6 +59,6 @@ struct AscriptionTypeHashFunction /** An output routine for AscriptionTypes */ std::ostream& operator<<(std::ostream& out, AscriptionType at); -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__ASCRIPTION_TYPE_H */ diff --git a/src/expr/attribute.cpp b/src/expr/attribute.cpp index ce617079e..4145a0007 100644 --- a/src/expr/attribute.cpp +++ b/src/expr/attribute.cpp @@ -21,7 +21,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace expr { namespace attr { @@ -115,4 +115,4 @@ void AttributeManager::deleteAttributes(const AttrIdVec& atids) { } // namespace attr } // namespace expr -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/expr/attribute.h b/src/expr/attribute.h index e41b63191..abd93f72b 100644 --- a/src/expr/attribute.h +++ b/src/expr/attribute.h @@ -31,7 +31,7 @@ #include "expr/attribute_internals.h" #undef CVC5_ATTRIBUTE_H__INCLUDING__ATTRIBUTE_INTERNALS_H -namespace cvc5 { +namespace cvc5::internal { namespace expr { namespace attr { @@ -611,6 +611,6 @@ NodeManager::setAttribute(TypeNode n, const AttrKind&, d_attrManager->setAttribute(n.d_nv, AttrKind(), value); } -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__EXPR__ATTRIBUTE_H */ diff --git a/src/expr/attribute_internals.h b/src/expr/attribute_internals.h index 1589349ad..901cf41cb 100644 --- a/src/expr/attribute_internals.h +++ b/src/expr/attribute_internals.h @@ -24,7 +24,7 @@ #include -namespace cvc5 { +namespace cvc5::internal { namespace expr { // ATTRIBUTE HASH FUNCTIONS ==================================================== @@ -498,6 +498,6 @@ const uint64_t Attribute::s_id = Attribute::registerAttribute(); } // namespace expr -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__EXPR__ATTRIBUTE_INTERNALS_H */ diff --git a/src/expr/attribute_unique_id.h b/src/expr/attribute_unique_id.h index ae86ba256..533619a1c 100644 --- a/src/expr/attribute_unique_id.h +++ b/src/expr/attribute_unique_id.h @@ -22,7 +22,7 @@ // ATTRIBUTE IDs ============================================================ -namespace cvc5 { +namespace cvc5::internal { namespace expr { namespace attr { @@ -60,8 +60,8 @@ public: AttrTableId getTableId() const{ return d_tableId; } uint64_t getWithinTypeId() const{ return d_withinTypeId; } -}; /* cvc5::expr::attr::AttributeUniqueId */ +}; /* cvc5::internal::expr::attr::AttributeUniqueId */ } // namespace attr } // namespace expr -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/expr/bound_var_manager.cpp b/src/expr/bound_var_manager.cpp index 450b2358f..fac07032c 100644 --- a/src/expr/bound_var_manager.cpp +++ b/src/expr/bound_var_manager.cpp @@ -18,9 +18,9 @@ #include "expr/node_manager_attributes.h" #include "util/rational.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { BoundVarManager::BoundVarManager() : d_keepCacheVals(false) {} @@ -61,4 +61,4 @@ Node BoundVarManager::getCacheValue(TNode cv, size_t i) return getCacheValue(cv, getCacheValue(i)); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/expr/bound_var_manager.h b/src/expr/bound_var_manager.h index 507cebab3..83379af93 100644 --- a/src/expr/bound_var_manager.h +++ b/src/expr/bound_var_manager.h @@ -23,7 +23,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { /** * Bound variable manager. @@ -101,6 +101,6 @@ class BoundVarManager std::unordered_set d_cacheVals; }; -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__EXPR__BOUND_VAR_MANAGER_H */ diff --git a/src/expr/cardinality_constraint.cpp b/src/expr/cardinality_constraint.cpp index 695f5d4a3..a470dfb3a 100644 --- a/src/expr/cardinality_constraint.cpp +++ b/src/expr/cardinality_constraint.cpp @@ -19,7 +19,7 @@ #include "expr/type_node.h" -namespace cvc5 { +namespace cvc5::internal { CardinalityConstraint::CardinalityConstraint(const TypeNode& type, const Integer& ub) @@ -105,4 +105,4 @@ size_t CombinedCardinalityConstraintHashFunction::operator()( return cc.getUpperBound().hash(); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/expr/cardinality_constraint.h b/src/expr/cardinality_constraint.h index b2bfa836f..c340c9010 100644 --- a/src/expr/cardinality_constraint.h +++ b/src/expr/cardinality_constraint.h @@ -24,7 +24,7 @@ #include "util/integer.h" #include "util/hash.h" -namespace cvc5 { +namespace cvc5::internal { class TypeNode; @@ -100,6 +100,6 @@ struct CombinedCardinalityConstraintHashFunction size_t operator()(const CombinedCardinalityConstraint& cc) const; }; -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/expr/codatatype_bound_variable.cpp b/src/expr/codatatype_bound_variable.cpp index a6a9d8e3e..356473828 100644 --- a/src/expr/codatatype_bound_variable.cpp +++ b/src/expr/codatatype_bound_variable.cpp @@ -25,7 +25,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { CodatatypeBoundVariable::CodatatypeBoundVariable(const TypeNode& type, Integer index) @@ -110,4 +110,4 @@ size_t CodatatypeBoundVariableHashFunction::operator()( * IntegerHashFunction()(cbv.getIndex()); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/expr/codatatype_bound_variable.h b/src/expr/codatatype_bound_variable.h index 9af8476d5..513408ce0 100644 --- a/src/expr/codatatype_bound_variable.h +++ b/src/expr/codatatype_bound_variable.h @@ -23,7 +23,7 @@ #include "util/integer.h" -namespace cvc5 { +namespace cvc5::internal { class TypeNode; @@ -86,6 +86,6 @@ struct CodatatypeBoundVariableHashFunction size_t operator()(const CodatatypeBoundVariable& cbv) const; }; -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__UNINTERPRETED_CONSTANT_H */ diff --git a/src/expr/datatype_index.cpp b/src/expr/datatype_index.cpp index 01f975523..2c6198fdd 100644 --- a/src/expr/datatype_index.cpp +++ b/src/expr/datatype_index.cpp @@ -21,7 +21,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { DatatypeIndexConstant::DatatypeIndexConstant(uint32_t index) : d_index(index) {} std::ostream& operator<<(std::ostream& out, const DatatypeIndexConstant& dic) @@ -35,4 +35,4 @@ size_t DatatypeIndexConstantHashFunction::operator()( return IntegerHashFunction()(dic.getIndex()); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/expr/datatype_index.h b/src/expr/datatype_index.h index f5f636b29..a8a4bdb33 100644 --- a/src/expr/datatype_index.h +++ b/src/expr/datatype_index.h @@ -20,7 +20,7 @@ #include -namespace cvc5 { +namespace cvc5::internal { /* stores an index to Datatype residing in NodeManager */ class DatatypeIndexConstant @@ -65,6 +65,6 @@ struct DatatypeIndexConstantHashFunction size_t operator()(const DatatypeIndexConstant& dic) const; }; /* struct DatatypeIndexConstantHashFunction */ -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__DATATYPE_H */ diff --git a/src/expr/dtype.cpp b/src/expr/dtype.cpp index cf51a5e0c..4375ac6e3 100644 --- a/src/expr/dtype.cpp +++ b/src/expr/dtype.cpp @@ -22,9 +22,9 @@ #include "expr/type_matcher.h" #include "util/rational.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { DType::DType(std::string name, bool isCo) : d_name(name), @@ -948,4 +948,4 @@ std::ostream& operator<<(std::ostream& out, const DTypeIndexConstant& dic) return out << "index_" << dic.getIndex(); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/expr/dtype.h b/src/expr/dtype.h index 210662ce4..0fe1b902b 100644 --- a/src/expr/dtype.h +++ b/src/expr/dtype.h @@ -27,7 +27,7 @@ #include "expr/type_node.h" #include "util/cardinality.h" -namespace cvc5 { +namespace cvc5::internal { // ----------------------- datatype attributes /** @@ -681,6 +681,6 @@ struct DTypeIndexConstantHashFunction std::ostream& operator<<(std::ostream& os, const DType& dt); -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/expr/dtype_cons.cpp b/src/expr/dtype_cons.cpp index c9c70f778..71ec23f8d 100644 --- a/src/expr/dtype_cons.cpp +++ b/src/expr/dtype_cons.cpp @@ -21,10 +21,10 @@ #include "expr/type_matcher.h" #include "options/datatypes_options.h" -using namespace cvc5::kind; -using namespace cvc5::theory; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::theory; -namespace cvc5 { +namespace cvc5::internal { DTypeConstructor::DTypeConstructor(std::string name, unsigned weight) @@ -692,4 +692,4 @@ std::ostream& operator<<(std::ostream& os, const DTypeConstructor& ctor) return os; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/expr/dtype_cons.h b/src/expr/dtype_cons.h index 657f6b7b8..b137d947c 100644 --- a/src/expr/dtype_cons.h +++ b/src/expr/dtype_cons.h @@ -26,7 +26,7 @@ #include "expr/type_node.h" #include "util/cardinality_class.h" -namespace cvc5 { +namespace cvc5::internal { /** * The Node-level representation of a constructor for a datatype, which @@ -365,6 +365,6 @@ struct DTypeConstructorHashFunction std::ostream& operator<<(std::ostream& os, const DTypeConstructor& ctor); -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/expr/dtype_selector.cpp b/src/expr/dtype_selector.cpp index 67a36798f..d60c682d0 100644 --- a/src/expr/dtype_selector.cpp +++ b/src/expr/dtype_selector.cpp @@ -15,9 +15,9 @@ #include "expr/dtype_selector.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { DTypeSelector::DTypeSelector(std::string name, Node selector, Node updater) : d_name(name), d_selector(selector), d_updater(updater), d_resolved(false) @@ -85,4 +85,4 @@ std::ostream& operator<<(std::ostream& os, const DTypeSelector& arg) return os; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/expr/dtype_selector.h b/src/expr/dtype_selector.h index 178151062..73facc9ae 100644 --- a/src/expr/dtype_selector.h +++ b/src/expr/dtype_selector.h @@ -22,7 +22,7 @@ #include "expr/node.h" #include "expr/type_node.h" -namespace cvc5 { +namespace cvc5::internal { class DatatypeConstructorArg; class DType; @@ -98,6 +98,6 @@ class DTypeSelector std::ostream& operator<<(std::ostream& os, const DTypeSelector& arg); -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/expr/emptybag.cpp b/src/expr/emptybag.cpp index b8cb70e16..ecbcbebab 100644 --- a/src/expr/emptybag.cpp +++ b/src/expr/emptybag.cpp @@ -19,7 +19,7 @@ #include "expr/type_node.h" -namespace cvc5 { +namespace cvc5::internal { std::ostream& operator<<(std::ostream& out, const EmptyBag& asa) { @@ -65,4 +65,4 @@ bool EmptyBag::operator<=(const EmptyBag& es) const bool EmptyBag::operator>(const EmptyBag& es) const { return !(*this <= es); } bool EmptyBag::operator>=(const EmptyBag& es) const { return !(*this < es); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/expr/emptybag.h b/src/expr/emptybag.h index 16f7d3d9c..d236ef0ce 100644 --- a/src/expr/emptybag.h +++ b/src/expr/emptybag.h @@ -21,7 +21,7 @@ #include #include -namespace cvc5 { +namespace cvc5::internal { class TypeNode; @@ -59,6 +59,6 @@ struct EmptyBagHashFunction size_t operator()(const EmptyBag& es) const; }; /* struct EmptyBagHashFunction */ -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__EMPTY_BAG_H */ diff --git a/src/expr/emptyset.cpp b/src/expr/emptyset.cpp index 0bd7ee213..e54022f51 100644 --- a/src/expr/emptyset.cpp +++ b/src/expr/emptyset.cpp @@ -22,7 +22,7 @@ #include "expr/type_node.h" -namespace cvc5 { +namespace cvc5::internal { std::ostream& operator<<(std::ostream& out, const EmptySet& asa) { return out << "emptyset(" << asa.getType() << ')'; @@ -65,4 +65,4 @@ bool EmptySet::operator<=(const EmptySet& es) const bool EmptySet::operator>(const EmptySet& es) const { return !(*this <= es); } bool EmptySet::operator>=(const EmptySet& es) const { return !(*this < es); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/expr/emptyset.h b/src/expr/emptyset.h index d3bdd1ec4..3fb90750a 100644 --- a/src/expr/emptyset.h +++ b/src/expr/emptyset.h @@ -24,7 +24,7 @@ #include #include -namespace cvc5 { +namespace cvc5::internal { class TypeNode; @@ -61,6 +61,6 @@ struct EmptySetHashFunction size_t operator()(const EmptySet& es) const; }; /* struct EmptySetHashFunction */ -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__EMPTY_SET_H */ diff --git a/src/expr/kind_map.h b/src/expr/kind_map.h index 3c5f27c49..62f075f80 100644 --- a/src/expr/kind_map.h +++ b/src/expr/kind_map.h @@ -26,7 +26,7 @@ #include "base/check.h" #include "expr/kind.h" -namespace cvc5 { +namespace cvc5::internal { /** A very simple bitmap for Kinds */ class KindMap @@ -52,6 +52,6 @@ class KindMap std::bitset d_bits; }; -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__KIND_MAP_H */ diff --git a/src/expr/kind_template.cpp b/src/expr/kind_template.cpp index 9c6fc6d0a..cce1d6871 100644 --- a/src/expr/kind_template.cpp +++ b/src/expr/kind_template.cpp @@ -20,12 +20,12 @@ #include "expr/kind.h" -namespace cvc5 { +namespace cvc5::internal { namespace kind { -const char* toString(cvc5::Kind k) +const char* toString(cvc5::internal::Kind k) { - using namespace cvc5::kind; + using namespace cvc5::internal::kind; switch (k) { @@ -40,7 +40,7 @@ const char* toString(cvc5::Kind k) } } -std::ostream& operator<<(std::ostream& out, cvc5::Kind k) +std::ostream& operator<<(std::ostream& out, cvc5::internal::Kind k) { out << toString(k); return out; @@ -50,7 +50,7 @@ std::ostream& operator<<(std::ostream& out, cvc5::Kind k) * decide whether it's safe to modify big expressions by changing the grouping of * the arguments. */ /* TODO: This could be generated. */ -bool isAssociative(::cvc5::Kind k) +bool isAssociative(::cvc5::internal::Kind k) { switch(k) { case kind::AND: @@ -63,7 +63,7 @@ bool isAssociative(::cvc5::Kind k) } } -std::string kindToString(::cvc5::Kind k) { return toString(k); } +std::string kindToString(::cvc5::internal::Kind k) { return toString(k); } } // namespace kind @@ -84,7 +84,7 @@ std::ostream& operator<<(std::ostream& out, TypeConstant typeConstant) namespace theory { -TheoryId kindToTheoryId(::cvc5::Kind k) +TheoryId kindToTheoryId(::cvc5::internal::Kind k) { switch (k) { @@ -99,7 +99,7 @@ ${kind_to_theory_id} throw IllegalArgumentException("", "k", __PRETTY_FUNCTION__, "bad kind"); } -TheoryId typeConstantToTheoryId(::cvc5::TypeConstant typeConstant) +TheoryId typeConstantToTheoryId(::cvc5::internal::TypeConstant typeConstant) { switch (typeConstant) { @@ -113,4 +113,4 @@ ${type_constant_to_theory_id} } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/expr/kind_template.h b/src/expr/kind_template.h index cc4286d25..ca7df0944 100644 --- a/src/expr/kind_template.h +++ b/src/expr/kind_template.h @@ -23,7 +23,7 @@ #include "base/exception.h" #include "theory/theory_id.h" -namespace cvc5 { +namespace cvc5::internal { namespace kind { enum Kind_t @@ -40,7 +40,7 @@ enum Kind_t // import Kind into the "cvc5" namespace but keep the individual kind // constants under kind:: -typedef ::cvc5::kind::Kind_t Kind; +typedef ::cvc5::internal::kind::Kind_t Kind; namespace kind { @@ -53,7 +53,7 @@ namespace kind { * @param k The kind * @return The name of the kind */ -const char* toString(cvc5::Kind k); +const char* toString(cvc5::internal::Kind k); /** * Writes a kind name to a stream. @@ -62,18 +62,18 @@ const char* toString(cvc5::Kind k); * @param k The kind to write to the stream * @return The stream */ -std::ostream& operator<<(std::ostream&, cvc5::Kind); +std::ostream& operator<<(std::ostream&, cvc5::internal::Kind); /** Returns true if the given kind is associative. This is used by ExprManager to * decide whether it's safe to modify big expressions by changing the grouping of * the arguments. */ /* TODO: This could be generated. */ -bool isAssociative(::cvc5::Kind k); -std::string kindToString(::cvc5::Kind k); +bool isAssociative(::cvc5::internal::Kind k); +std::string kindToString(::cvc5::internal::Kind k); struct KindHashFunction { - inline size_t operator()(::cvc5::Kind k) const { return k; } + inline size_t operator()(::cvc5::internal::Kind k) const { return k; } }; /* struct KindHashFunction */ } // namespace kind @@ -101,11 +101,11 @@ std::ostream& operator<<(std::ostream& out, TypeConstant typeConstant); namespace theory { -::cvc5::theory::TheoryId kindToTheoryId(::cvc5::Kind k); -::cvc5::theory::TheoryId typeConstantToTheoryId( - ::cvc5::TypeConstant typeConstant); +::cvc5::internal::theory::TheoryId kindToTheoryId(::cvc5::internal::Kind k); +::cvc5::internal::theory::TheoryId typeConstantToTheoryId( + ::cvc5::internal::TypeConstant typeConstant); } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__KIND_H */ diff --git a/src/expr/match_trie.cpp b/src/expr/match_trie.cpp index 43665cc3c..2187dc847 100644 --- a/src/expr/match_trie.cpp +++ b/src/expr/match_trie.cpp @@ -15,9 +15,9 @@ #include "expr/match_trie.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace expr { bool MatchTrie::getMatches(Node n, NotifyMatch* ntm) @@ -197,4 +197,4 @@ void MatchTrie::clear() } } // namespace expr -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/expr/match_trie.h b/src/expr/match_trie.h index e483b23fe..0886dc579 100644 --- a/src/expr/match_trie.h +++ b/src/expr/match_trie.h @@ -23,7 +23,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace expr { /** A virtual class for notifications regarding matches. */ @@ -78,6 +78,6 @@ class MatchTrie }; } // namespace expr -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__CANDIDATE_REWRITE_FILTER_H */ diff --git a/src/expr/metakind_template.cpp b/src/expr/metakind_template.cpp index d43c055d4..693b55930 100644 --- a/src/expr/metakind_template.cpp +++ b/src/expr/metakind_template.cpp @@ -26,7 +26,7 @@ ${metakind_includes} // clang-format off -namespace cvc5 { +namespace cvc5::internal { namespace expr { // clang-format off @@ -74,8 +74,8 @@ namespace metakind { template struct NodeValueConstCompare { - static bool compare(const ::cvc5::expr::NodeValue* x, - const ::cvc5::expr::NodeValue* y) + static bool compare(const ::cvc5::internal::expr::NodeValue* x, + const ::cvc5::internal::expr::NodeValue* y) { if (pool) { @@ -96,13 +96,13 @@ struct NodeValueConstCompare return x->getConst() == y->getConst(); } - static size_t constHash(const ::cvc5::expr::NodeValue* nv) + static size_t constHash(const ::cvc5::internal::expr::NodeValue* nv) { return nv->getConst().hash(); } }; -size_t NodeValueCompare::constHash(const ::cvc5::expr::NodeValue* nv) +size_t NodeValueCompare::constHash(const ::cvc5::internal::expr::NodeValue* nv) { Assert(nv->getMetaKind() == kind::metakind::CONSTANT); @@ -111,13 +111,13 @@ size_t NodeValueCompare::constHash(const ::cvc5::expr::NodeValue* nv) // clang-format off ${metakind_constHashes} // clang-format on -default: Unhandled() << ::cvc5::expr::NodeValue::dKindToKind(nv->d_kind); +default: Unhandled() << ::cvc5::internal::expr::NodeValue::dKindToKind(nv->d_kind); } } template -bool NodeValueCompare::compare(const ::cvc5::expr::NodeValue* nv1, - const ::cvc5::expr::NodeValue* nv2) +bool NodeValueCompare::compare(const ::cvc5::internal::expr::NodeValue* nv1, + const ::cvc5::internal::expr::NodeValue* nv2) { if(nv1->d_kind != nv2->d_kind) { return false; @@ -130,7 +130,7 @@ bool NodeValueCompare::compare(const ::cvc5::expr::NodeValue* nv1, // clang-format off ${metakind_compares} // clang-format on -default: Unhandled() << ::cvc5::expr::NodeValue::dKindToKind(nv1->d_kind); +default: Unhandled() << ::cvc5::internal::expr::NodeValue::dKindToKind(nv1->d_kind); } } @@ -138,9 +138,9 @@ default: Unhandled() << ::cvc5::expr::NodeValue::dKindToKind(nv1->d_kind); return false; } - ::cvc5::expr::NodeValue::const_nv_iterator i = nv1->nv_begin(); - ::cvc5::expr::NodeValue::const_nv_iterator j = nv2->nv_begin(); - ::cvc5::expr::NodeValue::const_nv_iterator i_end = nv1->nv_end(); + ::cvc5::internal::expr::NodeValue::const_nv_iterator i = nv1->nv_begin(); + ::cvc5::internal::expr::NodeValue::const_nv_iterator j = nv2->nv_begin(); + ::cvc5::internal::expr::NodeValue::const_nv_iterator i_end = nv1->nv_end(); while(i != i_end) { if((*i) != (*j)) { @@ -154,12 +154,12 @@ default: Unhandled() << ::cvc5::expr::NodeValue::dKindToKind(nv1->d_kind); } template bool NodeValueCompare::compare( - const ::cvc5::expr::NodeValue* nv1, const ::cvc5::expr::NodeValue* nv2); + const ::cvc5::internal::expr::NodeValue* nv1, const ::cvc5::internal::expr::NodeValue* nv2); template bool NodeValueCompare::compare( - const ::cvc5::expr::NodeValue* nv1, const ::cvc5::expr::NodeValue* nv2); + const ::cvc5::internal::expr::NodeValue* nv1, const ::cvc5::internal::expr::NodeValue* nv2); void nodeValueConstantToStream(std::ostream& out, - const ::cvc5::expr::NodeValue* nv) + const ::cvc5::internal::expr::NodeValue* nv) { Assert(nv->getMetaKind() == kind::metakind::CONSTANT); @@ -168,7 +168,7 @@ void nodeValueConstantToStream(std::ostream& out, // clang-format off ${metakind_constPrinters} // clang-format on -default: Unhandled() << ::cvc5::expr::NodeValue::dKindToKind(nv->d_kind); +default: Unhandled() << ::cvc5::internal::expr::NodeValue::dKindToKind(nv->d_kind); } } @@ -189,7 +189,7 @@ default: Unhandled() << ::cvc5::expr::NodeValue::dKindToKind(nv->d_kind); * This doesn't support "non-inlined" NodeValues, which shouldn't need this * kind of cleanup. */ -void deleteNodeValueConstant(::cvc5::expr::NodeValue* nv) +void deleteNodeValueConstant(::cvc5::internal::expr::NodeValue* nv) { Assert(nv->getMetaKind() == kind::metakind::CONSTANT); @@ -198,14 +198,14 @@ void deleteNodeValueConstant(::cvc5::expr::NodeValue* nv) // clang-format off ${metakind_constDeleters} // clang-format on -default: Unhandled() << ::cvc5::expr::NodeValue::dKindToKind(nv->d_kind); +default: Unhandled() << ::cvc5::internal::expr::NodeValue::dKindToKind(nv->d_kind); } } // re-enable the strict-aliasing warning # pragma GCC diagnostic warning "-Wstrict-aliasing" -uint32_t getMinArityForKind(::cvc5::Kind k) +uint32_t getMinArityForKind(::cvc5::internal::Kind k) { static const unsigned lbs[] = { 0, /* NULL_EXPR */ @@ -219,7 +219,7 @@ ${metakind_lbchildren} return lbs[k]; } -uint32_t getMaxArityForKind(::cvc5::Kind k) +uint32_t getMaxArityForKind(::cvc5::internal::Kind k) { static const unsigned ubs[] = { 0, /* NULL_EXPR */ @@ -240,7 +240,7 @@ ${metakind_ubchildren} * example, since the kind of functions is just VARIABLE, it should map * VARIABLE to APPLY_UF. */ -Kind operatorToKind(::cvc5::expr::NodeValue* nv) +Kind operatorToKind(::cvc5::internal::expr::NodeValue* nv) { if(nv->getKind() == kind::BUILTIN) { return nv->getConst(); @@ -259,4 +259,4 @@ Kind operatorToKind(::cvc5::expr::NodeValue* nv) } } // namespace kind -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/expr/metakind_template.h b/src/expr/metakind_template.h index d049de4a5..c9e6e4c36 100644 --- a/src/expr/metakind_template.h +++ b/src/expr/metakind_template.h @@ -23,7 +23,7 @@ #include "base/check.h" #include "expr/kind.h" -namespace cvc5 { +namespace cvc5::internal { // clang-format off ${metakind_fwd_decls} @@ -38,9 +38,9 @@ namespace metakind { struct NodeValueCompare { template - static bool compare(const ::cvc5::expr::NodeValue* nv1, - const ::cvc5::expr::NodeValue* nv2); - static size_t constHash(const ::cvc5::expr::NodeValue* nv); + static bool compare(const ::cvc5::internal::expr::NodeValue* nv1, + const ::cvc5::internal::expr::NodeValue* nv2); + static size_t constHash(const ::cvc5::internal::expr::NodeValue* nv); };/* struct NodeValueCompare */ /** @@ -67,7 +67,7 @@ enum MetaKind_t { * @param nv the node value representing a constant node */ void nodeValueConstantToStream(std::ostream& out, - const ::cvc5::expr::NodeValue* nv); + const ::cvc5::internal::expr::NodeValue* nv); /** * Cleanup to be performed when a NodeValue zombie is collected, and @@ -78,18 +78,18 @@ void nodeValueConstantToStream(std::ostream& out, * This doesn't support "non-inlined" NodeValues, which shouldn't need this * kind of cleanup. */ -void deleteNodeValueConstant(::cvc5::expr::NodeValue* nv); +void deleteNodeValueConstant(::cvc5::internal::expr::NodeValue* nv); /** Return the minimum arity of the given kind. */ -uint32_t getMinArityForKind(::cvc5::Kind k); +uint32_t getMinArityForKind(::cvc5::internal::Kind k); /** Return the maximum arity of the given kind. */ -uint32_t getMaxArityForKind(::cvc5::Kind k); +uint32_t getMaxArityForKind(::cvc5::internal::Kind k); } // namespace metakind -// import MetaKind into the "cvc5::kind" namespace but keep the +// import MetaKind into the "cvc5::internal::kind" namespace but keep the // individual MetaKind constants under kind::metakind:: -typedef ::cvc5::kind::metakind::MetaKind_t MetaKind; +typedef ::cvc5::internal::kind::metakind::MetaKind_t MetaKind; /** * Get the metakind for a particular kind. @@ -101,7 +101,7 @@ MetaKind metaKindOf(Kind k); * example, since the kind of functions is just VARIABLE, it should map * VARIABLE to APPLY_UF. */ -Kind operatorToKind(::cvc5::expr::NodeValue* nv); +Kind operatorToKind(::cvc5::internal::expr::NodeValue* nv); } // namespace kind @@ -111,11 +111,11 @@ namespace expr { struct NodeValuePoolEq { bool operator()(const NodeValue* nv1, const NodeValue* nv2) const { - return ::cvc5::kind::metakind::NodeValueCompare::compare(nv1, nv2); + return ::cvc5::internal::kind::metakind::NodeValueCompare::compare(nv1, nv2); } }; } // namespace expr -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__KIND__METAKIND_H */ diff --git a/src/expr/mkexpr b/src/expr/mkexpr index 64a99d406..9831fb277 100755 --- a/src/expr/mkexpr +++ b/src/expr/mkexpr @@ -95,9 +95,9 @@ function theory { echo "$kf:$lineno: error: \"theory\" directive missing class or header argument" >&2 exit 1 elif ! expr "$2" : '\(::*\)' >/dev/null; then - echo "$kf:$lineno: warning: theory class \`$2' isn't fully-qualified (e.g., ::cvc5::theory::foo)" >&2 - elif ! expr "$2" : '\(::cvc5::theory::*\)' >/dev/null; then - echo "$kf:$lineno: warning: theory class not under ::cvc5::theory namespace" >&2 + echo "$kf:$lineno: warning: theory class \`$2' isn't fully-qualified (e.g., ::cvc5::internal::theory::foo)" >&2 + elif ! expr "$2" : '\(::cvc5::internal::theory::*\)' >/dev/null; then + echo "$kf:$lineno: warning: theory class not under ::cvc5::internal::theory namespace" >&2 fi } @@ -229,7 +229,7 @@ template <> $2 const & Expr::getConst< $2 >() const; " getConst_implementations="${getConst_implementations} template <> $2 const & Expr::getConst() const { - PrettyCheckArgument(getKind() == ::cvc5::kind::$1, *this, \"Improper kind for getConst<$2>()\"); + PrettyCheckArgument(getKind() == ::cvc5::internal::kind::$1, *this, \"Improper kind for getConst<$2>()\"); return d_node->getConst< $2 >(); } " diff --git a/src/expr/mkkind b/src/expr/mkkind index 117b3bb9e..e6f38d4bf 100755 --- a/src/expr/mkkind +++ b/src/expr/mkkind @@ -100,9 +100,9 @@ function theory { echo "$kf:$lineno: error: \"theory\" directive missing class or header argument" >&2 exit 1 elif ! expr "$2" : '\(::*\)' >/dev/null; then - echo "$kf:$lineno: warning: theory class \`$2' isn't fully-qualified (e.g., ::cvc5::theory::foo)" >&2 - elif ! expr "$2" : '\(::cvc5::theory::*\)' >/dev/null; then - echo "$kf:$lineno: warning: theory class not under ::cvc5::theory namespace" >&2 + echo "$kf:$lineno: warning: theory class \`$2' isn't fully-qualified (e.g., ::cvc5::internal::theory::foo)" >&2 + elif ! expr "$2" : '\(::cvc5::internal::theory::*\)' >/dev/null; then + echo "$kf:$lineno: warning: theory class not under ::cvc5::internal::theory namespace" >&2 fi theory_id="$1" diff --git a/src/expr/mkmetakind b/src/expr/mkmetakind index 3ee7dc59b..480f7d41f 100755 --- a/src/expr/mkmetakind +++ b/src/expr/mkmetakind @@ -94,9 +94,9 @@ function theory { echo "$kf:$lineno: error: \"theory\" directive missing class or header argument" >&2 exit 1 elif ! expr "$2" : '\(::*\)' >/dev/null; then - echo "$kf:$lineno: warning: theory class \`$1' isn't fully-qualified (e.g., ::cvc5::theory::foo)" >&2 - elif ! expr "$2" : '\(::cvc5::theory::*\)' >/dev/null; then - echo "$kf:$lineno: warning: theory class not under ::cvc5::theory namespace" >&2 + echo "$kf:$lineno: warning: theory class \`$1' isn't fully-qualified (e.g., ::cvc5::internal::theory::foo)" >&2 + elif ! expr "$2" : '\(::cvc5::internal::theory::*\)' >/dev/null; then + echo "$kf:$lineno: warning: theory class not under ::cvc5::internal::theory namespace" >&2 fi theory_class=$1 @@ -224,7 +224,7 @@ function constant { check_theory_seen if ! expr "$4" : '\(::*\)' >/dev/null; then - echo "$kf:$lineno: warning: constant $1 hasher \`$4' isn't fully-qualified (e.g., ::cvc5::RationalHashFunction)" >&2 + echo "$kf:$lineno: warning: constant $1 hasher \`$4' isn't fully-qualified (e.g., ::cvc5::internal::RationalHashFunction)" >&2 fi if [[ "$3" =~ '+'$ ]]; then @@ -265,7 +265,7 @@ $2 ${class};" template <> ${class} const& NodeValue::getConst< ${class} >() const { - AssertArgument(getKind() == ::cvc5::kind::$1, *this, + AssertArgument(getKind() == ::cvc5::internal::kind::$1, *this, \"Improper kind for getConst<${class}>()\"); // To support non-inlined CONSTANT-kinded NodeValues (those that are // \"constructed\" when initially checking them against the NodeManager @@ -286,13 +286,13 @@ ${class} const& NodeValue::getConst< ${class} >() const { template<> Node NodeManager::mkConst<${class}>(const ${class}& val) { - return mkConstInternal(::cvc5::kind::$1, val); + return mkConstInternal(::cvc5::internal::kind::$1, val); } template<> TypeNode NodeManager::mkTypeConst<${class}>(const ${class}& val) { - return mkConstInternal(::cvc5::kind::$1, val); + return mkConstInternal(::cvc5::internal::kind::$1, val); } " metakind_mkConst="${metakind_mkConst} diff --git a/src/expr/nary_match_trie.cpp b/src/expr/nary_match_trie.cpp index 8e415c387..65fd24a5c 100644 --- a/src/expr/nary_match_trie.cpp +++ b/src/expr/nary_match_trie.cpp @@ -18,9 +18,9 @@ #include #include "expr/nary_term_util.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace expr { class NaryMatchFrame @@ -301,4 +301,4 @@ std::string NaryMatchTrie::debugPrint() const } } // namespace expr -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/expr/nary_match_trie.h b/src/expr/nary_match_trie.h index dc5af286c..625878ad2 100644 --- a/src/expr/nary_match_trie.h +++ b/src/expr/nary_match_trie.h @@ -24,7 +24,7 @@ #include "expr/match_trie.h" #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace expr { /** @@ -82,6 +82,6 @@ class NaryMatchTrie }; } // namespace expr -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__CANDIDATE_REWRITE_FILTER_H */ diff --git a/src/expr/nary_term_util.cpp b/src/expr/nary_term_util.cpp index a9f267253..b61fbb2e8 100644 --- a/src/expr/nary_term_util.cpp +++ b/src/expr/nary_term_util.cpp @@ -23,9 +23,9 @@ #include "util/regexp.h" #include "util/string.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace expr { struct IsListTag @@ -256,4 +256,4 @@ Node narySubstitute(Node src, } } // namespace expr -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/expr/nary_term_util.h b/src/expr/nary_term_util.h index 31157928c..3129a3ab1 100644 --- a/src/expr/nary_term_util.h +++ b/src/expr/nary_term_util.h @@ -23,7 +23,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace expr { /** Mark variable as list */ @@ -62,6 +62,6 @@ Node narySubstitute(Node src, const std::vector& subs); } // namespace expr -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC4__EXPR__NARY_TERM_UTIL__H */ diff --git a/src/expr/node.cpp b/src/expr/node.cpp index a19da6191..69e5fadba 100644 --- a/src/expr/node.cpp +++ b/src/expr/node.cpp @@ -25,7 +25,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { TypeCheckingExceptionPrivate::TypeCheckingExceptionPrivate(TNode node, std::string message) @@ -109,16 +109,16 @@ bool NodeTemplate::isConst() const { template bool NodeTemplate::isConst() const; template bool NodeTemplate::isConst() const; -} // namespace cvc5 +} // namespace cvc5::internal namespace std { -size_t hash::operator()(const cvc5::Node& node) const +size_t hash::operator()(const cvc5::internal::Node& node) const { return node.getId(); } -size_t hash::operator()(const cvc5::TNode& node) const +size_t hash::operator()(const cvc5::internal::TNode& node) const { return node.getId(); } diff --git a/src/expr/node.h b/src/expr/node.h index 5fc22b3d3..b078ab860 100644 --- a/src/expr/node.h +++ b/src/expr/node.h @@ -37,7 +37,7 @@ #include "util/hash.h" #include "util/utility.h" -namespace cvc5 { +namespace cvc5::internal { class TypeNode; class NodeManager; @@ -127,25 +127,25 @@ typedef NodeTemplate Node; */ typedef NodeTemplate TNode; -} // namespace cvc5 +} // namespace cvc5::internal namespace std { template <> -struct hash +struct hash { - size_t operator()(const cvc5::Node& node) const; + size_t operator()(const cvc5::internal::Node& node) const; }; template <> -struct hash +struct hash { - size_t operator()(const cvc5::TNode& node) const; + size_t operator()(const cvc5::internal::TNode& node) const; }; } // namespace std -namespace cvc5 { +namespace cvc5::internal { namespace expr { class NodeValue; @@ -199,8 +199,8 @@ class NodeTemplate { friend class NodeBuilder; - friend class ::cvc5::expr::attr::AttributeManager; - friend struct ::cvc5::expr::attr::SmtAttributes; + friend class ::cvc5::internal::expr::attr::AttributeManager; + friend struct ::cvc5::internal::expr::attr::SmtAttributes; /** * Assigns the expression value and does reference counting. No assumptions @@ -946,12 +946,12 @@ std::ostream& operator<<( return out; } -} // namespace cvc5 +} // namespace cvc5::internal //#include "expr/attribute.h" #include "expr/node_manager.h" -namespace cvc5 { +namespace cvc5::internal { using TNodePairHashFunction = PairHashFunction, std::hash>; @@ -1407,6 +1407,6 @@ Node NodeTemplate::substitute( } } -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__NODE_H */ diff --git a/src/expr/node_algorithm.cpp b/src/expr/node_algorithm.cpp index 7f0f74815..dd8a62c3e 100644 --- a/src/expr/node_algorithm.cpp +++ b/src/expr/node_algorithm.cpp @@ -20,7 +20,7 @@ #include "expr/attribute.h" #include "expr/dtype.h" -namespace cvc5 { +namespace cvc5::internal { namespace expr { bool hasSubterm(TNode n, TNode t, bool strict) @@ -865,4 +865,4 @@ bool isBooleanConnective(TNode cur) } } // namespace expr -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/expr/node_algorithm.h b/src/expr/node_algorithm.h index 9b109cced..b72941368 100644 --- a/src/expr/node_algorithm.h +++ b/src/expr/node_algorithm.h @@ -27,7 +27,7 @@ #include "expr/node.h" #include "expr/type_node.h" -namespace cvc5 { +namespace cvc5::internal { namespace expr { /** @@ -261,6 +261,6 @@ bool match(Node n1, Node n2, std::unordered_map& subs); bool isBooleanConnective(TNode cur); } // namespace expr -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/expr/node_builder.cpp b/src/expr/node_builder.cpp index 904157cb0..a8a2678eb 100644 --- a/src/expr/node_builder.cpp +++ b/src/expr/node_builder.cpp @@ -17,7 +17,7 @@ #include -namespace cvc5 { +namespace cvc5::internal { NodeBuilder::NodeBuilder() : d_nv(&d_inlineNv), @@ -709,4 +709,4 @@ std::ostream& operator<<(std::ostream& out, const NodeBuilder& nb) return out << *nb.d_nv; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/expr/node_builder.h b/src/expr/node_builder.h index c782d7870..831b3038a 100644 --- a/src/expr/node_builder.h +++ b/src/expr/node_builder.h @@ -148,7 +148,7 @@ #include "expr/node_value.h" #include "expr/type_node.h" -namespace cvc5 { +namespace cvc5::internal { class NodeManager; @@ -404,6 +404,6 @@ class NodeBuilder { // isn't yet a Node.. std::ostream& operator<<(std::ostream& out, const NodeBuilder& nb); -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__NODE_BUILDER_H */ diff --git a/src/expr/node_converter.cpp b/src/expr/node_converter.cpp index 3b165ded8..ad923a1fe 100644 --- a/src/expr/node_converter.cpp +++ b/src/expr/node_converter.cpp @@ -17,9 +17,9 @@ #include "expr/attribute.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { NodeConverter::NodeConverter(bool forceIdem) : d_forceIdem(forceIdem) {} @@ -261,4 +261,4 @@ TypeNode NodeConverter::postConvertType(TypeNode tn) } bool NodeConverter::shouldTraverse(Node n) { return true; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/expr/node_converter.h b/src/expr/node_converter.h index a2aaeca6f..aa9e2c6ba 100644 --- a/src/expr/node_converter.h +++ b/src/expr/node_converter.h @@ -24,7 +24,7 @@ #include "expr/node.h" #include "expr/type_node.h" -namespace cvc5 { +namespace cvc5::internal { /** * A node converter for terms and types. Implements term/type traversals, @@ -104,6 +104,6 @@ class NodeConverter bool d_forceIdem; }; -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/expr/node_manager_attributes.h b/src/expr/node_manager_attributes.h index 1a82e3316..72f33977a 100644 --- a/src/expr/node_manager_attributes.h +++ b/src/expr/node_manager_attributes.h @@ -20,7 +20,7 @@ #include "expr/attribute.h" -namespace cvc5 { +namespace cvc5::internal { namespace expr { // Definition of an attribute for the variable name. @@ -38,4 +38,4 @@ typedef expr::Attribute TypeAttr; typedef expr::Attribute TypeCheckedAttr; } // namespace expr -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/expr/node_manager_template.cpp b/src/expr/node_manager_template.cpp index 05f84248c..9f8e8885a 100644 --- a/src/expr/node_manager_template.cpp +++ b/src/expr/node_manager_template.cpp @@ -44,9 +44,9 @@ ${metakind_includes} // clang-format off using namespace std; -using namespace cvc5::expr; +using namespace cvc5::internal::expr; -namespace cvc5 { +namespace cvc5::internal { namespace { @@ -407,7 +407,7 @@ void NodeManager::reclaimZombies() { // Destroy (call the destructor for) the C++ type representing // the constant in this NodeValue. This is needed for - // e.g. cvc5::Rational, since it has a gmp internal + // e.g. cvc5::internal::Rational, since it has a gmp internal // representation that mallocs memory and should be cleaned // up. (This won't delete a pointer value if used as a // constant, but then, you should probably use a smart-pointer @@ -692,7 +692,7 @@ std::vector NodeManager::mkMutualDatatypeTypes( << "malformed selector in datatype post-resolution"; // This next one's a "hard" check, performed in non-debug builds // as well; the other ones should all be guaranteed by the - // cvc5::DType class, but this actually needs to be checked. + // cvc5::internal::DType class, but this actually needs to be checked. if (!selectorType.getRangeType().isFirstClass()) { throw Exception( @@ -1337,4 +1337,4 @@ Node NodeManager::mkRealAlgebraicNumber(const RealAlgebraicNumber& ran) return mkNode(Kind::REAL_ALGEBRAIC_NUMBER, inner); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/expr/node_manager_template.h b/src/expr/node_manager_template.h index 9db31d87c..49e88ca1b 100644 --- a/src/expr/node_manager_template.h +++ b/src/expr/node_manager_template.h @@ -34,11 +34,11 @@ namespace cvc5 { -using Record = std::vector>; - -namespace api { class Solver; -} + +namespace internal { + +using Record = std::vector>; class ResourceManager; class SkolemManager; @@ -58,7 +58,7 @@ namespace expr { class NodeManager { - friend class api::Solver; + friend class cvc5::Solver; friend class expr::NodeValue; friend class expr::TypeChecker; friend class SkolemManager; @@ -180,7 +180,7 @@ class NodeManager /** * Get the (singleton) operator of an OPERATOR-kinded kind. The * returned node n will have kind BUILTIN, and calling - * n.getConst() will yield k. + * n.getConst() will yield k. */ TNode operatorOf(Kind k); @@ -1049,7 +1049,7 @@ class NodeManager * ADD, are APPLYs of a ADD operator to arguments. This array * holds the set of operators for these things. A ADD operator is * a Node with kind "BUILTIN", and if you call - * plusOperator->getConst(), you get kind::ADD back. + * plusOperator->getConst(), you get kind::ADD back. */ Node d_operators[kind::LAST_KIND]; @@ -1253,6 +1253,7 @@ inline TypeNode NodeManager::mkTypeNode(Kind kind, ${metakind_mkConstDelete} // clang-format off -} // namespace cvc5 +} // namespace cvc5::internal +} #endif /* CVC5__NODE_MANAGER_H */ diff --git a/src/expr/node_self_iterator.h b/src/expr/node_self_iterator.h index 945038fbf..939d29404 100644 --- a/src/expr/node_self_iterator.h +++ b/src/expr/node_self_iterator.h @@ -23,7 +23,7 @@ #include "base/check.h" #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace expr { class NodeSelfIterator { @@ -141,6 +141,6 @@ inline bool NodeSelfIterator::operator!=(NodeSelfIterator i) const { } } // namespace expr -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__EXPR__NODE_SELF_ITERATOR_H */ diff --git a/src/expr/node_traversal.cpp b/src/expr/node_traversal.cpp index 4e2439668..973a2cf0f 100644 --- a/src/expr/node_traversal.cpp +++ b/src/expr/node_traversal.cpp @@ -17,7 +17,7 @@ #include -namespace cvc5 { +namespace cvc5::internal { NodeDfsIterator::NodeDfsIterator(TNode n, VisitOrder order, @@ -157,4 +157,4 @@ NodeDfsIterator NodeDfsIterable::end() const return NodeDfsIterator(d_order); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/expr/node_traversal.h b/src/expr/node_traversal.h index 75ae9c068..f1419e88c 100644 --- a/src/expr/node_traversal.h +++ b/src/expr/node_traversal.h @@ -24,7 +24,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { /** * Enum that represents an order in which nodes are visited. @@ -145,6 +145,6 @@ class NodeDfsIterable std::function d_skipIf; }; -} // namespace cvc5 +} // namespace cvc5::internal #endif // CVC5__EXPR__NODE_TRAVERSAL_H diff --git a/src/expr/node_trie.cpp b/src/expr/node_trie.cpp index 4e6e27e9e..3b353832b 100644 --- a/src/expr/node_trie.cpp +++ b/src/expr/node_trie.cpp @@ -15,7 +15,7 @@ #include "expr/node_trie.h" -namespace cvc5 { +namespace cvc5::internal { template NodeTemplate NodeTemplateTrie::existsTerm( @@ -91,4 +91,4 @@ template void NodeTemplateTrie::debugPrint(const char* c, template void NodeTemplateTrie::debugPrint(const char* c, unsigned depth) const; -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/expr/node_trie.h b/src/expr/node_trie.h index f6c3312a9..9c31d1311 100644 --- a/src/expr/node_trie.h +++ b/src/expr/node_trie.h @@ -21,7 +21,7 @@ #include #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { /** NodeTemplate trie class * @@ -106,6 +106,6 @@ typedef NodeTemplateTrie NodeTrie; /** Non-reference-counted version of the above data structure */ typedef NodeTemplateTrie TNodeTrie; -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__EXPR__NODE_TRIE_H */ diff --git a/src/expr/node_trie_algorithm.cpp b/src/expr/node_trie_algorithm.cpp index 3bd9016e0..2fab90349 100644 --- a/src/expr/node_trie_algorithm.cpp +++ b/src/expr/node_trie_algorithm.cpp @@ -15,7 +15,7 @@ #include "expr/node_trie_algorithm.h" -namespace cvc5 { +namespace cvc5::internal { void nodeTriePathPairProcess(const TNodeTrie* t, size_t arity, @@ -87,4 +87,4 @@ void nodeTriePathPairProcess(const TNodeTrie* t, } while (!visit.empty()); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/expr/node_trie_algorithm.h b/src/expr/node_trie_algorithm.h index caadecfc7..5b83fb862 100644 --- a/src/expr/node_trie_algorithm.h +++ b/src/expr/node_trie_algorithm.h @@ -20,7 +20,7 @@ #include "expr/node_trie.h" -namespace cvc5 { +namespace cvc5::internal { /** A virtual base class for the algorithm below. */ class NodeTriePathPairProcessCallback @@ -47,6 +47,6 @@ void nodeTriePathPairProcess(const TNodeTrie* t, size_t n, NodeTriePathPairProcessCallback& ntpc); -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__EXPR__NODE_TRIE_ALGORITHM_H */ diff --git a/src/expr/node_value.cpp b/src/expr/node_value.cpp index d38447f21..0d40ac48f 100644 --- a/src/expr/node_value.cpp +++ b/src/expr/node_value.cpp @@ -13,8 +13,8 @@ * A node value. * * The actual node implementation. - * Instances of this class are generally referenced through cvc5::Node rather - * than by pointer. Note that cvc5::Node maintains the reference count on + * Instances of this class are generally referenced through cvc5::internal::Node rather + * than by pointer. Note that cvc5::internal::Node maintains the reference count on * NodeValue instances. */ #include "expr/node_value.h" @@ -32,7 +32,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace expr { string NodeValue::toString() const { @@ -125,4 +125,4 @@ bool NodeValue::isBeingDeleted() const } } // namespace expr -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/expr/node_value.h b/src/expr/node_value.h index a0237a106..490e0adb1 100644 --- a/src/expr/node_value.h +++ b/src/expr/node_value.h @@ -13,8 +13,8 @@ * A node value. * * The actual node implementation. - * Instances of this class are generally referenced through cvc5::Node rather - * than by pointer. Note that cvc5::Node maintains the reference count on + * Instances of this class are generally referenced through cvc5::internal::Node rather + * than by pointer. Note that cvc5::internal::Node maintains the reference count on * NodeValue instances. */ @@ -30,7 +30,7 @@ #include "expr/metakind.h" #include "options/language.h" -namespace cvc5 { +namespace cvc5::internal { template class NodeTemplate; class TypeNode; @@ -44,7 +44,7 @@ namespace expr { namespace kind { namespace metakind { - template < ::cvc5::Kind k, class T, bool pool> + template < ::cvc5::internal::Kind k, class T, bool pool> struct NodeValueConstCompare; struct NodeValueCompare; @@ -60,10 +60,10 @@ namespace expr { class NodeValue { template - friend class ::cvc5::NodeTemplate; - friend class ::cvc5::TypeNode; - friend class ::cvc5::NodeBuilder; - friend class ::cvc5::NodeManager; + friend class ::cvc5::internal::NodeTemplate; + friend class ::cvc5::internal::TypeNode; + friend class ::cvc5::internal::NodeBuilder; + friend class ::cvc5::internal::NodeManager; template friend struct kind::metakind::NodeValueConstCompare; @@ -478,6 +478,6 @@ inline NodeValue* NodeValue::getChild(int i) const { } } // namespace expr -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__EXPR__NODE_VALUE_H */ diff --git a/src/expr/node_visitor.h b/src/expr/node_visitor.h index 73de7c02d..17b2b4a15 100644 --- a/src/expr/node_visitor.h +++ b/src/expr/node_visitor.h @@ -20,7 +20,7 @@ #include "cvc5_private.h" #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { /** * Traverses the nodes reverse-topologically (children before parents), @@ -121,4 +121,4 @@ public: template thread_local bool NodeVisitor::s_inRun = false; -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/expr/sequence.cpp b/src/expr/sequence.cpp index 82c83e0ea..1d2823a54 100644 --- a/src/expr/sequence.cpp +++ b/src/expr/sequence.cpp @@ -24,7 +24,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { Sequence::Sequence(const TypeNode& t, const std::vector& s) : d_type(new TypeNode(t)), d_seq(s) @@ -380,4 +380,4 @@ size_t SequenceHashFunction::operator()(const Sequence& s) const return static_cast(ret); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/expr/sequence.h b/src/expr/sequence.h index 8bf7abeea..ddde678c7 100644 --- a/src/expr/sequence.h +++ b/src/expr/sequence.h @@ -21,7 +21,7 @@ #include #include -namespace cvc5 { +namespace cvc5::internal { template class NodeTemplate; @@ -37,7 +37,7 @@ class Sequence public: /** constructors for Sequence * - * Internally, a cvc5::Sequence is represented by a vector of Nodes (d_seq), + * Internally, a cvc5::internal::Sequence is represented by a vector of Nodes (d_seq), * where each Node in this vector must be a constant. */ Sequence() = default; @@ -174,6 +174,6 @@ struct SequenceHashFunction std::ostream& operator<<(std::ostream& os, const Sequence& s); -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__EXPR__SEQUENCE_H */ diff --git a/src/expr/skolem_manager.cpp b/src/expr/skolem_manager.cpp index e3288c9e4..8bd7eb0c8 100644 --- a/src/expr/skolem_manager.cpp +++ b/src/expr/skolem_manager.cpp @@ -22,9 +22,9 @@ #include "expr/node_algorithm.h" #include "expr/node_manager_attributes.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { // Attributes are global maps from Nodes to data. Thus, note that these could // be implemented as internal maps in SkolemManager. @@ -453,4 +453,4 @@ Node SkolemManager::mkSkolemNode(const std::string& prefix, return n; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/expr/skolem_manager.h b/src/expr/skolem_manager.h index c83c35aeb..0c104e999 100644 --- a/src/expr/skolem_manager.h +++ b/src/expr/skolem_manager.h @@ -22,7 +22,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { class ProofGenerator; @@ -510,6 +510,6 @@ class SkolemManager int flags = SKOLEM_DEFAULT); }; -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__EXPR__PROOF_SKOLEM_CACHE_H */ diff --git a/src/expr/subs.cpp b/src/expr/subs.cpp index d01fa0843..e4d3f582a 100644 --- a/src/expr/subs.cpp +++ b/src/expr/subs.cpp @@ -19,7 +19,7 @@ #include "expr/skolem_manager.h" -namespace cvc5 { +namespace cvc5::internal { bool Subs::empty() const { return d_vars.empty(); } @@ -186,4 +186,4 @@ std::ostream& operator<<(std::ostream& out, const Subs& s) return out; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/expr/subs.h b/src/expr/subs.h index fb68c9fce..44edd567a 100644 --- a/src/expr/subs.h +++ b/src/expr/subs.h @@ -22,7 +22,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { /** * Helper substitution class. Stores a substitution in parallel vectors @@ -87,6 +87,6 @@ class Subs */ std::ostream& operator<<(std::ostream& out, const Subs& s); -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__EXPR__SUBS_H */ diff --git a/src/expr/subtype_elim_node_converter.cpp b/src/expr/subtype_elim_node_converter.cpp index 00a9fdd3a..37574d545 100644 --- a/src/expr/subtype_elim_node_converter.cpp +++ b/src/expr/subtype_elim_node_converter.cpp @@ -15,9 +15,9 @@ #include "expr/subtype_elim_node_converter.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { SubtypeElimNodeConverter::SubtypeElimNodeConverter() {} @@ -62,4 +62,4 @@ Node SubtypeElimNodeConverter::postConvert(Node n) return n; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/expr/subtype_elim_node_converter.h b/src/expr/subtype_elim_node_converter.h index f0a84c86e..2fc872ee4 100644 --- a/src/expr/subtype_elim_node_converter.h +++ b/src/expr/subtype_elim_node_converter.h @@ -24,7 +24,7 @@ #include "expr/node_converter.h" #include "expr/type_node.h" -namespace cvc5 { +namespace cvc5::internal { /** * This converts a node into one that does not involve (arithmetic) subtyping. @@ -43,6 +43,6 @@ class SubtypeElimNodeConverter : public NodeConverter static bool isRealTypeStrict(TypeNode tn); }; -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/expr/sygus_datatype.cpp b/src/expr/sygus_datatype.cpp index c5c603cad..d245d453d 100644 --- a/src/expr/sygus_datatype.cpp +++ b/src/expr/sygus_datatype.cpp @@ -18,9 +18,9 @@ #include #include "expr/skolem_manager.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { SygusDatatype::SygusDatatype(const std::string& name) : d_dt(DType(name)) {} @@ -102,4 +102,4 @@ const DType& SygusDatatype::getDatatype() const bool SygusDatatype::isInitialized() const { return d_dt.isSygus(); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/expr/sygus_datatype.h b/src/expr/sygus_datatype.h index 53c028185..e84632720 100644 --- a/src/expr/sygus_datatype.h +++ b/src/expr/sygus_datatype.h @@ -25,7 +25,7 @@ #include "expr/node.h" #include "expr/type_node.h" -namespace cvc5 { +namespace cvc5::internal { /** Attribute true for variables that represent any constant */ struct SygusAnyConstAttributeId @@ -135,6 +135,6 @@ class SygusDatatype DType d_dt; }; -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/expr/symbol_manager.cpp b/src/expr/symbol_manager.cpp index aaadeeede..846254bf2 100644 --- a/src/expr/symbol_manager.cpp +++ b/src/expr/symbol_manager.cpp @@ -20,7 +20,7 @@ #include "context/cdlist.h" #include "context/cdo.h" -using namespace cvc5::context; +using namespace cvc5::internal::context; namespace cvc5 { @@ -28,10 +28,11 @@ namespace cvc5 { class SymbolManager::Implementation { - using TermStringMap = CDHashMap>; - using TermSet = CDHashSet>; - using SortList = CDList; - using TermList = CDList; + using TermStringMap = + CDHashMap>; + using TermSet = CDHashSet>; + using SortList = CDList; + using TermList = CDList; public: Implementation() @@ -50,31 +51,32 @@ class SymbolManager::Implementation ~Implementation() { d_context.pop(); } /** set expression name */ - NamingResult setExpressionName(api::Term t, + NamingResult setExpressionName(cvc5::Term t, const std::string& name, bool isAssertion = false); /** get expression name */ - bool getExpressionName(api::Term t, + bool getExpressionName(cvc5::Term t, std::string& name, bool isAssertion = false) const; /** get expression names */ - void getExpressionNames(const std::vector& ts, + void getExpressionNames(const std::vector& ts, std::vector& names, bool areAssertions = false) const; /** get expression names */ - std::map getExpressionNames(bool areAssertions) const; + std::map getExpressionNames( + bool areAssertions) const; /** get model declare sorts */ - std::vector getModelDeclareSorts() const; + std::vector getModelDeclareSorts() const; /** get model declare terms */ - std::vector getModelDeclareTerms() const; + std::vector getModelDeclareTerms() const; /** get functions to synthesize */ - std::vector getFunctionsToSynthesize() const; + std::vector getFunctionsToSynthesize() const; /** Add declared sort to the list of model declarations. */ - void addModelDeclarationSort(api::Sort s); + void addModelDeclarationSort(cvc5::Sort s); /** Add declared term to the list of model declarations. */ - void addModelDeclarationTerm(api::Term t); + void addModelDeclarationTerm(cvc5::Term t); /** Add function to the list of functions to synthesize. */ - void addFunctionToSynthesize(api::Term t); + void addFunctionToSynthesize(cvc5::Term t); /** reset */ void reset(); /** reset assertions */ @@ -112,7 +114,7 @@ class SymbolManager::Implementation }; NamingResult SymbolManager::Implementation::setExpressionName( - api::Term t, const std::string& name, bool isAssertion) + cvc5::Term t, const std::string& name, bool isAssertion) { Trace("sym-manager") << "SymbolManager: set expression name: " << t << " -> " << name << ", isAssertion=" << isAssertion << std::endl; @@ -135,7 +137,7 @@ NamingResult SymbolManager::Implementation::setExpressionName( return NamingResult::SUCCESS; } -bool SymbolManager::Implementation::getExpressionName(api::Term t, +bool SymbolManager::Implementation::getExpressionName(cvc5::Term t, std::string& name, bool isAssertion) const { @@ -157,11 +159,11 @@ bool SymbolManager::Implementation::getExpressionName(api::Term t, } void SymbolManager::Implementation::getExpressionNames( - const std::vector& ts, + const std::vector& ts, std::vector& names, bool areAssertions) const { - for (const api::Term& t : ts) + for (const cvc5::Term& t : ts) { std::string name; if (getExpressionName(t, name, areAssertions)) @@ -171,16 +173,16 @@ void SymbolManager::Implementation::getExpressionNames( } } -std::map +std::map SymbolManager::Implementation::getExpressionNames(bool areAssertions) const { - std::map emap; + std::map emap; for (TermStringMap::const_iterator it = d_names.begin(), itend = d_names.end(); it != itend; ++it) { - api::Term t = (*it).first; + cvc5::Term t = (*it).first; if (areAssertions && d_namedAsserts.find(t) == d_namedAsserts.end()) { continue; @@ -190,43 +192,43 @@ SymbolManager::Implementation::getExpressionNames(bool areAssertions) const return emap; } -std::vector SymbolManager::Implementation::getModelDeclareSorts() +std::vector SymbolManager::Implementation::getModelDeclareSorts() const { - std::vector declareSorts(d_declareSorts.begin(), - d_declareSorts.end()); + std::vector declareSorts(d_declareSorts.begin(), + d_declareSorts.end()); return declareSorts; } -std::vector SymbolManager::Implementation::getModelDeclareTerms() +std::vector SymbolManager::Implementation::getModelDeclareTerms() const { - std::vector declareTerms(d_declareTerms.begin(), - d_declareTerms.end()); + std::vector declareTerms(d_declareTerms.begin(), + d_declareTerms.end()); return declareTerms; } -std::vector SymbolManager::Implementation::getFunctionsToSynthesize() - const +std::vector +SymbolManager::Implementation::getFunctionsToSynthesize() const { - return std::vector(d_funToSynth.begin(), d_funToSynth.end()); + return std::vector(d_funToSynth.begin(), d_funToSynth.end()); } -void SymbolManager::Implementation::addModelDeclarationSort(api::Sort s) +void SymbolManager::Implementation::addModelDeclarationSort(cvc5::Sort s) { Trace("sym-manager") << "SymbolManager: addModelDeclarationSort " << s << std::endl; d_declareSorts.push_back(s); } -void SymbolManager::Implementation::addModelDeclarationTerm(api::Term t) +void SymbolManager::Implementation::addModelDeclarationTerm(cvc5::Term t) { Trace("sym-manager") << "SymbolManager: addModelDeclarationTerm " << t << std::endl; d_declareTerms.push_back(t); } -void SymbolManager::Implementation::addFunctionToSynthesize(api::Term f) +void SymbolManager::Implementation::addFunctionToSynthesize(cvc5::Term f) { Trace("sym-manager") << "SymbolManager: addFunctionToSynthesize " << f << std::endl; @@ -251,7 +253,7 @@ void SymbolManager::Implementation::popScope() Trace("sym-manager") << "SymbolManager: popScope" << std::endl; if (d_context.getLevel() == 0) { - throw ScopeException(); + throw internal::ScopeException(); } d_context.pop(); Trace("sym-manager-debug") @@ -297,7 +299,7 @@ void SymbolManager::Implementation::resetAssertions() // ---------------------------------------------- SymbolManager -SymbolManager::SymbolManager(api::Solver* s) +SymbolManager::SymbolManager(cvc5::Solver* s) : d_solver(s), d_implementation(new SymbolManager::Implementation()), d_globalDeclarations(false) @@ -306,59 +308,62 @@ SymbolManager::SymbolManager(api::Solver* s) SymbolManager::~SymbolManager() {} -SymbolTable* SymbolManager::getSymbolTable() { return &d_symtabAllocated; } +internal::SymbolTable* SymbolManager::getSymbolTable() +{ + return &d_symtabAllocated; +} -NamingResult SymbolManager::setExpressionName(api::Term t, +NamingResult SymbolManager::setExpressionName(cvc5::Term t, const std::string& name, bool isAssertion) { return d_implementation->setExpressionName(t, name, isAssertion); } -bool SymbolManager::getExpressionName(api::Term t, +bool SymbolManager::getExpressionName(cvc5::Term t, std::string& name, bool isAssertion) const { return d_implementation->getExpressionName(t, name, isAssertion); } -void SymbolManager::getExpressionNames(const std::vector& ts, +void SymbolManager::getExpressionNames(const std::vector& ts, std::vector& names, bool areAssertions) const { return d_implementation->getExpressionNames(ts, names, areAssertions); } -std::map SymbolManager::getExpressionNames( +std::map SymbolManager::getExpressionNames( bool areAssertions) const { return d_implementation->getExpressionNames(areAssertions); } -std::vector SymbolManager::getModelDeclareSorts() const +std::vector SymbolManager::getModelDeclareSorts() const { return d_implementation->getModelDeclareSorts(); } -std::vector SymbolManager::getModelDeclareTerms() const +std::vector SymbolManager::getModelDeclareTerms() const { return d_implementation->getModelDeclareTerms(); } -std::vector SymbolManager::getFunctionsToSynthesize() const +std::vector SymbolManager::getFunctionsToSynthesize() const { return d_implementation->getFunctionsToSynthesize(); } -void SymbolManager::addModelDeclarationSort(api::Sort s) +void SymbolManager::addModelDeclarationSort(cvc5::Sort s) { d_implementation->addModelDeclarationSort(s); } -void SymbolManager::addModelDeclarationTerm(api::Term t) +void SymbolManager::addModelDeclarationTerm(cvc5::Term t) { d_implementation->addModelDeclarationTerm(t); } -void SymbolManager::addFunctionToSynthesize(api::Term f) +void SymbolManager::addFunctionToSynthesize(cvc5::Term f) { d_implementation->addFunctionToSynthesize(f); } diff --git a/src/expr/symbol_manager.h b/src/expr/symbol_manager.h index e3084904f..7ca159d91 100644 --- a/src/expr/symbol_manager.h +++ b/src/expr/symbol_manager.h @@ -50,10 +50,10 @@ enum class NamingResult class CVC5_EXPORT SymbolManager { public: - SymbolManager(api::Solver* s); + SymbolManager(cvc5::Solver* s); ~SymbolManager(); /** Get the underlying symbol table */ - SymbolTable* getSymbolTable(); + internal::SymbolTable* getSymbolTable(); //---------------------------- named expressions /** Set name of term t to name * @@ -65,7 +65,7 @@ class CVC5_EXPORT SymbolManager * @return true if the name was set. This method may return false if t * already has a name. */ - NamingResult setExpressionName(api::Term t, + NamingResult setExpressionName(cvc5::Term t, const std::string& name, bool isAssertion = false); /** Get name for term t @@ -76,7 +76,7 @@ class CVC5_EXPORT SymbolManager * @return true if t has a name. If so, name is updated to that name. * Otherwise, name is unchanged. */ - bool getExpressionName(api::Term t, + bool getExpressionName(cvc5::Term t, std::string& name, bool isAssertion = false) const; /** @@ -93,7 +93,7 @@ class CVC5_EXPORT SymbolManager * @param names The name list * @param areAssertions Whether we only wish to include assertion names */ - void getExpressionNames(const std::vector& ts, + void getExpressionNames(const std::vector& ts, std::vector& names, bool areAssertions = false) const; /** @@ -102,34 +102,34 @@ class CVC5_EXPORT SymbolManager * @param areAssertions Whether we only wish to include assertion names * @return the mapping containing all expression names. */ - std::map getExpressionNames( + std::map getExpressionNames( bool areAssertions = false) const; /** * @return The sorts we have declared that should be printed in the model. */ - std::vector getModelDeclareSorts() const; + std::vector getModelDeclareSorts() const; /** * @return The terms we have declared that should be printed in the model. */ - std::vector getModelDeclareTerms() const; + std::vector getModelDeclareTerms() const; /** * @return The functions we have declared that should be printed in a response * to check-synth. */ - std::vector getFunctionsToSynthesize() const; + std::vector getFunctionsToSynthesize() const; /** * Add declared sort to the list of model declarations. */ - void addModelDeclarationSort(api::Sort s); + void addModelDeclarationSort(cvc5::Sort s); /** * Add declared term to the list of model declarations. */ - void addModelDeclarationTerm(api::Term t); + void addModelDeclarationTerm(cvc5::Term t); /** * Add a function to synthesize. This ensures the solution for f is printed * in a successful response to check-synth. */ - void addFunctionToSynthesize(api::Term f); + void addFunctionToSynthesize(cvc5::Term f); //---------------------------- end named expressions /** @@ -174,11 +174,11 @@ class CVC5_EXPORT SymbolManager private: /** The API Solver object. */ - api::Solver* d_solver; + cvc5::Solver* d_solver; /** * The declaration scope that is "owned" by this symbol manager. */ - SymbolTable d_symtabAllocated; + internal::SymbolTable d_symtabAllocated; /** The implementation of the symbol manager */ class Implementation; std::unique_ptr d_implementation; diff --git a/src/expr/symbol_table.cpp b/src/expr/symbol_table.cpp index 1b0e679ca..8c0bd44dc 100644 --- a/src/expr/symbol_table.cpp +++ b/src/expr/symbol_table.cpp @@ -26,11 +26,11 @@ #include "context/cdhashset.h" #include "context/context.h" -namespace cvc5 { +namespace cvc5::internal { -using ::cvc5::context::CDHashMap; -using ::cvc5::context::CDHashSet; -using ::cvc5::context::Context; +using ::cvc5::internal::context::CDHashMap; +using ::cvc5::internal::context::CDHashSet; +using ::cvc5::internal::context::Context; using ::std::copy; using ::std::endl; using ::std::ostream_iterator; @@ -91,33 +91,33 @@ class OverloadedTypeTrie { public: OverloadedTypeTrie(Context* c, bool allowFunVariants = false) : d_overloaded_symbols( - new (true) CDHashSet>(c)), + new (true) CDHashSet>(c)), d_allowFunctionVariants(allowFunVariants) { } ~OverloadedTypeTrie() { d_overloaded_symbols->deleteSelf(); } /** is this function overloaded? */ - bool isOverloadedFunction(api::Term fun) const; + bool isOverloadedFunction(cvc5::Term fun) const; /** Get overloaded constant for type. * If possible, it returns a defined symbol with name * that has type t. Otherwise returns null expression. */ - api::Term getOverloadedConstantForType(const std::string& name, - api::Sort t) const; + cvc5::Term getOverloadedConstantForType(const std::string& name, + cvc5::Sort t) const; /** * If possible, returns a defined function for a name * and a vector of expected argument types. Otherwise returns * null expression. */ - api::Term getOverloadedFunctionForTypes( - const std::string& name, const std::vector& argTypes) const; + cvc5::Term getOverloadedFunctionForTypes( + const std::string& name, const std::vector& argTypes) const; /** called when obj is bound to name, and prev_bound_obj was already bound to * name Returns false if the binding is invalid. */ - bool bind(const string& name, api::Term prev_bound_obj, api::Term obj); + bool bind(const string& name, cvc5::Term prev_bound_obj, cvc5::Term obj); private: /** Marks expression obj with name as overloaded. @@ -135,9 +135,9 @@ class OverloadedTypeTrie { * These are put in the same place in the trie but do not have identical type, * hence we return false. */ - bool markOverloaded(const string& name, api::Term obj); + bool markOverloaded(const string& name, cvc5::Term obj); /** the null expression */ - api::Term d_nullTerm; + cvc5::Term d_nullTerm; // The (context-independent) trie storing that maps expected argument // vectors to symbols. All expressions stored in d_symbols are only // interpreted as active if they also appear in the context-dependent @@ -145,15 +145,15 @@ class OverloadedTypeTrie { class TypeArgTrie { public: // children of this node - std::map d_children; + std::map d_children; // symbols at this node - std::map d_symbols; + std::map d_symbols; }; /** for each string with operator overloading, this stores the data structure * above. */ std::unordered_map d_overload_type_arg_trie; /** The set of overloaded symbols. */ - CDHashSet>* d_overloaded_symbols; + CDHashSet>* d_overloaded_symbols; /** allow function variants * This is true if we allow overloading (non-constant) functions that expect * the same argument types. @@ -165,25 +165,25 @@ class OverloadedTypeTrie { * if reqUnique=true. * Otherwise, it returns the null expression. */ - api::Term getOverloadedFunctionAt(const TypeArgTrie* tat, - bool reqUnique = true) const; + cvc5::Term getOverloadedFunctionAt(const TypeArgTrie* tat, + bool reqUnique = true) const; }; -bool OverloadedTypeTrie::isOverloadedFunction(api::Term fun) const +bool OverloadedTypeTrie::isOverloadedFunction(cvc5::Term fun) const { return d_overloaded_symbols->find(fun) != d_overloaded_symbols->end(); } -api::Term OverloadedTypeTrie::getOverloadedConstantForType( - const std::string& name, api::Sort t) const +cvc5::Term OverloadedTypeTrie::getOverloadedConstantForType( + const std::string& name, cvc5::Sort t) const { std::unordered_map::const_iterator it = d_overload_type_arg_trie.find(name); if (it != d_overload_type_arg_trie.end()) { - std::map::const_iterator its = + std::map::const_iterator its = it->second.d_symbols.find(t); if (its != it->second.d_symbols.end()) { - api::Term expr = its->second; + cvc5::Term expr = its->second; // must be an active symbol if (isOverloadedFunction(expr)) { return expr; @@ -193,15 +193,15 @@ api::Term OverloadedTypeTrie::getOverloadedConstantForType( return d_nullTerm; } -api::Term OverloadedTypeTrie::getOverloadedFunctionForTypes( - const std::string& name, const std::vector& argTypes) const +cvc5::Term OverloadedTypeTrie::getOverloadedFunctionForTypes( + const std::string& name, const std::vector& argTypes) const { std::unordered_map::const_iterator it = d_overload_type_arg_trie.find(name); if (it != d_overload_type_arg_trie.end()) { const TypeArgTrie* tat = &it->second; for (unsigned i = 0; i < argTypes.size(); i++) { - std::map::const_iterator itc = + std::map::const_iterator itc = tat->d_children.find(argTypes[i]); if (itc != tat->d_children.end()) { tat = &itc->second; @@ -220,8 +220,8 @@ api::Term OverloadedTypeTrie::getOverloadedFunctionForTypes( } bool OverloadedTypeTrie::bind(const string& name, - api::Term prev_bound_obj, - api::Term obj) + cvc5::Term prev_bound_obj, + cvc5::Term obj) { bool retprev = true; if (!isOverloadedFunction(prev_bound_obj)) { @@ -233,14 +233,14 @@ bool OverloadedTypeTrie::bind(const string& name, return retprev && retobj; } -bool OverloadedTypeTrie::markOverloaded(const string& name, api::Term obj) +bool OverloadedTypeTrie::markOverloaded(const string& name, cvc5::Term obj) { Trace("parser-overloading") << "Overloaded function : " << name; Trace("parser-overloading") << " with type " << obj.getSort() << std::endl; // get the argument types - api::Sort t = obj.getSort(); - api::Sort rangeType = t; - std::vector argTypes; + cvc5::Sort t = obj.getSort(); + cvc5::Sort rangeType = t; + std::vector argTypes; if (t.isFunction()) { argTypes = t.getFunctionDomainSorts(); @@ -271,11 +271,11 @@ bool OverloadedTypeTrie::markOverloaded(const string& name, api::Term obj) if (d_allowFunctionVariants || argTypes.empty()) { // they are allowed, check for redefinition - std::map::iterator it = + std::map::iterator it = tat->d_symbols.find(rangeType); if (it != tat->d_symbols.end()) { - api::Term prev_obj = it->second; + cvc5::Term prev_obj = it->second; // if there is already an active function with the same name and expects // the same argument types and has the same return type, we reject the // re-declaration here. @@ -288,7 +288,7 @@ bool OverloadedTypeTrie::markOverloaded(const string& name, api::Term obj) else { // they are not allowed, we cannot have any function defined here. - api::Term existingFun = getOverloadedFunctionAt(tat, false); + cvc5::Term existingFun = getOverloadedFunctionAt(tat, false); if (!existingFun.isNull()) { return false; @@ -301,16 +301,16 @@ bool OverloadedTypeTrie::markOverloaded(const string& name, api::Term obj) return true; } -api::Term OverloadedTypeTrie::getOverloadedFunctionAt( +cvc5::Term OverloadedTypeTrie::getOverloadedFunctionAt( const OverloadedTypeTrie::TypeArgTrie* tat, bool reqUnique) const { - api::Term retExpr; - for (std::map::const_iterator its = + cvc5::Term retExpr; + for (std::map::const_iterator its = tat->d_symbols.begin(); its != tat->d_symbols.end(); ++its) { - api::Term expr = its->second; + cvc5::Term expr = its->second; if (isOverloadedFunction(expr)) { if (retExpr.isNull()) @@ -346,17 +346,17 @@ class SymbolTable::Implementation { ~Implementation() {} - bool bind(const string& name, api::Term obj, bool doOverload); - void bindType(const string& name, api::Sort t); + bool bind(const string& name, cvc5::Term obj, bool doOverload); + void bindType(const string& name, cvc5::Sort t); void bindType(const string& name, - const vector& params, - api::Sort t); + const vector& params, + cvc5::Sort t); bool isBound(const string& name) const; bool isBoundType(const string& name) const; - api::Term lookup(const string& name) const; - api::Sort lookupType(const string& name) const; - api::Sort lookupType(const string& name, - const vector& params) const; + cvc5::Term lookup(const string& name) const; + cvc5::Sort lookupType(const string& name) const; + cvc5::Sort lookupType(const string& name, + const vector& params) const; size_t lookupArity(const string& name); void popScope(); void pushScope(); @@ -365,30 +365,30 @@ class SymbolTable::Implementation { void resetAssertions(); //------------------------ operator overloading /** implementation of function from header */ - bool isOverloadedFunction(api::Term fun) const; + bool isOverloadedFunction(cvc5::Term fun) const; /** implementation of function from header */ - api::Term getOverloadedConstantForType(const std::string& name, - api::Sort t) const; + cvc5::Term getOverloadedConstantForType(const std::string& name, + cvc5::Sort t) const; /** implementation of function from header */ - api::Term getOverloadedFunctionForTypes( - const std::string& name, const std::vector& argTypes) const; + cvc5::Term getOverloadedFunctionForTypes( + const std::string& name, const std::vector& argTypes) const; //------------------------ end operator overloading private: /** The context manager for the scope maps. */ Context d_context; /** A map for expressions. */ - CDHashMap d_exprMap; + CDHashMap d_exprMap; /** A map for types. */ - using TypeMap = CDHashMap, api::Sort>>; + using TypeMap = CDHashMap, cvc5::Sort>>; TypeMap d_typeMap; //------------------------ operator overloading // the null expression - api::Term d_nullTerm; + cvc5::Term d_nullTerm; // overloaded type trie, stores all information regarding overloading OverloadedTypeTrie d_overload_trie; /** bind with overloading @@ -396,15 +396,15 @@ class SymbolTable::Implementation { * allowed. If a symbol is previously bound to that name, it marks both as * overloaded. Returns false if the binding was invalid. */ - bool bindWithOverloading(const string& name, api::Term obj); + bool bindWithOverloading(const string& name, cvc5::Term obj); //------------------------ end operator overloading }; /* SymbolTable::Implementation */ bool SymbolTable::Implementation::bind(const string& name, - api::Term obj, + cvc5::Term obj, bool doOverload) { - PrettyCheckArgument(!obj.isNull(), obj, "cannot bind to a null api::Term"); + PrettyCheckArgument(!obj.isNull(), obj, "cannot bind to a null cvc5::Term"); Trace("sym-table") << "SymbolTable: bind " << name << ", doOverload=" << doOverload << std::endl; if (doOverload) { @@ -421,10 +421,10 @@ bool SymbolTable::Implementation::isBound(const string& name) const { return d_exprMap.find(name) != d_exprMap.end(); } -api::Term SymbolTable::Implementation::lookup(const string& name) const +cvc5::Term SymbolTable::Implementation::lookup(const string& name) const { Assert(isBound(name)); - api::Term expr = (*d_exprMap.find(name)).second; + cvc5::Term expr = (*d_exprMap.find(name)).second; if (isOverloadedFunction(expr)) { return d_nullTerm; } else { @@ -432,21 +432,21 @@ api::Term SymbolTable::Implementation::lookup(const string& name) const } } -void SymbolTable::Implementation::bindType(const string& name, api::Sort t) +void SymbolTable::Implementation::bindType(const string& name, cvc5::Sort t) { - d_typeMap.insert(name, make_pair(vector(), t)); + d_typeMap.insert(name, make_pair(vector(), t)); } void SymbolTable::Implementation::bindType(const string& name, - const vector& params, - api::Sort t) + const vector& params, + cvc5::Sort t) { if (TraceIsOn("sort")) { Trace("sort") << "bindType(" << name << ", ["; if (params.size() > 0) { copy(params.begin(), params.end() - 1, - ostream_iterator(Trace("sort"), ", ")); + ostream_iterator(Trace("sort"), ", ")); Trace("sort") << params.back(); } Trace("sort") << "], " << t << ")" << endl; @@ -459,9 +459,9 @@ bool SymbolTable::Implementation::isBoundType(const string& name) const { return d_typeMap.find(name) != d_typeMap.end(); } -api::Sort SymbolTable::Implementation::lookupType(const string& name) const +cvc5::Sort SymbolTable::Implementation::lookupType(const string& name) const { - std::pair, api::Sort> p = + std::pair, cvc5::Sort> p = (*d_typeMap.find(name)).second; PrettyCheckArgument(p.first.size() == 0, name, "type constructor arity is wrong: " @@ -470,10 +470,10 @@ api::Sort SymbolTable::Implementation::lookupType(const string& name) const return p.second; } -api::Sort SymbolTable::Implementation::lookupType( - const string& name, const vector& params) const +cvc5::Sort SymbolTable::Implementation::lookupType( + const string& name, const vector& params) const { - std::pair, api::Sort> p = + std::pair, cvc5::Sort> p = (*d_typeMap.find(name)).second; PrettyCheckArgument(p.first.size() == params.size(), params, "type constructor arity is wrong: " @@ -499,18 +499,18 @@ api::Sort SymbolTable::Implementation::lookupType( Trace("sort") << "have formals ["; copy(p.first.begin(), p.first.end() - 1, - ostream_iterator(Trace("sort"), ", ")); + ostream_iterator(Trace("sort"), ", ")); Trace("sort") << p.first.back() << "]" << std::endl << "parameters ["; copy(params.begin(), params.end() - 1, - ostream_iterator(Trace("sort"), ", ")); + ostream_iterator(Trace("sort"), ", ")); Trace("sort") << params.back() << "]" << endl << "type ctor " << name << std::endl << "type is " << p.second << std::endl; } - api::Sort instantiation = isSortConstructor - ? p.second.instantiate(params) - : p.second.substitute(p.first, params); + cvc5::Sort instantiation = isSortConstructor + ? p.second.instantiate(params) + : p.second.substitute(p.first, params); Trace("sort") << "instance is " << instantiation << std::endl; @@ -518,7 +518,7 @@ api::Sort SymbolTable::Implementation::lookupType( } size_t SymbolTable::Implementation::lookupArity(const string& name) { - std::pair, api::Sort> p = + std::pair, cvc5::Sort> p = (*d_typeMap.find(name)).second; return p.first.size(); } @@ -555,30 +555,30 @@ void SymbolTable::Implementation::resetAssertions() d_context.push(); } -bool SymbolTable::Implementation::isOverloadedFunction(api::Term fun) const +bool SymbolTable::Implementation::isOverloadedFunction(cvc5::Term fun) const { return d_overload_trie.isOverloadedFunction(fun); } -api::Term SymbolTable::Implementation::getOverloadedConstantForType( - const std::string& name, api::Sort t) const +cvc5::Term SymbolTable::Implementation::getOverloadedConstantForType( + const std::string& name, cvc5::Sort t) const { return d_overload_trie.getOverloadedConstantForType(name, t); } -api::Term SymbolTable::Implementation::getOverloadedFunctionForTypes( - const std::string& name, const std::vector& argTypes) const +cvc5::Term SymbolTable::Implementation::getOverloadedFunctionForTypes( + const std::string& name, const std::vector& argTypes) const { return d_overload_trie.getOverloadedFunctionForTypes(name, argTypes); } bool SymbolTable::Implementation::bindWithOverloading(const string& name, - api::Term obj) + cvc5::Term obj) { - CDHashMap::const_iterator it = d_exprMap.find(name); + CDHashMap::const_iterator it = d_exprMap.find(name); if (it != d_exprMap.end()) { - const api::Term& prev_bound_obj = (*it).second; + const cvc5::Term& prev_bound_obj = (*it).second; if (prev_bound_obj != obj) { return d_overload_trie.bind(name, prev_bound_obj, obj); } @@ -586,19 +586,19 @@ bool SymbolTable::Implementation::bindWithOverloading(const string& name, return true; } -bool SymbolTable::isOverloadedFunction(api::Term fun) const +bool SymbolTable::isOverloadedFunction(cvc5::Term fun) const { return d_implementation->isOverloadedFunction(fun); } -api::Term SymbolTable::getOverloadedConstantForType(const std::string& name, - api::Sort t) const +cvc5::Term SymbolTable::getOverloadedConstantForType(const std::string& name, + cvc5::Sort t) const { return d_implementation->getOverloadedConstantForType(name, t); } -api::Term SymbolTable::getOverloadedFunctionForTypes( - const std::string& name, const std::vector& argTypes) const +cvc5::Term SymbolTable::getOverloadedFunctionForTypes( + const std::string& name, const std::vector& argTypes) const { return d_implementation->getOverloadedFunctionForTypes(name, argTypes); } @@ -608,21 +608,19 @@ SymbolTable::SymbolTable() : d_implementation(new SymbolTable::Implementation()) } SymbolTable::~SymbolTable() {} -bool SymbolTable::bind(const string& name, - api::Term obj, - bool doOverload) +bool SymbolTable::bind(const string& name, cvc5::Term obj, bool doOverload) { return d_implementation->bind(name, obj, doOverload); } -void SymbolTable::bindType(const string& name, api::Sort t) +void SymbolTable::bindType(const string& name, cvc5::Sort t) { d_implementation->bindType(name, t); } void SymbolTable::bindType(const string& name, - const vector& params, - api::Sort t) + const vector& params, + cvc5::Sort t) { d_implementation->bindType(name, params, t); } @@ -635,17 +633,17 @@ bool SymbolTable::isBoundType(const string& name) const { return d_implementation->isBoundType(name); } -api::Term SymbolTable::lookup(const string& name) const +cvc5::Term SymbolTable::lookup(const string& name) const { return d_implementation->lookup(name); } -api::Sort SymbolTable::lookupType(const string& name) const +cvc5::Sort SymbolTable::lookupType(const string& name) const { return d_implementation->lookupType(name); } -api::Sort SymbolTable::lookupType(const string& name, - const vector& params) const +cvc5::Sort SymbolTable::lookupType(const string& name, + const vector& params) const { return d_implementation->lookupType(name, params); } @@ -658,4 +656,4 @@ size_t SymbolTable::getLevel() const { return d_implementation->getLevel(); } void SymbolTable::reset() { d_implementation->reset(); } void SymbolTable::resetAssertions() { d_implementation->resetAssertions(); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/expr/symbol_table.h b/src/expr/symbol_table.h index e4a39a8ca..52963fc2e 100644 --- a/src/expr/symbol_table.h +++ b/src/expr/symbol_table.h @@ -26,12 +26,12 @@ #include "cvc5_export.h" namespace cvc5 { - -namespace api { class Solver; class Sort; class Term; -} // namespace api +} // namespace cvc5 + +namespace cvc5::internal { class CVC5_EXPORT ScopeException : public Exception { @@ -70,9 +70,7 @@ class CVC5_EXPORT SymbolTable * * Returns false if the binding was invalid. */ - bool bind(const std::string& name, - api::Term obj, - bool doOverload = false); + bool bind(const std::string& name, cvc5::Term obj, bool doOverload = false); /** * Bind a type to a name in the current scope. If name @@ -84,7 +82,7 @@ class CVC5_EXPORT SymbolTable * @param name an identifier * @param t the type to bind to name */ - void bindType(const std::string& name, api::Sort t); + void bindType(const std::string& name, cvc5::Sort t); /** * Bind a type to a name in the current scope. If name @@ -98,8 +96,8 @@ class CVC5_EXPORT SymbolTable * @param t the type to bind to name */ void bindType(const std::string& name, - const std::vector& params, - api::Sort t); + const std::vector& params, + cvc5::Sort t); /** * Check whether a name is bound to an expression with bind(). @@ -126,7 +124,7 @@ class CVC5_EXPORT SymbolTable * It returns the null expression if there is not a unique expression bound to * name in the current scope (i.e. if there is not exactly one). */ - api::Term lookup(const std::string& name) const; + cvc5::Term lookup(const std::string& name) const; /** * Lookup a bound type. @@ -134,7 +132,7 @@ class CVC5_EXPORT SymbolTable * @param name the type identifier to lookup * @returns the type bound to name in the current scope. */ - api::Sort lookupType(const std::string& name) const; + cvc5::Sort lookupType(const std::string& name) const; /** * Lookup a bound parameterized type. @@ -144,8 +142,8 @@ class CVC5_EXPORT SymbolTable * @returns the type bound to name(params) in * the current scope. */ - api::Sort lookupType(const std::string& name, - const std::vector& params) const; + cvc5::Sort lookupType(const std::string& name, + const std::vector& params) const; /** * Lookup the arity of a bound parameterized type. @@ -173,14 +171,14 @@ class CVC5_EXPORT SymbolTable //------------------------ operator overloading /** is this function overloaded? */ - bool isOverloadedFunction(api::Term fun) const; + bool isOverloadedFunction(cvc5::Term fun) const; /** Get overloaded constant for type. * If possible, it returns the defined symbol with name * that has type t. Otherwise returns null expression. */ - api::Term getOverloadedConstantForType(const std::string& name, - api::Sort t) const; + cvc5::Term getOverloadedConstantForType(const std::string& name, + cvc5::Sort t) const; /** * If possible, returns the unique defined function for a name @@ -193,8 +191,8 @@ class CVC5_EXPORT SymbolTable * no functions with name and expected argTypes, or alternatively there is * more than one function with name and expected argTypes. */ - api::Term getOverloadedFunctionForTypes( - const std::string& name, const std::vector& argTypes) const; + cvc5::Term getOverloadedFunctionForTypes( + const std::string& name, const std::vector& argTypes) const; //------------------------ end operator overloading private: @@ -203,6 +201,6 @@ class CVC5_EXPORT SymbolTable std::unique_ptr d_implementation; }; /* class SymbolTable */ -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__SYMBOL_TABLE_H */ diff --git a/src/expr/term_canonize.cpp b/src/expr/term_canonize.cpp index 8b6201b63..697fe032a 100644 --- a/src/expr/term_canonize.cpp +++ b/src/expr/term_canonize.cpp @@ -20,9 +20,9 @@ // TODO #1216: move the code in this include #include "theory/quantifiers/term_util.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace expr { TermCanonize::TermCanonize(TypeClassCallback* tcc) @@ -239,4 +239,4 @@ Node TermCanonize::getCanonicalTerm(TNode n, } } // namespace expr -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/expr/term_canonize.h b/src/expr/term_canonize.h index 74eefdd2d..b07585fb9 100644 --- a/src/expr/term_canonize.h +++ b/src/expr/term_canonize.h @@ -21,7 +21,7 @@ #include #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace expr { /** @@ -135,6 +135,6 @@ class TermCanonize }; } // namespace expr -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__EXPR__TERM_CANONIZE_H */ diff --git a/src/expr/term_context.cpp b/src/expr/term_context.cpp index 02ec8981b..3d1d70538 100644 --- a/src/expr/term_context.cpp +++ b/src/expr/term_context.cpp @@ -17,7 +17,7 @@ #include "theory/theory.h" -namespace cvc5 { +namespace cvc5::internal { uint32_t TermContext::computeValueOp(TNode t, uint32_t tval) const { @@ -144,4 +144,4 @@ uint32_t TheoryLeafTermContext::computeValue(TNode t, return theory::Theory::isLeafOf(t, d_theoryId) ? 1 : tval; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/expr/term_context.h b/src/expr/term_context.h index db08372ef..9cbb19201 100644 --- a/src/expr/term_context.h +++ b/src/expr/term_context.h @@ -21,7 +21,7 @@ #include "expr/node.h" #include "theory/theory_id.h" -namespace cvc5 { +namespace cvc5::internal { /** * This is an abstract class for computing "term context identifiers". A term @@ -182,6 +182,6 @@ class TheoryLeafTermContext : public TermContext theory::TheoryId d_theoryId; }; -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__EXPR__TERM_CONVERSION_PROOF_GENERATOR_H */ diff --git a/src/expr/term_context_node.cpp b/src/expr/term_context_node.cpp index 91e6dbfd3..dbe57d62c 100644 --- a/src/expr/term_context_node.cpp +++ b/src/expr/term_context_node.cpp @@ -18,9 +18,9 @@ #include "expr/term_context.h" #include "util/rational.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { TCtxNode::TCtxNode(Node n, const TermContext* tctx) : d_node(n), d_val(tctx->initialValue()), d_tctx(tctx) @@ -77,4 +77,4 @@ Node TCtxNode::decomposeNodeHash(Node h, uint32_t& val) return h[0]; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/expr/term_context_node.h b/src/expr/term_context_node.h index 9e4fe90de..4c91e0317 100644 --- a/src/expr/term_context_node.h +++ b/src/expr/term_context_node.h @@ -20,7 +20,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { class TCtxStack; class TermContext; @@ -75,6 +75,6 @@ class TCtxNode const TermContext* d_tctx; }; -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__EXPR__TERM_CONVERSION_PROOF_GENERATOR_H */ diff --git a/src/expr/term_context_stack.cpp b/src/expr/term_context_stack.cpp index a8839564b..33fe73096 100644 --- a/src/expr/term_context_stack.cpp +++ b/src/expr/term_context_stack.cpp @@ -17,7 +17,7 @@ #include "expr/term_context.h" -namespace cvc5 { +namespace cvc5::internal { TCtxStack::TCtxStack(const TermContext* tctx) : d_tctx(tctx) {} @@ -76,4 +76,4 @@ TCtxNode TCtxStack::getCurrentNode() const return TCtxNode(curr.first, curr.second, d_tctx); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/expr/term_context_stack.h b/src/expr/term_context_stack.h index e3412793f..7aec38a8d 100644 --- a/src/expr/term_context_stack.h +++ b/src/expr/term_context_stack.h @@ -20,7 +20,7 @@ #include "expr/term_context_node.h" -namespace cvc5 { +namespace cvc5::internal { /** * A stack for term-context-sensitive terms. Its main advantage is that @@ -69,6 +69,6 @@ class TCtxStack const TermContext* d_tctx; }; -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__EXPR__TERM_CONTEXT_STACK_H */ diff --git a/src/expr/type_checker.h b/src/expr/type_checker.h index c072ca4d4..a16de4d64 100644 --- a/src/expr/type_checker.h +++ b/src/expr/type_checker.h @@ -21,7 +21,7 @@ #ifndef CVC5__EXPR__TYPE_CHECKER_H #define CVC5__EXPR__TYPE_CHECKER_H -namespace cvc5 { +namespace cvc5::internal { namespace expr { class TypeChecker { @@ -35,6 +35,6 @@ public: };/* class TypeChecker */ } // namespace expr -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__EXPR__TYPE_CHECKER_H */ diff --git a/src/expr/type_checker_template.cpp b/src/expr/type_checker_template.cpp index 47adb17b1..7ef102ec8 100644 --- a/src/expr/type_checker_template.cpp +++ b/src/expr/type_checker_template.cpp @@ -24,7 +24,7 @@ ${typechecker_includes} // clang-format on -namespace cvc5 { +namespace cvc5::internal { namespace expr { TypeNode TypeChecker::computeType(NodeManager* nodeManager, TNode n, bool check) @@ -79,4 +79,4 @@ ${construles} }/* TypeChecker::computeIsConst */ } // namespace expr -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/expr/type_checker_util.h b/src/expr/type_checker_util.h index e837659ad..3d733beb7 100644 --- a/src/expr/type_checker_util.h +++ b/src/expr/type_checker_util.h @@ -26,7 +26,7 @@ #include "expr/node_manager.h" #include "expr/type_node.h" -namespace cvc5 { +namespace cvc5::internal { namespace expr { /** Type check returns the builtin operator sort */ @@ -202,4 +202,4 @@ class SimpleTypeRuleVar }; } // namespace expr -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/expr/type_matcher.cpp b/src/expr/type_matcher.cpp index cc33494d8..22a8e0899 100644 --- a/src/expr/type_matcher.cpp +++ b/src/expr/type_matcher.cpp @@ -17,7 +17,7 @@ #include "expr/dtype.h" -namespace cvc5 { +namespace cvc5::internal { TypeMatcher::TypeMatcher(TypeNode dt) { @@ -136,4 +136,4 @@ void TypeMatcher::getMatches(std::vector& types) const } } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/expr/type_matcher.h b/src/expr/type_matcher.h index e7b839234..7f09df805 100644 --- a/src/expr/type_matcher.h +++ b/src/expr/type_matcher.h @@ -22,7 +22,7 @@ #include "expr/type_node.h" -namespace cvc5 { +namespace cvc5::internal { /** * This class is used for inferring the parameters of an instantiated @@ -69,6 +69,6 @@ class TypeMatcher void addTypes(const std::vector& types); }; /* class TypeMatcher */ -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__MATCHER_H */ diff --git a/src/expr/type_node.cpp b/src/expr/type_node.cpp index 4ef73ddba..5fa22a1a9 100644 --- a/src/expr/type_node.cpp +++ b/src/expr/type_node.cpp @@ -28,7 +28,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { TypeNode TypeNode::s_null( &expr::NodeValue::null() ); @@ -677,11 +677,11 @@ TypeNode TypeNode::getRangeType() const return (*this)[getNumChildren() - 1]; } -} // namespace cvc5 +} // namespace cvc5::internal namespace std { -size_t hash::operator()(const cvc5::TypeNode& tn) const +size_t hash::operator()(const cvc5::internal::TypeNode& tn) const { return tn.getId(); } diff --git a/src/expr/type_node.h b/src/expr/type_node.h index 60b24d57e..8c6e98ddb 100644 --- a/src/expr/type_node.h +++ b/src/expr/type_node.h @@ -31,7 +31,7 @@ #include "expr/node_value.h" #include "util/cardinality_class.h" -namespace cvc5 { +namespace cvc5::internal { class NodeManager; class Cardinality; @@ -714,21 +714,21 @@ inline std::ostream& operator<<(std::ostream& out, const TypeNode& n) { return out; } -} // namespace cvc5 +} // namespace cvc5::internal namespace std { template <> -struct hash +struct hash { - size_t operator()(const cvc5::TypeNode& tn) const; + size_t operator()(const cvc5::internal::TypeNode& tn) const; }; } // namespace std #include "expr/node_manager.h" -namespace cvc5 { +namespace cvc5::internal { inline TypeNode TypeNode::substitute(const TypeNode& type, @@ -977,6 +977,6 @@ inline unsigned TypeNode::getFloatingPointSignificandSize() const { return getConst().significandWidth(); } -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__NODE_H */ diff --git a/src/expr/type_properties_template.cpp b/src/expr/type_properties_template.cpp index 1ad2572d7..097185f96 100644 --- a/src/expr/type_properties_template.cpp +++ b/src/expr/type_properties_template.cpp @@ -15,7 +15,7 @@ #include "expr/type_properties.h" -namespace cvc5 { +namespace cvc5::internal { namespace kind { Node mkGroundTerm(TypeConstant tc) @@ -48,4 +48,4 @@ ${type_groundterms} } } // namespace kind -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/expr/type_properties_template.h b/src/expr/type_properties_template.h index 3ce3391dc..e91f913a2 100644 --- a/src/expr/type_properties_template.h +++ b/src/expr/type_properties_template.h @@ -30,7 +30,7 @@ ${type_properties_includes} // clang-format on -namespace cvc5 { +namespace cvc5::internal { namespace kind { /** @@ -101,6 +101,6 @@ Node mkGroundTerm(TypeConstant tc); Node mkGroundTerm(TypeNode typeNode); } // namespace kind -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__TYPE_PROPERTIES_H */ diff --git a/src/expr/variadic_trie.cpp b/src/expr/variadic_trie.cpp index bd27780e9..168770b05 100644 --- a/src/expr/variadic_trie.cpp +++ b/src/expr/variadic_trie.cpp @@ -15,7 +15,7 @@ #include "expr/variadic_trie.h" -namespace cvc5 { +namespace cvc5::internal { bool VariadicTrie::add(Node n, const std::vector& i) { @@ -52,4 +52,4 @@ bool VariadicTrie::hasSubset(const std::vector& is) const return false; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/expr/variadic_trie.h b/src/expr/variadic_trie.h index aa7ca1e37..0748884c3 100644 --- a/src/expr/variadic_trie.h +++ b/src/expr/variadic_trie.h @@ -23,7 +23,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { /** * A trie that stores data at undetermined depth. Storing data at @@ -49,6 +49,6 @@ class VariadicTrie bool hasSubset(const std::vector& is) const; }; -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__EXPR__VARIADIC_TRIE_H */ diff --git a/src/main/command_executor.cpp b/src/main/command_executor.cpp index a3f3b6d73..f6206e84e 100644 --- a/src/main/command_executor.cpp +++ b/src/main/command_executor.cpp @@ -29,7 +29,7 @@ #include "smt/command.h" #include "smt/solver_engine.h" -namespace cvc5 { +namespace cvc5::internal { namespace main { // Function to cancel any (externally-imposed) limit on CPU time. @@ -48,10 +48,8 @@ void setNoLimitCPU() { #endif /* ! __WIN32__ */ } -CommandExecutor::CommandExecutor(std::unique_ptr& solver) - : d_solver(solver), - d_symman(new SymbolManager(d_solver.get())), - d_result() +CommandExecutor::CommandExecutor(std::unique_ptr& solver) + : d_solver(solver), d_symman(new SymbolManager(d_solver.get())), d_result() { } CommandExecutor::~CommandExecutor() @@ -121,7 +119,7 @@ bool CommandExecutor::doCommandSingleton(Command* cmd) bool status = solverInvoke( d_solver.get(), d_symman.get(), cmd, d_solver->getDriverOptions().out()); - api::Result res; + cvc5::Result res; const CheckSatCommand* cs = dynamic_cast(cmd); if(cs != nullptr) { d_result = res = cs->getResult(); @@ -142,7 +140,7 @@ bool CommandExecutor::doCommandSingleton(Command* cmd) if (d_solver->getOptionInfo("dump-models").boolValue() && (isResultSat || (res.isUnknown() - && res.getUnknownExplanation() == api::Result::INCOMPLETE))) + && res.getUnknownExplanation() == cvc5::Result::INCOMPLETE))) { getterCommands.emplace_back(new GetModelCommand()); } @@ -188,7 +186,7 @@ bool CommandExecutor::doCommandSingleton(Command* cmd) return status; } -bool solverInvoke(api::Solver* solver, +bool solverInvoke(cvc5::Solver* solver, SymbolManager* sm, Command* cmd, std::ostream& out) @@ -223,4 +221,4 @@ void CommandExecutor::flushOutputStreams() { } } // namespace main -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/main/command_executor.h b/src/main/command_executor.h index a9897f53e..9ee3cb4e1 100644 --- a/src/main/command_executor.h +++ b/src/main/command_executor.h @@ -26,6 +26,8 @@ namespace cvc5 { class Command; +namespace internal { + namespace main { class CommandExecutor @@ -35,7 +37,7 @@ class CommandExecutor * The solver object, which is allocated by this class and is used for * executing most commands (e.g. check-sat). */ - std::unique_ptr& d_solver; + std::unique_ptr& d_solver; /** * The symbol manager, which is allocated by this class. This manages * all things related to definitions of symbols and their impact on behaviors @@ -48,10 +50,10 @@ class CommandExecutor */ std::unique_ptr d_symman; - api::Result d_result; + cvc5::Result d_result; public: - CommandExecutor(std::unique_ptr& solver); + CommandExecutor(std::unique_ptr& solver); virtual ~CommandExecutor(); @@ -68,12 +70,12 @@ class CommandExecutor } /** Get a pointer to the solver object owned by this CommandExecutor. */ - api::Solver* getSolver() { return d_solver.get(); } + cvc5::Solver* getSolver() { return d_solver.get(); } /** Get a pointer to the symbol manager owned by this CommandExecutor */ SymbolManager* getSymbolManager() { return d_symman.get(); } - api::Result getResult() const { return d_result; } + cvc5::Result getResult() const { return d_result; } void reset(); /** Store the current options as the original options */ @@ -105,12 +107,13 @@ private: }; /* class CommandExecutor */ -bool solverInvoke(api::Solver* solver, +bool solverInvoke(cvc5::Solver* solver, SymbolManager* sm, Command* cmd, std::ostream& out); } // namespace main +} // namespace internal } // namespace cvc5 #endif /* CVC5__MAIN__COMMAND_EXECUTOR_H */ diff --git a/src/main/driver_unified.cpp b/src/main/driver_unified.cpp index 5c3933e5a..51420dd21 100644 --- a/src/main/driver_unified.cpp +++ b/src/main/driver_unified.cpp @@ -40,11 +40,11 @@ #include "util/result.h" using namespace std; -using namespace cvc5; +using namespace cvc5::internal; using namespace cvc5::parser; -using namespace cvc5::main; +using namespace cvc5::internal::main; -namespace cvc5 { +namespace cvc5::internal { namespace main { /** Full argv[0] */ @@ -54,12 +54,12 @@ const char* progPath; std::string progName; /** A pointer to the CommandExecutor (the signal handlers need it) */ -std::unique_ptr pExecutor; +std::unique_ptr pExecutor; } // namespace main -} // namespace cvc5 +} // namespace cvc5::internal -int runCvc5(int argc, char* argv[], std::unique_ptr& solver) +int runCvc5(int argc, char* argv[], std::unique_ptr& solver) { // Initialize the signal handlers signal_handlers::install(); @@ -68,7 +68,7 @@ int runCvc5(int argc, char* argv[], std::unique_ptr& solver) // Create the command executor to execute the parsed commands pExecutor = std::make_unique(solver); - api::DriverOptions dopts = solver->getDriverOptions(); + cvc5::DriverOptions dopts = solver->getDriverOptions(); // Parse the options std::vector filenames = main::parse(*solver, argc, argv, progName); @@ -154,8 +154,8 @@ int runCvc5(int argc, char* argv[], std::unique_ptr& solver) // Determine which messages to show based on smtcomp_mode and verbosity if(Configuration::isMuzzledBuild()) { - TraceChannel.setStream(&cvc5::null_os); - WarningChannel.setStream(&cvc5::null_os); + TraceChannel.setStream(&cvc5::internal::null_os); + WarningChannel.setStream(&cvc5::internal::null_os); } int returnValue = 0; @@ -163,7 +163,7 @@ int runCvc5(int argc, char* argv[], std::unique_ptr& solver) solver->setInfo("filename", filenameStr); // Parse and execute commands until we are done - std::unique_ptr cmd; + std::unique_ptr cmd; bool status = true; if (solver->getOptionInfo("interactive").boolValue() && inputFromStdin) { @@ -228,7 +228,7 @@ int runCvc5(int argc, char* argv[], std::unique_ptr& solver) while (status) { if (interrupted) { - dopts.out() << CommandInterrupted(); + dopts.out() << cvc5::CommandInterrupted(); pExecutor->reset(); break; } @@ -241,13 +241,14 @@ int runCvc5(int argc, char* argv[], std::unique_ptr& solver) break; } - if(dynamic_cast(cmd.get()) != nullptr) { + if (dynamic_cast(cmd.get()) != nullptr) + { break; } } } - api::Result result; + cvc5::Result result; if(status) { result = pExecutor->getResult(); returnValue = 0; diff --git a/src/main/interactive_shell.cpp b/src/main/interactive_shell.cpp index b6ded9b94..6759f9c66 100644 --- a/src/main/interactive_shell.cpp +++ b/src/main/interactive_shell.cpp @@ -50,9 +50,9 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { -using namespace parser; +using namespace cvc5::parser; using namespace language; const string InteractiveShell::INPUT_FILENAME = ""; @@ -81,7 +81,7 @@ static set s_declarations; #endif /* HAVE_LIBEDITLINE */ -InteractiveShell::InteractiveShell(api::Solver* solver, +InteractiveShell::InteractiveShell(Solver* solver, SymbolManager* sm, std::istream& in, std::ostream& out) @@ -431,4 +431,4 @@ char* commandGenerator(const char* text, int state) { #endif /* HAVE_LIBEDITLINE */ -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/main/interactive_shell.h b/src/main/interactive_shell.h index 401f7a1c9..2e2bfbf13 100644 --- a/src/main/interactive_shell.h +++ b/src/main/interactive_shell.h @@ -22,56 +22,57 @@ namespace cvc5 { -class Command; - -namespace api { class Solver; -} + +class SymbolManager; namespace parser { class Parser; } // namespace parser -class SymbolManager; - -class InteractiveShell -{ - public: - InteractiveShell(api::Solver* solver, - SymbolManager* sm, - std::istream& in, - std::ostream& out); - - /** - * Close out the interactive session. - */ - ~InteractiveShell(); - - /** - * Read a command from the interactive shell. This will read as - * many lines as necessary to parse a well-formed command. - */ - Command* readCommand(); - - /** - * Return the internal parser being used. - */ - parser::Parser* getParser() { return d_parser.get(); } - - private: - api::Solver* d_solver; - std::istream& d_in; - std::ostream& d_out; - std::unique_ptr d_parser; - bool d_quit; - bool d_usingEditline; - - std::string d_historyFilename; - - static const std::string INPUT_FILENAME; - static const unsigned s_historyLimit = 500; -};/* class InteractiveShell */ - -} // namespace cvc5 + class Command; + + namespace internal { + + class InteractiveShell + { + public: + InteractiveShell(Solver* solver, + SymbolManager* sm, + std::istream& in, + std::ostream& out); + + /** + * Close out the interactive session. + */ + ~InteractiveShell(); + + /** + * Read a command from the interactive shell. This will read as + * many lines as necessary to parse a well-formed command. + */ + Command* readCommand(); + + /** + * Return the internal parser being used. + */ + parser::Parser* getParser() { return d_parser.get(); } + + private: + Solver* d_solver; + std::istream& d_in; + std::ostream& d_out; + std::unique_ptr d_parser; + bool d_quit; + bool d_usingEditline; + + std::string d_historyFilename; + + static const std::string INPUT_FILENAME; + static const unsigned s_historyLimit = 500; + }; /* class InteractiveShell */ + + } // namespace internal + } // namespace cvc5 #endif /* CVC5__INTERACTIVE_SHELL_H */ diff --git a/src/main/main.cpp b/src/main/main.cpp index 26997e084..9910bc7ef 100644 --- a/src/main/main.cpp +++ b/src/main/main.cpp @@ -21,19 +21,19 @@ #include "main/command_executor.h" #include "options/option_exception.h" -using namespace cvc5; +using namespace cvc5::internal; /** * cvc5's main() routine is just an exception-safe wrapper around runCvc5. */ int main(int argc, char* argv[]) { - std::unique_ptr solver = std::make_unique(); + std::unique_ptr solver = std::make_unique(); try { return runCvc5(argc, argv, solver); } - catch (cvc5::api::CVC5ApiOptionException& e) + catch (cvc5::CVC5ApiOptionException& e) { #ifdef CVC5_COMPETITION_MODE solver->getDriverOptions().out() << "unknown" << std::endl; diff --git a/src/main/main.h b/src/main/main.h index 765e85abb..ef1a6003f 100644 --- a/src/main/main.h +++ b/src/main/main.h @@ -22,7 +22,7 @@ #ifndef CVC5__MAIN__MAIN_H #define CVC5__MAIN__MAIN_H -namespace cvc5 { +namespace cvc5::internal { namespace main { class CommandExecutor; @@ -34,7 +34,7 @@ extern const char* progPath; extern std::string progName; /** A reference for use by the signal handlers to print statistics */ -extern std::unique_ptr pExecutor; +extern std::unique_ptr pExecutor; /** * If true, will not spin on segfault even when CVC5_DEBUG is on. @@ -44,9 +44,9 @@ extern std::unique_ptr pExecutor; extern bool segvSpin; } // namespace main -} // namespace cvc5 +} // namespace cvc5::internal /** Actual cvc5 driver functions **/ -int runCvc5(int argc, char* argv[], std::unique_ptr&); +int runCvc5(int argc, char* argv[], std::unique_ptr&); #endif /* CVC5__MAIN__MAIN_H */ diff --git a/src/main/options.h b/src/main/options.h index d3af4994d..7c496bdfc 100644 --- a/src/main/options.h +++ b/src/main/options.h @@ -22,7 +22,7 @@ #include "api/cpp/cvc5.h" -namespace cvc5::main { +namespace cvc5::internal::main { /** * Print overall command-line option usage message to the given output stream @@ -42,11 +42,11 @@ void printUsage(const std::string& binary, std::ostream& os); * * Preconditions: options and argv must be non-null. */ -std::vector parse(api::Solver& solver, +std::vector parse(cvc5::Solver& solver, int argc, char* argv[], std::string& binaryName); -} // namespace cvc5::options +} // namespace cvc5::internal::options #endif diff --git a/src/main/options_template.cpp b/src/main/options_template.cpp index eedf4e04c..dbd71b1c1 100644 --- a/src/main/options_template.cpp +++ b/src/main/options_template.cpp @@ -44,7 +44,7 @@ extern int optreset; #include #include -namespace cvc5::main { +namespace cvc5::internal::main { // clang-format off static const std::string commonOptionsDescription = @@ -117,7 +117,7 @@ std::string suggestCommandLineOptions(const std::string& optionName) optionName.substr(0, optionName.find('='))); } -void parseInternal(api::Solver& solver, +void parseInternal(cvc5::Solver& solver, int argc, char* argv[], std::vector& nonoptions) @@ -234,13 +234,13 @@ void parseInternal(api::Solver& solver, } /** - * Parse argc/argv and put the result into a cvc5::Options. + * Parse argc/argv and put the result into a cvc5::internal::Options. * The return value is what's left of the command line (that is, the * non-option arguments). * * Throws OptionException on failures. */ -std::vector parse(api::Solver& solver, +std::vector parse(cvc5::Solver& solver, int argc, char* argv[], std::string& binaryName) @@ -277,4 +277,4 @@ std::vector parse(api::Solver& solver, return nonoptions; } -} // namespace cvc5::options +} // namespace cvc5::internal::options diff --git a/src/main/signal_handlers.cpp b/src/main/signal_handlers.cpp index 666b90ee2..a531da839 100644 --- a/src/main/signal_handlers.cpp +++ b/src/main/signal_handlers.cpp @@ -38,10 +38,10 @@ #include "main/main.h" #include "util/safe_print.h" -using cvc5::Exception; +using cvc5::internal::Exception; using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace main { /** @@ -345,4 +345,4 @@ void cleanup() noexcept } // namespace signal_handlers } // namespace main -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/main/signal_handlers.h b/src/main/signal_handlers.h index b849198c7..5394dec15 100644 --- a/src/main/signal_handlers.h +++ b/src/main/signal_handlers.h @@ -16,7 +16,7 @@ #ifndef CVC5__MAIN__SIGNAL_HANDLERS_H #define CVC5__MAIN__SIGNAL_HANDLERS_H -namespace cvc5 { +namespace cvc5::internal { namespace main { namespace signal_handlers { @@ -40,6 +40,6 @@ void cleanup(); } // namespace signal_handlers } // namespace main -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__MAIN__SIGNAL_HANDLERS_H */ diff --git a/src/main/time_limit.cpp b/src/main/time_limit.cpp index 698d08c6d..b557729ee 100644 --- a/src/main/time_limit.cpp +++ b/src/main/time_limit.cpp @@ -58,7 +58,7 @@ #include "base/exception.h" #include "signal_handlers.h" -namespace cvc5 { +namespace cvc5::internal { namespace main { #if HAVE_SETITIMER @@ -132,4 +132,4 @@ TimeLimit install_time_limit(uint64_t ms) } } // namespace main -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/main/time_limit.h b/src/main/time_limit.h index 6c9a1920f..74686823e 100644 --- a/src/main/time_limit.h +++ b/src/main/time_limit.h @@ -18,7 +18,7 @@ #include -namespace cvc5 { +namespace cvc5::internal { namespace main { /** @@ -46,6 +46,6 @@ struct TimeLimit TimeLimit install_time_limit(uint64_t ms); } // namespace main -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__MAIN__TIME_LIMIT_H */ diff --git a/src/omt/bitvector_optimizer.cpp b/src/omt/bitvector_optimizer.cpp index a282429c1..5152dc2e9 100644 --- a/src/omt/bitvector_optimizer.cpp +++ b/src/omt/bitvector_optimizer.cpp @@ -19,8 +19,8 @@ #include "smt/solver_engine.h" #include "util/bitvector.h" -using namespace cvc5::smt; -namespace cvc5::omt { +using namespace cvc5::internal::smt; +namespace cvc5::internal::omt { OMTOptimizerBitVector::OMTOptimizerBitVector(bool isSigned) : d_isSigned(isSigned) @@ -219,4 +219,4 @@ OptimizationResult OMTOptimizerBitVector::maximize(SolverEngine* optChecker, return OptimizationResult(lastSatResult, value); } -} // namespace cvc5::omt +} // namespace cvc5::internal::omt diff --git a/src/omt/bitvector_optimizer.h b/src/omt/bitvector_optimizer.h index 671dd1a56..91b5b0eed 100644 --- a/src/omt/bitvector_optimizer.h +++ b/src/omt/bitvector_optimizer.h @@ -18,7 +18,7 @@ #include "omt/omt_optimizer.h" -namespace cvc5::omt { +namespace cvc5::internal::omt { /** * Optimizer for BitVector type @@ -46,6 +46,6 @@ class OMTOptimizerBitVector : public OMTOptimizer bool d_isSigned; }; -} // namespace cvc5::omt +} // namespace cvc5::internal::omt #endif /* CVC5__OMT__BITVECTOR_OPTIMIZER_H */ diff --git a/src/omt/integer_optimizer.cpp b/src/omt/integer_optimizer.cpp index 6ee6f9aa8..c8041f6e5 100644 --- a/src/omt/integer_optimizer.cpp +++ b/src/omt/integer_optimizer.cpp @@ -18,8 +18,8 @@ #include "options/smt_options.h" #include "smt/solver_engine.h" -using namespace cvc5::smt; -namespace cvc5::omt { +using namespace cvc5::internal::smt; +namespace cvc5::internal::omt { OptimizationResult OMTOptimizerInteger::optimize(SolverEngine* optChecker, TNode target, @@ -82,4 +82,4 @@ OptimizationResult OMTOptimizerInteger::maximize(SolverEngine* optChecker, return this->optimize(optChecker, target, false); } -} // namespace cvc5::omt +} // namespace cvc5::internal::omt diff --git a/src/omt/integer_optimizer.h b/src/omt/integer_optimizer.h index 141597449..d2a4a3e14 100644 --- a/src/omt/integer_optimizer.h +++ b/src/omt/integer_optimizer.h @@ -18,7 +18,7 @@ #include "omt/omt_optimizer.h" -namespace cvc5::omt { +namespace cvc5::internal::omt { /** * Optimizer for Integer type @@ -44,6 +44,6 @@ class OMTOptimizerInteger : public OMTOptimizer bool isMinimize); }; -} // namespace cvc5::omt +} // namespace cvc5::internal::omt #endif /* CVC5__OMT__INTEGER_OPTIMIZER_H */ diff --git a/src/omt/omt_optimizer.cpp b/src/omt/omt_optimizer.cpp index 2145492db..925c025e3 100644 --- a/src/omt/omt_optimizer.cpp +++ b/src/omt/omt_optimizer.cpp @@ -18,9 +18,9 @@ #include "omt/bitvector_optimizer.h" #include "omt/integer_optimizer.h" -using namespace cvc5::theory; -using namespace cvc5::smt; -namespace cvc5::omt { +using namespace cvc5::internal::theory; +using namespace cvc5::internal::smt; +namespace cvc5::internal::omt { bool OMTOptimizer::nodeSupportsOptimization(TNode node) { @@ -182,4 +182,4 @@ Node OMTOptimizer::mkWeakIncrementalExpression( Unreachable(); } -} // namespace cvc5::omt +} // namespace cvc5::internal::omt diff --git a/src/omt/omt_optimizer.h b/src/omt/omt_optimizer.h index f92385816..f923ccdf3 100644 --- a/src/omt/omt_optimizer.h +++ b/src/omt/omt_optimizer.h @@ -18,7 +18,7 @@ #include "smt/optimization_solver.h" -namespace cvc5::omt { +namespace cvc5::internal::omt { /** * The base class for optimizers of individual CVC type @@ -120,6 +120,6 @@ class OMTOptimizer TNode target) = 0; }; -} // namespace cvc5::omt +} // namespace cvc5::internal::omt #endif /* CVC5__OMT__OMT_OPTIMIZER_H */ diff --git a/src/options/didyoumean_test.cpp b/src/options/didyoumean_test.cpp index dcfaef715..0d1b6eadc 100644 --- a/src/options/didyoumean_test.cpp +++ b/src/options/didyoumean_test.cpp @@ -24,7 +24,7 @@ #include using namespace std; -using namespace cvc5; +using namespace cvc5::internal; set getDebugTags(); set getOptionStrings(); diff --git a/src/options/io_utils.cpp b/src/options/io_utils.cpp index 5a51e6c3f..75dd3a660 100644 --- a/src/options/io_utils.cpp +++ b/src/options/io_utils.cpp @@ -18,7 +18,7 @@ #include #include -namespace cvc5::options::ioutils { +namespace cvc5::internal::options::ioutils { namespace { template @@ -102,4 +102,4 @@ Scope::Scope(std::ios_base& ios) } Scope::~Scope() { apply(d_ios, d_dagThresh, d_nodeDepth, d_outputLang); } -} // namespace cvc5::options::ioutils +} // namespace cvc5::internal::options::ioutils diff --git a/src/options/io_utils.h b/src/options/io_utils.h index 071c79c36..5f24e5c0b 100644 --- a/src/options/io_utils.h +++ b/src/options/io_utils.h @@ -36,7 +36,7 @@ * streams), `apply*()` will set the given values on the given object while * `get*()` retrieves the specified option. */ -namespace cvc5::options::ioutils { +namespace cvc5::internal::options::ioutils { /** Set the default dag threshold */ void setDefaultDagThresh(int64_t value); /** Set the default node depth */ @@ -87,6 +87,6 @@ class Scope /** The stored output language */ Language d_outputLang; }; -} // namespace cvc5::options::ioutils +} // namespace cvc5::internal::options::ioutils #endif /* CVC5__OPTIONS__IO_UTILS_H */ diff --git a/src/options/language.cpp b/src/options/language.cpp index 6170bcf28..00a13b229 100644 --- a/src/options/language.cpp +++ b/src/options/language.cpp @@ -17,7 +17,7 @@ #include "options/option_exception.h" -namespace cvc5 { +namespace cvc5::internal { std::ostream& operator<<(std::ostream& out, Language lang) { @@ -64,4 +64,4 @@ Language toLanguage(const std::string& language) } } // namespace language -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/options/language.h b/src/options/language.h index 2bf596124..28af03a5e 100644 --- a/src/options/language.h +++ b/src/options/language.h @@ -23,7 +23,7 @@ #include "cvc5_export.h" -namespace cvc5 { +namespace cvc5::internal { enum class Language { @@ -65,6 +65,6 @@ inline bool isLangSygus(Language lang) Language toLanguage(const std::string& language) CVC5_EXPORT; } // namespace language -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__LANGUAGE_H */ diff --git a/src/options/managed_streams.cpp b/src/options/managed_streams.cpp index 935b75a35..6d61bd6ab 100644 --- a/src/options/managed_streams.cpp +++ b/src/options/managed_streams.cpp @@ -27,7 +27,7 @@ #include "options/option_exception.h" -namespace cvc5 { +namespace cvc5::internal { std::string cvc5_errno_failreason() { @@ -151,4 +151,4 @@ bool ManagedOut::specialCases(const std::string& value) return false; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/options/managed_streams.h b/src/options/managed_streams.h index 830916b2f..931699d69 100644 --- a/src/options/managed_streams.h +++ b/src/options/managed_streams.h @@ -24,7 +24,7 @@ #include #include -namespace cvc5 { +namespace cvc5::internal { namespace detail { /* @@ -148,6 +148,6 @@ class ManagedOut : public ManagedStream bool specialCases(const std::string& value) override final; }; -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__OPTIONS__MANAGED_STREAMS_H */ diff --git a/src/options/module_template.cpp b/src/options/module_template.cpp index d2ece3f13..0b44e9298 100644 --- a/src/options/module_template.cpp +++ b/src/options/module_template.cpp @@ -22,10 +22,10 @@ #include "base/check.h" #include "options/option_exception.h" -namespace cvc5::options { +namespace cvc5::internal::options { // clang-format off ${modes_impl}$ // clang-format on -} // namespace cvc5::options +} // namespace cvc5::internal::options diff --git a/src/options/module_template.h b/src/options/module_template.h index 00bf7c0ca..0cc62db97 100644 --- a/src/options/module_template.h +++ b/src/options/module_template.h @@ -27,7 +27,7 @@ ${includes}$ // clang-format on -namespace cvc5::options { +namespace cvc5::internal::options { // clang-format off ${modes_decl}$ @@ -52,6 +52,6 @@ struct Holder${id_cap}$ ${wrapper_functions}$ // clang-format on -} // namespace cvc5::options +} // namespace cvc5::internal::options #endif /* CVC5__OPTIONS__${id_cap}$_H */ diff --git a/src/options/option_exception.cpp b/src/options/option_exception.cpp index 447d3daf7..71911aacd 100644 --- a/src/options/option_exception.cpp +++ b/src/options/option_exception.cpp @@ -15,6 +15,6 @@ #include "options/option_exception.h" -namespace cvc5 { +namespace cvc5::internal { const std::string OptionException::s_errPrefix = "Error in option parsing: "; -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/options/option_exception.h b/src/options/option_exception.h index 928b4c2f1..ca5a82771 100644 --- a/src/options/option_exception.h +++ b/src/options/option_exception.h @@ -21,16 +21,16 @@ #include "cvc5_export.h" #include "base/exception.h" -namespace cvc5 { +namespace cvc5::internal { /** * Class representing an option-parsing exception such as badly-typed * or missing arguments, arguments out of bounds, etc. */ -class CVC5_EXPORT OptionException : public cvc5::Exception +class CVC5_EXPORT OptionException : public cvc5::internal::Exception { public: - OptionException(const std::string& s) : cvc5::Exception(s_errPrefix + s) {} + OptionException(const std::string& s) : cvc5::internal::Exception(s_errPrefix + s) {} /** * Get the error message without the prefix that is automatically added for @@ -46,6 +46,6 @@ class CVC5_EXPORT OptionException : public cvc5::Exception static const std::string s_errPrefix; }; /* class OptionException */ -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__OPTION_EXCEPTION_H */ diff --git a/src/options/options_handler.cpp b/src/options/options_handler.cpp index 82bb6af76..14aa331af 100644 --- a/src/options/options_handler.cpp +++ b/src/options/options_handler.cpp @@ -41,7 +41,7 @@ #include "smt/command.h" #include "util/didyoumean.h" -namespace cvc5 { +namespace cvc5::internal { namespace options { // helper functions @@ -164,11 +164,11 @@ void OptionsHandler::applyOutputLanguage(const std::string& flag, Language lang) void OptionsHandler::setVerbosity(const std::string& flag, int value) { if(Configuration::isMuzzledBuild()) { - TraceChannel.setStream(&cvc5::null_os); - WarningChannel.setStream(&cvc5::null_os); + TraceChannel.setStream(&cvc5::internal::null_os); + WarningChannel.setStream(&cvc5::internal::null_os); } else { if(value < 0) { - WarningChannel.setStream(&cvc5::null_os); + WarningChannel.setStream(&cvc5::internal::null_os); } else { WarningChannel.setStream(&std::cerr); } @@ -293,9 +293,9 @@ void OptionsHandler::enableOutputTag(const std::string& flag, void OptionsHandler::setPrintSuccess(const std::string& flag, bool value) { - TraceChannel.getStream() << Command::printsuccess(value); - Warning.getStream() << Command::printsuccess(value); - *d_options->base.out << Command::printsuccess(value); + TraceChannel.getStream() << cvc5::Command::printsuccess(value); + Warning.getStream() << cvc5::Command::printsuccess(value); + *d_options->base.out << cvc5::Command::printsuccess(value); } void OptionsHandler::setResourceWeight(const std::string& flag, @@ -468,4 +468,4 @@ void OptionsHandler::showTraceTags(const std::string& flag, bool value) } } // namespace options -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/options/options_handler.h b/src/options/options_handler.h index ffa948399..bf97399f2 100644 --- a/src/options/options_handler.h +++ b/src/options/options_handler.h @@ -30,7 +30,7 @@ #include "options/option_exception.h" #include "options/quantifiers_options.h" -namespace cvc5 { +namespace cvc5::internal { class Options; @@ -131,6 +131,6 @@ class OptionsHandler }; /* class OptionHandler */ } // namespace options -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__OPTIONS__OPTIONS_HANDLER_H */ diff --git a/src/options/options_listener.h b/src/options/options_listener.h index 634111610..417ac4231 100644 --- a/src/options/options_listener.h +++ b/src/options/options_listener.h @@ -20,7 +20,7 @@ #include -namespace cvc5 { +namespace cvc5::internal { class OptionsListener { @@ -33,6 +33,6 @@ class OptionsListener virtual void notifySetOption(const std::string& key) = 0; }; -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__OPTIONS__OPTION_LISTENER_H */ diff --git a/src/options/options_public.h b/src/options/options_public.h index a6246a894..137b4f521 100644 --- a/src/options/options_public.h +++ b/src/options/options_public.h @@ -32,7 +32,7 @@ #include "cvc5_export.h" #include "options/options.h" -namespace cvc5::options { +namespace cvc5::internal::options { /** * Get a (sorted) list of all option names that are available. @@ -119,6 +119,6 @@ struct CVC5_EXPORT OptionInfo */ OptionInfo getInfo(const Options& opts, const std::string& name) CVC5_EXPORT; -} // namespace cvc5::options +} // namespace cvc5::internal::options #endif diff --git a/src/options/options_public_template.cpp b/src/options/options_public_template.cpp index 952b4c7f8..d89484878 100644 --- a/src/options/options_public_template.cpp +++ b/src/options/options_public_template.cpp @@ -30,7 +30,7 @@ ${options_includes}$ #include #include -namespace cvc5::options +namespace cvc5::internal::options { // Contains the default option handlers (i.e. parsers) namespace handlers { @@ -231,4 +231,4 @@ OptionInfo getInfo(const Options& opts, const std::string& name) #undef DO_SEMANTIC_CHECKS_BY_DEFAULT -} // namespace cvc5::options +} // namespace cvc5::internal::options diff --git a/src/options/options_template.cpp b/src/options/options_template.cpp index c6f24a41d..46b8c4cba 100644 --- a/src/options/options_template.cpp +++ b/src/options/options_template.cpp @@ -24,7 +24,7 @@ ${headers_module}$ // clang-format on -namespace cvc5 +namespace cvc5::internal { thread_local Options* Options::s_current = nullptr; @@ -50,5 +50,5 @@ ${holder_mem_copy}$ } } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/options/options_template.h b/src/options/options_template.h index 290b96f9e..30b284e2b 100644 --- a/src/options/options_template.h +++ b/src/options/options_template.h @@ -25,7 +25,7 @@ #include "cvc5_export.h" -namespace cvc5 { +namespace cvc5::internal { namespace options { class OptionsHandler; // clang-format off @@ -109,6 +109,6 @@ ${holder_ref_decls}$ }; /* class Options */ -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__OPTIONS__OPTIONS_H */ diff --git a/src/parser/antlr_input.cpp b/src/parser/antlr_input.cpp index a45b20201..32d0a0b48 100644 --- a/src/parser/antlr_input.cpp +++ b/src/parser/antlr_input.cpp @@ -31,8 +31,6 @@ #include "parser/tptp/tptp_input.h" using namespace std; -using namespace cvc5; -using namespace cvc5::parser; namespace cvc5 { namespace parser { diff --git a/src/parser/input.h b/src/parser/input.h index ab732e300..be45fc522 100644 --- a/src/parser/input.h +++ b/src/parser/input.h @@ -35,7 +35,7 @@ class Command; namespace parser { -class InputStreamException : public Exception +class InputStreamException : public internal::Exception { public: InputStreamException(const std::string& msg); @@ -161,11 +161,11 @@ class CVC5_EXPORT Input /** Parse an expression from the input by invoking the * implementation-specific parsing method. Returns a null - * api::Term if there is no expression there to parse. + * cvc5::Term if there is no expression there to parse. * * @throws ParserException if an error is encountered during parsing. */ - virtual api::Term parseExpr() = 0; + virtual cvc5::Term parseExpr() = 0; /** Set the Parser object for this input. */ virtual void setParser(Parser& parser) = 0; diff --git a/src/parser/parse_op.cpp b/src/parser/parse_op.cpp index ef7ddec2e..3e36b4abb 100644 --- a/src/parser/parse_op.cpp +++ b/src/parser/parse_op.cpp @@ -29,7 +29,7 @@ std::ostream& operator<<(std::ostream& os, const ParseOp& p) { out << " :op " << p.d_op; } - if (p.d_kind != api::NULL_TERM) + if (p.d_kind != cvc5::NULL_TERM) { out << " :kind " << p.d_kind; } diff --git a/src/parser/parse_op.h b/src/parser/parse_op.h index c5d2c459b..d658d8b6c 100644 --- a/src/parser/parse_op.h +++ b/src/parser/parse_op.h @@ -59,19 +59,19 @@ namespace cvc5 { */ struct ParseOp { - ParseOp(api::Kind k = api::NULL_TERM) : d_kind(k) {} + ParseOp(cvc5::Kind k = cvc5::NULL_TERM) : d_kind(k) {} /** The kind associated with the parsed operator, if it exists */ - api::Kind d_kind; + cvc5::Kind d_kind; /** The name associated with the parsed operator, if it exists */ std::string d_name; /** The expression associated with the parsed operator, if it exists */ - api::Term d_expr; + cvc5::Term d_expr; /** The type associated with the parsed operator, if it exists */ - api::Sort d_type; + cvc5::Sort d_type; /** The operator associated with the parsed operator, if it exists */ - api::Op d_op; + cvc5::Op d_op; /** - * The indices if the operator is indexed, but api::Op is the null operator. + * The indices if the operator is indexed, but cvc5::Op is the null operator. * This is the case for operator symbols that cannot be resolved to a kind * without parsing the arguments. This is currently only the case for * `to_fp`. diff --git a/src/parser/parser.cpp b/src/parser/parser.cpp index a7bf82fb7..ac93ca191 100644 --- a/src/parser/parser.cpp +++ b/src/parser/parser.cpp @@ -35,7 +35,7 @@ using namespace std; namespace cvc5 { namespace parser { -Parser::Parser(api::Solver* solver, +Parser::Parser(cvc5::Solver* solver, SymbolManager* sm, bool strictMode, bool parseOnly) @@ -63,9 +63,9 @@ Parser::~Parser() { d_commandQueue.clear(); } -api::Solver* Parser::getSolver() const { return d_solver; } +cvc5::Solver* Parser::getSolver() const { return d_solver; } -api::Term Parser::getSymbol(const std::string& name, SymbolType type) +cvc5::Term Parser::getSymbol(const std::string& name, SymbolType type) { checkDeclaration(name, CHECK_DECLARED, type); Assert(isDeclared(name, type)); @@ -81,28 +81,28 @@ void Parser::forceLogic(const std::string& logic) d_forcedLogic = logic; } -api::Term Parser::getVariable(const std::string& name) +cvc5::Term Parser::getVariable(const std::string& name) { return getSymbol(name, SYM_VARIABLE); } -api::Term Parser::getFunction(const std::string& name) +cvc5::Term Parser::getFunction(const std::string& name) { return getSymbol(name, SYM_VARIABLE); } -api::Term Parser::getExpressionForName(const std::string& name) +cvc5::Term Parser::getExpressionForName(const std::string& name) { - api::Sort t; + cvc5::Sort t; return getExpressionForNameAndType(name, t); } -api::Term Parser::getExpressionForNameAndType(const std::string& name, - api::Sort t) +cvc5::Term Parser::getExpressionForNameAndType(const std::string& name, + cvc5::Sort t) { Assert(isDeclared(name)); // first check if the variable is declared and not overloaded - api::Term expr = getVariable(name); + cvc5::Term expr = getVariable(name); if(expr.isNull()) { // the variable is overloaded, try with type if the type exists if(!t.isNull()) { @@ -118,57 +118,57 @@ api::Term Parser::getExpressionForNameAndType(const std::string& name, } // now, post-process the expression Assert(!expr.isNull()); - api::Sort te = expr.getSort(); + cvc5::Sort te = expr.getSort(); if (te.isConstructor() && te.getConstructorArity() == 0) { // nullary constructors have APPLY_CONSTRUCTOR kind with no children - expr = d_solver->mkTerm(api::APPLY_CONSTRUCTOR, {expr}); + expr = d_solver->mkTerm(cvc5::APPLY_CONSTRUCTOR, {expr}); } return expr; } -bool Parser::getTesterName(api::Term cons, std::string& name) { return false; } +bool Parser::getTesterName(cvc5::Term cons, std::string& name) { return false; } -api::Kind Parser::getKindForFunction(api::Term fun) +cvc5::Kind Parser::getKindForFunction(cvc5::Term fun) { - api::Sort t = fun.getSort(); + cvc5::Sort t = fun.getSort(); if (t.isFunction()) { - return api::APPLY_UF; + return cvc5::APPLY_UF; } else if (t.isConstructor()) { - return api::APPLY_CONSTRUCTOR; + return cvc5::APPLY_CONSTRUCTOR; } else if (t.isSelector()) { - return api::APPLY_SELECTOR; + return cvc5::APPLY_SELECTOR; } else if (t.isTester()) { - return api::APPLY_TESTER; + return cvc5::APPLY_TESTER; } else if (t.isUpdater()) { - return api::APPLY_UPDATER; + return cvc5::APPLY_UPDATER; } - return api::UNDEFINED_KIND; + return cvc5::UNDEFINED_KIND; } -api::Sort Parser::getSort(const std::string& name) +cvc5::Sort Parser::getSort(const std::string& name) { checkDeclaration(name, CHECK_DECLARED, SYM_SORT); Assert(isDeclared(name, SYM_SORT)); - api::Sort t = d_symtab->lookupType(name); + cvc5::Sort t = d_symtab->lookupType(name); return t; } -api::Sort Parser::getSort(const std::string& name, - const std::vector& params) +cvc5::Sort Parser::getSort(const std::string& name, + const std::vector& params) { checkDeclaration(name, CHECK_DECLARED, SYM_SORT); Assert(isDeclared(name, SYM_SORT)); - api::Sort t = d_symtab->lookupType(name, params); + cvc5::Sort t = d_symtab->lookupType(name, params); return t; } @@ -180,71 +180,71 @@ size_t Parser::getArity(const std::string& sort_name) { /* Returns true if name is bound to a boolean variable. */ bool Parser::isBoolean(const std::string& name) { - api::Term expr = getVariable(name); + cvc5::Term expr = getVariable(name); return !expr.isNull() && expr.getSort().isBoolean(); } -bool Parser::isFunctionLike(api::Term fun) +bool Parser::isFunctionLike(cvc5::Term fun) { if(fun.isNull()) { return false; } - api::Sort type = fun.getSort(); + cvc5::Sort type = fun.getSort(); return type.isFunction() || type.isConstructor() || type.isTester() || type.isSelector(); } /* Returns true if name is bound to a function returning boolean. */ bool Parser::isPredicate(const std::string& name) { - api::Term expr = getVariable(name); + cvc5::Term expr = getVariable(name); return !expr.isNull() && expr.getSort().isPredicate(); } -api::Term Parser::bindVar(const std::string& name, - const api::Sort& type, - bool doOverload) +cvc5::Term Parser::bindVar(const std::string& name, + const cvc5::Sort& type, + bool doOverload) { Trace("parser") << "bindVar(" << name << ", " << type << ")" << std::endl; - api::Term expr = d_solver->mkConst(type, name); + cvc5::Term expr = d_solver->mkConst(type, name); defineVar(name, expr, doOverload); return expr; } -api::Term Parser::bindBoundVar(const std::string& name, const api::Sort& type) +cvc5::Term Parser::bindBoundVar(const std::string& name, const cvc5::Sort& type) { Trace("parser") << "bindBoundVar(" << name << ", " << type << ")" << std::endl; - api::Term expr = d_solver->mkVar(type, name); + cvc5::Term expr = d_solver->mkVar(type, name); defineVar(name, expr); return expr; } -std::vector Parser::bindBoundVars( - std::vector >& sortedVarNames) +std::vector Parser::bindBoundVars( + std::vector >& sortedVarNames) { - std::vector vars; - for (std::pair& i : sortedVarNames) + std::vector vars; + for (std::pair& i : sortedVarNames) { vars.push_back(bindBoundVar(i.first, i.second)); } return vars; } -std::vector Parser::bindVars(const std::vector names, - const api::Sort& type, - bool doOverload) +std::vector Parser::bindVars(const std::vector names, + const cvc5::Sort& type, + bool doOverload) { - std::vector vars; + std::vector vars; for (unsigned i = 0; i < names.size(); ++i) { vars.push_back(bindVar(names[i], type, doOverload)); } return vars; } -std::vector Parser::bindBoundVars( - const std::vector names, const api::Sort& type) +std::vector Parser::bindBoundVars( + const std::vector names, const cvc5::Sort& type) { - std::vector vars; + std::vector vars; for (unsigned i = 0; i < names.size(); ++i) { vars.push_back(bindBoundVar(names[i], type)); } @@ -252,7 +252,7 @@ std::vector Parser::bindBoundVars( } void Parser::defineVar(const std::string& name, - const api::Term& val, + const cvc5::Term& val, bool doOverload) { Trace("parser") << "defineVar( " << name << " := " << val << ")" << std::endl; @@ -267,7 +267,7 @@ void Parser::defineVar(const std::string& name, } void Parser::defineType(const std::string& name, - const api::Sort& type, + const cvc5::Sort& type, bool skipExisting) { if (skipExisting && isDeclared(name, SYM_SORT)) @@ -280,16 +280,16 @@ void Parser::defineType(const std::string& name, } void Parser::defineType(const std::string& name, - const std::vector& params, - const api::Sort& type) + const std::vector& params, + const cvc5::Sort& type) { d_symtab->bindType(name, params, type); Assert(isDeclared(name, SYM_SORT)); } void Parser::defineParameterizedType(const std::string& name, - const std::vector& params, - const api::Sort& type) + const std::vector& params, + const cvc5::Sort& type) { if (TraceIsOn("parser")) { Trace("parser") << "defineParameterizedType(" << name << ", " @@ -297,7 +297,7 @@ void Parser::defineParameterizedType(const std::string& name, if (params.size() > 0) { copy(params.begin(), params.end() - 1, - ostream_iterator(Trace("parser"), ", ")); + ostream_iterator(Trace("parser"), ", ")); Trace("parser") << params.back(); } Trace("parser") << "], " << type << ")" << std::endl; @@ -305,55 +305,55 @@ void Parser::defineParameterizedType(const std::string& name, defineType(name, params, type); } -api::Sort Parser::mkSort(const std::string& name) +cvc5::Sort Parser::mkSort(const std::string& name) { Trace("parser") << "newSort(" << name << ")" << std::endl; - api::Sort type = d_solver->mkUninterpretedSort(name); + cvc5::Sort type = d_solver->mkUninterpretedSort(name); defineType(name, type); return type; } -api::Sort Parser::mkSortConstructor(const std::string& name, size_t arity) +cvc5::Sort Parser::mkSortConstructor(const std::string& name, size_t arity) { Trace("parser") << "newSortConstructor(" << name << ", " << arity << ")" << std::endl; - api::Sort type = d_solver->mkUninterpretedSortConstructorSort(name, arity); - defineType(name, vector(arity), type); + cvc5::Sort type = d_solver->mkUninterpretedSortConstructorSort(name, arity); + defineType(name, vector(arity), type); return type; } -api::Sort Parser::mkUnresolvedType(const std::string& name) +cvc5::Sort Parser::mkUnresolvedType(const std::string& name) { - api::Sort unresolved = d_solver->mkUninterpretedSort(name); + cvc5::Sort unresolved = d_solver->mkUninterpretedSort(name); defineType(name, unresolved); d_unresolved.insert(unresolved); return unresolved; } -api::Sort Parser::mkUnresolvedTypeConstructor(const std::string& name, - size_t arity) +cvc5::Sort Parser::mkUnresolvedTypeConstructor(const std::string& name, + size_t arity) { - api::Sort unresolved = + cvc5::Sort unresolved = d_solver->mkUninterpretedSortConstructorSort(name, arity); - defineType(name, vector(arity), unresolved); + defineType(name, vector(arity), unresolved); d_unresolved.insert(unresolved); return unresolved; } -api::Sort Parser::mkUnresolvedTypeConstructor( - const std::string& name, const std::vector& params) +cvc5::Sort Parser::mkUnresolvedTypeConstructor( + const std::string& name, const std::vector& params) { Trace("parser") << "newSortConstructor(P)(" << name << ", " << params.size() << ")" << std::endl; - api::Sort unresolved = + cvc5::Sort unresolved = d_solver->mkUninterpretedSortConstructorSort(name, params.size()); defineType(name, params, unresolved); - api::Sort t = getSort(name, params); + cvc5::Sort t = getSort(name, params); d_unresolved.insert(unresolved); return unresolved; } -api::Sort Parser::mkUnresolvedType(const std::string& name, size_t arity) +cvc5::Sort Parser::mkUnresolvedType(const std::string& name, size_t arity) { if (arity == 0) { @@ -369,18 +369,18 @@ bool Parser::isUnresolvedType(const std::string& name) { return d_unresolved.find(getSort(name)) != d_unresolved.end(); } -std::vector Parser::bindMutualDatatypeTypes( - std::vector& datatypes, bool doOverload) +std::vector Parser::bindMutualDatatypeTypes( + std::vector& datatypes, bool doOverload) { try { - std::vector types = + std::vector types = d_solver->mkDatatypeSorts(datatypes, d_unresolved); Assert(datatypes.size() == types.size()); for (unsigned i = 0; i < datatypes.size(); ++i) { - api::Sort t = types[i]; - const api::Datatype& dt = t.getDatatype(); + cvc5::Sort t = types[i]; + const cvc5::Datatype& dt = t.getDatatype(); const std::string& name = dt.getName(); Trace("parser-idt") << "define " << name << " as " << t << std::endl; if (isDeclared(name, SYM_SORT)) { @@ -388,7 +388,7 @@ std::vector Parser::bindMutualDatatypeTypes( } if (dt.isParametric()) { - std::vector paramTypes = dt.getParameters(); + std::vector paramTypes = dt.getParameters(); defineType(name, paramTypes, t); } else @@ -399,8 +399,8 @@ std::vector Parser::bindMutualDatatypeTypes( std::unordered_set< std::string > selNames; for (size_t j = 0, ncons = dt.getNumConstructors(); j < ncons; j++) { - const api::DatatypeConstructor& ctor = dt[j]; - api::Term constructor = ctor.getConstructorTerm(); + const cvc5::DatatypeConstructor& ctor = dt[j]; + cvc5::Term constructor = ctor.getConstructorTerm(); Trace("parser-idt") << "+ define " << constructor << std::endl; string constructorName = ctor.getName(); if(consNames.find(constructorName)==consNames.end()) { @@ -415,7 +415,7 @@ std::vector Parser::bindMutualDatatypeTypes( std::string testerName; if (getTesterName(constructor, testerName)) { - api::Term tester = ctor.getTesterTerm(); + cvc5::Term tester = ctor.getTesterTerm(); Trace("parser-idt") << "+ define " << testerName << std::endl; if (!doOverload) { @@ -425,8 +425,8 @@ std::vector Parser::bindMutualDatatypeTypes( } for (size_t k = 0, nargs = ctor.getNumSelectors(); k < nargs; k++) { - const api::DatatypeSelector& sel = ctor[k]; - api::Term selector = sel.getSelectorTerm(); + const cvc5::DatatypeSelector& sel = ctor[k]; + cvc5::Term selector = sel.getSelectorTerm(); Trace("parser-idt") << "+++ define " << selector << std::endl; string selectorName = sel.getName(); if(selNames.find(selectorName)==selNames.end()) { @@ -449,31 +449,33 @@ std::vector Parser::bindMutualDatatypeTypes( // throw exception if any datatype is not well-founded for (unsigned i = 0; i < datatypes.size(); ++i) { - const api::Datatype& dt = types[i].getDatatype(); + const cvc5::Datatype& dt = types[i].getDatatype(); if (!dt.isCodatatype() && !dt.isWellFounded()) { throw ParserException(dt.getName() + " is not well-founded"); } } return types; - } catch (IllegalArgumentException& ie) { + } + catch (internal::IllegalArgumentException& ie) + { throw ParserException(ie.getMessage()); } } -api::Sort Parser::mkFlatFunctionType(std::vector& sorts, - api::Sort range, - std::vector& flattenVars) +cvc5::Sort Parser::mkFlatFunctionType(std::vector& sorts, + cvc5::Sort range, + std::vector& flattenVars) { if (range.isFunction()) { - std::vector domainTypes = range.getFunctionDomainSorts(); + std::vector domainTypes = range.getFunctionDomainSorts(); for (unsigned i = 0, size = domainTypes.size(); i < size; i++) { sorts.push_back(domainTypes[i]); // the introduced variable is internal (not parsable) std::stringstream ss; ss << "__flatten_var_" << i; - api::Term v = d_solver->mkVar(domainTypes[i], ss.str()); + cvc5::Term v = d_solver->mkVar(domainTypes[i], ss.str()); flattenVars.push_back(v); } range = range.getFunctionCodomainSort(); @@ -485,8 +487,8 @@ api::Sort Parser::mkFlatFunctionType(std::vector& sorts, return d_solver->mkFunctionSort(sorts, range); } -api::Sort Parser::mkFlatFunctionType(std::vector& sorts, - api::Sort range) +cvc5::Sort Parser::mkFlatFunctionType(std::vector& sorts, + cvc5::Sort range) { if (sorts.empty()) { @@ -496,7 +498,7 @@ api::Sort Parser::mkFlatFunctionType(std::vector& sorts, if (TraceIsOn("parser")) { Trace("parser") << "mkFlatFunctionType: range " << range << " and domains "; - for (api::Sort t : sorts) + for (cvc5::Sort t : sorts) { Trace("parser") << " " << t; } @@ -504,34 +506,35 @@ api::Sort Parser::mkFlatFunctionType(std::vector& sorts, } while (range.isFunction()) { - std::vector domainTypes = range.getFunctionDomainSorts(); + std::vector domainTypes = range.getFunctionDomainSorts(); sorts.insert(sorts.end(), domainTypes.begin(), domainTypes.end()); range = range.getFunctionCodomainSort(); } return d_solver->mkFunctionSort(sorts, range); } -api::Term Parser::mkHoApply(api::Term expr, const std::vector& args) +cvc5::Term Parser::mkHoApply(cvc5::Term expr, + const std::vector& args) { for (unsigned i = 0; i < args.size(); i++) { - expr = d_solver->mkTerm(api::HO_APPLY, {expr, args[i]}); + expr = d_solver->mkTerm(cvc5::HO_APPLY, {expr, args[i]}); } return expr; } -api::Term Parser::applyTypeAscription(api::Term t, api::Sort s) +cvc5::Term Parser::applyTypeAscription(cvc5::Term t, cvc5::Sort s) { - api::Kind k = t.getKind(); - if (k == api::SET_EMPTY) + cvc5::Kind k = t.getKind(); + if (k == cvc5::SET_EMPTY) { t = d_solver->mkEmptySet(s); } - else if (k == api::BAG_EMPTY) + else if (k == cvc5::BAG_EMPTY) { t = d_solver->mkEmptyBag(s); } - else if (k == api::CONST_SEQUENCE) + else if (k == cvc5::CONST_SEQUENCE) { if (!s.isSequence()) { @@ -547,30 +550,30 @@ api::Term Parser::applyTypeAscription(api::Term t, api::Sort s) } t = d_solver->mkEmptySequence(s.getSequenceElementSort()); } - else if (k == api::SET_UNIVERSE) + else if (k == cvc5::SET_UNIVERSE) { t = d_solver->mkUniverseSet(s); } - else if (k == api::SEP_NIL) + else if (k == cvc5::SEP_NIL) { t = d_solver->mkSepNil(s); } - else if (k == api::APPLY_CONSTRUCTOR) + else if (k == cvc5::APPLY_CONSTRUCTOR) { - std::vector children(t.begin(), t.end()); + std::vector children(t.begin(), t.end()); // apply type ascription to the operator and reconstruct children[0] = applyTypeAscription(children[0], s); - t = d_solver->mkTerm(api::APPLY_CONSTRUCTOR, children); + t = d_solver->mkTerm(cvc5::APPLY_CONSTRUCTOR, children); } // !!! temporary until datatypes are refactored in the new API - api::Sort etype = t.getSort(); + cvc5::Sort etype = t.getSort(); if (etype.isConstructor()) { // Type ascriptions only have an effect on the node structure if this is a // parametric datatype. // get the datatype that t belongs to - api::Sort etyped = etype.getConstructorCodomainSort(); - api::Datatype d = etyped.getDatatype(); + cvc5::Sort etyped = etype.getConstructorCodomainSort(); + cvc5::Datatype d = etyped.getDatatype(); // Note that we check whether the datatype is parametric, and not whether // etyped is a parametric datatype, since e.g. the smt2 parser constructs // an arbitrary instantitated constructor term before it is resolved. @@ -579,7 +582,7 @@ api::Term Parser::applyTypeAscription(api::Term t, api::Sort s) if (d.isParametric()) { // lookup by name - api::DatatypeConstructor dc = d.getConstructor(t.toString()); + cvc5::DatatypeConstructor dc = d.getConstructor(t.toString()); // ask the constructor for the specialized constructor term t = dc.getInstantiatedConstructorTerm(s); } @@ -597,7 +600,7 @@ api::Term Parser::applyTypeAscription(api::Term t, api::Sort s) // Otherwise, check that the type is correct. Type ascriptions in SMT-LIB 2.6 // referred to the range of function sorts. Note that this is only a check // and does not impact the returned term. - api::Sort checkSort = t.getSort(); + cvc5::Sort checkSort = t.getSort(); if (checkSort.isFunction()) { checkSort = checkSort.getFunctionCodomainSort(); @@ -655,7 +658,7 @@ void Parser::checkDeclaration(const std::string& varName, } } -void Parser::checkFunctionLike(api::Term fun) +void Parser::checkFunctionLike(cvc5::Term fun) { if (d_checksEnabled && !isFunctionLike(fun)) { stringstream ss; @@ -666,7 +669,7 @@ void Parser::checkFunctionLike(api::Term fun) } } -void Parser::addOperator(api::Kind kind) { d_logicOperators.insert(kind); } +void Parser::addOperator(cvc5::Kind kind) { d_logicOperators.insert(kind); } void Parser::preemptCommand(Command* cmd) { d_commandQueue.push_back(cmd); } Command* Parser::nextCommand() @@ -696,10 +699,10 @@ Command* Parser::nextCommand() return cmd; } -api::Term Parser::nextExpression() +cvc5::Term Parser::nextExpression() { Trace("parser") << "nextExpression()" << std::endl; - api::Term result; + cvc5::Term result; if (!done()) { try { result = d_input->parseExpr(); @@ -739,13 +742,13 @@ void Parser::pushGetValueScope() // we must bind all relevant uninterpreted constants, which coincide with // the set of uninterpreted constants that are printed in the definition // of a model. - std::vector declareSorts = d_symman->getModelDeclareSorts(); + std::vector declareSorts = d_symman->getModelDeclareSorts(); Trace("parser") << "Push get value scope, with " << declareSorts.size() << " declared sorts" << std::endl; - for (const api::Sort& s : declareSorts) + for (const cvc5::Sort& s : declareSorts) { - std::vector elements = d_solver->getModelDomainElements(s); - for (const api::Term& e : elements) + std::vector elements = d_solver->getModelDomainElements(s); + for (const cvc5::Term& e : elements) { defineVar(e.getUninterpretedSortValue(), e); } @@ -916,7 +919,7 @@ std::wstring Parser::processAdHocStringEsc(const std::string& s) return res; } -api::Term Parser::mkStringConstant(const std::string& s) +cvc5::Term Parser::mkStringConstant(const std::string& s) { if (d_solver->getOption("input-language") == "LANG_SMTLIB_V2_6") { @@ -927,7 +930,7 @@ api::Term Parser::mkStringConstant(const std::string& s) return d_solver->mkString(str); } -api::Term Parser::mkCharConstant(const std::string& s) +cvc5::Term Parser::mkCharConstant(const std::string& s) { Assert(s.find_first_not_of("0123456789abcdefABCDEF", 0) == std::string::npos && s.size() <= 5 && s.size() > 0) diff --git a/src/parser/parser.h b/src/parser/parser.h index 6781fc4f9..de7e029fa 100644 --- a/src/parser/parser.h +++ b/src/parser/parser.h @@ -118,7 +118,7 @@ private: /** * This current symbol table used by this parser, from symbol manager. */ - SymbolTable* d_symtab; + internal::SymbolTable* d_symtab; /** * The level of the assertions in the declaration scope. Things declared @@ -159,7 +159,7 @@ private: std::string d_forcedLogic; /** The set of operators available in the current logic. */ - std::set d_logicOperators; + std::set d_logicOperators; /** The set of attributes already warned about. */ std::set d_attributesWarnedAbout; @@ -171,7 +171,7 @@ private: * depend on mkMutualDatatypeTypes() to check everything and clear * this out. */ - std::set d_unresolved; + std::set d_unresolved; /** * "Preemption commands": extra commands implied by subterms that @@ -185,11 +185,11 @@ private: /** Lookup a symbol in the given namespace (as specified by the type). * Only returns a symbol if it is not overloaded, returns null otherwise. */ - api::Term getSymbol(const std::string& var_name, SymbolType type); + cvc5::Term getSymbol(const std::string& var_name, SymbolType type); protected: /** The API Solver object. */ - api::Solver* d_solver; + cvc5::Solver* d_solver; /** * Create a parser state. @@ -205,7 +205,7 @@ protected: * need not be performed, like those about unimplemented features, @see * unimplementedFeature()) */ - Parser(api::Solver* solver, + Parser(cvc5::Solver* solver, SymbolManager* sm, bool strictMode = false, bool parseOnly = false); @@ -215,13 +215,13 @@ public: virtual ~Parser(); /** Get the associated solver. */ - api::Solver* getSolver() const; + cvc5::Solver* getSolver() const; /** Get the associated input. */ Input* getInput() const { return d_input.get(); } /** Get unresolved sorts */ - inline std::set& getUnresolvedSorts() { return d_unresolved; } + inline std::set& getUnresolvedSorts() { return d_unresolved; } /** Deletes and replaces the current parser input. */ void setInput(Input* input) { @@ -279,7 +279,7 @@ public: * @return the variable expression * Only returns a variable if its name is not overloaded, returns null otherwise. */ - api::Term getVariable(const std::string& name); + cvc5::Term getVariable(const std::string& name); /** * Gets the function currently bound to name. @@ -288,7 +288,7 @@ public: * @return the variable expression * Only returns a function if its name is not overloaded, returns null otherwise. */ - api::Term getFunction(const std::string& name); + cvc5::Term getFunction(const std::string& name); /** * Returns the expression that name should be interpreted as, based on the current binding. @@ -299,7 +299,7 @@ public: * a nullary constructor or a defined function. * Only returns an expression if its name is not overloaded, returns null otherwise. */ - virtual api::Term getExpressionForName(const std::string& name); + virtual cvc5::Term getExpressionForName(const std::string& name); /** * Returns the expression that name should be interpreted as, based on the @@ -307,8 +307,8 @@ public: * * This is the same as above but where the name has been type cast to t. */ - virtual api::Term getExpressionForNameAndType(const std::string& name, - api::Sort t); + virtual cvc5::Term getExpressionForNameAndType(const std::string& name, + cvc5::Sort t); /** * If this method returns true, then name is updated with the tester name @@ -324,7 +324,7 @@ public: * the above syntax if strict mode is disabled. * - In cvc, the syntax for testers is "is_cons". */ - virtual bool getTesterName(api::Term cons, std::string& name); + virtual bool getTesterName(cvc5::Term cons, std::string& name); /** * Returns the kind that should be used for applications of expression fun. @@ -336,19 +336,19 @@ public: * APPLY_UF if fun has function type, * APPLY_CONSTRUCTOR if fun has constructor type. */ - api::Kind getKindForFunction(api::Term fun); + cvc5::Kind getKindForFunction(cvc5::Term fun); /** * Returns a sort, given a name. * @param sort_name the name to look up */ - api::Sort getSort(const std::string& sort_name); + cvc5::Sort getSort(const std::string& sort_name); /** * Returns a (parameterized) sort, given a name and args. */ - api::Sort getSort(const std::string& sort_name, - const std::vector& params); + cvc5::Sort getSort(const std::string& sort_name, + const std::vector& params); /** * Returns arity of a (parameterized) sort, given a name and args. @@ -386,7 +386,7 @@ public: * @throws ParserException if checks are enabled and fun is not * a function */ - void checkFunctionLike(api::Term fun); + void checkFunctionLike(cvc5::Term fun); /** Create a new cvc5 variable expression of the given type. * @@ -395,9 +395,9 @@ public: * else if doOverload is false, the existing expression is shadowed by the * new expression. */ - api::Term bindVar(const std::string& name, - const api::Sort& type, - bool doOverload = false); + cvc5::Term bindVar(const std::string& name, + const cvc5::Sort& type, + bool doOverload = false); /** * Create a set of new cvc5 variable expressions of the given type. @@ -407,22 +407,22 @@ public: * else if doOverload is false, the existing expression is shadowed by the * new expression. */ - std::vector bindVars(const std::vector names, - const api::Sort& type, - bool doOverload = false); + std::vector bindVars(const std::vector names, + const cvc5::Sort& type, + bool doOverload = false); /** * Create a new cvc5 bound variable expression of the given type. This binds * the symbol name to that variable in the current scope. */ - api::Term bindBoundVar(const std::string& name, const api::Sort& type); + cvc5::Term bindBoundVar(const std::string& name, const cvc5::Sort& type); /** * Create a new cvc5 bound variable expressions of the given names and types. * Like the method above, this binds these names to those variables in the * current scope. */ - std::vector bindBoundVars( - std::vector >& sortedVarNames); + std::vector bindBoundVars( + std::vector >& sortedVarNames); /** * Create a set of new cvc5 bound variable expressions of the given type. @@ -432,8 +432,8 @@ public: * else if doOverload is false, the existing expression is shadowed by the * new expression. */ - std::vector bindBoundVars(const std::vector names, - const api::Sort& type); + std::vector bindBoundVars(const std::vector names, + const cvc5::Sort& type); /** Create a new variable definition (e.g., from a let binding). * If a symbol with name already exists, @@ -442,7 +442,7 @@ public: * new expression. */ void defineVar(const std::string& name, - const api::Term& val, + const cvc5::Term& val, bool doOverload = false); /** @@ -455,7 +455,7 @@ public: * the definition is the exact same as the existing one. */ void defineType(const std::string& name, - const api::Sort& type, + const cvc5::Sort& type, bool skipExisting = false); /** @@ -466,47 +466,47 @@ public: * @param type The type that should be associated with the name */ void defineType(const std::string& name, - const std::vector& params, - const api::Sort& type); + const std::vector& params, + const cvc5::Sort& type); /** Create a new type definition (e.g., from an SMT-LIBv2 define-sort). */ void defineParameterizedType(const std::string& name, - const std::vector& params, - const api::Sort& type); + const std::vector& params, + const cvc5::Sort& type); /** * Creates a new sort with the given name. */ - api::Sort mkSort(const std::string& name); + cvc5::Sort mkSort(const std::string& name); /** * Creates a new sort constructor with the given name and arity. */ - api::Sort mkSortConstructor(const std::string& name, size_t arity); + cvc5::Sort mkSortConstructor(const std::string& name, size_t arity); /** * Creates a new "unresolved type," used only during parsing. */ - api::Sort mkUnresolvedType(const std::string& name); + cvc5::Sort mkUnresolvedType(const std::string& name); /** * Creates a new unresolved (parameterized) type constructor of the given * arity. */ - api::Sort mkUnresolvedTypeConstructor(const std::string& name, size_t arity); + cvc5::Sort mkUnresolvedTypeConstructor(const std::string& name, size_t arity); /** * Creates a new unresolved (parameterized) type constructor given the type * parameters. */ - api::Sort mkUnresolvedTypeConstructor(const std::string& name, - const std::vector& params); + cvc5::Sort mkUnresolvedTypeConstructor(const std::string& name, + const std::vector& params); /** * Creates a new unresolved (parameterized) type constructor of the given * arity. Calls either mkUnresolvedType or mkUnresolvedTypeConstructor * depending on the arity. */ - api::Sort mkUnresolvedType(const std::string& name, size_t arity); + cvc5::Sort mkUnresolvedType(const std::string& name, size_t arity); /** * Returns true IFF name is an unresolved type. @@ -522,8 +522,8 @@ public: * doOverload is false, the existing expression is shadowed by the new * expression. */ - std::vector bindMutualDatatypeTypes( - std::vector& datatypes, bool doOverload = false); + std::vector bindMutualDatatypeTypes( + std::vector& datatypes, bool doOverload = false); /** make flat function type * @@ -563,9 +563,9 @@ public: * where @ is (higher-order) application. In this example, z is added to * flattenVars. */ - api::Sort mkFlatFunctionType(std::vector& sorts, - api::Sort range, - std::vector& flattenVars); + cvc5::Sort mkFlatFunctionType(std::vector& sorts, + cvc5::Sort range, + std::vector& flattenVars); /** make flat function type * @@ -573,7 +573,8 @@ public: * This is used when the arguments of the function are not important (for * instance, if we are only using this type in a declare-fun). */ - api::Sort mkFlatFunctionType(std::vector& sorts, api::Sort range); + cvc5::Sort mkFlatFunctionType(std::vector& sorts, + cvc5::Sort range); /** make higher-order apply * @@ -588,7 +589,7 @@ public: * for each i where 0 <= i < args.size(). If expr is not of this * type, the expression returned by this method will not be well typed. */ - api::Term mkHoApply(api::Term expr, const std::vector& args); + cvc5::Term mkHoApply(cvc5::Term expr, const std::vector& args); /** Apply type ascription * @@ -613,14 +614,14 @@ public: * @param s The sort to ascribe * @return Term t with sort s ascribed. */ - api::Term applyTypeAscription(api::Term t, api::Sort s); + cvc5::Term applyTypeAscription(cvc5::Term t, cvc5::Sort s); /** * Add an operator to the current legal set. * * @param kind the built-in operator to add */ - void addOperator(api::Kind kind); + void addOperator(cvc5::Kind kind); /** * Preempt the next returned command with other ones; used to @@ -637,7 +638,7 @@ public: * Currently this means its type is either a function, constructor, tester, or * selector. */ - bool isFunctionLike(api::Term fun); + bool isFunctionLike(cvc5::Term fun); /** Is the symbol bound to a predicate? */ bool isPredicate(const std::string& name); @@ -646,7 +647,7 @@ public: Command* nextCommand(); /** Parse and return the next expression. */ - api::Term nextExpression(); + cvc5::Term nextExpression(); /** Issue a warning to the user. */ void warning(const std::string& msg) { d_input->warning(msg); } @@ -716,7 +717,7 @@ public: //------------------------ operator overloading /** is this function overloaded? */ - bool isOverloadedFunction(api::Term fun) + bool isOverloadedFunction(cvc5::Term fun) { return d_symtab->isOverloadedFunction(fun); } @@ -725,7 +726,7 @@ public: * If possible, it returns a defined symbol with name * that has type t. Otherwise returns null expression. */ - api::Term getOverloadedConstantForType(const std::string& name, api::Sort t) + cvc5::Term getOverloadedConstantForType(const std::string& name, cvc5::Sort t) { return d_symtab->getOverloadedConstantForType(name, t); } @@ -735,8 +736,8 @@ public: * and a vector of expected argument types. Otherwise returns * null expression. */ - api::Term getOverloadedFunctionForTypes(const std::string& name, - std::vector& argTypes) + cvc5::Term getOverloadedFunctionForTypes(const std::string& name, + std::vector& argTypes) { return d_symtab->getOverloadedFunctionForTypes(name, argTypes); } @@ -749,7 +750,7 @@ public: * SMT-LIB 2.6 or higher), or otherwise calling the solver to construct * the string. */ - api::Term mkStringConstant(const std::string& s); + cvc5::Term mkStringConstant(const std::string& s); /** * Make string constant from a single character in hex representation @@ -757,7 +758,7 @@ public: * This makes the string constant based on the character from the strings, * represented as a hexadecimal code point. */ - api::Term mkCharConstant(const std::string& s); + cvc5::Term mkCharConstant(const std::string& s); /** ad-hoc string escaping * diff --git a/src/parser/parser_builder.cpp b/src/parser/parser_builder.cpp index 25e08b84e..d820e8bdb 100644 --- a/src/parser/parser_builder.cpp +++ b/src/parser/parser_builder.cpp @@ -29,7 +29,7 @@ namespace cvc5 { namespace parser { -ParserBuilder::ParserBuilder(api::Solver* solver, +ParserBuilder::ParserBuilder(cvc5::Solver* solver, SymbolManager* sm, bool useOptions) : d_solver(solver), d_symman(sm) @@ -41,7 +41,7 @@ ParserBuilder::ParserBuilder(api::Solver* solver, } } -void ParserBuilder::init(api::Solver* solver, SymbolManager* sm) +void ParserBuilder::init(cvc5::Solver* solver, SymbolManager* sm) { d_lang = "LANG_AUTO"; d_solver = solver; @@ -113,7 +113,7 @@ ParserBuilder& ParserBuilder::withOptions() auto info = d_solver->getOptionInfo("force-logic"); if (info.setByUser) { - LogicInfo tmp(info.stringValue()); + internal::LogicInfo tmp(info.stringValue()); retval = retval.withForcedLogic(tmp.getLogicString()); } return retval; diff --git a/src/parser/parser_builder.h b/src/parser/parser_builder.h index d148a538d..78e0580b7 100644 --- a/src/parser/parser_builder.h +++ b/src/parser/parser_builder.h @@ -26,9 +26,7 @@ namespace cvc5 { -namespace api { class Solver; -} class Options; class SymbolManager; @@ -48,7 +46,7 @@ class CVC5_EXPORT ParserBuilder std::string d_lang; /** The API Solver object. */ - api::Solver* d_solver; + cvc5::Solver* d_solver; /** The symbol manager */ SymbolManager* d_symman; @@ -72,11 +70,11 @@ class CVC5_EXPORT ParserBuilder std::string d_forcedLogic; /** Initialize this parser builder */ - void init(api::Solver* solver, SymbolManager* sm); + void init(cvc5::Solver* solver, SymbolManager* sm); public: /** Create a parser builder using the given Solver and filename. */ - ParserBuilder(api::Solver* solver, SymbolManager* sm, bool useOptions); + ParserBuilder(cvc5::Solver* solver, SymbolManager* sm, bool useOptions); /** Build the parser, using the current settings. */ Parser* build(); diff --git a/src/parser/parser_exception.h b/src/parser/parser_exception.h index 124013183..33789bf7f 100644 --- a/src/parser/parser_exception.h +++ b/src/parser/parser_exception.h @@ -28,7 +28,7 @@ namespace cvc5 { namespace parser { -class CVC5_EXPORT ParserException : public Exception +class CVC5_EXPORT ParserException : public internal::Exception { public: // Constructors diff --git a/src/parser/smt2/Smt2.g b/src/parser/smt2/Smt2.g index 57abe495f..86ee80b4c 100644 --- a/src/parser/smt2/Smt2.g +++ b/src/parser/smt2/Smt2.g @@ -83,11 +83,9 @@ using namespace cvc5::parser; namespace cvc5 { - namespace api { - class Term; - class Sort; - } - +class Term; +class Sort; + }/* cvc5 namespace */ }/* @parser::includes */ @@ -131,9 +129,9 @@ using namespace cvc5::parser; * @return the parsed expression, or the Null Expr if we've reached the * end of the input */ -parseExpr returns [cvc5::api::Term expr = cvc5::api::Term()] +parseExpr returns [cvc5::Term expr = cvc5::Term()] @declarations { - cvc5::api::Term expr2; + cvc5::Term expr2; } : term[expr, expr2] | EOF @@ -198,12 +196,12 @@ command [std::unique_ptr* cmd] @declarations { std::string name; std::vector names; - cvc5::api::Term expr, expr2; - cvc5::api::Sort t; - std::vector terms; - std::vector sorts; - std::vector > sortedVarNames; - std::vector flattenVars; + cvc5::Term expr, expr2; + cvc5::Sort t; + std::vector terms; + std::vector sorts; + std::vector > sortedVarNames; + std::vector flattenVars; } : /* set the logic */ SET_LOGIC_TOK symbol[name,CHECK_NONE,SYM_SORT] @@ -237,10 +235,10 @@ command [std::unique_ptr* cmd] << "' arity=" << n << std::endl; unsigned arity = AntlrInput::tokenToUnsigned(n); if(arity == 0) { - api::Sort type = PARSER_STATE->mkSort(name); + cvc5::Sort type = PARSER_STATE->mkSort(name); cmd->reset(new DeclareSortCommand(name, 0, type)); } else { - api::Sort type = PARSER_STATE->mkSortConstructor(name, arity); + cvc5::Sort type = PARSER_STATE->mkSortConstructor(name, arity); cmd->reset(new DeclareSortCommand(name, arity, type)); } } @@ -286,7 +284,7 @@ command [std::unique_ptr* cmd] } else { - api::Term func = + cvc5::Term func = PARSER_STATE->bindVar(name, t, true); cmd->reset(new DeclareFunctionCommand(name, func, t)); } @@ -301,7 +299,7 @@ command [std::unique_ptr* cmd] Trace("parser") << "define fun: '" << name << "'" << std::endl; if( sortedVarNames.size() > 0 ) { sorts.reserve(sortedVarNames.size()); - for(std::vector >::const_iterator i = + for(std::vector >::const_iterator i = sortedVarNames.begin(), iend = sortedVarNames.end(); i != iend; ++i) { @@ -364,7 +362,7 @@ command [std::unique_ptr* cmd] if (PARSER_STATE->lastNamedTerm().first == expr) { // set the expression name, if there was a named term - std::pair namedTerm = + std::pair namedTerm = PARSER_STATE->lastNamedTerm(); SYM_MAN->setExpressionName(namedTerm.first, namedTerm.second, true); } @@ -502,15 +500,15 @@ command [std::unique_ptr* cmd] sygusCommand returns [std::unique_ptr cmd] @declarations { - cvc5::api::Term expr, expr2, fun; - cvc5::api::Sort t, range; + cvc5::Term expr, expr2, fun; + cvc5::Sort t, range; std::vector names; - std::vector > sortedVarNames; - std::vector sygusVars; + std::vector > sortedVarNames; + std::vector sygusVars; std::string name; bool isAssume; bool isInv; - cvc5::api::Grammar* grammar = nullptr; + cvc5::Grammar* grammar = nullptr; } : /* declare-var */ DECLARE_VAR_TOK { PARSER_STATE->checkThatLogicIsSet(); } @@ -518,7 +516,7 @@ sygusCommand returns [std::unique_ptr cmd] { PARSER_STATE->checkUserSymbol(name); } sortSymbol[t,CHECK_DECLARED] { - api::Term var = SOLVER->declareSygusVar(t, name); + cvc5::Term var = SOLVER->declareSygusVar(t, name); PARSER_STATE->defineVar(name, var); cmd.reset(new DeclareSygusVarCommand(name, var, t)); } @@ -612,18 +610,18 @@ sygusCommand returns [std::unique_ptr cmd] * The argument fun is a unique identifier to avoid naming clashes for the * datatypes constructed by this call. */ -sygusGrammar[cvc5::api::Grammar*& ret, - const std::vector& sygusVars, +sygusGrammar[cvc5::Grammar*& ret, + const std::vector& sygusVars, const std::string& fun] @declarations { // the pre-declaration - std::vector> sortedVarNames; + std::vector> sortedVarNames; // non-terminal symbols of the grammar - std::vector ntSyms; - cvc5::api::Sort t; + std::vector ntSyms; + cvc5::Sort t; std::string name; - cvc5::api::Term e, e2; + cvc5::Term e, e2; unsigned dtProcessed = 0; } : @@ -663,12 +661,12 @@ sygusGrammar[cvc5::api::Grammar*& ret, { // non-terminal symbols in the pre-declaration are locally scoped PARSER_STATE->pushScope(); - for (std::pair& i : sortedVarNames) + for (std::pair& i : sortedVarNames) { PARSER_STATE->checkDeclaration(name, CHECK_UNDECLARED, SYM_SORT); // make the non-terminal symbol, which will be parsed as an ordinary // free variable. - api::Term nts = PARSER_STATE->bindBoundVar(i.first, i.second); + cvc5::Term nts = PARSER_STATE->bindBoundVar(i.first, i.second); ntSyms.push_back(nts); } ret = PARSER_STATE->mkGrammar(sygusVars, ntSyms); @@ -728,7 +726,7 @@ sygusGrammar[cvc5::api::Grammar*& ret, setInfoInternal[std::unique_ptr* cmd] @declarations { std::string name; - api::Term sexpr; + cvc5::Term sexpr; } : keyword[name] symbolicExpr[sexpr] { cmd->reset(new SetInfoCommand(name.c_str() + 1, sexprToString(sexpr))); } @@ -737,7 +735,7 @@ setInfoInternal[std::unique_ptr* cmd] setOptionInternal[std::unique_ptr* cmd] @init { std::string name; - api::Term sexpr; + cvc5::Term sexpr; } : keyword[name] symbolicExpr[sexpr] { cmd->reset(new SetOptionCommand(name.c_str() + 1, sexprToString(sexpr))); @@ -755,22 +753,22 @@ smt25Command[std::unique_ptr* cmd] @declarations { std::string name; std::string fname; - cvc5::api::Term expr, expr2; - std::vector > sortedVarNames; + cvc5::Term expr, expr2; + std::vector > sortedVarNames; std::string s; - cvc5::api::Sort t; - cvc5::api::Term func; - std::vector bvs; - std::vector>> + cvc5::Sort t; + cvc5::Term func; + std::vector bvs; + std::vector>> sortedVarNamesList; - std::vector> flattenVarsList; - std::vector> formals; - std::vector funcs; - std::vector func_defs; - cvc5::api::Term aexpr; + std::vector> flattenVarsList; + std::vector> formals; + std::vector funcs; + std::vector func_defs; + cvc5::Term aexpr; std::unique_ptr seq; - std::vector sorts; - std::vector flattenVars; + std::vector sorts; + std::vector flattenVars; } /* declare-const */ : DECLARE_CONST_TOK { PARSER_STATE->checkThatLogicIsSet(); } @@ -783,7 +781,7 @@ smt25Command[std::unique_ptr* cmd] PARSER_STATE->parseError("declare-const is not allowed in sygus " "version 2.0"); } - api::Term c = + cvc5::Term c = PARSER_STATE->bindVar(name, t, true); cmd->reset(new DeclareFunctionCommand(name, c, t)); } @@ -898,16 +896,16 @@ smt25Command[std::unique_ptr* cmd] extendedCommand[std::unique_ptr* cmd] @declarations { - std::vector dts; - cvc5::api::Term e, e2; - cvc5::api::Sort t, s; + std::vector dts; + cvc5::Term e, e2; + cvc5::Sort t, s; std::string name; std::vector names; - std::vector terms; - std::vector sorts; - std::vector > sortedVarNames; + std::vector terms; + std::vector sorts; + std::vector > sortedVarNames; std::unique_ptr seq; - api::Grammar* g = nullptr; + cvc5::Grammar* g = nullptr; } /* Extended SMT-LIB set of commands syntax, not permitted in * --smtlib2 compliance mode. */ @@ -925,7 +923,7 @@ extendedCommand[std::unique_ptr* cmd] LPAREN_TOK ( symbol[name,CHECK_UNDECLARED,SYM_SORT] { PARSER_STATE->checkUserSymbol(name); - api::Sort type = PARSER_STATE->mkSort(name); + cvc5::Sort type = PARSER_STATE->mkSort(name); seq->addCommand(new DeclareSortCommand(name, 0, type)); } )+ @@ -938,18 +936,18 @@ extendedCommand[std::unique_ptr* cmd] ( LPAREN_TOK symbol[name,CHECK_UNDECLARED,SYM_VARIABLE] { PARSER_STATE->checkUserSymbol(name); } nonemptySortList[sorts] RPAREN_TOK - { api::Sort tt; + { cvc5::Sort tt; if(sorts.size() > 1) { PARSER_STATE->checkLogicAllowsFunctions(); // must flatten - api::Sort range = sorts.back(); + cvc5::Sort range = sorts.back(); sorts.pop_back(); tt = PARSER_STATE->mkFlatFunctionType(sorts, range); } else { tt = sorts[0]; } // allow overloading - api::Term func = + cvc5::Term func = PARSER_STATE->bindVar(name, tt, true); seq->addCommand(new DeclareFunctionCommand(name, func, tt)); sorts.clear(); @@ -969,7 +967,7 @@ extendedCommand[std::unique_ptr* cmd] t = SOLVER->mkFunctionSort(sorts, t); } // allow overloading - api::Term func = + cvc5::Term func = PARSER_STATE->bindVar(name, t, true); seq->addCommand(new DeclareFunctionCommand(name, func, t)); sorts.clear(); @@ -1043,7 +1041,7 @@ extendedCommand[std::unique_ptr* cmd] { terms.push_back( e ); } )* RPAREN_TOK { Trace("parser") << "declare pool: '" << name << "'" << std::endl; - api::Term pool = SOLVER->declarePool(name, t, terms); + cvc5::Term pool = SOLVER->declarePool(name, t, terms); PARSER_STATE->defineVar(name, pool); cmd->reset(new DeclarePoolCommand(name, pool, t, terms)); } @@ -1063,7 +1061,7 @@ extendedCommand[std::unique_ptr* cmd] datatypeDefCommand[bool isCo, std::unique_ptr* cmd] @declarations { - std::vector dts; + std::vector dts; std::string name; std::vector dnames; std::vector arities; @@ -1079,7 +1077,7 @@ datatypeDefCommand[bool isCo, std::unique_ptr* cmd] datatypesDefCommand[bool isCo, std::unique_ptr* cmd] @declarations { - std::vector dts; + std::vector dts; std::string name; std::vector dnames; std::vector arities; @@ -1112,9 +1110,9 @@ datatypesDef[bool isCo, const std::vector& arities, std::unique_ptr* cmd] @declarations { - std::vector dts; + std::vector dts; std::string name; - std::vector params; + std::vector params; } : { PARSER_STATE->pushScope(); // Declare the datatypes that are currently being defined as unresolved @@ -1230,28 +1228,28 @@ simpleSymbolicExpr[std::string& s] | KEYWORD { s = AntlrInput::tokenText($KEYWORD); } ; -symbolicExpr[cvc5::api::Term& sexpr] +symbolicExpr[cvc5::Term& sexpr] @declarations { std::string s; - std::vector children; + std::vector children; } : simpleSymbolicExpr[s] { sexpr = SOLVER->mkString(PARSER_STATE->processAdHocStringEsc(s)); } | LPAREN_TOK ( symbolicExpr[sexpr] { children.push_back(sexpr); } )* RPAREN_TOK - { sexpr = SOLVER->mkTerm(cvc5::api::SEXPR, children); } + { sexpr = SOLVER->mkTerm(cvc5::SEXPR, children); } ; /** * Matches a term. * @return the expression representing the term. */ -term[cvc5::api::Term& expr, cvc5::api::Term& expr2] +term[cvc5::Term& expr, cvc5::Term& expr2] @init { - api::Kind kind = api::NULL_TERM; - cvc5::api::Term f; + cvc5::Kind kind = cvc5::NULL_TERM; + cvc5::Term f; std::string name; - cvc5::api::Sort type; + cvc5::Sort type; ParseOp p; } : termNonVariable[expr, expr2] @@ -1269,30 +1267,30 @@ term[cvc5::api::Term& expr, cvc5::api::Term& expr2] * @return the expression expr representing the term or formula, and expr2, an * optional annotation for expr (for instance, for attributed expressions). */ -termNonVariable[cvc5::api::Term& expr, cvc5::api::Term& expr2] +termNonVariable[cvc5::Term& expr, cvc5::Term& expr2] @init { Trace("parser") << "term: " << AntlrInput::tokenText(LT(1)) << std::endl; - api::Kind kind = api::NULL_TERM; + cvc5::Kind kind = cvc5::NULL_TERM; std::string name; - std::vector args; - std::vector< std::pair > sortedVarNames; - cvc5::api::Term bvl; - cvc5::api::Term f, f2, f3; + std::vector args; + std::vector< std::pair > sortedVarNames; + cvc5::Term bvl; + cvc5::Term f, f2, f3; std::string attr; - cvc5::api::Term attexpr; - std::vector patexprs; - std::vector matchcases; + cvc5::Term attexpr; + std::vector patexprs; + std::vector matchcases; std::unordered_set names; - std::vector< std::pair > binders; - cvc5::api::Sort type; - cvc5::api::Sort type2; - api::Term atomTerm; + std::vector< std::pair > binders; + cvc5::Sort type; + cvc5::Sort type2; + cvc5::Term atomTerm; ParseOp p; - std::vector argTypes; + std::vector argTypes; } : LPAREN_TOK quantOp[kind] { - if (!PARSER_STATE->isTheoryEnabled(theory::THEORY_QUANTIFIERS)) + if (!PARSER_STATE->isTheoryEnabled(internal::theory::THEORY_QUANTIFIERS)) { PARSER_STATE->parseError("Quantifier used in non-quantified logic."); } @@ -1319,7 +1317,7 @@ termNonVariable[cvc5::api::Term& expr, cvc5::api::Term& expr2] term[f, f2] { args.push_back(f); } term[f, f2] { args.push_back(f); - expr = MK_TERM(api::SET_COMPREHENSION, args); + expr = MK_TERM(cvc5::SET_COMPREHENSION, args); } RPAREN_TOK | LPAREN_TOK qualIdentifier[p] @@ -1346,7 +1344,7 @@ termNonVariable[cvc5::api::Term& expr, cvc5::api::Term& expr2] } binders.push_back(std::make_pair(name, expr)); } )+ { // now implement these bindings - for (const std::pair& binder : binders) + for (const std::pair& binder : binders) { { PARSER_STATE->defineVar(binder.first, binder.second); @@ -1376,12 +1374,12 @@ termNonVariable[cvc5::api::Term& expr, cvc5::api::Term& expr2] { PARSER_STATE->parseError("Pattern must be application of a constructor or a variable."); } - api::Datatype dt = type.getConstructorCodomainSort().getDatatype(); + cvc5::Datatype dt = type.getConstructorCodomainSort().getDatatype(); if (dt.isParametric()) { // lookup constructor by name - api::DatatypeConstructor dc = dt.getConstructor(f.toString()); - api::Term scons = dc.getInstantiatedConstructorTerm(expr.getSort()); + cvc5::DatatypeConstructor dc = dt.getConstructor(f.toString()); + cvc5::Term scons = dc.getInstantiatedConstructorTerm(expr.getSort()); // take the type of the specialized constructor instead type = scons.getSort(); } @@ -1394,18 +1392,18 @@ termNonVariable[cvc5::api::Term& expr, cvc5::api::Term& expr2] PARSER_STATE->parseError("Too many arguments for pattern."); } //make of proper type - api::Term arg = PARSER_STATE->bindBoundVar(name, argTypes[args.size()]); + cvc5::Term arg = PARSER_STATE->bindBoundVar(name, argTypes[args.size()]); args.push_back( arg ); } )* RPAREN_TOK term[f3, f2] { // make the match case - std::vector cargs; + std::vector cargs; cargs.push_back(f); cargs.insert(cargs.end(),args.begin(),args.end()); - api::Term c = MK_TERM(api::APPLY_CONSTRUCTOR,cargs); - api::Term bvla = MK_TERM(api::VARIABLE_LIST,args); - api::Term mc = MK_TERM(api::MATCH_BIND_CASE, bvla, c, f3); + cvc5::Term c = MK_TERM(cvc5::APPLY_CONSTRUCTOR,cargs); + cvc5::Term bvla = MK_TERM(cvc5::VARIABLE_LIST,args); + cvc5::Term mc = MK_TERM(cvc5::MATCH_BIND_CASE, bvla, c, f3); matchcases.push_back(mc); // now, pop the scope PARSER_STATE->popScope(); @@ -1423,7 +1421,7 @@ termNonVariable[cvc5::api::Term& expr, cvc5::api::Term& expr2] PARSER_STATE->parseError("Must apply constructors of arity greater than 0 to arguments in pattern."); } // make nullary constructor application - f = MK_TERM(api::APPLY_CONSTRUCTOR, f); + f = MK_TERM(cvc5::APPLY_CONSTRUCTOR, f); } else { @@ -1432,15 +1430,15 @@ termNonVariable[cvc5::api::Term& expr, cvc5::api::Term& expr2] } } term[f3, f2] { - api::Term mc; - if (f.getKind() == api::VARIABLE) + cvc5::Term mc; + if (f.getKind() == cvc5::VARIABLE) { - api::Term bvlf = MK_TERM(api::VARIABLE_LIST, f); - mc = MK_TERM(api::MATCH_BIND_CASE, bvlf, f, f3); + cvc5::Term bvlf = MK_TERM(cvc5::VARIABLE_LIST, f); + mc = MK_TERM(cvc5::MATCH_BIND_CASE, bvlf, f, f3); } else { - mc = MK_TERM(api::MATCH_CASE, f, f3); + mc = MK_TERM(cvc5::MATCH_CASE, f, f3); } matchcases.push_back(mc); } @@ -1452,10 +1450,10 @@ termNonVariable[cvc5::api::Term& expr, cvc5::api::Term& expr2] { PARSER_STATE->parseError("Must have at least one case in match."); } - std::vector mchildren; + std::vector mchildren; mchildren.push_back(expr); mchildren.insert(mchildren.end(), matchcases.begin(), matchcases.end()); - expr = MK_TERM(api::MATCH, mchildren); + expr = MK_TERM(cvc5::MATCH, mchildren); } /* attributed expressions */ @@ -1468,12 +1466,12 @@ termNonVariable[cvc5::api::Term& expr, cvc5::api::Term& expr2] )+ RPAREN_TOK { if(! patexprs.empty()) { - if( !f2.isNull() && f2.getKind()==api::INST_PATTERN_LIST ){ + if( !f2.isNull() && f2.getKind()==cvc5::INST_PATTERN_LIST ){ for( size_t i=0; ipopScope(); - expr = MK_TERM(api::LAMBDA, args); + expr = MK_TERM(cvc5::LAMBDA, args); } | LPAREN_TOK TUPLE_CONST_TOK termList[args,expr] RPAREN_TOK { - std::vector sorts; - std::vector terms; - for (const api::Term& arg : args) + std::vector sorts; + std::vector terms; + for (const cvc5::Term& arg : args) { sorts.emplace_back(arg.getSort()); terms.emplace_back(arg); @@ -1503,7 +1501,7 @@ termNonVariable[cvc5::api::Term& expr, cvc5::api::Term& expr2] | LPAREN_TOK TUPLE_PROJECT_TOK term[expr,expr2] RPAREN_TOK { std::vector indices; - api::Op op = SOLVER->mkOp(api::TUPLE_PROJECT, indices); + cvc5::Op op = SOLVER->mkOp(cvc5::TUPLE_PROJECT, indices); expr = SOLVER->mkTerm(op, {expr}); } | /* an atomic term (a term with no subterms) */ @@ -1535,7 +1533,7 @@ termNonVariable[cvc5::api::Term& expr, cvc5::api::Term& expr2] * - For indexed functions like testers (_ is C) and bitvector extract * (_ extract n m), we return (3) for the appropriate operator. * - For tuple selectors (_ tuple_select n) and updaters (_ tuple_update n), we - * return (1) and (3). api::Kind is set to APPLY_SELECTOR or APPLY_UPDATER + * return (1) and (3). cvc5::Kind is set to APPLY_SELECTOR or APPLY_UPDATER * respectively, and expr is set to n, which is to be interpreted by the * caller as the n^th generic tuple selector or updater. We do this since there * is no AST expression representing generic tuple select, and we do not have @@ -1564,16 +1562,16 @@ termNonVariable[cvc5::api::Term& expr, cvc5::api::Term& expr2] */ qualIdentifier[cvc5::ParseOp& p] @init { - api::Kind k; + cvc5::Kind k; std::string baseName; - cvc5::api::Term f; - cvc5::api::Sort type; + cvc5::Term f; + cvc5::Sort type; } : identifier[p] | LPAREN_TOK AS_TOK ( CONST_TOK sortSymbol[type, CHECK_DECLARED] { - p.d_kind = api::CONST_ARRAY; + p.d_kind = cvc5::CONST_ARRAY; PARSER_STATE->parseOpApplyTypeAscription(p, type); } | identifier[p] @@ -1595,8 +1593,8 @@ qualIdentifier[cvc5::ParseOp& p] */ identifier[cvc5::ParseOp& p] @init { - cvc5::api::Term f; - cvc5::api::Term f2; + cvc5::Term f; + cvc5::Term f2; std::vector numerals; } : functionName[p.d_name, CHECK_NONE] @@ -1606,7 +1604,7 @@ identifier[cvc5::ParseOp& p] | LPAREN_TOK INDEX_TOK ( TESTER_TOK term[f, f2] { - if (f.getKind() == api::APPLY_CONSTRUCTOR && f.getNumChildren() == 1) + if (f.getKind() == cvc5::APPLY_CONSTRUCTOR && f.getNumChildren() == 1) { // for nullary constructors, must get the operator f = f[0]; @@ -1617,10 +1615,10 @@ identifier[cvc5::ParseOp& p] "Bad syntax for (_ is X), X must be a constructor."); } // get the datatype that f belongs to - api::Sort sf = f.getSort().getConstructorCodomainSort(); - api::Datatype d = sf.getDatatype(); + cvc5::Sort sf = f.getSort().getConstructorCodomainSort(); + cvc5::Datatype d = sf.getDatatype(); // lookup by name - api::DatatypeConstructor dc = d.getConstructor(f.toString()); + cvc5::DatatypeConstructor dc = d.getConstructor(f.toString()); p.d_expr = dc.getTesterTerm(); } | UPDATE_TOK term[f, f2] @@ -1632,10 +1630,10 @@ identifier[cvc5::ParseOp& p] } std::string sname = f.toString(); // get the datatype that f belongs to - api::Sort sf = f.getSort().getSelectorDomainSort(); - api::Datatype d = sf.getDatatype(); + cvc5::Sort sf = f.getSort().getSelectorDomainSort(); + cvc5::Datatype d = sf.getDatatype(); // find the selector - api::DatatypeSelector ds = d.getSelector(f.toString()); + cvc5::DatatypeSelector ds = d.getSelector(f.toString()); // get the updater term p.d_expr = ds.getUpdaterTerm(); } @@ -1643,22 +1641,22 @@ identifier[cvc5::ParseOp& p] { // we adopt a special syntax (_ tuple_project i_1 ... i_n) where // i_1, ..., i_n are numerals - p.d_kind = api::TUPLE_PROJECT; - p.d_op = SOLVER->mkOp(api::TUPLE_PROJECT, numerals); + p.d_kind = cvc5::TUPLE_PROJECT; + p.d_op = SOLVER->mkOp(cvc5::TUPLE_PROJECT, numerals); } | sym=SIMPLE_SYMBOL nonemptyNumeralList[numerals] { std::string opName = AntlrInput::tokenText($sym); - api::Kind k = PARSER_STATE->getIndexedOpKind(opName); - if (k == api::UNDEFINED_KIND) + cvc5::Kind k = PARSER_STATE->getIndexedOpKind(opName); + if (k == cvc5::UNDEFINED_KIND) { // We don't know which kind to use until we know the type of the // arguments p.d_name = opName; p.d_indices = numerals; - p.d_kind = api::UNDEFINED_KIND; + p.d_kind = cvc5::UNDEFINED_KIND; } - else if (k == api::APPLY_SELECTOR || k == api::APPLY_UPDATER) + else if (k == cvc5::APPLY_SELECTOR || k == cvc5::APPLY_UPDATER) { // we adopt a special syntax (_ tuple_select n) and (_ tuple_update n) // for tuple selectors and updaters @@ -1691,9 +1689,9 @@ identifier[cvc5::ParseOp& p] * Matches an atomic term (a term with no subterms). * @return the expression expr representing the term or formula. */ -termAtomic[cvc5::api::Term& atomTerm] +termAtomic[cvc5::Term& atomTerm] @init { - cvc5::api::Sort t; + cvc5::Sort t; std::string s; std::vector numerals; } @@ -1753,32 +1751,32 @@ termAtomic[cvc5::api::Term& atomTerm] // Empty tuple constant | TUPLE_CONST_TOK { - atomTerm = SOLVER->mkTuple(std::vector(), - std::vector()); + atomTerm = SOLVER->mkTuple(std::vector(), + std::vector()); } ; /** * Read attribute */ -attribute[cvc5::api::Term& expr, cvc5::api::Term& retExpr] +attribute[cvc5::Term& expr, cvc5::Term& retExpr] @init { - api::Term sexpr; + cvc5::Term sexpr; std::string s; - cvc5::api::Term patexpr; - std::vector patexprs; - cvc5::api::Term e2; + cvc5::Term patexpr; + std::vector patexprs; + cvc5::Term e2; bool hasValue = false; - api::Kind k; + cvc5::Kind k; } : KEYWORD ( simpleSymbolicExprNoKeyword[s] { hasValue = true; } )? { PARSER_STATE->attributeNotSupported(AntlrInput::tokenText($KEYWORD)); } - | ( ATTRIBUTE_PATTERN_TOK { k = api::INST_PATTERN; } | - ATTRIBUTE_POOL_TOK { k = api::INST_POOL; } | - ATTRIBUTE_INST_ADD_TO_POOL_TOK { k = api::INST_ADD_TO_POOL; } | - ATTRIBUTE_SKOLEM_ADD_TO_POOL_TOK{ k = api::SKOLEM_ADD_TO_POOL; } + | ( ATTRIBUTE_PATTERN_TOK { k = cvc5::INST_PATTERN; } | + ATTRIBUTE_POOL_TOK { k = cvc5::INST_POOL; } | + ATTRIBUTE_INST_ADD_TO_POOL_TOK { k = cvc5::INST_ADD_TO_POOL; } | + ATTRIBUTE_SKOLEM_ADD_TO_POOL_TOK{ k = cvc5::SKOLEM_ADD_TO_POOL; } ) LPAREN_TOK ( term[patexpr, e2] @@ -1789,23 +1787,23 @@ attribute[cvc5::api::Term& expr, cvc5::api::Term& retExpr] } | ATTRIBUTE_NO_PATTERN_TOK term[patexpr, e2] { - retExpr = MK_TERM(api::INST_NO_PATTERN, patexpr); + retExpr = MK_TERM(cvc5::INST_NO_PATTERN, patexpr); } | tok=( ATTRIBUTE_INST_LEVEL ) INTEGER_LITERAL { std::stringstream sIntLit; sIntLit << $INTEGER_LITERAL; - api::Term keyword = SOLVER->mkString("quant-inst-max-level"); - api::Term n = SOLVER->mkInteger(sIntLit.str()); - retExpr = MK_TERM(api::INST_ATTRIBUTE, keyword, n); + cvc5::Term keyword = SOLVER->mkString("quant-inst-max-level"); + cvc5::Term n = SOLVER->mkInteger(sIntLit.str()); + retExpr = MK_TERM(cvc5::INST_ATTRIBUTE, keyword, n); } | tok=( ATTRIBUTE_QUANTIFIER_ID_TOK ) symbol[s,CHECK_UNDECLARED,SYM_VARIABLE] { - api::Term keyword = SOLVER->mkString("qid"); + cvc5::Term keyword = SOLVER->mkString("qid"); // must create a variable whose name is the name of the quantified // formula, not a string. - api::Term name = SOLVER->mkConst(SOLVER->getBooleanSort(), s); - retExpr = MK_TERM(api::INST_ATTRIBUTE, keyword, name); + cvc5::Term name = SOLVER->mkConst(SOLVER->getBooleanSort(), s); + retExpr = MK_TERM(cvc5::INST_ATTRIBUTE, keyword, name); } | ATTRIBUTE_NAMED_TOK symbol[s,CHECK_UNDECLARED,SYM_VARIABLE] { @@ -1822,13 +1820,13 @@ attribute[cvc5::api::Term& expr, cvc5::api::Term& retExpr] * Matches a sequence of terms and puts them into the formulas * vector. * @param formulas the vector to fill with terms - * @param expr an cvc5::api::Term reference for the elements of the sequence + * @param expr an cvc5::Term reference for the elements of the sequence */ -/* NOTE: We pass an cvc5::api::Term in here just to avoid allocating a fresh cvc5::api::Term every +/* NOTE: We pass an cvc5::Term in here just to avoid allocating a fresh cvc5::Term every * time through this rule. */ -termList[std::vector& formulas, cvc5::api::Term& expr] +termList[std::vector& formulas, cvc5::Term& expr] @declarations { - cvc5::api::Term expr2; + cvc5::Term expr2; } : ( term[expr, expr2] { formulas.push_back(expr); } )+ ; @@ -1883,12 +1881,12 @@ str[std::string& s, bool fsmtlib] } ; -quantOp[cvc5::api::Kind& kind] +quantOp[cvc5::Kind& kind] @init { Trace("parser") << "quant: " << AntlrInput::tokenText(LT(1)) << std::endl; } - : EXISTS_TOK { $kind = api::EXISTS; } - | FORALL_TOK { $kind = api::FORALL; } + : EXISTS_TOK { $kind = cvc5::EXISTS; } + | FORALL_TOK { $kind = cvc5::FORALL; } ; /** @@ -1903,16 +1901,16 @@ functionName[std::string& name, cvc5::parser::DeclarationCheck check] * Matches a sequence of sort symbols and fills them into the given * vector. */ -sortList[std::vector& sorts] +sortList[std::vector& sorts] @declarations { - cvc5::api::Sort t; + cvc5::Sort t; } : ( sortSymbol[t,CHECK_DECLARED] { sorts.push_back(t); } )* ; -nonemptySortList[std::vector& sorts] +nonemptySortList[std::vector& sorts] @declarations { - cvc5::api::Sort t; + cvc5::Sort t; } : ( sortSymbol[t,CHECK_DECLARED] { sorts.push_back(t); } )+ ; @@ -1921,10 +1919,10 @@ nonemptySortList[std::vector& sorts] * Matches a sequence of (variable,sort) symbol pairs and fills them * into the given vector. */ -sortedVarList[std::vector >& sortedVars] +sortedVarList[std::vector >& sortedVars] @declarations { std::string name; - cvc5::api::Sort t; + cvc5::Sort t; } : ( LPAREN_TOK symbol[name,CHECK_NONE,SYM_VARIABLE] sortSymbol[t,CHECK_DECLARED] RPAREN_TOK @@ -1936,15 +1934,15 @@ sortedVarList[std::vector >& sortedVars] * Matches a sequence of (variable, sort) symbol pairs, registers them as bound * variables, and returns a term corresponding to the list of pairs. */ -boundVarList[cvc5::api::Term& expr] +boundVarList[cvc5::Term& expr] @declarations { - std::vector> sortedVarNames; + std::vector> sortedVarNames; } : LPAREN_TOK sortedVarList[sortedVarNames] RPAREN_TOK { - std::vector args = + std::vector args = PARSER_STATE->bindBoundVars(sortedVarNames); - expr = MK_TERM(api::VARIABLE_LIST, args); + expr = MK_TERM(cvc5::VARIABLE_LIST, args); } ; @@ -1956,10 +1954,10 @@ sortName[std::string& name, cvc5::parser::DeclarationCheck check] : symbol[name,check,SYM_SORT] ; -sortSymbol[cvc5::api::Sort& t, cvc5::parser::DeclarationCheck check] +sortSymbol[cvc5::Sort& t, cvc5::parser::DeclarationCheck check] @declarations { std::string name; - std::vector args; + std::vector args; std::vector numerals; bool indexed = false; } @@ -1994,10 +1992,10 @@ sortSymbol[cvc5::api::Sort& t, cvc5::parser::DeclarationCheck check] if( numerals.size() != 2 ) { PARSER_STATE->parseError("Illegal floating-point type."); } - if(!validExponentSize(numerals[0])) { + if(!internal::validExponentSize(numerals[0])) { PARSER_STATE->parseError("Illegal floating-point exponent size"); } - if(!validSignificandSize(numerals[1])) { + if(!internal::validSignificandSize(numerals[1])) { PARSER_STATE->parseError("Illegal floating-point significand size"); } t = SOLVER->mkFloatingPointSort(numerals[0],numerals[1]); @@ -2018,27 +2016,27 @@ sortSymbol[cvc5::api::Sort& t, cvc5::parser::DeclarationCheck check] PARSER_STATE->parseError("Extra parentheses around sort name not " "permitted in SMT-LIB"); } else if(name == "Array" && - PARSER_STATE->isTheoryEnabled(theory::THEORY_ARRAYS) ) { + PARSER_STATE->isTheoryEnabled(internal::theory::THEORY_ARRAYS) ) { if(args.size() != 2) { PARSER_STATE->parseError("Illegal array type."); } t = SOLVER->mkArraySort( args[0], args[1] ); } else if(name == "Set" && - PARSER_STATE->isTheoryEnabled(theory::THEORY_SETS) ) { + PARSER_STATE->isTheoryEnabled(internal::theory::THEORY_SETS) ) { if(args.size() != 1) { PARSER_STATE->parseError("Illegal set type."); } t = SOLVER->mkSetSort( args[0] ); } else if(name == "Bag" && - PARSER_STATE->isTheoryEnabled(theory::THEORY_BAGS) ) { + PARSER_STATE->isTheoryEnabled(internal::theory::THEORY_BAGS) ) { if(args.size() != 1) { PARSER_STATE->parseError("Illegal bag type."); } t = SOLVER->mkBagSort( args[0] ); } else if(name == "Seq" && !PARSER_STATE->strictModeEnabled() && - PARSER_STATE->isTheoryEnabled(theory::THEORY_STRINGS) ) { + PARSER_STATE->isTheoryEnabled(internal::theory::THEORY_STRINGS) ) { if(args.size() != 1) { PARSER_STATE->parseError("Illegal sequence type."); } @@ -2070,7 +2068,7 @@ sortSymbol[cvc5::api::Sort& t, cvc5::parser::DeclarationCheck check] PARSER_STATE->parseError("Arrow types must have at least 2 arguments"); } //flatten the type - api::Sort rangeType = args.back(); + cvc5::Sort rangeType = args.back(); args.pop_back(); t = PARSER_STATE->mkFlatFunctionType( args, rangeType ); } @@ -2136,8 +2134,8 @@ nonemptyNumeralList[std::vector& numerals] /** * Parses a datatype definition */ -datatypeDef[bool isCo, std::vector& datatypes, - std::vector< cvc5::api::Sort >& params] +datatypeDef[bool isCo, std::vector& datatypes, + std::vector< cvc5::Sort >& params] @init { std::string id; } @@ -2156,14 +2154,14 @@ datatypeDef[bool isCo, std::vector& datatypes, /** * Parses a constructor defintion for type */ -constructorDef[cvc5::api::DatatypeDecl& type] +constructorDef[cvc5::DatatypeDecl& type] @init { std::string id; - cvc5::api::DatatypeConstructorDecl* ctor = NULL; + cvc5::DatatypeConstructorDecl* ctor = NULL; } : symbol[id,CHECK_NONE,SYM_VARIABLE] { - ctor = new api::DatatypeConstructorDecl( + ctor = new cvc5::DatatypeConstructorDecl( SOLVER->mkDatatypeConstructorDecl(id)); } ( LPAREN_TOK selector[*ctor] RPAREN_TOK )* @@ -2174,10 +2172,10 @@ constructorDef[cvc5::api::DatatypeDecl& type] } ; -selector[cvc5::api::DatatypeConstructorDecl& ctor] +selector[cvc5::DatatypeConstructorDecl& ctor] @init { std::string id; - cvc5::api::Sort t, t2; + cvc5::Sort t, t2; } : symbol[id,CHECK_NONE,SYM_SORT] sortSymbol[t,CHECK_NONE] { @@ -2231,10 +2229,10 @@ DECLARE_DATATYPES_TOK : { PARSER_STATE->v2_6() || PARSER_STATE->sygus() }?'decla DECLARE_CODATATYPES_2_5_TOK : { !( PARSER_STATE->v2_6() || PARSER_STATE->sygus() ) }?'declare-codatatypes'; DECLARE_CODATATYPES_TOK : { PARSER_STATE->v2_6() || PARSER_STATE->sygus() }?'declare-codatatypes'; PAR_TOK : { PARSER_STATE->v2_6() || PARSER_STATE->sygus() }?'par'; -SET_COMPREHENSION_TOK : { PARSER_STATE->isTheoryEnabled(theory::THEORY_SETS) }?'set.comprehension'; -TESTER_TOK : { ( PARSER_STATE->v2_6() || PARSER_STATE->sygus() ) && PARSER_STATE->isTheoryEnabled(theory::THEORY_DATATYPES) }?'is'; -UPDATE_TOK : { ( PARSER_STATE->v2_6() || PARSER_STATE->sygus() ) && PARSER_STATE->isTheoryEnabled(theory::THEORY_DATATYPES) }?'update'; -MATCH_TOK : { ( PARSER_STATE->v2_6() || PARSER_STATE->sygus() ) && PARSER_STATE->isTheoryEnabled(theory::THEORY_DATATYPES) }?'match'; +SET_COMPREHENSION_TOK : { PARSER_STATE->isTheoryEnabled(internal::theory::THEORY_SETS) }?'set.comprehension'; +TESTER_TOK : { ( PARSER_STATE->v2_6() || PARSER_STATE->sygus() ) && PARSER_STATE->isTheoryEnabled(internal::theory::THEORY_DATATYPES) }?'is'; +UPDATE_TOK : { ( PARSER_STATE->v2_6() || PARSER_STATE->sygus() ) && PARSER_STATE->isTheoryEnabled(internal::theory::THEORY_DATATYPES) }?'update'; +MATCH_TOK : { ( PARSER_STATE->v2_6() || PARSER_STATE->sygus() ) && PARSER_STATE->isTheoryEnabled(internal::theory::THEORY_DATATYPES) }?'match'; GET_MODEL_TOK : 'get-model'; BLOCK_MODEL_TOK : 'block-model'; BLOCK_MODEL_VALUES_TOK : 'block-model-values'; @@ -2282,9 +2280,9 @@ ATTRIBUTE_QUANTIFIER_ID_TOK : ':qid'; EXISTS_TOK : 'exists'; FORALL_TOK : 'forall'; -CHAR_TOK : { PARSER_STATE->isTheoryEnabled(theory::THEORY_STRINGS) }? 'char'; -TUPLE_CONST_TOK: { PARSER_STATE->isTheoryEnabled(theory::THEORY_DATATYPES) }? 'tuple'; -TUPLE_PROJECT_TOK: { PARSER_STATE->isTheoryEnabled(theory::THEORY_DATATYPES) }? 'tuple_project'; +CHAR_TOK : { PARSER_STATE->isTheoryEnabled(internal::theory::THEORY_STRINGS) }? 'char'; +TUPLE_CONST_TOK: { PARSER_STATE->isTheoryEnabled(internal::theory::THEORY_DATATYPES) }? 'tuple'; +TUPLE_PROJECT_TOK: { PARSER_STATE->isTheoryEnabled(internal::theory::THEORY_DATATYPES) }? 'tuple_project'; FMF_CARD_TOK: { !PARSER_STATE->strictModeEnabled() && PARSER_STATE->hasCardinalityConstraints() }? 'fmf.card'; HO_ARROW_TOK : { PARSER_STATE->isHoEnabled() }? '->'; diff --git a/src/parser/smt2/smt2.cpp b/src/parser/smt2/smt2.cpp index 9183c2bf7..c4ff3cadf 100644 --- a/src/parser/smt2/smt2.cpp +++ b/src/parser/smt2/smt2.cpp @@ -30,7 +30,7 @@ namespace cvc5 { namespace parser { -Smt2::Smt2(api::Solver* solver, +Smt2::Smt2(cvc5::Solver* solver, SymbolManager* sm, bool strictMode, bool parseOnly) @@ -43,39 +43,39 @@ Smt2::Smt2(api::Solver* solver, Smt2::~Smt2() {} void Smt2::addArithmeticOperators() { - addOperator(api::ADD, "+"); - addOperator(api::SUB, "-"); - // api::SUB is converted to api::NEG if there is only a single operand - Parser::addOperator(api::NEG); - addOperator(api::MULT, "*"); - addOperator(api::LT, "<"); - addOperator(api::LEQ, "<="); - addOperator(api::GT, ">"); - addOperator(api::GEQ, ">="); + addOperator(cvc5::ADD, "+"); + addOperator(cvc5::SUB, "-"); + // cvc5::SUB is converted to cvc5::NEG if there is only a single operand + Parser::addOperator(cvc5::NEG); + addOperator(cvc5::MULT, "*"); + addOperator(cvc5::LT, "<"); + addOperator(cvc5::LEQ, "<="); + addOperator(cvc5::GT, ">"); + addOperator(cvc5::GEQ, ">="); if (!strictModeEnabled()) { // NOTE: this operator is non-standard - addOperator(api::POW, "^"); + addOperator(cvc5::POW, "^"); } } void Smt2::addTranscendentalOperators() { - addOperator(api::EXPONENTIAL, "exp"); - addOperator(api::SINE, "sin"); - addOperator(api::COSINE, "cos"); - addOperator(api::TANGENT, "tan"); - addOperator(api::COSECANT, "csc"); - addOperator(api::SECANT, "sec"); - addOperator(api::COTANGENT, "cot"); - addOperator(api::ARCSINE, "arcsin"); - addOperator(api::ARCCOSINE, "arccos"); - addOperator(api::ARCTANGENT, "arctan"); - addOperator(api::ARCCOSECANT, "arccsc"); - addOperator(api::ARCSECANT, "arcsec"); - addOperator(api::ARCCOTANGENT, "arccot"); - addOperator(api::SQRT, "sqrt"); + addOperator(cvc5::EXPONENTIAL, "exp"); + addOperator(cvc5::SINE, "sin"); + addOperator(cvc5::COSINE, "cos"); + addOperator(cvc5::TANGENT, "tan"); + addOperator(cvc5::COSECANT, "csc"); + addOperator(cvc5::SECANT, "sec"); + addOperator(cvc5::COTANGENT, "cot"); + addOperator(cvc5::ARCSINE, "arcsin"); + addOperator(cvc5::ARCCOSINE, "arccos"); + addOperator(cvc5::ARCTANGENT, "arctan"); + addOperator(cvc5::ARCCOSECANT, "arccsc"); + addOperator(cvc5::ARCSECANT, "arcsec"); + addOperator(cvc5::ARCCOTANGENT, "arccot"); + addOperator(cvc5::SQRT, "sqrt"); } void Smt2::addQuantifiersOperators() @@ -83,163 +83,163 @@ void Smt2::addQuantifiersOperators() } void Smt2::addBitvectorOperators() { - addOperator(api::BITVECTOR_CONCAT, "concat"); - addOperator(api::BITVECTOR_NOT, "bvnot"); - addOperator(api::BITVECTOR_AND, "bvand"); - addOperator(api::BITVECTOR_OR, "bvor"); - addOperator(api::BITVECTOR_NEG, "bvneg"); - addOperator(api::BITVECTOR_ADD, "bvadd"); - addOperator(api::BITVECTOR_MULT, "bvmul"); - addOperator(api::BITVECTOR_UDIV, "bvudiv"); - addOperator(api::BITVECTOR_UREM, "bvurem"); - addOperator(api::BITVECTOR_SHL, "bvshl"); - addOperator(api::BITVECTOR_LSHR, "bvlshr"); - addOperator(api::BITVECTOR_ULT, "bvult"); - addOperator(api::BITVECTOR_NAND, "bvnand"); - addOperator(api::BITVECTOR_NOR, "bvnor"); - addOperator(api::BITVECTOR_XOR, "bvxor"); - addOperator(api::BITVECTOR_XNOR, "bvxnor"); - addOperator(api::BITVECTOR_COMP, "bvcomp"); - addOperator(api::BITVECTOR_SUB, "bvsub"); - addOperator(api::BITVECTOR_SDIV, "bvsdiv"); - addOperator(api::BITVECTOR_SREM, "bvsrem"); - addOperator(api::BITVECTOR_SMOD, "bvsmod"); - addOperator(api::BITVECTOR_ASHR, "bvashr"); - addOperator(api::BITVECTOR_ULE, "bvule"); - addOperator(api::BITVECTOR_UGT, "bvugt"); - addOperator(api::BITVECTOR_UGE, "bvuge"); - addOperator(api::BITVECTOR_SLT, "bvslt"); - addOperator(api::BITVECTOR_SLE, "bvsle"); - addOperator(api::BITVECTOR_SGT, "bvsgt"); - addOperator(api::BITVECTOR_SGE, "bvsge"); - addOperator(api::BITVECTOR_REDOR, "bvredor"); - addOperator(api::BITVECTOR_REDAND, "bvredand"); - - addIndexedOperator(api::BITVECTOR_EXTRACT, "extract"); - addIndexedOperator(api::BITVECTOR_REPEAT, "repeat"); - addIndexedOperator(api::BITVECTOR_ZERO_EXTEND, "zero_extend"); - addIndexedOperator(api::BITVECTOR_SIGN_EXTEND, "sign_extend"); - addIndexedOperator(api::BITVECTOR_ROTATE_LEFT, "rotate_left"); - addIndexedOperator(api::BITVECTOR_ROTATE_RIGHT, "rotate_right"); + addOperator(cvc5::BITVECTOR_CONCAT, "concat"); + addOperator(cvc5::BITVECTOR_NOT, "bvnot"); + addOperator(cvc5::BITVECTOR_AND, "bvand"); + addOperator(cvc5::BITVECTOR_OR, "bvor"); + addOperator(cvc5::BITVECTOR_NEG, "bvneg"); + addOperator(cvc5::BITVECTOR_ADD, "bvadd"); + addOperator(cvc5::BITVECTOR_MULT, "bvmul"); + addOperator(cvc5::BITVECTOR_UDIV, "bvudiv"); + addOperator(cvc5::BITVECTOR_UREM, "bvurem"); + addOperator(cvc5::BITVECTOR_SHL, "bvshl"); + addOperator(cvc5::BITVECTOR_LSHR, "bvlshr"); + addOperator(cvc5::BITVECTOR_ULT, "bvult"); + addOperator(cvc5::BITVECTOR_NAND, "bvnand"); + addOperator(cvc5::BITVECTOR_NOR, "bvnor"); + addOperator(cvc5::BITVECTOR_XOR, "bvxor"); + addOperator(cvc5::BITVECTOR_XNOR, "bvxnor"); + addOperator(cvc5::BITVECTOR_COMP, "bvcomp"); + addOperator(cvc5::BITVECTOR_SUB, "bvsub"); + addOperator(cvc5::BITVECTOR_SDIV, "bvsdiv"); + addOperator(cvc5::BITVECTOR_SREM, "bvsrem"); + addOperator(cvc5::BITVECTOR_SMOD, "bvsmod"); + addOperator(cvc5::BITVECTOR_ASHR, "bvashr"); + addOperator(cvc5::BITVECTOR_ULE, "bvule"); + addOperator(cvc5::BITVECTOR_UGT, "bvugt"); + addOperator(cvc5::BITVECTOR_UGE, "bvuge"); + addOperator(cvc5::BITVECTOR_SLT, "bvslt"); + addOperator(cvc5::BITVECTOR_SLE, "bvsle"); + addOperator(cvc5::BITVECTOR_SGT, "bvsgt"); + addOperator(cvc5::BITVECTOR_SGE, "bvsge"); + addOperator(cvc5::BITVECTOR_REDOR, "bvredor"); + addOperator(cvc5::BITVECTOR_REDAND, "bvredand"); + + addIndexedOperator(cvc5::BITVECTOR_EXTRACT, "extract"); + addIndexedOperator(cvc5::BITVECTOR_REPEAT, "repeat"); + addIndexedOperator(cvc5::BITVECTOR_ZERO_EXTEND, "zero_extend"); + addIndexedOperator(cvc5::BITVECTOR_SIGN_EXTEND, "sign_extend"); + addIndexedOperator(cvc5::BITVECTOR_ROTATE_LEFT, "rotate_left"); + addIndexedOperator(cvc5::BITVECTOR_ROTATE_RIGHT, "rotate_right"); } void Smt2::addDatatypesOperators() { - Parser::addOperator(api::APPLY_CONSTRUCTOR); - Parser::addOperator(api::APPLY_TESTER); - Parser::addOperator(api::APPLY_SELECTOR); + Parser::addOperator(cvc5::APPLY_CONSTRUCTOR); + Parser::addOperator(cvc5::APPLY_TESTER); + Parser::addOperator(cvc5::APPLY_SELECTOR); if (!strictModeEnabled()) { - Parser::addOperator(api::APPLY_UPDATER); - addOperator(api::DT_SIZE, "dt.size"); + Parser::addOperator(cvc5::APPLY_UPDATER); + addOperator(cvc5::DT_SIZE, "dt.size"); // Notice that tuple operators, we use the generic APPLY_SELECTOR and // APPLY_UPDATER kinds. These are processed based on the context // in which they are parsed, e.g. when parsing identifiers. - addIndexedOperator(api::APPLY_SELECTOR, "tuple_select"); - addIndexedOperator(api::APPLY_UPDATER, "tuple_update"); + addIndexedOperator(cvc5::APPLY_SELECTOR, "tuple_select"); + addIndexedOperator(cvc5::APPLY_UPDATER, "tuple_update"); } } void Smt2::addStringOperators() { defineVar("re.all", getSolver()->mkRegexpAll()); - addOperator(api::STRING_CONCAT, "str.++"); - addOperator(api::STRING_LENGTH, "str.len"); - addOperator(api::STRING_SUBSTR, "str.substr"); - addOperator(api::STRING_CONTAINS, "str.contains"); - addOperator(api::STRING_CHARAT, "str.at"); - addOperator(api::STRING_INDEXOF, "str.indexof"); - addOperator(api::STRING_REPLACE, "str.replace"); - addOperator(api::STRING_PREFIX, "str.prefixof"); - addOperator(api::STRING_SUFFIX, "str.suffixof"); - addOperator(api::STRING_FROM_CODE, "str.from_code"); - addOperator(api::STRING_IS_DIGIT, "str.is_digit"); - addOperator(api::STRING_REPLACE_RE, "str.replace_re"); - addOperator(api::STRING_REPLACE_RE_ALL, "str.replace_re_all"); + addOperator(cvc5::STRING_CONCAT, "str.++"); + addOperator(cvc5::STRING_LENGTH, "str.len"); + addOperator(cvc5::STRING_SUBSTR, "str.substr"); + addOperator(cvc5::STRING_CONTAINS, "str.contains"); + addOperator(cvc5::STRING_CHARAT, "str.at"); + addOperator(cvc5::STRING_INDEXOF, "str.indexof"); + addOperator(cvc5::STRING_REPLACE, "str.replace"); + addOperator(cvc5::STRING_PREFIX, "str.prefixof"); + addOperator(cvc5::STRING_SUFFIX, "str.suffixof"); + addOperator(cvc5::STRING_FROM_CODE, "str.from_code"); + addOperator(cvc5::STRING_IS_DIGIT, "str.is_digit"); + addOperator(cvc5::STRING_REPLACE_RE, "str.replace_re"); + addOperator(cvc5::STRING_REPLACE_RE_ALL, "str.replace_re_all"); if (!strictModeEnabled()) { - addOperator(api::STRING_INDEXOF_RE, "str.indexof_re"); - addOperator(api::STRING_UPDATE, "str.update"); - addOperator(api::STRING_TO_LOWER, "str.to_lower"); - addOperator(api::STRING_TO_UPPER, "str.to_upper"); - addOperator(api::STRING_REV, "str.rev"); + addOperator(cvc5::STRING_INDEXOF_RE, "str.indexof_re"); + addOperator(cvc5::STRING_UPDATE, "str.update"); + addOperator(cvc5::STRING_TO_LOWER, "str.to_lower"); + addOperator(cvc5::STRING_TO_UPPER, "str.to_upper"); + addOperator(cvc5::STRING_REV, "str.rev"); // sequence versions - addOperator(api::SEQ_CONCAT, "seq.++"); - addOperator(api::SEQ_LENGTH, "seq.len"); - addOperator(api::SEQ_EXTRACT, "seq.extract"); - addOperator(api::SEQ_UPDATE, "seq.update"); - addOperator(api::SEQ_AT, "seq.at"); - addOperator(api::SEQ_CONTAINS, "seq.contains"); - addOperator(api::SEQ_INDEXOF, "seq.indexof"); - addOperator(api::SEQ_REPLACE, "seq.replace"); - addOperator(api::SEQ_PREFIX, "seq.prefixof"); - addOperator(api::SEQ_SUFFIX, "seq.suffixof"); - addOperator(api::SEQ_REV, "seq.rev"); - addOperator(api::SEQ_REPLACE_ALL, "seq.replace_all"); - addOperator(api::SEQ_UNIT, "seq.unit"); - addOperator(api::SEQ_NTH, "seq.nth"); + addOperator(cvc5::SEQ_CONCAT, "seq.++"); + addOperator(cvc5::SEQ_LENGTH, "seq.len"); + addOperator(cvc5::SEQ_EXTRACT, "seq.extract"); + addOperator(cvc5::SEQ_UPDATE, "seq.update"); + addOperator(cvc5::SEQ_AT, "seq.at"); + addOperator(cvc5::SEQ_CONTAINS, "seq.contains"); + addOperator(cvc5::SEQ_INDEXOF, "seq.indexof"); + addOperator(cvc5::SEQ_REPLACE, "seq.replace"); + addOperator(cvc5::SEQ_PREFIX, "seq.prefixof"); + addOperator(cvc5::SEQ_SUFFIX, "seq.suffixof"); + addOperator(cvc5::SEQ_REV, "seq.rev"); + addOperator(cvc5::SEQ_REPLACE_ALL, "seq.replace_all"); + addOperator(cvc5::SEQ_UNIT, "seq.unit"); + addOperator(cvc5::SEQ_NTH, "seq.nth"); } - addOperator(api::STRING_FROM_INT, "str.from_int"); - addOperator(api::STRING_TO_INT, "str.to_int"); - addOperator(api::STRING_IN_REGEXP, "str.in_re"); - addOperator(api::STRING_TO_REGEXP, "str.to_re"); - addOperator(api::STRING_TO_CODE, "str.to_code"); - addOperator(api::STRING_REPLACE_ALL, "str.replace_all"); - - addOperator(api::REGEXP_CONCAT, "re.++"); - addOperator(api::REGEXP_UNION, "re.union"); - addOperator(api::REGEXP_INTER, "re.inter"); - addOperator(api::REGEXP_STAR, "re.*"); - addOperator(api::REGEXP_PLUS, "re.+"); - addOperator(api::REGEXP_OPT, "re.opt"); - addIndexedOperator(api::REGEXP_REPEAT, "re.^"); - addIndexedOperator(api::REGEXP_LOOP, "re.loop"); - addOperator(api::REGEXP_RANGE, "re.range"); - addOperator(api::REGEXP_COMPLEMENT, "re.comp"); - addOperator(api::REGEXP_DIFF, "re.diff"); - addOperator(api::STRING_LT, "str.<"); - addOperator(api::STRING_LEQ, "str.<="); + addOperator(cvc5::STRING_FROM_INT, "str.from_int"); + addOperator(cvc5::STRING_TO_INT, "str.to_int"); + addOperator(cvc5::STRING_IN_REGEXP, "str.in_re"); + addOperator(cvc5::STRING_TO_REGEXP, "str.to_re"); + addOperator(cvc5::STRING_TO_CODE, "str.to_code"); + addOperator(cvc5::STRING_REPLACE_ALL, "str.replace_all"); + + addOperator(cvc5::REGEXP_CONCAT, "re.++"); + addOperator(cvc5::REGEXP_UNION, "re.union"); + addOperator(cvc5::REGEXP_INTER, "re.inter"); + addOperator(cvc5::REGEXP_STAR, "re.*"); + addOperator(cvc5::REGEXP_PLUS, "re.+"); + addOperator(cvc5::REGEXP_OPT, "re.opt"); + addIndexedOperator(cvc5::REGEXP_REPEAT, "re.^"); + addIndexedOperator(cvc5::REGEXP_LOOP, "re.loop"); + addOperator(cvc5::REGEXP_RANGE, "re.range"); + addOperator(cvc5::REGEXP_COMPLEMENT, "re.comp"); + addOperator(cvc5::REGEXP_DIFF, "re.diff"); + addOperator(cvc5::STRING_LT, "str.<"); + addOperator(cvc5::STRING_LEQ, "str.<="); } void Smt2::addFloatingPointOperators() { - addOperator(api::FLOATINGPOINT_FP, "fp"); - addOperator(api::FLOATINGPOINT_EQ, "fp.eq"); - addOperator(api::FLOATINGPOINT_ABS, "fp.abs"); - addOperator(api::FLOATINGPOINT_NEG, "fp.neg"); - addOperator(api::FLOATINGPOINT_ADD, "fp.add"); - addOperator(api::FLOATINGPOINT_SUB, "fp.sub"); - addOperator(api::FLOATINGPOINT_MULT, "fp.mul"); - addOperator(api::FLOATINGPOINT_DIV, "fp.div"); - addOperator(api::FLOATINGPOINT_FMA, "fp.fma"); - addOperator(api::FLOATINGPOINT_SQRT, "fp.sqrt"); - addOperator(api::FLOATINGPOINT_REM, "fp.rem"); - addOperator(api::FLOATINGPOINT_RTI, "fp.roundToIntegral"); - addOperator(api::FLOATINGPOINT_MIN, "fp.min"); - addOperator(api::FLOATINGPOINT_MAX, "fp.max"); - addOperator(api::FLOATINGPOINT_LEQ, "fp.leq"); - addOperator(api::FLOATINGPOINT_LT, "fp.lt"); - addOperator(api::FLOATINGPOINT_GEQ, "fp.geq"); - addOperator(api::FLOATINGPOINT_GT, "fp.gt"); - addOperator(api::FLOATINGPOINT_IS_NORMAL, "fp.isNormal"); - addOperator(api::FLOATINGPOINT_IS_SUBNORMAL, "fp.isSubnormal"); - addOperator(api::FLOATINGPOINT_IS_ZERO, "fp.isZero"); - addOperator(api::FLOATINGPOINT_IS_INF, "fp.isInfinite"); - addOperator(api::FLOATINGPOINT_IS_NAN, "fp.isNaN"); - addOperator(api::FLOATINGPOINT_IS_NEG, "fp.isNegative"); - addOperator(api::FLOATINGPOINT_IS_POS, "fp.isPositive"); - addOperator(api::FLOATINGPOINT_TO_REAL, "fp.to_real"); - - addIndexedOperator(api::UNDEFINED_KIND, "to_fp"); - addIndexedOperator(api::FLOATINGPOINT_TO_FP_FROM_UBV, "to_fp_unsigned"); - addIndexedOperator(api::FLOATINGPOINT_TO_UBV, "fp.to_ubv"); - addIndexedOperator(api::FLOATINGPOINT_TO_SBV, "fp.to_sbv"); + addOperator(cvc5::FLOATINGPOINT_FP, "fp"); + addOperator(cvc5::FLOATINGPOINT_EQ, "fp.eq"); + addOperator(cvc5::FLOATINGPOINT_ABS, "fp.abs"); + addOperator(cvc5::FLOATINGPOINT_NEG, "fp.neg"); + addOperator(cvc5::FLOATINGPOINT_ADD, "fp.add"); + addOperator(cvc5::FLOATINGPOINT_SUB, "fp.sub"); + addOperator(cvc5::FLOATINGPOINT_MULT, "fp.mul"); + addOperator(cvc5::FLOATINGPOINT_DIV, "fp.div"); + addOperator(cvc5::FLOATINGPOINT_FMA, "fp.fma"); + addOperator(cvc5::FLOATINGPOINT_SQRT, "fp.sqrt"); + addOperator(cvc5::FLOATINGPOINT_REM, "fp.rem"); + addOperator(cvc5::FLOATINGPOINT_RTI, "fp.roundToIntegral"); + addOperator(cvc5::FLOATINGPOINT_MIN, "fp.min"); + addOperator(cvc5::FLOATINGPOINT_MAX, "fp.max"); + addOperator(cvc5::FLOATINGPOINT_LEQ, "fp.leq"); + addOperator(cvc5::FLOATINGPOINT_LT, "fp.lt"); + addOperator(cvc5::FLOATINGPOINT_GEQ, "fp.geq"); + addOperator(cvc5::FLOATINGPOINT_GT, "fp.gt"); + addOperator(cvc5::FLOATINGPOINT_IS_NORMAL, "fp.isNormal"); + addOperator(cvc5::FLOATINGPOINT_IS_SUBNORMAL, "fp.isSubnormal"); + addOperator(cvc5::FLOATINGPOINT_IS_ZERO, "fp.isZero"); + addOperator(cvc5::FLOATINGPOINT_IS_INF, "fp.isInfinite"); + addOperator(cvc5::FLOATINGPOINT_IS_NAN, "fp.isNaN"); + addOperator(cvc5::FLOATINGPOINT_IS_NEG, "fp.isNegative"); + addOperator(cvc5::FLOATINGPOINT_IS_POS, "fp.isPositive"); + addOperator(cvc5::FLOATINGPOINT_TO_REAL, "fp.to_real"); + + addIndexedOperator(cvc5::UNDEFINED_KIND, "to_fp"); + addIndexedOperator(cvc5::FLOATINGPOINT_TO_FP_FROM_UBV, "to_fp_unsigned"); + addIndexedOperator(cvc5::FLOATINGPOINT_TO_UBV, "fp.to_ubv"); + addIndexedOperator(cvc5::FLOATINGPOINT_TO_SBV, "fp.to_sbv"); if (!strictModeEnabled()) { - addIndexedOperator(api::FLOATINGPOINT_TO_FP_FROM_IEEE_BV, "to_fp_bv"); - addIndexedOperator(api::FLOATINGPOINT_TO_FP_FROM_FP, "to_fp_fp"); - addIndexedOperator(api::FLOATINGPOINT_TO_FP_FROM_REAL, "to_fp_real"); - addIndexedOperator(api::FLOATINGPOINT_TO_FP_FROM_SBV, "to_fp_signed"); + addIndexedOperator(cvc5::FLOATINGPOINT_TO_FP_FROM_IEEE_BV, "to_fp_bv"); + addIndexedOperator(cvc5::FLOATINGPOINT_TO_FP_FROM_FP, "to_fp_fp"); + addIndexedOperator(cvc5::FLOATINGPOINT_TO_FP_FROM_REAL, "to_fp_real"); + addIndexedOperator(cvc5::FLOATINGPOINT_TO_FP_FROM_SBV, "to_fp_signed"); } } @@ -248,12 +248,12 @@ void Smt2::addSepOperators() { // the Boolean sort is a placeholder here since we don't have type info // without type annotation defineVar("sep.nil", d_solver->mkSepNil(d_solver->getBooleanSort())); - addOperator(api::SEP_STAR, "sep"); - addOperator(api::SEP_PTO, "pto"); - addOperator(api::SEP_WAND, "wand"); - Parser::addOperator(api::SEP_STAR); - Parser::addOperator(api::SEP_PTO); - Parser::addOperator(api::SEP_WAND); + addOperator(cvc5::SEP_STAR, "sep"); + addOperator(cvc5::SEP_PTO, "pto"); + addOperator(cvc5::SEP_WAND, "wand"); + Parser::addOperator(cvc5::SEP_STAR); + Parser::addOperator(cvc5::SEP_PTO); + Parser::addOperator(cvc5::SEP_WAND); } void Smt2::addCoreSymbols() @@ -261,17 +261,17 @@ void Smt2::addCoreSymbols() defineType("Bool", d_solver->getBooleanSort(), true); defineVar("true", d_solver->mkTrue(), true); defineVar("false", d_solver->mkFalse(), true); - addOperator(api::AND, "and"); - addOperator(api::DISTINCT, "distinct"); - addOperator(api::EQUAL, "="); - addOperator(api::IMPLIES, "=>"); - addOperator(api::ITE, "ite"); - addOperator(api::NOT, "not"); - addOperator(api::OR, "or"); - addOperator(api::XOR, "xor"); + addOperator(cvc5::AND, "and"); + addOperator(cvc5::DISTINCT, "distinct"); + addOperator(cvc5::EQUAL, "="); + addOperator(cvc5::IMPLIES, "=>"); + addOperator(cvc5::ITE, "ite"); + addOperator(cvc5::NOT, "not"); + addOperator(cvc5::OR, "or"); + addOperator(cvc5::XOR, "xor"); } -void Smt2::addOperator(api::Kind kind, const std::string& name) +void Smt2::addOperator(cvc5::Kind kind, const std::string& name) { Trace("parser") << "Smt2::addOperator( " << kind << ", " << name << " )" << std::endl; @@ -279,8 +279,7 @@ void Smt2::addOperator(api::Kind kind, const std::string& name) d_operatorKindMap[name] = kind; } -void Smt2::addIndexedOperator(api::Kind tKind, - const std::string& name) +void Smt2::addIndexedOperator(cvc5::Kind tKind, const std::string& name) { Parser::addOperator(tKind); d_indexedOpKindMap[name] = tKind; @@ -291,7 +290,7 @@ bool Smt2::isIndexedOperatorEnabled(const std::string& name) const return d_indexedOpKindMap.find(name) != d_indexedOpKindMap.end(); } -api::Kind Smt2::getOperatorKind(const std::string& name) const +cvc5::Kind Smt2::getOperatorKind(const std::string& name) const { // precondition: isOperatorEnabled(name) return d_operatorKindMap.find(name)->second; @@ -301,7 +300,7 @@ bool Smt2::isOperatorEnabled(const std::string& name) const { return d_operatorKindMap.find(name) != d_operatorKindMap.end(); } -bool Smt2::isTheoryEnabled(theory::TheoryId theory) const +bool Smt2::isTheoryEnabled(internal::theory::TheoryId theory) const { return d_logic.isTheoryEnabled(theory); } @@ -314,7 +313,7 @@ bool Smt2::logicIsSet() { return d_logicSet; } -bool Smt2::getTesterName(api::Term cons, std::string& name) +bool Smt2::getTesterName(cvc5::Term cons, std::string& name) { if ((v2_6() || sygus()) && strictModeEnabled()) { @@ -328,10 +327,10 @@ bool Smt2::getTesterName(api::Term cons, std::string& name) return true; } -api::Term Smt2::mkIndexedConstant(const std::string& name, - const std::vector& numerals) +cvc5::Term Smt2::mkIndexedConstant(const std::string& name, + const std::vector& numerals) { - if (d_logic.isTheoryEnabled(theory::THEORY_FP)) + if (d_logic.isTheoryEnabled(internal::theory::THEORY_FP)) { if (name == "+oo") { @@ -355,7 +354,8 @@ api::Term Smt2::mkIndexedConstant(const std::string& name, } } - if (d_logic.isTheoryEnabled(theory::THEORY_BV) && name.find("bv") == 0) + if (d_logic.isTheoryEnabled(internal::theory::THEORY_BV) + && name.find("bv") == 0) { std::string bvStr = name.substr(2); return d_solver->mkBitVector(numerals[0], bvStr, 10); @@ -364,10 +364,10 @@ api::Term Smt2::mkIndexedConstant(const std::string& name, // NOTE: Theory parametric constants go here parseError(std::string("Unknown indexed literal `") + name + "'"); - return api::Term(); + return cvc5::Term(); } -api::Kind Smt2::getIndexedOpKind(const std::string& name) +cvc5::Kind Smt2::getIndexedOpKind(const std::string& name) { const auto& kIt = d_indexedOpKindMap.find(name); if (kIt != d_indexedOpKindMap.end()) @@ -375,42 +375,42 @@ api::Kind Smt2::getIndexedOpKind(const std::string& name) return (*kIt).second; } parseError(std::string("Unknown indexed function `") + name + "'"); - return api::UNDEFINED_KIND; + return cvc5::UNDEFINED_KIND; } -api::Term Smt2::bindDefineFunRec( +cvc5::Term Smt2::bindDefineFunRec( const std::string& fname, - const std::vector>& sortedVarNames, - api::Sort t, - std::vector& flattenVars) + const std::vector>& sortedVarNames, + cvc5::Sort t, + std::vector& flattenVars) { - std::vector sorts; - for (const std::pair& svn : sortedVarNames) + std::vector sorts; + for (const std::pair& svn : sortedVarNames) { sorts.push_back(svn.second); } // make the flattened function type, add bound variables // to flattenVars if the defined function was given a function return type. - api::Sort ft = mkFlatFunctionType(sorts, t, flattenVars); + cvc5::Sort ft = mkFlatFunctionType(sorts, t, flattenVars); // allow overloading return bindVar(fname, ft, true); } void Smt2::pushDefineFunRecScope( - const std::vector>& sortedVarNames, - api::Term func, - const std::vector& flattenVars, - std::vector& bvs) + const std::vector>& sortedVarNames, + cvc5::Term func, + const std::vector& flattenVars, + std::vector& bvs) { pushScope(); // bound variables are those that are explicitly named in the preamble // of the define-fun(s)-rec command, we define them here - for (const std::pair& svn : sortedVarNames) + for (const std::pair& svn : sortedVarNames) { - api::Term v = bindBoundVar(svn.first, svn.second); + cvc5::Term v = bindBoundVar(svn.first, svn.second); bvs.push_back(v); } @@ -420,9 +420,9 @@ void Smt2::pushDefineFunRecScope( void Smt2::reset() { d_logicSet = false; d_seenSetLogic = false; - d_logic = LogicInfo(); + d_logic = internal::LogicInfo(); d_operatorKindMap.clear(); - d_lastNamedTerm = std::pair(); + d_lastNamedTerm = std::pair(); } std::unique_ptr Smt2::invConstraint( @@ -439,7 +439,7 @@ std::unique_ptr Smt2::invConstraint( "arguments."); } - std::vector terms; + std::vector terms; for (const std::string& name : names) { if (!isDeclared(name)) @@ -487,44 +487,46 @@ Command* Smt2::setLogic(std::string name, bool fromCommand) // Core theory belongs to every logic addCoreSymbols(); - if(d_logic.isTheoryEnabled(theory::THEORY_UF)) { - Parser::addOperator(api::APPLY_UF); + if (d_logic.isTheoryEnabled(internal::theory::THEORY_UF)) + { + Parser::addOperator(cvc5::APPLY_UF); } if (d_logic.isHigherOrder()) { - addOperator(api::HO_APPLY, "@"); + addOperator(cvc5::HO_APPLY, "@"); } - if(d_logic.isTheoryEnabled(theory::THEORY_ARITH)) { + if (d_logic.isTheoryEnabled(internal::theory::THEORY_ARITH)) + { if(d_logic.areIntegersUsed()) { defineType("Int", d_solver->getIntegerSort(), true); addArithmeticOperators(); if (!strictModeEnabled() || !d_logic.isLinear()) { - addOperator(api::INTS_DIVISION, "div"); - addOperator(api::INTS_MODULUS, "mod"); - addOperator(api::ABS, "abs"); + addOperator(cvc5::INTS_DIVISION, "div"); + addOperator(cvc5::INTS_MODULUS, "mod"); + addOperator(cvc5::ABS, "abs"); } - addIndexedOperator(api::DIVISIBLE, "divisible"); + addIndexedOperator(cvc5::DIVISIBLE, "divisible"); } if (d_logic.areRealsUsed()) { defineType("Real", d_solver->getRealSort(), true); addArithmeticOperators(); - addOperator(api::DIVISION, "/"); + addOperator(cvc5::DIVISION, "/"); if (!strictModeEnabled()) { - addOperator(api::ABS, "abs"); + addOperator(cvc5::ABS, "abs"); } } if (d_logic.areIntegersUsed() && d_logic.areRealsUsed()) { - addOperator(api::TO_INTEGER, "to_int"); - addOperator(api::IS_INTEGER, "is_int"); - addOperator(api::TO_REAL, "to_real"); + addOperator(cvc5::TO_INTEGER, "to_int"); + addOperator(cvc5::IS_INTEGER, "is_int"); + addOperator(cvc5::TO_REAL, "to_real"); } if (d_logic.areTranscendentalsUsed()) @@ -535,87 +537,93 @@ Command* Smt2::setLogic(std::string name, bool fromCommand) if (!strictModeEnabled()) { // integer version of AND - addIndexedOperator(api::IAND, "iand"); + addIndexedOperator(cvc5::IAND, "iand"); // pow2 - addOperator(api::POW2, "int.pow2"); + addOperator(cvc5::POW2, "int.pow2"); } } - if(d_logic.isTheoryEnabled(theory::THEORY_ARRAYS)) { - addOperator(api::SELECT, "select"); - addOperator(api::STORE, "store"); - addOperator(api::EQ_RANGE, "eqrange"); + if (d_logic.isTheoryEnabled(internal::theory::THEORY_ARRAYS)) + { + addOperator(cvc5::SELECT, "select"); + addOperator(cvc5::STORE, "store"); + addOperator(cvc5::EQ_RANGE, "eqrange"); } - if(d_logic.isTheoryEnabled(theory::THEORY_BV)) { + if (d_logic.isTheoryEnabled(internal::theory::THEORY_BV)) + { addBitvectorOperators(); - if (!strictModeEnabled() && d_logic.isTheoryEnabled(theory::THEORY_ARITH) + if (!strictModeEnabled() + && d_logic.isTheoryEnabled(internal::theory::THEORY_ARITH) && d_logic.areIntegersUsed()) { // Conversions between bit-vectors and integers - addOperator(api::BITVECTOR_TO_NAT, "bv2nat"); - addIndexedOperator(api::INT_TO_BITVECTOR, "int2bv"); + addOperator(cvc5::BITVECTOR_TO_NAT, "bv2nat"); + addIndexedOperator(cvc5::INT_TO_BITVECTOR, "int2bv"); } } - if(d_logic.isTheoryEnabled(theory::THEORY_DATATYPES)) { - const std::vector types; + if (d_logic.isTheoryEnabled(internal::theory::THEORY_DATATYPES)) + { + const std::vector types; defineType("Tuple", d_solver->mkTupleSort(types), true); addDatatypesOperators(); } - if(d_logic.isTheoryEnabled(theory::THEORY_SETS)) { + if (d_logic.isTheoryEnabled(internal::theory::THEORY_SETS)) + { defineVar("set.empty", d_solver->mkEmptySet(d_solver->getNullSort())); // the Boolean sort is a placeholder here since we don't have type info // without type annotation defineVar("set.universe", d_solver->mkUniverseSet(d_solver->getBooleanSort())); - addOperator(api::SET_UNION, "set.union"); - addOperator(api::SET_INTER, "set.inter"); - addOperator(api::SET_MINUS, "set.minus"); - addOperator(api::SET_SUBSET, "set.subset"); - addOperator(api::SET_MEMBER, "set.member"); - addOperator(api::SET_SINGLETON, "set.singleton"); - addOperator(api::SET_INSERT, "set.insert"); - addOperator(api::SET_CARD, "set.card"); - addOperator(api::SET_COMPLEMENT, "set.complement"); - addOperator(api::SET_CHOOSE, "set.choose"); - addOperator(api::SET_IS_SINGLETON, "set.is_singleton"); - addOperator(api::SET_MAP, "set.map"); - addOperator(api::RELATION_JOIN, "rel.join"); - addOperator(api::RELATION_PRODUCT, "rel.product"); - addOperator(api::RELATION_TRANSPOSE, "rel.transpose"); - addOperator(api::RELATION_TCLOSURE, "rel.tclosure"); - addOperator(api::RELATION_JOIN_IMAGE, "rel.join_image"); - addOperator(api::RELATION_IDEN, "rel.iden"); + addOperator(cvc5::SET_UNION, "set.union"); + addOperator(cvc5::SET_INTER, "set.inter"); + addOperator(cvc5::SET_MINUS, "set.minus"); + addOperator(cvc5::SET_SUBSET, "set.subset"); + addOperator(cvc5::SET_MEMBER, "set.member"); + addOperator(cvc5::SET_SINGLETON, "set.singleton"); + addOperator(cvc5::SET_INSERT, "set.insert"); + addOperator(cvc5::SET_CARD, "set.card"); + addOperator(cvc5::SET_COMPLEMENT, "set.complement"); + addOperator(cvc5::SET_CHOOSE, "set.choose"); + addOperator(cvc5::SET_IS_SINGLETON, "set.is_singleton"); + addOperator(cvc5::SET_MAP, "set.map"); + addOperator(cvc5::RELATION_JOIN, "rel.join"); + addOperator(cvc5::RELATION_PRODUCT, "rel.product"); + addOperator(cvc5::RELATION_TRANSPOSE, "rel.transpose"); + addOperator(cvc5::RELATION_TCLOSURE, "rel.tclosure"); + addOperator(cvc5::RELATION_JOIN_IMAGE, "rel.join_image"); + addOperator(cvc5::RELATION_IDEN, "rel.iden"); } - if (d_logic.isTheoryEnabled(theory::THEORY_BAGS)) + if (d_logic.isTheoryEnabled(internal::theory::THEORY_BAGS)) { defineVar("bag.empty", d_solver->mkEmptyBag(d_solver->getNullSort())); - addOperator(api::BAG_UNION_MAX, "bag.union_max"); - addOperator(api::BAG_UNION_DISJOINT, "bag.union_disjoint"); - addOperator(api::BAG_INTER_MIN, "bag.inter_min"); - addOperator(api::BAG_DIFFERENCE_SUBTRACT, "bag.difference_subtract"); - addOperator(api::BAG_DIFFERENCE_REMOVE, "bag.difference_remove"); - addOperator(api::BAG_SUBBAG, "bag.subbag"); - addOperator(api::BAG_COUNT, "bag.count"); - addOperator(api::BAG_MEMBER, "bag.member"); - addOperator(api::BAG_DUPLICATE_REMOVAL, "bag.duplicate_removal"); - addOperator(api::BAG_MAKE, "bag"); - addOperator(api::BAG_CARD, "bag.card"); - addOperator(api::BAG_CHOOSE, "bag.choose"); - addOperator(api::BAG_IS_SINGLETON, "bag.is_singleton"); - addOperator(api::BAG_FROM_SET, "bag.from_set"); - addOperator(api::BAG_TO_SET, "bag.to_set"); - addOperator(api::BAG_MAP, "bag.map"); - addOperator(api::BAG_FILTER, "bag.filter"); - addOperator(api::BAG_FOLD, "bag.fold"); - addOperator(api::TABLE_PRODUCT, "table.product"); + addOperator(cvc5::BAG_UNION_MAX, "bag.union_max"); + addOperator(cvc5::BAG_UNION_DISJOINT, "bag.union_disjoint"); + addOperator(cvc5::BAG_INTER_MIN, "bag.inter_min"); + addOperator(cvc5::BAG_DIFFERENCE_SUBTRACT, "bag.difference_subtract"); + addOperator(cvc5::BAG_DIFFERENCE_REMOVE, "bag.difference_remove"); + addOperator(cvc5::BAG_SUBBAG, "bag.subbag"); + addOperator(cvc5::BAG_COUNT, "bag.count"); + addOperator(cvc5::BAG_MEMBER, "bag.member"); + addOperator(cvc5::BAG_DUPLICATE_REMOVAL, "bag.duplicate_removal"); + addOperator(cvc5::BAG_MAKE, "bag"); + addOperator(cvc5::BAG_CARD, "bag.card"); + addOperator(cvc5::BAG_CHOOSE, "bag.choose"); + addOperator(cvc5::BAG_IS_SINGLETON, "bag.is_singleton"); + addOperator(cvc5::BAG_FROM_SET, "bag.from_set"); + addOperator(cvc5::BAG_TO_SET, "bag.to_set"); + addOperator(cvc5::BAG_MAP, "bag.map"); + addOperator(cvc5::BAG_FILTER, "bag.filter"); + addOperator(cvc5::BAG_FOLD, "bag.fold"); + addOperator(cvc5::TABLE_PRODUCT, "table.product"); } - if(d_logic.isTheoryEnabled(theory::THEORY_STRINGS)) { + if (d_logic.isTheoryEnabled(internal::theory::THEORY_STRINGS)) + { defineType("String", d_solver->getStringSort(), true); defineType("RegLan", d_solver->getRegExpSort(), true); defineType("Int", d_solver->getIntegerSort(), true); @@ -634,33 +642,36 @@ Command* Smt2::setLogic(std::string name, bool fromCommand) addQuantifiersOperators(); } - if (d_logic.isTheoryEnabled(theory::THEORY_FP)) { + if (d_logic.isTheoryEnabled(internal::theory::THEORY_FP)) + { defineType("RoundingMode", d_solver->getRoundingModeSort(), true); defineType("Float16", d_solver->mkFloatingPointSort(5, 11), true); defineType("Float32", d_solver->mkFloatingPointSort(8, 24), true); defineType("Float64", d_solver->mkFloatingPointSort(11, 53), true); defineType("Float128", d_solver->mkFloatingPointSort(15, 113), true); - defineVar("RNE", d_solver->mkRoundingMode(api::ROUND_NEAREST_TIES_TO_EVEN)); + defineVar("RNE", + d_solver->mkRoundingMode(cvc5::ROUND_NEAREST_TIES_TO_EVEN)); defineVar("roundNearestTiesToEven", - d_solver->mkRoundingMode(api::ROUND_NEAREST_TIES_TO_EVEN)); - defineVar("RNA", d_solver->mkRoundingMode(api::ROUND_NEAREST_TIES_TO_AWAY)); + d_solver->mkRoundingMode(cvc5::ROUND_NEAREST_TIES_TO_EVEN)); + defineVar("RNA", + d_solver->mkRoundingMode(cvc5::ROUND_NEAREST_TIES_TO_AWAY)); defineVar("roundNearestTiesToAway", - d_solver->mkRoundingMode(api::ROUND_NEAREST_TIES_TO_AWAY)); - defineVar("RTP", d_solver->mkRoundingMode(api::ROUND_TOWARD_POSITIVE)); + d_solver->mkRoundingMode(cvc5::ROUND_NEAREST_TIES_TO_AWAY)); + defineVar("RTP", d_solver->mkRoundingMode(cvc5::ROUND_TOWARD_POSITIVE)); defineVar("roundTowardPositive", - d_solver->mkRoundingMode(api::ROUND_TOWARD_POSITIVE)); - defineVar("RTN", d_solver->mkRoundingMode(api::ROUND_TOWARD_NEGATIVE)); + d_solver->mkRoundingMode(cvc5::ROUND_TOWARD_POSITIVE)); + defineVar("RTN", d_solver->mkRoundingMode(cvc5::ROUND_TOWARD_NEGATIVE)); defineVar("roundTowardNegative", - d_solver->mkRoundingMode(api::ROUND_TOWARD_NEGATIVE)); - defineVar("RTZ", d_solver->mkRoundingMode(api::ROUND_TOWARD_ZERO)); + d_solver->mkRoundingMode(cvc5::ROUND_TOWARD_NEGATIVE)); + defineVar("RTZ", d_solver->mkRoundingMode(cvc5::ROUND_TOWARD_ZERO)); defineVar("roundTowardZero", - d_solver->mkRoundingMode(api::ROUND_TOWARD_ZERO)); + d_solver->mkRoundingMode(cvc5::ROUND_TOWARD_ZERO)); addFloatingPointOperators(); } - if (d_logic.isTheoryEnabled(theory::THEORY_SEP)) + if (d_logic.isTheoryEnabled(internal::theory::THEORY_SEP)) { addSepOperators(); } @@ -683,11 +694,11 @@ Command* Smt2::setLogic(std::string name, bool fromCommand) return cmd; } /* Smt2::setLogic() */ -api::Grammar* Smt2::mkGrammar(const std::vector& boundVars, - const std::vector& ntSymbols) +cvc5::Grammar* Smt2::mkGrammar(const std::vector& boundVars, + const std::vector& ntSymbols) { d_allocGrammars.emplace_back( - new api::Grammar(d_solver->mkSygusGrammar(boundVars, ntSymbols))); + new cvc5::Grammar(d_solver->mkSygusGrammar(boundVars, ntSymbols))); return d_allocGrammars.back().get(); } @@ -728,11 +739,11 @@ void Smt2::checkThatLogicIsSet() void Smt2::checkLogicAllowsFreeSorts() { - if (!d_logic.isTheoryEnabled(theory::THEORY_UF) - && !d_logic.isTheoryEnabled(theory::THEORY_ARRAYS) - && !d_logic.isTheoryEnabled(theory::THEORY_DATATYPES) - && !d_logic.isTheoryEnabled(theory::THEORY_SETS) - && !d_logic.isTheoryEnabled(theory::THEORY_BAGS)) + if (!d_logic.isTheoryEnabled(internal::theory::THEORY_UF) + && !d_logic.isTheoryEnabled(internal::theory::THEORY_ARRAYS) + && !d_logic.isTheoryEnabled(internal::theory::THEORY_DATATYPES) + && !d_logic.isTheoryEnabled(internal::theory::THEORY_SETS) + && !d_logic.isTheoryEnabled(internal::theory::THEORY_BAGS)) { parseErrorLogic("Free sort symbols not allowed in "); } @@ -740,7 +751,7 @@ void Smt2::checkLogicAllowsFreeSorts() void Smt2::checkLogicAllowsFunctions() { - if (!d_logic.isTheoryEnabled(theory::THEORY_UF) && !isHoEnabled()) + if (!d_logic.isTheoryEnabled(internal::theory::THEORY_UF) && !isHoEnabled()) { parseError( "Functions (of non-zero arity) cannot " @@ -815,12 +826,12 @@ bool Smt2::isAbstractValue(const std::string& name) && name.find_first_not_of("0123456789", 1) == std::string::npos; } -void Smt2::parseOpApplyTypeAscription(ParseOp& p, api::Sort type) +void Smt2::parseOpApplyTypeAscription(ParseOp& p, cvc5::Sort type) { Trace("parser") << "parseOpApplyTypeAscription : " << p << " " << type << std::endl; // (as const (Array T1 T2)) - if (p.d_kind == api::CONST_ARRAY) + if (p.d_kind == cvc5::CONST_ARRAY) { if (!type.isArray()) { @@ -859,11 +870,11 @@ void Smt2::parseOpApplyTypeAscription(ParseOp& p, api::Sort type) p.d_expr = applyTypeAscription(p.d_expr, type); } -api::Term Smt2::parseOpToExpr(ParseOp& p) +cvc5::Term Smt2::parseOpToExpr(ParseOp& p) { Trace("parser") << "parseOpToExpr: " << p << std::endl; - api::Term expr; - if (p.d_kind != api::NULL_TERM || !p.d_type.isNull()) + cvc5::Term expr; + if (p.d_kind != cvc5::NULL_TERM || !p.d_type.isNull()) { parseError( "Bad syntax for qualified identifier operator in term position."); @@ -886,23 +897,23 @@ api::Term Smt2::parseOpToExpr(ParseOp& p) return expr; } -api::Term Smt2::applyParseOp(ParseOp& p, std::vector& args) +cvc5::Term Smt2::applyParseOp(ParseOp& p, std::vector& args) { bool isBuiltinOperator = false; // the builtin kind of the overall return expression - api::Kind kind = api::NULL_TERM; + cvc5::Kind kind = cvc5::NULL_TERM; // First phase: process the operator if (TraceIsOn("parser")) { Trace("parser") << "applyParseOp: " << p << " to:" << std::endl; - for (std::vector::iterator i = args.begin(); i != args.end(); + for (std::vector::iterator i = args.begin(); i != args.end(); ++i) { Trace("parser") << "++ " << *i << std::endl; } } - api::Op op; - if (p.d_kind == api::UNDEFINED_KIND && isIndexedOperatorEnabled(p.d_name)) + cvc5::Op op; + if (p.d_kind == cvc5::UNDEFINED_KIND && isIndexedOperatorEnabled(p.d_name)) { // Resolve indexed symbols that cannot be resolved without knowing the type // of the arguments. This is currently limited to `to_fp`. @@ -910,7 +921,7 @@ api::Term Smt2::applyParseOp(ParseOp& p, std::vector& args) size_t nchildren = args.size(); if (nchildren == 1) { - kind = api::FLOATINGPOINT_TO_FP_FROM_IEEE_BV; + kind = cvc5::FLOATINGPOINT_TO_FP_FROM_IEEE_BV; op = d_solver->mkOp(kind, p.d_indices); } else if (nchildren > 2) @@ -930,26 +941,26 @@ api::Term Smt2::applyParseOp(ParseOp& p, std::vector& args) } else { - api::Sort t = args[1].getSort(); + cvc5::Sort t = args[1].getSort(); if (t.isFloatingPoint()) { - kind = api::FLOATINGPOINT_TO_FP_FROM_FP; + kind = cvc5::FLOATINGPOINT_TO_FP_FROM_FP; op = d_solver->mkOp(kind, p.d_indices); } else if (t.isInteger() || t.isReal()) { - kind = api::FLOATINGPOINT_TO_FP_FROM_REAL; + kind = cvc5::FLOATINGPOINT_TO_FP_FROM_REAL; op = d_solver->mkOp(kind, p.d_indices); } else { - kind = api::FLOATINGPOINT_TO_FP_FROM_SBV; + kind = cvc5::FLOATINGPOINT_TO_FP_FROM_SBV; op = d_solver->mkOp(kind, p.d_indices); } } } - else if (p.d_kind != api::NULL_TERM) + else if (p.d_kind != cvc5::NULL_TERM) { // It is a special case, e.g. tuple_select or array constant specification. // We have to wait until the arguments are parsed to resolve it. @@ -957,8 +968,8 @@ api::Term Smt2::applyParseOp(ParseOp& p, std::vector& args) else if (!p.d_expr.isNull()) { // An explicit operator, e.g. an apply function - api::Kind fkind = getKindForFunction(p.d_expr); - if (fkind != api::UNDEFINED_KIND) + cvc5::Kind fkind = getKindForFunction(p.d_expr); + if (fkind != cvc5::UNDEFINED_KIND) { // Some operators may require a specific kind. // Testers are handled differently than other indexed operators, @@ -988,7 +999,7 @@ api::Term Smt2::applyParseOp(ParseOp& p, std::vector& args) { // A non-built-in function application, get the expression checkDeclaration(p.d_name, CHECK_DECLARED, SYM_VARIABLE); - api::Term v = getVariable(p.d_name); + cvc5::Term v = getVariable(p.d_name); if (!v.isNull()) { checkFunctionLike(v); @@ -1001,13 +1012,14 @@ api::Term Smt2::applyParseOp(ParseOp& p, std::vector& args) // Could not find the expression. It may be an overloaded symbol, // in which case we may find it after knowing the types of its // arguments. - std::vector argTypes; - for (std::vector::iterator i = args.begin(); i != args.end(); + std::vector argTypes; + for (std::vector::iterator i = args.begin(); + i != args.end(); ++i) { argTypes.push_back((*i).getSort()); } - api::Term fop = getOverloadedFunctionForTypes(p.d_name, argTypes); + cvc5::Term fop = getOverloadedFunctionForTypes(p.d_name, argTypes); if (!fop.isNull()) { checkFunctionLike(fop); @@ -1024,13 +1036,13 @@ api::Term Smt2::applyParseOp(ParseOp& p, std::vector& args) } } // handle special cases - if (p.d_kind == api::CONST_ARRAY && !p.d_type.isNull()) + if (p.d_kind == cvc5::CONST_ARRAY && !p.d_type.isNull()) { if (args.size() != 1) { parseError("Too many arguments to array constant."); } - api::Term constVal = args[0]; + cvc5::Term constVal = args[0]; if (p.d_type.getArrayElementSort() != constVal.getSort()) { @@ -1042,11 +1054,11 @@ api::Term Smt2::applyParseOp(ParseOp& p, std::vector& args) << "computed const type: " << constVal.getSort(); parseError(ss.str()); } - api::Term ret = d_solver->mkConstArray(p.d_type, constVal); + cvc5::Term ret = d_solver->mkConstArray(p.d_type, constVal); Trace("parser") << "applyParseOp: return store all " << ret << std::endl; return ret; } - else if ((p.d_kind == api::APPLY_SELECTOR || p.d_kind == api::APPLY_UPDATER) + else if ((p.d_kind == cvc5::APPLY_SELECTOR || p.d_kind == cvc5::APPLY_UPDATER) && !p.d_expr.isNull()) { // tuple selector case @@ -1056,11 +1068,11 @@ api::Term Smt2::applyParseOp(ParseOp& p, std::vector& args) "index of tuple select or update is larger than size of uint64_t"); } uint64_t n = p.d_expr.getUInt64Value(); - if (args.size() != (p.d_kind == api::APPLY_SELECTOR ? 1 : 2)) + if (args.size() != (p.d_kind == cvc5::APPLY_SELECTOR ? 1 : 2)) { parseError("wrong number of arguments for tuple select or update"); } - api::Sort t = args[0].getSort(); + cvc5::Sort t = args[0].getSort(); if (!t.isTuple()) { parseError("tuple select or update applied to non-tuple"); @@ -1072,28 +1084,28 @@ api::Term Smt2::applyParseOp(ParseOp& p, std::vector& args) ss << "tuple is of length " << length << "; cannot access index " << n; parseError(ss.str()); } - const api::Datatype& dt = t.getDatatype(); - api::Term ret; - if (p.d_kind == api::APPLY_SELECTOR) + const cvc5::Datatype& dt = t.getDatatype(); + cvc5::Term ret; + if (p.d_kind == cvc5::APPLY_SELECTOR) { - ret = d_solver->mkTerm(api::APPLY_SELECTOR, + ret = d_solver->mkTerm(cvc5::APPLY_SELECTOR, {dt[0][n].getSelectorTerm(), args[0]}); } else { - ret = d_solver->mkTerm(api::APPLY_UPDATER, + ret = d_solver->mkTerm(cvc5::APPLY_UPDATER, {dt[0][n].getUpdaterTerm(), args[0], args[1]}); } Trace("parser") << "applyParseOp: return selector " << ret << std::endl; return ret; } - else if (p.d_kind == api::TUPLE_PROJECT) + else if (p.d_kind == cvc5::TUPLE_PROJECT) { - api::Term ret = d_solver->mkTerm(p.d_op, args); + cvc5::Term ret = d_solver->mkTerm(p.d_op, args); Trace("parser") << "applyParseOp: return projection " << ret << std::endl; return ret; } - else if (p.d_kind != api::NULL_TERM) + else if (p.d_kind != cvc5::NULL_TERM) { // it should not have an expression or type specified at this point if (!p.d_expr.isNull() || !p.d_type.isNull()) @@ -1107,10 +1119,10 @@ api::Term Smt2::applyParseOp(ParseOp& p, std::vector& args) } else if (isBuiltinOperator) { - if (!isHoEnabled() && (kind == api::EQUAL || kind == api::DISTINCT)) + if (!isHoEnabled() && (kind == cvc5::EQUAL || kind == cvc5::DISTINCT)) { // need hol if these operators are applied over function args - for (std::vector::iterator i = args.begin(); i != args.end(); + for (std::vector::iterator i = args.begin(); i != args.end(); ++i) { if ((*i).getSort().isFunction()) @@ -1121,63 +1133,63 @@ api::Term Smt2::applyParseOp(ParseOp& p, std::vector& args) } } } - if (!strictModeEnabled() && (kind == api::AND || kind == api::OR) + if (!strictModeEnabled() && (kind == cvc5::AND || kind == cvc5::OR) && args.size() == 1) { // Unary AND/OR can be replaced with the argument. Trace("parser") << "applyParseOp: return unary " << args[0] << std::endl; return args[0]; } - else if (kind == api::SUB && args.size() == 1) + else if (kind == cvc5::SUB && args.size() == 1) { if (isConstInt(args[0]) && args[0].getRealOrIntegerValueSign() > 0) { // (- n) denotes a negative value std::stringstream suminus; suminus << "-" << args[0].getIntegerValue(); - api::Term ret = d_solver->mkInteger(suminus.str()); + cvc5::Term ret = d_solver->mkInteger(suminus.str()); Trace("parser") << "applyParseOp: return negative constant " << ret << std::endl; return ret; } - api::Term ret = d_solver->mkTerm(api::NEG, {args[0]}); + cvc5::Term ret = d_solver->mkTerm(cvc5::NEG, {args[0]}); Trace("parser") << "applyParseOp: return uminus " << ret << std::endl; return ret; } - else if (kind == api::DIVISION && args.size() == 2 && isConstInt(args[0]) + else if (kind == cvc5::DIVISION && args.size() == 2 && isConstInt(args[0]) && isConstInt(args[1]) && args[1].getRealOrIntegerValueSign() > 0) { // (/ m n) or (/ (- m) n) denote values in reals std::stringstream sdiv; sdiv << args[0].getIntegerValue() << "/" << args[1].getIntegerValue(); - api::Term ret = d_solver->mkReal(sdiv.str()); + cvc5::Term ret = d_solver->mkReal(sdiv.str()); Trace("parser") << "applyParseOp: return rational constant " << ret << std::endl; return ret; } - if (kind == api::SET_SINGLETON && args.size() == 1) + if (kind == cvc5::SET_SINGLETON && args.size() == 1) { - api::Term ret = d_solver->mkTerm(api::SET_SINGLETON, {args[0]}); + cvc5::Term ret = d_solver->mkTerm(cvc5::SET_SINGLETON, {args[0]}); Trace("parser") << "applyParseOp: return set.singleton " << ret << std::endl; return ret; } - else if (kind == api::CARDINALITY_CONSTRAINT) + else if (kind == cvc5::CARDINALITY_CONSTRAINT) { if (args.size() != 2) { parseError("Incorrect arguments for cardinality constraint"); } - api::Sort sort = args[0].getSort(); + cvc5::Sort sort = args[0].getSort(); if (!sort.isUninterpretedSort()) { parseError("Expected uninterpreted sort for cardinality constraint"); } uint64_t ubound = args[1].getUInt32Value(); - api::Term ret = d_solver->mkCardinalityConstraint(sort, ubound); + cvc5::Term ret = d_solver->mkCardinalityConstraint(sort, ubound); return ret; } - api::Term ret = d_solver->mkTerm(kind, args); + cvc5::Term ret = d_solver->mkTerm(kind, args); Trace("parser") << "applyParseOp: return default builtin " << ret << std::endl; return ret; @@ -1186,7 +1198,7 @@ api::Term Smt2::applyParseOp(ParseOp& p, std::vector& args) if (args.size() >= 2) { // may be partially applied function, in this case we use HO_APPLY - api::Sort argt = args[0].getSort(); + cvc5::Sort argt = args[0].getSort(); if (argt.isFunction()) { unsigned arity = argt.getFunctionArity(); @@ -1201,7 +1213,7 @@ api::Term Smt2::applyParseOp(ParseOp& p, std::vector& args) Trace("parser") << "Partial application of " << args[0]; Trace("parser") << " : #argTypes = " << arity; Trace("parser") << ", #args = " << args.size() - 1 << std::endl; - api::Term ret = d_solver->mkTerm(api::HO_APPLY, args); + cvc5::Term ret = d_solver->mkTerm(cvc5::HO_APPLY, args); Trace("parser") << "applyParseOp: return curry higher order " << ret << std::endl; // must curry the partial application @@ -1211,23 +1223,23 @@ api::Term Smt2::applyParseOp(ParseOp& p, std::vector& args) } if (!op.isNull()) { - api::Term ret = d_solver->mkTerm(op, args); + cvc5::Term ret = d_solver->mkTerm(op, args); Trace("parser") << "applyParseOp: return op : " << ret << std::endl; return ret; } - if (kind == api::NULL_TERM) + if (kind == cvc5::NULL_TERM) { // should never happen in the new API parseError("do not know how to process parse op"); } Trace("parser") << "Try default term construction for kind " << kind << " #args = " << args.size() << "..." << std::endl; - api::Term ret = d_solver->mkTerm(kind, args); + cvc5::Term ret = d_solver->mkTerm(kind, args); Trace("parser") << "applyParseOp: return : " << ret << std::endl; return ret; } -void Smt2::notifyNamedExpression(api::Term& expr, std::string name) +void Smt2::notifyNamedExpression(cvc5::Term& expr, std::string name) { checkUserSymbol(name); // remember the expression name in the symbol manager @@ -1244,7 +1256,7 @@ void Smt2::notifyNamedExpression(api::Term& expr, std::string name) setLastNamedTerm(expr, name); } -api::Term Smt2::mkAnd(const std::vector& es) const +cvc5::Term Smt2::mkAnd(const std::vector& es) const { if (es.size() == 0) { @@ -1254,15 +1266,15 @@ api::Term Smt2::mkAnd(const std::vector& es) const { return es[0]; } - return d_solver->mkTerm(api::AND, es); + return d_solver->mkTerm(cvc5::AND, es); } -bool Smt2::isConstInt(const api::Term& t) +bool Smt2::isConstInt(const cvc5::Term& t) { - api::Kind k = t.getKind(); + cvc5::Kind k = t.getKind(); // !!! Note when arithmetic subtyping is eliminated, this will update to // CONST_INTEGER. - return k == api::CONST_RATIONAL && t.getSort().isInteger(); + return k == cvc5::CONST_RATIONAL && t.getSort().isInteger(); } } // namespace parser diff --git a/src/parser/smt2/smt2.h b/src/parser/smt2/smt2.h index a945e373d..f844c9802 100644 --- a/src/parser/smt2/smt2.h +++ b/src/parser/smt2/smt2.h @@ -32,10 +32,7 @@ namespace cvc5 { class Command; - -namespace api { class Solver; -} namespace parser { @@ -49,22 +46,22 @@ class Smt2 : public Parser /** Have we seen a set-logic command yet? */ bool d_seenSetLogic; - LogicInfo d_logic; - std::unordered_map d_operatorKindMap; + internal::LogicInfo d_logic; + std::unordered_map d_operatorKindMap; /** * Maps indexed symbols to the kind of the operator (e.g. "extract" to * BITVECTOR_EXTRACT). */ - std::unordered_map d_indexedOpKindMap; - std::pair d_lastNamedTerm; + std::unordered_map d_indexedOpKindMap; + std::pair d_lastNamedTerm; /** * A list of sygus grammar objects. We keep track of them here to ensure that * they don't get deleted before the commands using them get invoked. */ - std::vector> d_allocGrammars; + std::vector> d_allocGrammars; protected: - Smt2(api::Solver* solver, + Smt2(cvc5::Solver* solver, SymbolManager* sm, bool strictMode = false, bool parseOnly = false); @@ -77,7 +74,7 @@ class Smt2 : public Parser */ void addCoreSymbols(); - void addOperator(api::Kind k, const std::string& name); + void addOperator(cvc5::Kind k, const std::string& name); /** * Registers an indexed function symbol. @@ -88,8 +85,7 @@ class Smt2 : public Parser * be`UNDEFINED_KIND`. * @param name The name of the symbol (e.g. "extract") */ - void addIndexedOperator(api::Kind tKind, - const std::string& name); + void addIndexedOperator(cvc5::Kind tKind, const std::string& name); /** * Checks whether an indexed operator is enabled. All indexed operators in * the current logic are considered to be enabled. This includes operators @@ -100,11 +96,11 @@ class Smt2 : public Parser */ bool isIndexedOperatorEnabled(const std::string& name) const; - api::Kind getOperatorKind(const std::string& name) const; + cvc5::Kind getOperatorKind(const std::string& name) const; bool isOperatorEnabled(const std::string& name) const; - bool isTheoryEnabled(theory::TheoryId theory) const; + bool isTheoryEnabled(internal::theory::TheoryId theory) const; /** * Checks if higher-order support is enabled. @@ -128,8 +124,8 @@ class Smt2 : public Parser * @return The term corresponding to the constant or a parse error if name is * not valid. */ - api::Term mkIndexedConstant(const std::string& name, - const std::vector& numerals); + cvc5::Term mkIndexedConstant(const std::string& name, + const std::vector& numerals); /** * Creates an indexed operator kind, e.g. BITVECTOR_EXTRACT for "extract". @@ -138,13 +134,13 @@ class Smt2 : public Parser * @return The kind corresponding to the indexed operator or a parse * error if the name is not valid. */ - api::Kind getIndexedOpKind(const std::string& name); + cvc5::Kind getIndexedOpKind(const std::string& name); /** * If we are in a version < 2.6, this updates name to the tester name of cons, * e.g. "is-cons". */ - bool getTesterName(api::Term cons, std::string& name) override; + bool getTesterName(cvc5::Term cons, std::string& name) override; /** Make function defined by a define-fun(s)-rec command. * @@ -160,11 +156,11 @@ class Smt2 : public Parser * added to flattenVars in this function if the function is given a function * range type. */ - api::Term bindDefineFunRec( + cvc5::Term bindDefineFunRec( const std::string& fname, - const std::vector>& sortedVarNames, - api::Sort t, - std::vector& flattenVars); + const std::vector>& sortedVarNames, + cvc5::Sort t, + std::vector& flattenVars); /** Push scope for define-fun-rec * @@ -184,10 +180,10 @@ class Smt2 : public Parser * that defined this definition and stores it in bvs. */ void pushDefineFunRecScope( - const std::vector>& sortedVarNames, - api::Term func, - const std::vector& flattenVars, - std::vector& bvs); + const std::vector>& sortedVarNames, + cvc5::Term func, + const std::vector& flattenVars, + std::vector& bvs); void reset() override; @@ -216,7 +212,7 @@ class Smt2 : public Parser /** * Get the logic. */ - const LogicInfo& getLogic() const { return d_logic; } + const internal::LogicInfo& getLogic() const { return d_logic; } /** * Create a Sygus grammar. @@ -224,8 +220,8 @@ class Smt2 : public Parser * @param ntSymbols the pre-declaration of the non-terminal symbols * @return a pointer to the grammar */ - api::Grammar* mkGrammar(const std::vector& boundVars, - const std::vector& ntSymbols); + cvc5::Grammar* mkGrammar(const std::vector& boundVars, + const std::vector& ntSymbols); /** * Are we using smtlib 2.6 or above? If exact=true, then this method returns @@ -279,17 +275,17 @@ class Smt2 : public Parser void includeFile(const std::string& filename); - void setLastNamedTerm(api::Term e, std::string name) + void setLastNamedTerm(cvc5::Term e, std::string name) { d_lastNamedTerm = std::make_pair(e, name); } void clearLastNamedTerm() { - d_lastNamedTerm = std::make_pair(api::Term(), ""); + d_lastNamedTerm = std::make_pair(cvc5::Term(), ""); } - std::pair lastNamedTerm() { return d_lastNamedTerm; } + std::pair lastNamedTerm() { return d_lastNamedTerm; } /** Does name denote an abstract value? (of the form '@n' for numeral n). */ bool isAbstractValue(const std::string& name); @@ -299,7 +295,7 @@ class Smt2 : public Parser * Abstract values are used for processing get-value calls. The argument * name should be such that isUninterpretedSortValue(name) is true. */ - api::Term mkUninterpretedSortValue(const std::string& name); + cvc5::Term mkUninterpretedSortValue(const std::string& name); /** * Smt2 parser provides its own checkDeclaration, which does the @@ -327,7 +323,7 @@ class Smt2 : public Parser * Notify that expression expr was given name std::string via a :named * attribute. */ - void notifyNamedExpression(api::Term& expr, std::string name); + void notifyNamedExpression(cvc5::Term& expr, std::string name); // Throw a ParserException with msg appended with the current logic. inline void parseErrorLogic(const std::string& msg) @@ -353,7 +349,7 @@ class Smt2 : public Parser * - If p's expression field is set, then we leave p unchanged, check if * that expression has the given type and throw a parse error otherwise. */ - void parseOpApplyTypeAscription(ParseOp& p, api::Sort type); + void parseOpApplyTypeAscription(ParseOp& p, cvc5::Sort type); /** * This converts a ParseOp to expression, assuming it is a standalone term. * @@ -363,7 +359,7 @@ class Smt2 : public Parser * of this class. * In other cases, a parse error is thrown. */ - api::Term parseOpToExpr(ParseOp& p); + cvc5::Term parseOpToExpr(ParseOp& p); /** * Apply parse operator to list of arguments, and return the resulting * expression. @@ -396,7 +392,7 @@ class Smt2 : public Parser * - If the overall expression is a partial application, then we process this * as a chain of HO_APPLY terms. */ - api::Term applyParseOp(ParseOp& p, std::vector& args); + cvc5::Term applyParseOp(ParseOp& p, std::vector& args); //------------------------- end processing parse operators private: @@ -423,11 +419,11 @@ class Smt2 : public Parser * @return True if `es` is empty, `e` if `es` consists of a single element * `e`, the conjunction of expressions otherwise. */ - api::Term mkAnd(const std::vector& es) const; + cvc5::Term mkAnd(const std::vector& es) const; /** * Is term t a constant integer? */ - static bool isConstInt(const api::Term& t); + static bool isConstInt(const cvc5::Term& t); }; /* class Smt2 */ } // namespace parser diff --git a/src/parser/smt2/smt2_input.cpp b/src/parser/smt2/smt2_input.cpp index 90b2087fa..f54ad18f7 100644 --- a/src/parser/smt2/smt2_input.cpp +++ b/src/parser/smt2/smt2_input.cpp @@ -63,7 +63,7 @@ Command* Smt2Input::parseCommand() { return d_pSmt2Parser->parseCommand(d_pSmt2Parser); } -api::Term Smt2Input::parseExpr() +cvc5::Term Smt2Input::parseExpr() { return d_pSmt2Parser->parseExpr(d_pSmt2Parser); } diff --git a/src/parser/smt2/smt2_input.h b/src/parser/smt2/smt2_input.h index b05316faf..1d6042616 100644 --- a/src/parser/smt2/smt2_input.h +++ b/src/parser/smt2/smt2_input.h @@ -78,7 +78,7 @@ class Smt2Input : public AntlrInput { * * @throws ParserException if an error is encountered during parsing. */ - api::Term parseExpr() override; + cvc5::Term parseExpr() override; };/* class Smt2Input */ diff --git a/src/parser/smt2/sygus_input.cpp b/src/parser/smt2/sygus_input.cpp index 85288b647..87a7a825b 100644 --- a/src/parser/smt2/sygus_input.cpp +++ b/src/parser/smt2/sygus_input.cpp @@ -64,7 +64,7 @@ Command* SygusInput::parseCommand() { return d_pSmt2Parser->parseSygus(d_pSmt2Parser); } -api::Term SygusInput::parseExpr() +cvc5::Term SygusInput::parseExpr() { return d_pSmt2Parser->parseExpr(d_pSmt2Parser); } diff --git a/src/parser/smt2/sygus_input.h b/src/parser/smt2/sygus_input.h index 6da46736f..157e93da0 100644 --- a/src/parser/smt2/sygus_input.h +++ b/src/parser/smt2/sygus_input.h @@ -74,11 +74,11 @@ class SygusInput : public AntlrInput { /** * Parse an expression from the input. Returns a null - * api::Term if there is no expression there to parse. + * cvc5::Term if there is no expression there to parse. * * @throws ParserException if an error is encountered during parsing. */ - api::Term parseExpr() override; + cvc5::Term parseExpr() override; };/* class SygusInput */ diff --git a/src/parser/tptp/Tptp.g b/src/parser/tptp/Tptp.g index 518b72ac5..a69559ee0 100644 --- a/src/parser/tptp/Tptp.g +++ b/src/parser/tptp/Tptp.g @@ -122,7 +122,7 @@ using namespace cvc5::parser; /** * Parses an expression. - * @return the parsed expression, or the Null cvc5::api::Term if we've reached + * @return the parsed expression, or the Null cvc5::Term if we've reached * the end of the input */ parseExpr returns [cvc5::parser::tptp::myExpr expr] @@ -136,7 +136,7 @@ parseExpr returns [cvc5::parser::tptp::myExpr expr] */ parseCommand returns [cvc5::Command* cmd = NULL] @declarations { - cvc5::api::Term expr; + cvc5::Term expr; Tptp::FormulaRole fr; std::string name, inclSymbol; ParseOp p; @@ -147,14 +147,14 @@ parseCommand returns [cvc5::Command* cmd = NULL] PARSER_STATE->pushScope(); } cnfFormula[expr] { PARSER_STATE->popScope(); - std::vector bvl = PARSER_STATE->getFreeVar(); + std::vector bvl = PARSER_STATE->getFreeVar(); if(!bvl.empty()) { - expr = MK_TERM(api::FORALL,MK_TERM(api::VARIABLE_LIST,bvl),expr); + expr = MK_TERM(cvc5::FORALL,MK_TERM(cvc5::VARIABLE_LIST,bvl),expr); }; } (COMMA_TOK anything*)? RPAREN_TOK DOT_TOK { - cvc5::api::Term aexpr = PARSER_STATE->getAssertionExpr(fr, expr); + cvc5::Term aexpr = PARSER_STATE->getAssertionExpr(fr, expr); if( !aexpr.isNull() ){ // set the expression name (e.g. used with unsat core printing) SYM_MAN->setExpressionName(aexpr, name, true); @@ -166,7 +166,7 @@ parseCommand returns [cvc5::Command* cmd = NULL] { PARSER_STATE->setCnf(false); PARSER_STATE->setFof(true); } fofFormula[expr] (COMMA_TOK anything*)? RPAREN_TOK DOT_TOK { - cvc5::api::Term aexpr = PARSER_STATE->getAssertionExpr(fr,expr); + cvc5::Term aexpr = PARSER_STATE->getAssertionExpr(fr,expr); if( !aexpr.isNull() ){ // set the expression name (e.g. used with unsat core printing) SYM_MAN->setExpressionName(aexpr, name, true); @@ -180,7 +180,7 @@ parseCommand returns [cvc5::Command* cmd = NULL] { PARSER_STATE->setCnf(false); PARSER_STATE->setFof(false); } tffFormula[expr] (COMMA_TOK anything*)? { - cvc5::api::Term aexpr = PARSER_STATE->getAssertionExpr(fr,expr); + cvc5::Term aexpr = PARSER_STATE->getAssertionExpr(fr,expr); if( !aexpr.isNull() ){ // set the expression name (e.g. used with unsat core printing) SYM_MAN->setExpressionName(aexpr, name, true); @@ -206,7 +206,7 @@ parseCommand returns [cvc5::Command* cmd = NULL] PARSER_STATE->parseError("Top level expression must be a formula"); } expr = p.d_expr; - cvc5::api::Term aexpr = PARSER_STATE->getAssertionExpr(fr, expr); + cvc5::Term aexpr = PARSER_STATE->getAssertionExpr(fr, expr); if (!aexpr.isNull()) { // set the expression name (e.g. used with unsat core printing) @@ -240,7 +240,7 @@ parseCommand returns [cvc5::Command* cmd = NULL] { CommandSequence* seq = new CommandSequence(); // assert that all distinct constants are distinct - cvc5::api::Term aexpr = PARSER_STATE->getAssertionDistinctConstants(); + cvc5::Term aexpr = PARSER_STATE->getAssertionDistinctConstants(); if( !aexpr.isNull() ) { seq->addCommand(new AssertCommand(aexpr)); @@ -295,33 +295,33 @@ formulaRole[cvc5::parser::Tptp::FormulaRole& role] /* It can parse a little more than the cnf grammar: false and true can appear. * Normally only false can appear and only at top level. */ -cnfFormula[cvc5::api::Term& expr] +cnfFormula[cvc5::Term& expr] : LPAREN_TOK cnfDisjunction[expr] RPAREN_TOK | cnfDisjunction[expr] ; -cnfDisjunction[cvc5::api::Term& expr] +cnfDisjunction[cvc5::Term& expr] @declarations { - std::vector args; + std::vector args; } : cnfLiteral[expr] { args.push_back(expr); } ( OR_TOK cnfLiteral[expr] { args.push_back(expr); } )* { if(args.size() > 1) { - expr = MK_TERM(api::OR, args); + expr = MK_TERM(cvc5::OR, args); } // else its already in the expr } ; -cnfLiteral[cvc5::api::Term& expr] +cnfLiteral[cvc5::Term& expr] : atomicFormula[expr] - | NOT_TOK atomicFormula[expr] { expr = MK_TERM(api::NOT, expr); } + | NOT_TOK atomicFormula[expr] { expr = MK_TERM(cvc5::NOT, expr); } ; -atomicFormula[cvc5::api::Term& expr] +atomicFormula[cvc5::Term& expr] @declarations { - cvc5::api::Term expr2; + cvc5::Term expr2; std::string name; - std::vector args; + std::vector args; bool equal; ParseOp p; } @@ -333,11 +333,11 @@ atomicFormula[cvc5::api::Term& expr] args.clear(); args.push_back(expr); args.push_back(expr2); - ParseOp p1(api::EQUAL); + ParseOp p1(cvc5::EQUAL); expr = PARSER_STATE->applyParseOp(p1, args); if (!equal) { - expr = MK_TERM(api::NOT, expr); + expr = MK_TERM(cvc5::NOT, expr); } } | { // predicate @@ -355,11 +355,11 @@ atomicFormula[cvc5::api::Term& expr] args.clear(); args.push_back(expr); args.push_back(expr2); - ParseOp p1(api::EQUAL); + ParseOp p1(cvc5::EQUAL); expr = PARSER_STATE->applyParseOp(p1, args); if (!equal) { - expr = MK_TERM(api::NOT, expr); + expr = MK_TERM(cvc5::NOT, expr); } } ) @@ -369,11 +369,11 @@ atomicFormula[cvc5::api::Term& expr] { // equality/disequality between terms args.push_back(expr); args.push_back(expr2); - p.d_kind = api::EQUAL; + p.d_kind = cvc5::EQUAL; expr = PARSER_STATE->applyParseOp(p, args); if (!equal) { - expr = MK_TERM(api::NOT, expr); + expr = MK_TERM(cvc5::NOT, expr); } } )? @@ -387,9 +387,9 @@ atomicFormula[cvc5::api::Term& expr] thfAtomicFormula[cvc5::ParseOp& p] @declarations { - cvc5::api::Term expr2; + cvc5::Term expr2; std::string name; - std::vector args; + std::vector args; bool equal; } : atomicWord[p.d_name] (LPAREN_TOK arguments[args] RPAREN_TOK)? @@ -406,11 +406,11 @@ thfAtomicFormula[cvc5::ParseOp& p] args.clear(); args.push_back(p.d_expr); args.push_back(expr2); - ParseOp p1(api::EQUAL); + ParseOp p1(cvc5::EQUAL); p.d_expr = PARSER_STATE->applyParseOp(p1, args); if (!equal) { - p.d_expr = MK_TERM(api::NOT, p.d_expr); + p.d_expr = MK_TERM(cvc5::NOT, p.d_expr); } } )? @@ -431,7 +431,7 @@ thfAtomicFormula[cvc5::ParseOp& p] //%----Using removes a reduce/reduce ambiguity in lex/yacc. //%----Note: "defined" means a word starting with one $ and "system" means $$. -definedProp[cvc5::api::Term& expr] +definedProp[cvc5::Term& expr] : TRUE_TOK { expr = SOLVER->mkTrue(); } | FALSE_TOK { expr = SOLVER->mkFalse(); } ; @@ -439,122 +439,122 @@ definedProp[cvc5::api::Term& expr] definedPred[cvc5::ParseOp& p] : '$less' { - p.d_kind = api::LT; + p.d_kind = cvc5::LT; } | '$lesseq' { - p.d_kind = api::LEQ; + p.d_kind = cvc5::LEQ; } | '$greater' { - p.d_kind = api::GT; + p.d_kind = cvc5::GT; } | '$greatereq' { - p.d_kind = api::GEQ; + p.d_kind = cvc5::GEQ; } | '$is_rat' // a real n is a rational if there exists q,r integers such that // to_real(q) = n*to_real(r), // where r is non-zero. { - api::Term n = SOLVER->mkVar(SOLVER->getRealSort(), "N"); - api::Term q = SOLVER->mkVar(SOLVER->getIntegerSort(), "Q"); - api::Term qr = MK_TERM(api::TO_REAL, q); - api::Term r = SOLVER->mkVar(SOLVER->getIntegerSort(), "R"); - api::Term rr = MK_TERM(api::TO_REAL, r); - api::Term body = - MK_TERM(api::AND, - MK_TERM(api::NOT, - MK_TERM(api::EQUAL, r, SOLVER->mkInteger(0))), - MK_TERM(api::EQUAL, qr, MK_TERM(api::MULT, n, rr))); - api::Term bvl = MK_TERM(api::VARIABLE_LIST, q, r); - body = MK_TERM(api::EXISTS, bvl, body); - api::Term lbvl = MK_TERM(api::VARIABLE_LIST, n); - p.d_kind = api::LAMBDA; - p.d_expr = MK_TERM(api::LAMBDA, lbvl, body); + cvc5::Term n = SOLVER->mkVar(SOLVER->getRealSort(), "N"); + cvc5::Term q = SOLVER->mkVar(SOLVER->getIntegerSort(), "Q"); + cvc5::Term qr = MK_TERM(cvc5::TO_REAL, q); + cvc5::Term r = SOLVER->mkVar(SOLVER->getIntegerSort(), "R"); + cvc5::Term rr = MK_TERM(cvc5::TO_REAL, r); + cvc5::Term body = + MK_TERM(cvc5::AND, + MK_TERM(cvc5::NOT, + MK_TERM(cvc5::EQUAL, r, SOLVER->mkInteger(0))), + MK_TERM(cvc5::EQUAL, qr, MK_TERM(cvc5::MULT, n, rr))); + cvc5::Term bvl = MK_TERM(cvc5::VARIABLE_LIST, q, r); + body = MK_TERM(cvc5::EXISTS, bvl, body); + cvc5::Term lbvl = MK_TERM(cvc5::VARIABLE_LIST, n); + p.d_kind = cvc5::LAMBDA; + p.d_expr = MK_TERM(cvc5::LAMBDA, lbvl, body); } | '$is_int' { - p.d_kind = api::IS_INTEGER; + p.d_kind = cvc5::IS_INTEGER; } | '$distinct' { - p.d_kind = api::DISTINCT; + p.d_kind = cvc5::DISTINCT; } | AND_TOK { - p.d_kind = api::AND; + p.d_kind = cvc5::AND; } | IMPLIES_TOK { - p.d_kind = api::IMPLIES; + p.d_kind = cvc5::IMPLIES; } | OR_TOK { - p.d_kind = api::OR; + p.d_kind = cvc5::OR; } ; thfDefinedPred[cvc5::ParseOp& p] : '$less' { - p.d_kind = api::LT; + p.d_kind = cvc5::LT; } | '$lesseq' { - p.d_kind = api::LEQ; + p.d_kind = cvc5::LEQ; } | '$greater' { - p.d_kind = api::GT; + p.d_kind = cvc5::GT; } | '$greatereq' { - p.d_kind = api::GEQ; + p.d_kind = cvc5::GEQ; } | '$is_rat' // a real n is a rational if there exists q,r integers such that // to_real(q) = n*to_real(r), // where r is non-zero. { - api::Term n = SOLVER->mkVar(SOLVER->getRealSort(), "N"); - api::Term q = SOLVER->mkVar(SOLVER->getIntegerSort(), "Q"); - api::Term qr = MK_TERM(api::TO_REAL, q); - api::Term r = SOLVER->mkVar(SOLVER->getIntegerSort(), "R"); - api::Term rr = MK_TERM(api::TO_REAL, r); - api::Term body = MK_TERM( - api::AND, - MK_TERM(api::NOT, - MK_TERM(api::EQUAL, r, SOLVER->mkInteger(0))), - MK_TERM(api::EQUAL, qr, MK_TERM(api::MULT, n, rr))); - api::Term bvl = MK_TERM(api::VARIABLE_LIST, q, r); - body = MK_TERM(api::EXISTS, bvl, body); - api::Term lbvl = MK_TERM(api::VARIABLE_LIST, n); - p.d_kind = api::LAMBDA; - p.d_expr = MK_TERM(api::LAMBDA, lbvl, body); + cvc5::Term n = SOLVER->mkVar(SOLVER->getRealSort(), "N"); + cvc5::Term q = SOLVER->mkVar(SOLVER->getIntegerSort(), "Q"); + cvc5::Term qr = MK_TERM(cvc5::TO_REAL, q); + cvc5::Term r = SOLVER->mkVar(SOLVER->getIntegerSort(), "R"); + cvc5::Term rr = MK_TERM(cvc5::TO_REAL, r); + cvc5::Term body = MK_TERM( + cvc5::AND, + MK_TERM(cvc5::NOT, + MK_TERM(cvc5::EQUAL, r, SOLVER->mkInteger(0))), + MK_TERM(cvc5::EQUAL, qr, MK_TERM(cvc5::MULT, n, rr))); + cvc5::Term bvl = MK_TERM(cvc5::VARIABLE_LIST, q, r); + body = MK_TERM(cvc5::EXISTS, bvl, body); + cvc5::Term lbvl = MK_TERM(cvc5::VARIABLE_LIST, n); + p.d_kind = cvc5::LAMBDA; + p.d_expr = MK_TERM(cvc5::LAMBDA, lbvl, body); } | '$is_int' { - p.d_kind = api::IS_INTEGER; + p.d_kind = cvc5::IS_INTEGER; } | '$distinct' { - p.d_kind = api::DISTINCT; + p.d_kind = cvc5::DISTINCT; } | LPAREN_TOK ( AND_TOK { - p.d_kind = api::AND; + p.d_kind = cvc5::AND; } | OR_TOK { - p.d_kind = api::OR; + p.d_kind = cvc5::OR; } | IMPLIES_TOK { - p.d_kind = api::IMPLIES; + p.d_kind = cvc5::IMPLIES; } ) RPAREN_TOK @@ -566,152 +566,152 @@ definedFun[cvc5::ParseOp& p] } : '$uminus' { - p.d_kind = api::NEG; + p.d_kind = cvc5::NEG; } | '$sum' { - p.d_kind = api::ADD; + p.d_kind = cvc5::ADD; } | '$difference' { - p.d_kind = api::SUB; + p.d_kind = cvc5::SUB; } | '$product' { - p.d_kind = api::MULT; + p.d_kind = cvc5::MULT; } | '$quotient' { - p.d_kind = api::DIVISION; + p.d_kind = cvc5::DIVISION; } | ( '$quotient_e' { remainder = false; } | '$remainder_e' { remainder = true; } ) { - api::Term n = SOLVER->mkVar(SOLVER->getRealSort(), "N"); - api::Term d = SOLVER->mkVar(SOLVER->getRealSort(), "D"); - api::Term formals = MK_TERM(api::VARIABLE_LIST, n, d); - api::Term expr = MK_TERM(api::DIVISION, n, d); - expr = MK_TERM(api::ITE, - MK_TERM(api::GEQ, d, SOLVER->mkReal(0)), - MK_TERM(api::TO_INTEGER, expr), - MK_TERM(api::NEG, - MK_TERM(api::TO_INTEGER, - MK_TERM(api::NEG, expr)))); + cvc5::Term n = SOLVER->mkVar(SOLVER->getRealSort(), "N"); + cvc5::Term d = SOLVER->mkVar(SOLVER->getRealSort(), "D"); + cvc5::Term formals = MK_TERM(cvc5::VARIABLE_LIST, n, d); + cvc5::Term expr = MK_TERM(cvc5::DIVISION, n, d); + expr = MK_TERM(cvc5::ITE, + MK_TERM(cvc5::GEQ, d, SOLVER->mkReal(0)), + MK_TERM(cvc5::TO_INTEGER, expr), + MK_TERM(cvc5::NEG, + MK_TERM(cvc5::TO_INTEGER, + MK_TERM(cvc5::NEG, expr)))); if (remainder) { expr = MK_TERM( - api::TO_INTEGER, - MK_TERM(api::SUB, n, MK_TERM(api::MULT, expr, d))); + cvc5::TO_INTEGER, + MK_TERM(cvc5::SUB, n, MK_TERM(cvc5::MULT, expr, d))); } - p.d_kind = api::LAMBDA; - p.d_expr = MK_TERM(api::LAMBDA, formals, expr); + p.d_kind = cvc5::LAMBDA; + p.d_expr = MK_TERM(cvc5::LAMBDA, formals, expr); } | ( '$quotient_t' { remainder = false; } | '$remainder_t' { remainder = true; } ) { - api::Term n = SOLVER->mkVar(SOLVER->getRealSort(), "N"); - api::Term d = SOLVER->mkVar(SOLVER->getRealSort(), "D"); - api::Term formals = MK_TERM(api::VARIABLE_LIST, n, d); - api::Term expr = MK_TERM(api::DIVISION, n, d); - expr = MK_TERM(api::ITE, - MK_TERM(api::GEQ, expr, SOLVER->mkReal(0)), - MK_TERM(api::TO_INTEGER, expr), - MK_TERM(api::NEG, - MK_TERM(api::TO_INTEGER, - MK_TERM(api::NEG, expr)))); + cvc5::Term n = SOLVER->mkVar(SOLVER->getRealSort(), "N"); + cvc5::Term d = SOLVER->mkVar(SOLVER->getRealSort(), "D"); + cvc5::Term formals = MK_TERM(cvc5::VARIABLE_LIST, n, d); + cvc5::Term expr = MK_TERM(cvc5::DIVISION, n, d); + expr = MK_TERM(cvc5::ITE, + MK_TERM(cvc5::GEQ, expr, SOLVER->mkReal(0)), + MK_TERM(cvc5::TO_INTEGER, expr), + MK_TERM(cvc5::NEG, + MK_TERM(cvc5::TO_INTEGER, + MK_TERM(cvc5::NEG, expr)))); if (remainder) { expr = MK_TERM( - api::TO_INTEGER, - MK_TERM(api::SUB, n, MK_TERM(api::MULT, expr, d))); + cvc5::TO_INTEGER, + MK_TERM(cvc5::SUB, n, MK_TERM(cvc5::MULT, expr, d))); } - p.d_kind = api::LAMBDA; - p.d_expr = MK_TERM(api::LAMBDA, formals, expr); + p.d_kind = cvc5::LAMBDA; + p.d_expr = MK_TERM(cvc5::LAMBDA, formals, expr); } | ( '$quotient_f' { remainder = false; } | '$remainder_f' { remainder = true; } ) { - api::Term n = SOLVER->mkVar(SOLVER->getRealSort(), "N"); - api::Term d = SOLVER->mkVar(SOLVER->getRealSort(), "D"); - api::Term formals = MK_TERM(api::VARIABLE_LIST, n, d); - api::Term expr = MK_TERM(api::DIVISION, n, d); - expr = MK_TERM(api::TO_INTEGER, expr); + cvc5::Term n = SOLVER->mkVar(SOLVER->getRealSort(), "N"); + cvc5::Term d = SOLVER->mkVar(SOLVER->getRealSort(), "D"); + cvc5::Term formals = MK_TERM(cvc5::VARIABLE_LIST, n, d); + cvc5::Term expr = MK_TERM(cvc5::DIVISION, n, d); + expr = MK_TERM(cvc5::TO_INTEGER, expr); if (remainder) { - expr = MK_TERM(api::TO_INTEGER, - MK_TERM(api::SUB, n, MK_TERM(api::MULT, expr, d))); + expr = MK_TERM(cvc5::TO_INTEGER, + MK_TERM(cvc5::SUB, n, MK_TERM(cvc5::MULT, expr, d))); } - p.d_kind = api::LAMBDA; - p.d_expr = MK_TERM(api::LAMBDA, formals, expr); + p.d_kind = cvc5::LAMBDA; + p.d_expr = MK_TERM(cvc5::LAMBDA, formals, expr); } | '$floor' { - p.d_kind = api::TO_INTEGER; + p.d_kind = cvc5::TO_INTEGER; } | '$ceiling' { - api::Term n = SOLVER->mkVar(SOLVER->getRealSort(), "N"); - api::Term formals = MK_TERM(api::VARIABLE_LIST, n); - api::Term expr = MK_TERM(api::NEG, - MK_TERM(api::TO_INTEGER, MK_TERM(api::NEG, n))); - p.d_kind = api::LAMBDA; - p.d_expr = MK_TERM(api::LAMBDA, formals, expr); + cvc5::Term n = SOLVER->mkVar(SOLVER->getRealSort(), "N"); + cvc5::Term formals = MK_TERM(cvc5::VARIABLE_LIST, n); + cvc5::Term expr = MK_TERM(cvc5::NEG, + MK_TERM(cvc5::TO_INTEGER, MK_TERM(cvc5::NEG, n))); + p.d_kind = cvc5::LAMBDA; + p.d_expr = MK_TERM(cvc5::LAMBDA, formals, expr); } | '$truncate' { - api::Term n = SOLVER->mkVar(SOLVER->getRealSort(), "N"); - api::Term formals = MK_TERM(api::VARIABLE_LIST, n); - api::Term expr = - MK_TERM(api::ITE, - MK_TERM(api::GEQ, n, SOLVER->mkReal(0)), - MK_TERM(api::TO_INTEGER, n), - MK_TERM(api::NEG, - MK_TERM(api::TO_INTEGER, MK_TERM(api::NEG, n)))); - p.d_kind = api::LAMBDA; - p.d_expr = MK_TERM(api::LAMBDA, formals, expr); + cvc5::Term n = SOLVER->mkVar(SOLVER->getRealSort(), "N"); + cvc5::Term formals = MK_TERM(cvc5::VARIABLE_LIST, n); + cvc5::Term expr = + MK_TERM(cvc5::ITE, + MK_TERM(cvc5::GEQ, n, SOLVER->mkReal(0)), + MK_TERM(cvc5::TO_INTEGER, n), + MK_TERM(cvc5::NEG, + MK_TERM(cvc5::TO_INTEGER, MK_TERM(cvc5::NEG, n)))); + p.d_kind = cvc5::LAMBDA; + p.d_expr = MK_TERM(cvc5::LAMBDA, formals, expr); } | '$round' { - api::Term n = SOLVER->mkVar(SOLVER->getRealSort(), "N"); - api::Term formals = MK_TERM(api::VARIABLE_LIST, n); - api::Term decPart = MK_TERM(api::SUB, n, MK_TERM(api::TO_INTEGER, n)); - api::Term expr = MK_TERM( - api::ITE, - MK_TERM(api::LT, decPart, SOLVER->mkReal(1, 2)), + cvc5::Term n = SOLVER->mkVar(SOLVER->getRealSort(), "N"); + cvc5::Term formals = MK_TERM(cvc5::VARIABLE_LIST, n); + cvc5::Term decPart = MK_TERM(cvc5::SUB, n, MK_TERM(cvc5::TO_INTEGER, n)); + cvc5::Term expr = MK_TERM( + cvc5::ITE, + MK_TERM(cvc5::LT, decPart, SOLVER->mkReal(1, 2)), // if decPart < 0.5, round down - MK_TERM(api::TO_INTEGER, n), - MK_TERM(api::ITE, - MK_TERM(api::GT, decPart, SOLVER->mkReal(1, 2)), + MK_TERM(cvc5::TO_INTEGER, n), + MK_TERM(cvc5::ITE, + MK_TERM(cvc5::GT, decPart, SOLVER->mkReal(1, 2)), // if decPart > 0.5, round up - MK_TERM(api::TO_INTEGER, - MK_TERM(api::ADD, n, SOLVER->mkReal(1))), + MK_TERM(cvc5::TO_INTEGER, + MK_TERM(cvc5::ADD, n, SOLVER->mkReal(1))), // if decPart == 0.5, round to nearest even integer: // result is: to_int(n/2 + .5) * 2 - MK_TERM(api::MULT, - MK_TERM(api::TO_INTEGER, - MK_TERM(api::ADD, - MK_TERM(api::DIVISION, + MK_TERM(cvc5::MULT, + MK_TERM(cvc5::TO_INTEGER, + MK_TERM(cvc5::ADD, + MK_TERM(cvc5::DIVISION, n, SOLVER->mkReal(2)), SOLVER->mkReal(1, 2))), SOLVER->mkInteger(2)))); - p.d_kind = api::LAMBDA; - p.d_expr = MK_TERM(api::LAMBDA, formals, expr); + p.d_kind = cvc5::LAMBDA; + p.d_expr = MK_TERM(cvc5::LAMBDA, formals, expr); } | '$to_int' { - p.d_kind = api::TO_INTEGER; + p.d_kind = cvc5::TO_INTEGER; } | '$to_rat' { - p.d_kind = api::TO_REAL; + p.d_kind = cvc5::TO_REAL; } | '$to_real' { - p.d_kind = api::TO_REAL; + p.d_kind = cvc5::TO_REAL; } ; @@ -723,16 +723,16 @@ equalOp[bool& equal] | DISEQUAL_TOK { equal = false; } ; -term[cvc5::api::Term& expr] +term[cvc5::Term& expr] : functionTerm[expr] | conditionalTerm[expr] | simpleTerm[expr] | letTerm[expr] ; -letTerm[cvc5::api::Term& expr] +letTerm[cvc5::Term& expr] @declarations { - cvc5::api::Term lhs, rhs; + cvc5::Term lhs, rhs; } : '$let_ft' LPAREN_TOK { PARSER_STATE->pushScope(); } tffLetFormulaDefn[lhs, rhs] COMMA_TOK @@ -751,14 +751,14 @@ letTerm[cvc5::api::Term& expr] ; /* Not an application */ -simpleTerm[cvc5::api::Term& expr] +simpleTerm[cvc5::Term& expr] : variable[expr] | NUMBER { expr = PARSER_STATE->d_tmp_expr; } | DISTINCT_OBJECT { expr = PARSER_STATE->convertStrToUnsorted(AntlrInput::tokenText($DISTINCT_OBJECT)); } ; /* Not an application */ -thfSimpleTerm[cvc5::api::Term& expr] +thfSimpleTerm[cvc5::Term& expr] : NUMBER { expr = PARSER_STATE->d_tmp_expr; } | DISTINCT_OBJECT { @@ -767,9 +767,9 @@ thfSimpleTerm[cvc5::api::Term& expr] } ; -functionTerm[cvc5::api::Term& expr] +functionTerm[cvc5::Term& expr] @declarations { - std::vector args; + std::vector args; ParseOp p; } : plainTerm[expr] @@ -779,18 +779,18 @@ functionTerm[cvc5::api::Term& expr] } ; -conditionalTerm[cvc5::api::Term& expr] +conditionalTerm[cvc5::Term& expr] @declarations { - cvc5::api::Term expr2, expr3; + cvc5::Term expr2, expr3; } : '$ite_t' LPAREN_TOK tffLogicFormula[expr] COMMA_TOK term[expr2] COMMA_TOK term[expr3] RPAREN_TOK - { expr = MK_TERM(api::ITE, expr, expr2, expr3); } + { expr = MK_TERM(cvc5::ITE, expr, expr2, expr3); } ; -plainTerm[cvc5::api::Term& expr] +plainTerm[cvc5::Term& expr] @declarations { std::string name; - std::vector args; + std::vector args; ParseOp p; } : atomicWord[p.d_name] (LPAREN_TOK arguments[args] RPAREN_TOK)? @@ -800,15 +800,15 @@ plainTerm[cvc5::api::Term& expr] } ; -arguments[std::vector& args] +arguments[std::vector& args] @declarations { - cvc5::api::Term expr; + cvc5::Term expr; } : term[expr] { args.push_back(expr); } ( COMMA_TOK term[expr] { args.push_back(expr); } )* ; -variable[cvc5::api::Term& expr] +variable[cvc5::Term& expr] : UPPER_WORD { std::string name = AntlrInput::tokenText($UPPER_WORD); @@ -823,35 +823,35 @@ variable[cvc5::api::Term& expr] /*******/ /* FOF */ -fofFormula[cvc5::api::Term& expr] : fofLogicFormula[expr] ; +fofFormula[cvc5::Term& expr] : fofLogicFormula[expr] ; -fofLogicFormula[cvc5::api::Term& expr] +fofLogicFormula[cvc5::Term& expr] @declarations { tptp::NonAssoc na; - std::vector< cvc5::api::Term > args; - cvc5::api::Term expr2; + std::vector< cvc5::Term > args; + cvc5::Term expr2; } : fofUnitaryFormula[expr] ( // Non-associative: <=> <~> ~& ~| ( fofBinaryNonAssoc[na] fofUnitaryFormula[expr2] { switch(na) { case tptp::NA_IFF: - expr = MK_TERM(api::EQUAL,expr,expr2); + expr = MK_TERM(cvc5::EQUAL,expr,expr2); break; case tptp::NA_REVIFF: - expr = MK_TERM(api::XOR,expr,expr2); + expr = MK_TERM(cvc5::XOR,expr,expr2); break; case tptp::NA_IMPLIES: - expr = MK_TERM(api::IMPLIES,expr,expr2); + expr = MK_TERM(cvc5::IMPLIES,expr,expr2); break; case tptp::NA_REVIMPLIES: - expr = MK_TERM(api::IMPLIES,expr2,expr); + expr = MK_TERM(cvc5::IMPLIES,expr2,expr); break; case tptp::NA_REVOR: - expr = MK_TERM(api::NOT,MK_TERM(api::OR,expr,expr2)); + expr = MK_TERM(cvc5::NOT,MK_TERM(cvc5::OR,expr,expr2)); break; case tptp::NA_REVAND: - expr = MK_TERM(api::NOT,MK_TERM(api::AND,expr,expr2)); + expr = MK_TERM(cvc5::NOT,MK_TERM(cvc5::AND,expr,expr2)); break; } } @@ -859,35 +859,35 @@ fofLogicFormula[cvc5::api::Term& expr] | // N-ary and & ( { args.push_back(expr); } ( AND_TOK fofUnitaryFormula[expr] { args.push_back(expr); } )+ - { expr = MK_TERM(api::AND, args); } + { expr = MK_TERM(cvc5::AND, args); } ) | // N-ary or | ( { args.push_back(expr); } ( OR_TOK fofUnitaryFormula[expr] { args.push_back(expr); } )+ - { expr = MK_TERM(api::OR, args); } + { expr = MK_TERM(cvc5::OR, args); } ) )? ; -fofUnitaryFormula[cvc5::api::Term& expr] +fofUnitaryFormula[cvc5::Term& expr] @declarations { - api::Kind kind; - std::vector< cvc5::api::Term > bv; + cvc5::Kind kind; + std::vector< cvc5::Term > bv; } : atomicFormula[expr] | LPAREN_TOK fofLogicFormula[expr] RPAREN_TOK - | NOT_TOK fofUnitaryFormula[expr] { expr = MK_TERM(api::NOT,expr); } + | NOT_TOK fofUnitaryFormula[expr] { expr = MK_TERM(cvc5::NOT,expr); } | // Quantified folQuantifier[kind] LBRACK_TOK {PARSER_STATE->pushScope();} ( bindvariable[expr] { bv.push_back(expr); } ( COMMA_TOK bindvariable[expr] { bv.push_back(expr); } )* ) RBRACK_TOK COLON_TOK fofUnitaryFormula[expr] { PARSER_STATE->popScope(); - expr = MK_TERM(kind, MK_TERM(api::VARIABLE_LIST, bv), expr); + expr = MK_TERM(kind, MK_TERM(cvc5::VARIABLE_LIST, bv), expr); } ; -bindvariable[cvc5::api::Term& expr] +bindvariable[cvc5::Term& expr] : UPPER_WORD { std::string name = AntlrInput::tokenText($UPPER_WORD); expr = PARSER_STATE->bindBoundVar(name, PARSER_STATE->d_unsorted); @@ -903,18 +903,18 @@ fofBinaryNonAssoc[cvc5::parser::tptp::NonAssoc& na] | REVIMPLIES_TOK { na = tptp::NA_REVIMPLIES; } ; -folQuantifier[cvc5::api::Kind& kind] - : FORALL_TOK { kind = api::FORALL; } - | EXISTS_TOK { kind = api::EXISTS; } +folQuantifier[cvc5::Kind& kind] + : FORALL_TOK { kind = cvc5::FORALL; } + | EXISTS_TOK { kind = cvc5::EXISTS; } ; /*******/ /* THF */ -thfQuantifier[cvc5::api::Kind& kind] - : FORALL_TOK { kind = api::FORALL; } - | EXISTS_TOK { kind = api::EXISTS; } - | LAMBDA_TOK { kind = api::LAMBDA; } +thfQuantifier[cvc5::Kind& kind] + : FORALL_TOK { kind = cvc5::FORALL; } + | EXISTS_TOK { kind = cvc5::EXISTS; } + | LAMBDA_TOK { kind = cvc5::LAMBDA; } | CHOICE_TOK { UNSUPPORTED("Choice operator"); @@ -932,8 +932,8 @@ thfQuantifier[cvc5::api::Kind& kind] thfAtomTyping[cvc5::Command*& cmd] // for now only supports mapping types (i.e. no applied types) @declarations { - cvc5::api::Term expr; - cvc5::api::Sort type; + cvc5::Term expr; + cvc5::Sort type; std::string name; } : LPAREN_TOK thfAtomTyping[cmd] RPAREN_TOK @@ -955,7 +955,7 @@ thfAtomTyping[cvc5::Command*& cmd] else { // as yet, it's undeclared - api::Sort atype = PARSER_STATE->mkSort(name); + cvc5::Sort atype = PARSER_STATE->mkSort(name); cmd = new DeclareSortCommand(name, 0, atype); } } @@ -987,7 +987,7 @@ thfAtomTyping[cvc5::Command*& cmd] else { // as of yet, it's undeclared - cvc5::api::Term freshExpr; + cvc5::Term freshExpr; if (type.isFunction()) { freshExpr = PARSER_STATE->bindVar(name, type); @@ -1005,9 +1005,9 @@ thfAtomTyping[cvc5::Command*& cmd] thfLogicFormula[cvc5::ParseOp& p] @declarations { tptp::NonAssoc na; - std::vector args; + std::vector args; std::vector p_args; - cvc5::api::Term expr2; + cvc5::Term expr2; bool equal; ParseOp p1; } @@ -1038,10 +1038,10 @@ thfLogicFormula[cvc5::ParseOp& p] } args.push_back(p.d_expr); args.push_back(p1.d_expr); - p.d_expr = MK_TERM(api::EQUAL, args); + p.d_expr = MK_TERM(cvc5::EQUAL, args); if (!equal) { - p.d_expr = MK_TERM(api::NOT, p.d_expr); + p.d_expr = MK_TERM(cvc5::NOT, p.d_expr); } } | // Non-associative: <=> <~> ~& ~| @@ -1055,24 +1055,24 @@ thfLogicFormula[cvc5::ParseOp& p] switch (na) { case tptp::NA_IFF: - p.d_expr = MK_TERM(api::EQUAL, p.d_expr, p1.d_expr); + p.d_expr = MK_TERM(cvc5::EQUAL, p.d_expr, p1.d_expr); break; case tptp::NA_REVIFF: - p.d_expr = MK_TERM(api::XOR, p.d_expr, p1.d_expr); + p.d_expr = MK_TERM(cvc5::XOR, p.d_expr, p1.d_expr); break; case tptp::NA_IMPLIES: - p.d_expr = MK_TERM(api::IMPLIES, p.d_expr, p1.d_expr); + p.d_expr = MK_TERM(cvc5::IMPLIES, p.d_expr, p1.d_expr); break; case tptp::NA_REVIMPLIES: - p.d_expr = MK_TERM(api::IMPLIES, p1.d_expr, p.d_expr); + p.d_expr = MK_TERM(cvc5::IMPLIES, p1.d_expr, p.d_expr); break; case tptp::NA_REVOR: p.d_expr = - MK_TERM(api::NOT, MK_TERM(api::OR, p.d_expr, p1.d_expr)); + MK_TERM(cvc5::NOT, MK_TERM(cvc5::OR, p.d_expr, p1.d_expr)); break; case tptp::NA_REVAND: p.d_expr = - MK_TERM(api::NOT, MK_TERM(api::AND, p.d_expr, p1.d_expr)); + MK_TERM(cvc5::NOT, MK_TERM(cvc5::AND, p.d_expr, p1.d_expr)); break; } } @@ -1097,7 +1097,7 @@ thfLogicFormula[cvc5::ParseOp& p] } )+ { - p.d_expr = MK_TERM(api::AND, args); + p.d_expr = MK_TERM(cvc5::AND, args); } ) | // N-ary or | @@ -1121,7 +1121,7 @@ thfLogicFormula[cvc5::ParseOp& p] } )+ { - p.d_expr = MK_TERM(api::OR, args); + p.d_expr = MK_TERM(cvc5::OR, args); } ) | // N-ary @ | @@ -1186,14 +1186,14 @@ thfLogicFormula[cvc5::ParseOp& p] } for (unsigned i = 0, size = args.size(); i < size; ++i) { - p.d_expr = MK_TERM(api::HO_APPLY, p.d_expr, args[i]); + p.d_expr = MK_TERM(cvc5::HO_APPLY, p.d_expr, args[i]); } } } )? ; -thfTupleForm[std::vector& args] +thfTupleForm[std::vector& args] @declarations { ParseOp p; } @@ -1218,9 +1218,9 @@ thfTupleForm[std::vector& args] thfUnitaryFormula[cvc5::ParseOp& p] @declarations { - api::Kind kind; - std::vector< cvc5::api::Term > bv; - cvc5::api::Term expr; + cvc5::Kind kind; + std::vector< cvc5::Term > bv; + cvc5::Term expr; bool equal; ParseOp p1; } @@ -1231,7 +1231,7 @@ thfUnitaryFormula[cvc5::ParseOp& p] RPAREN_TOK | NOT_TOK { - p.d_kind = api::NOT; + p.d_kind = cvc5::NOT; } ( thfUnitaryFormula[p1] @@ -1240,7 +1240,7 @@ thfUnitaryFormula[cvc5::ParseOp& p] { PARSER_STATE->parseError("NOT must be applied to a formula"); } - std::vector args{p1.d_expr}; + std::vector args{p1.d_expr}; p.d_expr = PARSER_STATE->applyParseOp(p, args); } )? @@ -1272,8 +1272,8 @@ thfUnitaryFormula[cvc5::ParseOp& p] // see documentation of mkFlatFunctionType for how it's done // // flatten body via flattening its type - std::vector sorts; - std::vector flattenVars; + std::vector sorts; + std::vector flattenVars; PARSER_STATE->mkFlatFunctionType(sorts, expr.getSort(), flattenVars); if (!flattenVars.empty()) { @@ -1282,18 +1282,18 @@ thfUnitaryFormula[cvc5::ParseOp& p] // add variables to VARIABLE_LIST bv.insert(bv.end(), flattenVars.begin(), flattenVars.end()); } - p.d_expr = MK_TERM(p.d_kind, MK_TERM(api::VARIABLE_LIST, bv), expr); + p.d_expr = MK_TERM(p.d_kind, MK_TERM(cvc5::VARIABLE_LIST, bv), expr); } ; /*******/ /* TFF */ -tffFormula[cvc5::api::Term& expr] : tffLogicFormula[expr]; +tffFormula[cvc5::Term& expr] : tffLogicFormula[expr]; tffTypedAtom[cvc5::Command*& cmd] @declarations { - cvc5::api::Term expr; - cvc5::api::Sort type; + cvc5::Term expr; + cvc5::Sort type; std::string name; } : LPAREN_TOK tffTypedAtom[cmd] RPAREN_TOK @@ -1307,7 +1307,7 @@ tffTypedAtom[cvc5::Command*& cmd] PARSER_STATE->parseError("Symbol `" + name + "' previously declared as a constant; cannot also be a sort"); } else { // as yet, it's undeclared - api::Sort atype = PARSER_STATE->mkSort(name); + cvc5::Sort atype = PARSER_STATE->mkSort(name); cmd = new DeclareSortCommand(name, 0, atype); } } @@ -1326,40 +1326,40 @@ tffTypedAtom[cvc5::Command*& cmd] } } else { // as yet, it's undeclared - cvc5::api::Term aexpr = PARSER_STATE->bindVar(name, type); + cvc5::Term aexpr = PARSER_STATE->bindVar(name, type); cmd = new DeclareFunctionCommand(name, aexpr, type); } } ) ; -tffLogicFormula[cvc5::api::Term& expr] +tffLogicFormula[cvc5::Term& expr] @declarations { tptp::NonAssoc na; - std::vector< cvc5::api::Term > args; - cvc5::api::Term expr2; + std::vector< cvc5::Term > args; + cvc5::Term expr2; } : tffUnitaryFormula[expr] ( // Non Assoc <=> <~> ~& ~| ( fofBinaryNonAssoc[na] tffUnitaryFormula[expr2] { switch(na) { case tptp::NA_IFF: - expr = MK_TERM(api::EQUAL,expr,expr2); + expr = MK_TERM(cvc5::EQUAL,expr,expr2); break; case tptp::NA_REVIFF: - expr = MK_TERM(api::XOR,expr,expr2); + expr = MK_TERM(cvc5::XOR,expr,expr2); break; case tptp::NA_IMPLIES: - expr = MK_TERM(api::IMPLIES,expr,expr2); + expr = MK_TERM(cvc5::IMPLIES,expr,expr2); break; case tptp::NA_REVIMPLIES: - expr = MK_TERM(api::IMPLIES,expr2,expr); + expr = MK_TERM(cvc5::IMPLIES,expr2,expr); break; case tptp::NA_REVOR: - expr = MK_TERM(api::NOT,MK_TERM(api::OR,expr,expr2)); + expr = MK_TERM(cvc5::NOT,MK_TERM(cvc5::OR,expr,expr2)); break; case tptp::NA_REVAND: - expr = MK_TERM(api::NOT,MK_TERM(api::AND,expr,expr2)); + expr = MK_TERM(cvc5::NOT,MK_TERM(cvc5::AND,expr,expr2)); break; } } @@ -1367,35 +1367,35 @@ tffLogicFormula[cvc5::api::Term& expr] | // And & ( { args.push_back(expr); } ( AND_TOK tffUnitaryFormula[expr] { args.push_back(expr); } )+ - { expr = MK_TERM(api::AND,args); } + { expr = MK_TERM(cvc5::AND,args); } ) | // Or | ( { args.push_back(expr); } ( OR_TOK tffUnitaryFormula[expr] { args.push_back(expr); } )+ - { expr = MK_TERM(api::OR,args); } + { expr = MK_TERM(cvc5::OR,args); } ) )? ; -tffUnitaryFormula[cvc5::api::Term& expr] +tffUnitaryFormula[cvc5::Term& expr] @declarations { - api::Kind kind; - std::vector< cvc5::api::Term > bv; - cvc5::api::Term lhs, rhs; + cvc5::Kind kind; + std::vector< cvc5::Term > bv; + cvc5::Term lhs, rhs; } : atomicFormula[expr] | LPAREN_TOK tffLogicFormula[expr] RPAREN_TOK - | NOT_TOK tffUnitaryFormula[expr] { expr = MK_TERM(api::NOT,expr); } + | NOT_TOK tffUnitaryFormula[expr] { expr = MK_TERM(cvc5::NOT,expr); } | // Quantified folQuantifier[kind] LBRACK_TOK {PARSER_STATE->pushScope();} ( tffbindvariable[expr] { bv.push_back(expr); } ( COMMA_TOK tffbindvariable[expr] { bv.push_back(expr); } )* ) RBRACK_TOK COLON_TOK tffUnitaryFormula[expr] { PARSER_STATE->popScope(); - expr = MK_TERM(kind, MK_TERM(api::VARIABLE_LIST, bv), expr); + expr = MK_TERM(kind, MK_TERM(cvc5::VARIABLE_LIST, bv), expr); } | '$ite_f' LPAREN_TOK tffLogicFormula[expr] COMMA_TOK tffLogicFormula[lhs] COMMA_TOK tffLogicFormula[rhs] RPAREN_TOK - { expr = MK_TERM(api::ITE, expr, lhs, rhs); } + { expr = MK_TERM(cvc5::ITE, expr, lhs, rhs); } | '$let_tf' LPAREN_TOK { PARSER_STATE->pushScope(); } tffLetTermDefn[lhs, rhs] COMMA_TOK tffFormula[expr] @@ -1412,22 +1412,22 @@ tffUnitaryFormula[cvc5::api::Term& expr] RPAREN_TOK ; -tffLetTermDefn[cvc5::api::Term& lhs, cvc5::api::Term& rhs] +tffLetTermDefn[cvc5::Term& lhs, cvc5::Term& rhs] @declarations { - std::vector bvlist; + std::vector bvlist; } : (FORALL_TOK LBRACK_TOK tffVariableList[bvlist] RBRACK_TOK COLON_TOK)* tffLetTermBinding[bvlist, lhs, rhs] ; -tffLetTermBinding[std::vector & bvlist, - cvc5::api::Term& lhs, - cvc5::api::Term& rhs] +tffLetTermBinding[std::vector & bvlist, + cvc5::Term& lhs, + cvc5::Term& rhs] : term[lhs] EQUAL_TOK term[rhs] { PARSER_STATE->checkLetBinding(bvlist, lhs, rhs, false); - std::vector lchildren(++lhs.begin(), lhs.end()); - rhs = MK_TERM(api::LAMBDA, MK_TERM(api::VARIABLE_LIST, lchildren), rhs); + std::vector lchildren(++lhs.begin(), lhs.end()); + rhs = MK_TERM(cvc5::LAMBDA, MK_TERM(cvc5::VARIABLE_LIST, lchildren), rhs); // since lhs is always APPLY_UF (otherwise we'd have had a parser error in // checkLetBinding) the function to be replaced is always the first // argument. Note that the way in which lchildren is built above is also @@ -1437,23 +1437,23 @@ tffLetTermBinding[std::vector & bvlist, | LPAREN_TOK tffLetTermBinding[bvlist, lhs, rhs] RPAREN_TOK ; -tffLetFormulaDefn[cvc5::api::Term& lhs, cvc5::api::Term& rhs] +tffLetFormulaDefn[cvc5::Term& lhs, cvc5::Term& rhs] @declarations { - std::vector bvlist; + std::vector bvlist; } : (FORALL_TOK LBRACK_TOK tffVariableList[bvlist] RBRACK_TOK COLON_TOK)* tffLetFormulaBinding[bvlist, lhs, rhs] ; -tffLetFormulaBinding[std::vector & bvlist, - cvc5::api::Term& lhs, - cvc5::api::Term& rhs] +tffLetFormulaBinding[std::vector & bvlist, + cvc5::Term& lhs, + cvc5::Term& rhs] : atomicFormula[lhs] IFF_TOK tffUnitaryFormula[rhs] { PARSER_STATE->checkLetBinding(bvlist, lhs, rhs, true); - std::vector lchildren(++lhs.begin(), lhs.end()); - rhs = MK_TERM(api::LAMBDA, MK_TERM(api::VARIABLE_LIST, lchildren), rhs); + std::vector lchildren(++lhs.begin(), lhs.end()); + rhs = MK_TERM(cvc5::LAMBDA, MK_TERM(cvc5::VARIABLE_LIST, lchildren), rhs); // since lhs is always APPLY_UF (otherwise we'd have had a parser error in // checkLetBinding) the function to be replaced is always the first // argument. Note that the way in which lchildren is built above is also @@ -1463,10 +1463,10 @@ tffLetFormulaBinding[std::vector & bvlist, | LPAREN_TOK tffLetFormulaBinding[bvlist, lhs, rhs] RPAREN_TOK ; -thfBindVariable[cvc5::api::Term& expr] +thfBindVariable[cvc5::Term& expr] @declarations { std::string name; - cvc5::api::Sort type = PARSER_STATE->d_unsorted; + cvc5::Sort type = PARSER_STATE->d_unsorted; } : UPPER_WORD { name = AntlrInput::tokenText($UPPER_WORD); } @@ -1477,9 +1477,9 @@ thfBindVariable[cvc5::api::Term& expr] ; -tffbindvariable[cvc5::api::Term& expr] +tffbindvariable[cvc5::Term& expr] @declarations { - cvc5::api::Sort type = PARSER_STATE->d_unsorted; + cvc5::Sort type = PARSER_STATE->d_unsorted; } : UPPER_WORD ( COLON_TOK parseType[type] )? @@ -1490,18 +1490,18 @@ tffbindvariable[cvc5::api::Term& expr] // bvlist is accumulative; it can already contain elements // on the way in, which are left undisturbed -tffVariableList[std::vector& bvlist] +tffVariableList[std::vector& bvlist] @declarations { - cvc5::api::Term e; + cvc5::Term e; } : tffbindvariable[e] { bvlist.push_back(e); } ( COMMA_TOK tffbindvariable[e] { bvlist.push_back(e); } )* ; -parseThfType[cvc5::api::Sort& type] +parseThfType[cvc5::Sort& type] // assumes only mapping types (arrows), no tuple type @declarations { - std::vector sorts; + std::vector sorts; } : thfType[type] { sorts.push_back(type); } ( @@ -1514,24 +1514,24 @@ parseThfType[cvc5::api::Sort& type] } else { - api::Sort range = sorts.back(); + cvc5::Sort range = sorts.back(); sorts.pop_back(); type = PARSER_STATE->mkFlatFunctionType(sorts, range); } } ; -thfType[cvc5::api::Sort& type] +thfType[cvc5::Sort& type] // assumes only mapping types (arrows), no tuple type : simpleType[type] | LPAREN_TOK parseThfType[type] RPAREN_TOK | LBRACK_TOK { UNSUPPORTED("Tuple types"); } parseThfType[type] RBRACK_TOK ; -parseType[cvc5::api::Sort & type] +parseType[cvc5::Sort & type] @declarations { - std::vector v; + std::vector v; } : simpleType[type] | ( simpleType[type] { v.push_back(type); } @@ -1545,7 +1545,7 @@ parseType[cvc5::api::Sort & type] ; // non-function types -simpleType[cvc5::api::Sort& type] +simpleType[cvc5::Sort& type] @declarations { std::string name; } diff --git a/src/parser/tptp/tptp.cpp b/src/parser/tptp/tptp.cpp index fcbdea9b6..79878adfa 100644 --- a/src/parser/tptp/tptp.cpp +++ b/src/parser/tptp/tptp.cpp @@ -34,7 +34,7 @@ namespace cvc5 { namespace parser { -Tptp::Tptp(api::Solver* solver, +Tptp::Tptp(cvc5::Solver* solver, SymbolManager* sm, bool strictMode, bool parseOnly) @@ -89,14 +89,14 @@ void Tptp::addTheory(Theory theory) { defineType("Bool", d_solver->getBooleanSort()); defineVar("$true", d_solver->mkTrue()); defineVar("$false", d_solver->mkFalse()); - addOperator(api::AND); - addOperator(api::EQUAL); - addOperator(api::IMPLIES); - // addOperator(api::ITE); //only for tff thf - addOperator(api::NOT); - addOperator(api::OR); - addOperator(api::XOR); - addOperator(api::APPLY_UF); + addOperator(cvc5::AND); + addOperator(cvc5::EQUAL); + addOperator(cvc5::IMPLIES); + // addOperator(cvc5::ITE); //only for tff thf + addOperator(cvc5::NOT); + addOperator(cvc5::OR); + addOperator(cvc5::XOR); + addOperator(cvc5::APPLY_UF); //Add quantifiers? break; @@ -191,21 +191,21 @@ void Tptp::includeFile(std::string fileName) { } } -void Tptp::checkLetBinding(const std::vector& bvlist, - api::Term lhs, - api::Term rhs, +void Tptp::checkLetBinding(const std::vector& bvlist, + cvc5::Term lhs, + cvc5::Term rhs, bool formula) { - if (lhs.getKind() != api::APPLY_UF) + if (lhs.getKind() != cvc5::APPLY_UF) { parseError("malformed let: LHS must be a flat function application"); } - const std::multiset vars{lhs.begin(), lhs.end()}; + const std::multiset vars{lhs.begin(), lhs.end()}; if (formula && !lhs.getSort().isBoolean()) { parseError("malformed let: LHS must be formula"); } - for (const cvc5::api::Term& var : vars) + for (const cvc5::Term& var : vars) { if (var.hasOp()) { @@ -215,7 +215,7 @@ void Tptp::checkLetBinding(const std::vector& bvlist, } // ensure all let-bound variables appear on the LHS, and appear only once - for (const api::Term& bound_var : bvlist) + for (const cvc5::Term& bound_var : bvlist) { const size_t count = vars.count(bound_var); if (count == 0) { @@ -230,20 +230,20 @@ void Tptp::checkLetBinding(const std::vector& bvlist, } } -api::Term Tptp::parseOpToExpr(ParseOp& p) +cvc5::Term Tptp::parseOpToExpr(ParseOp& p) { - api::Term expr; + cvc5::Term expr; if (!p.d_expr.isNull()) { return p.d_expr; } // if it has a kind, it's a builtin one and this function should not have been // called - Assert(p.d_kind == api::NULL_TERM); + Assert(p.d_kind == cvc5::NULL_TERM); expr = isTptpDeclared(p.d_name); if (expr.isNull()) { - api::Sort t = + cvc5::Sort t = p.d_type == d_solver->getBooleanSort() ? p.d_type : d_unsorted; expr = bindVar(p.d_name, t); // must define at level zero d_auxSymbolTable[p.d_name] = expr; @@ -252,28 +252,28 @@ api::Term Tptp::parseOpToExpr(ParseOp& p) return expr; } -api::Term Tptp::isTptpDeclared(const std::string& name) +cvc5::Term Tptp::isTptpDeclared(const std::string& name) { if (isDeclared(name)) { // already appeared return getVariable(name); } - std::unordered_map::iterator it = + std::unordered_map::iterator it = d_auxSymbolTable.find(name); if (it != d_auxSymbolTable.end()) { return it->second; } // otherwise null - return api::Term(); + return cvc5::Term(); } -api::Term Tptp::applyParseOp(ParseOp& p, std::vector& args) +cvc5::Term Tptp::applyParseOp(ParseOp& p, std::vector& args) { if (TraceIsOn("parser")) { Trace("parser") << "applyParseOp: " << p << " to:" << std::endl; - for (std::vector::iterator i = args.begin(); i != args.end(); + for (std::vector::iterator i = args.begin(); i != args.end(); ++i) { Trace("parser") << "++ " << *i << std::endl; @@ -286,20 +286,20 @@ api::Term Tptp::applyParseOp(ParseOp& p, std::vector& args) // this happens with some arithmetic kinds, which are wrapped around // lambdas. args.insert(args.begin(), p.d_expr); - return d_solver->mkTerm(api::APPLY_UF, args); + return d_solver->mkTerm(cvc5::APPLY_UF, args); } bool isBuiltinKind = false; // the builtin kind of the overall return expression - api::Kind kind = api::NULL_TERM; + cvc5::Kind kind = cvc5::NULL_TERM; // First phase: piece operator together - if (p.d_kind == api::NULL_TERM) + if (p.d_kind == cvc5::NULL_TERM) { // A non-built-in function application, get the expression - api::Term v = isTptpDeclared(p.d_name); + cvc5::Term v = isTptpDeclared(p.d_name); if (v.isNull()) { - std::vector sorts(args.size(), d_unsorted); - api::Sort t = + std::vector sorts(args.size(), d_unsorted); + cvc5::Sort t = p.d_type == d_solver->getBooleanSort() ? p.d_type : d_unsorted; t = d_solver->mkFunctionSort(sorts, t); v = bindVar(p.d_name, t); // must define at level zero @@ -326,14 +326,14 @@ api::Term Tptp::applyParseOp(ParseOp& p, std::vector& args) kind = p.d_kind; isBuiltinKind = true; } - Assert(kind != api::NULL_TERM); + Assert(kind != cvc5::NULL_TERM); // Second phase: apply parse op to the arguments if (isBuiltinKind) { - if (!hol() && (kind == api::EQUAL || kind == api::DISTINCT)) + if (!hol() && (kind == cvc5::EQUAL || kind == cvc5::DISTINCT)) { // need hol if these operators are applied over function args - for (std::vector::iterator i = args.begin(); i != args.end(); + for (std::vector::iterator i = args.begin(); i != args.end(); ++i) { if ((*i).getSort().isFunction()) @@ -342,23 +342,23 @@ api::Term Tptp::applyParseOp(ParseOp& p, std::vector& args) } } } - if (!strictModeEnabled() && (kind == api::AND || kind == api::OR) + if (!strictModeEnabled() && (kind == cvc5::AND || kind == cvc5::OR) && args.size() == 1) { // Unary AND/OR can be replaced with the argument. return args[0]; } - if (kind == api::SUB && args.size() == 1) + if (kind == cvc5::SUB && args.size() == 1) { - return d_solver->mkTerm(api::NEG, {args[0]}); + return d_solver->mkTerm(cvc5::NEG, {args[0]}); } - if (kind == api::TO_REAL) + if (kind == cvc5::TO_REAL) { // If the type is real, this is a no-op. We require this special // case in the TPTP parser since TO_REAL is designed to match the // SMT-LIB operator, meaning it can only be applied to integers, whereas // the TPTP to_real / to_rat do not have the same semantics. - api::Sort s = args[0].getSort(); + cvc5::Sort s = args[0].getSort(); if (s.isReal()) { return args[0]; @@ -370,7 +370,7 @@ api::Term Tptp::applyParseOp(ParseOp& p, std::vector& args) // check if partially applied function, in this case we use HO_APPLY if (args.size() >= 2) { - api::Sort argt = args[0].getSort(); + cvc5::Sort argt = args[0].getSort(); if (argt.isFunction()) { unsigned arity = argt.getFunctionArity(); @@ -384,14 +384,14 @@ api::Term Tptp::applyParseOp(ParseOp& p, std::vector& args) Trace("parser") << " : #argTypes = " << arity; Trace("parser") << ", #args = " << args.size() - 1 << std::endl; // must curry the partial application - return d_solver->mkTerm(api::HO_APPLY, args); + return d_solver->mkTerm(cvc5::HO_APPLY, args); } } } return d_solver->mkTerm(kind, args); } -api::Term Tptp::mkDecimal( +cvc5::Term Tptp::mkDecimal( std::string& snum, std::string& sden, bool pos, size_t exp, bool posE) { // the numerator and the denominator @@ -467,25 +467,25 @@ void Tptp::forceLogic(const std::string& logic) preemptCommand(new SetBenchmarkLogicCommand(logic)); } -void Tptp::addFreeVar(api::Term var) +void Tptp::addFreeVar(cvc5::Term var) { Assert(cnf()); d_freeVar.push_back(var); } -std::vector Tptp::getFreeVar() +std::vector Tptp::getFreeVar() { Assert(cnf()); - std::vector r; + std::vector r; r.swap(d_freeVar); return r; } -api::Term Tptp::convertRatToUnsorted(api::Term expr) +cvc5::Term Tptp::convertRatToUnsorted(cvc5::Term expr) { // Create the conversion function If they doesn't exists if (d_rtu_op.isNull()) { - api::Sort t; + cvc5::Sort t; // Conversion from rational to unsorted t = d_solver->mkFunctionSort(d_solver->getRealSort(), d_unsorted); d_rtu_op = d_solver->mkConst(t, "$$rtu"); @@ -498,19 +498,19 @@ api::Term Tptp::convertRatToUnsorted(api::Term expr) // Add the inverse in order to show that over the elements that // appear in the problem there is a bijection between unsorted and // rational - api::Term ret = d_solver->mkTerm(api::APPLY_UF, {d_rtu_op, expr}); + cvc5::Term ret = d_solver->mkTerm(cvc5::APPLY_UF, {d_rtu_op, expr}); if (d_r_converted.find(expr) == d_r_converted.end()) { d_r_converted.insert(expr); - api::Term eq = d_solver->mkTerm( - api::EQUAL, {expr, d_solver->mkTerm(api::APPLY_UF, {d_utr_op, ret})}); + cvc5::Term eq = d_solver->mkTerm( + cvc5::EQUAL, {expr, d_solver->mkTerm(cvc5::APPLY_UF, {d_utr_op, ret})}); preemptCommand(new AssertCommand(eq)); } - return api::Term(ret); + return cvc5::Term(ret); } -api::Term Tptp::convertStrToUnsorted(std::string str) +cvc5::Term Tptp::convertStrToUnsorted(std::string str) { - api::Term& e = d_distinct_objects[str]; + cvc5::Term& e = d_distinct_objects[str]; if (e.isNull()) { e = d_solver->mkConst(d_unsorted, str); @@ -518,30 +518,30 @@ api::Term Tptp::convertStrToUnsorted(std::string str) return e; } -api::Term Tptp::mkLambdaWrapper(api::Kind k, api::Sort argType) +cvc5::Term Tptp::mkLambdaWrapper(cvc5::Kind k, cvc5::Sort argType) { Trace("parser") << "mkLambdaWrapper: kind " << k << " and type " << argType << "\n"; - std::vector lvars; - std::vector domainTypes = argType.getFunctionDomainSorts(); + std::vector lvars; + std::vector domainTypes = argType.getFunctionDomainSorts(); for (unsigned i = 0, size = domainTypes.size(); i < size; ++i) { // the introduced variable is internal (not parsable) std::stringstream ss; ss << "_lvar_" << i; - api::Term v = d_solver->mkVar(domainTypes[i], ss.str()); + cvc5::Term v = d_solver->mkVar(domainTypes[i], ss.str()); lvars.push_back(v); } // apply body of lambda to variables - api::Term wrapper = - d_solver->mkTerm(api::LAMBDA, - {d_solver->mkTerm(api::VARIABLE_LIST, lvars), + cvc5::Term wrapper = + d_solver->mkTerm(cvc5::LAMBDA, + {d_solver->mkTerm(cvc5::VARIABLE_LIST, lvars), d_solver->mkTerm(k, lvars)}); return wrapper; } -api::Term Tptp::getAssertionExpr(FormulaRole fr, api::Term expr) +cvc5::Term Tptp::getAssertionExpr(FormulaRole fr, cvc5::Term expr) { switch (fr) { case FR_AXIOM: @@ -556,7 +556,7 @@ api::Term Tptp::getAssertionExpr(FormulaRole fr, api::Term expr) return expr; case FR_CONJECTURE: // it should be negated when asserted - return d_solver->mkTerm(api::NOT, {expr}); + return d_solver->mkTerm(cvc5::NOT, {expr}); case FR_UNKNOWN: case FR_FI_DOMAIN: case FR_FI_FUNCTORS: @@ -570,21 +570,21 @@ api::Term Tptp::getAssertionExpr(FormulaRole fr, api::Term expr) return d_nullExpr; } -api::Term Tptp::getAssertionDistinctConstants() +cvc5::Term Tptp::getAssertionDistinctConstants() { - std::vector constants; - for (std::pair& cs : d_distinct_objects) + std::vector constants; + for (std::pair& cs : d_distinct_objects) { constants.push_back(cs.second); } if (constants.size() > 1) { - return d_solver->mkTerm(api::DISTINCT, constants); + return d_solver->mkTerm(cvc5::DISTINCT, constants); } return d_nullExpr; } -Command* Tptp::makeAssertCommand(FormulaRole fr, api::Term expr, bool cnf) +Command* Tptp::makeAssertCommand(FormulaRole fr, cvc5::Term expr, bool cnf) { // For SZS ontology compliance. // if we're in cnf() though, conjectures don't result in "Theorem" or diff --git a/src/parser/tptp/tptp.h b/src/parser/tptp/tptp.h index f765bfb2f..4778c07c8 100644 --- a/src/parser/tptp/tptp.h +++ b/src/parser/tptp/tptp.h @@ -30,10 +30,7 @@ namespace cvc5 { class Command; - -namespace api { class Solver; -} namespace parser { @@ -52,20 +49,20 @@ class Tptp : public Parser { void forceLogic(const std::string& logic) override; - void addFreeVar(api::Term var); - std::vector getFreeVar(); + void addFreeVar(cvc5::Term var); + std::vector getFreeVar(); - api::Term convertRatToUnsorted(api::Term expr); + cvc5::Term convertRatToUnsorted(cvc5::Term expr); /** * Returns a free constant corresponding to the string str. We ensure that * these constants are one-to-one with str. We assert that all these free * constants are pairwise distinct before issuing satisfiability queries. */ - api::Term convertStrToUnsorted(std::string str); + cvc5::Term convertStrToUnsorted(std::string str); // CNF and FOF are unsorted so we define this common type. - // This is also the api::Sort of $i in TFF. - api::Sort d_unsorted; + // This is also the cvc5::Sort of $i in TFF. + cvc5::Sort d_unsorted; enum Theory { THEORY_CORE, @@ -91,7 +88,7 @@ class Tptp : public Parser { bool hasConjecture() const { return d_hasConjecture; } protected: - Tptp(api::Solver* solver, + Tptp(cvc5::Solver* solver, SymbolManager* sm, bool strictMode = false, bool parseOnly = false); @@ -111,14 +108,14 @@ class Tptp : public Parser { * expression * (lambda x1:t1,...,xn:tn . (k x1 ... xn)) : t */ - api::Term mkLambdaWrapper(api::Kind k, api::Sort argType); + cvc5::Term mkLambdaWrapper(cvc5::Kind k, cvc5::Sort argType); /** get assertion expression, based on the formula role. * expr should have Boolean type. * This returns the expression that should be asserted, given the formula role fr. * For example, if the role is "conjecture", then the return value is the negation of expr. */ - api::Term getAssertionExpr(FormulaRole fr, api::Term expr); + cvc5::Term getAssertionExpr(FormulaRole fr, cvc5::Term expr); /** get assertion for distinct constants * @@ -126,7 +123,7 @@ class Tptp : public Parser { * are the distinct constants introduced by this parser (see * convertStrToUnsorted) if n>1, or null otherwise. */ - api::Term getAssertionDistinctConstants(); + cvc5::Term getAssertionDistinctConstants(); /** returns the appropriate AssertCommand, given a role, expression expr to * assert, and information about the assertion. The assertion expr is @@ -134,20 +131,20 @@ class Tptp : public Parser { * getAssertionExpr above). This may set a flag in the parser to mark * that we have asserted a conjecture. */ - Command* makeAssertCommand(FormulaRole fr, api::Term expr, bool cnf); + Command* makeAssertCommand(FormulaRole fr, cvc5::Term expr, bool cnf); /** Ugly hack because I don't know how to return an expression from a token */ - api::Term d_tmp_expr; + cvc5::Term d_tmp_expr; /** Push a new stream in the lexer. When EOF is reached the previous stream is reused */ void includeFile(std::string fileName); /** Check a TPTP let binding for well-formedness. */ - void checkLetBinding(const std::vector& bvlist, - api::Term lhs, - api::Term rhs, + void checkLetBinding(const std::vector& bvlist, + cvc5::Term lhs, + cvc5::Term rhs, bool formula); /** * This converts a ParseOp to expression, assuming it is a standalone term. @@ -155,7 +152,7 @@ class Tptp : public Parser { * There are three cases in TPTP: either p already has an expression, in which * case this function just returns it, or p has just a name or a builtin kind. */ - api::Term parseOpToExpr(ParseOp& p); + cvc5::Term parseOpToExpr(ParseOp& p); /** * Apply parse operator to list of arguments, and return the resulting * expression. @@ -172,37 +169,37 @@ class Tptp : public Parser { * been previously declared, which leads to a more convoluted processing than * what is necessary in parsing SMT-LIB. */ - api::Term applyParseOp(ParseOp& p, std::vector& args); + cvc5::Term applyParseOp(ParseOp& p, std::vector& args); /** * Make decimal, returns a real corresponding to string ( snum "." sden ), * negated if pos is false, having exponent exp, negated exponent if posE is * false. */ - api::Term mkDecimal( + cvc5::Term mkDecimal( std::string& snum, std::string& sden, bool pos, size_t exp, bool posE); private: void addArithmeticOperators(); /** is the name declared, if so, return the term for that name */ - api::Term isTptpDeclared(const std::string& name); + cvc5::Term isTptpDeclared(const std::string& name); // In CNF variable are implicitly binded // d_freevar collect them - std::vector d_freeVar; - api::Term d_rtu_op; - api::Term d_stu_op; - api::Term d_utr_op; - api::Term d_uts_op; + std::vector d_freeVar; + cvc5::Term d_rtu_op; + cvc5::Term d_stu_op; + cvc5::Term d_utr_op; + cvc5::Term d_uts_op; // The set of expression that already have a bridge - std::unordered_set d_r_converted; - std::unordered_map d_distinct_objects; + std::unordered_set d_r_converted; + std::unordered_map d_distinct_objects; /** * TPTP automatically declares symbols as they are parsed inline. This * requires using an auxiliary symbol table for such symbols. This must be * independent of the main symbol table which is aware of quantifier * scopes. */ - std::unordered_map d_auxSymbolTable; + std::unordered_map d_auxSymbolTable; std::vector< pANTLR3_INPUT_STREAM > d_in_created; @@ -211,7 +208,7 @@ class Tptp : public Parser { std::string d_tptpDir; // the null expression - api::Term d_nullExpr; + cvc5::Term d_nullExpr; // hack to make output SZS ontology-compliant bool d_hasConjecture; @@ -227,12 +224,12 @@ namespace tptp { * Just exists to provide the uintptr_t constructor that ANTLR * requires. */ -struct myExpr : public cvc5::api::Term +struct myExpr : public cvc5::Term { - myExpr() : cvc5::api::Term() {} - myExpr(void*) : cvc5::api::Term() {} - myExpr(const cvc5::api::Term& e) : cvc5::api::Term(e) {} - myExpr(const myExpr& e) : cvc5::api::Term(e) {} + myExpr() : cvc5::Term() {} + myExpr(void*) : cvc5::Term() {} + myExpr(const cvc5::Term& e) : cvc5::Term(e) {} + myExpr(const myExpr& e) : cvc5::Term(e) {} }; /* struct myExpr*/ enum NonAssoc { diff --git a/src/parser/tptp/tptp_input.cpp b/src/parser/tptp/tptp_input.cpp index 3bf6ad958..b57d030a9 100644 --- a/src/parser/tptp/tptp_input.cpp +++ b/src/parser/tptp/tptp_input.cpp @@ -64,7 +64,7 @@ Command* TptpInput::parseCommand() { return d_pTptpParser->parseCommand(d_pTptpParser); } -api::Term TptpInput::parseExpr() +cvc5::Term TptpInput::parseExpr() { return d_pTptpParser->parseExpr(d_pTptpParser); } diff --git a/src/parser/tptp/tptp_input.h b/src/parser/tptp/tptp_input.h index f08a28026..bf7f2af2f 100644 --- a/src/parser/tptp/tptp_input.h +++ b/src/parser/tptp/tptp_input.h @@ -74,11 +74,11 @@ class TptpInput : public AntlrInput { /** * Parse an expression from the input. Returns a null - * api::Term if there is no expression there to parse. + * cvc5::Term if there is no expression there to parse. * * @throws ParserException if an error is encountered during parsing. */ - api::Term parseExpr() override; + cvc5::Term parseExpr() override; };/* class TptpInput */ diff --git a/src/preprocessing/assertion_pipeline.cpp b/src/preprocessing/assertion_pipeline.cpp index 5c43a0168..30579f744 100644 --- a/src/preprocessing/assertion_pipeline.cpp +++ b/src/preprocessing/assertion_pipeline.cpp @@ -22,7 +22,7 @@ #include "smt/preprocess_proof_generator.h" #include "theory/builtin/proof_checker.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { AssertionPipeline::AssertionPipeline(Env& env) @@ -204,4 +204,4 @@ void AssertionPipeline::conjoin(size_t i, Node n, ProofGenerator* pg) } } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/preprocessing/assertion_pipeline.h b/src/preprocessing/assertion_pipeline.h index 6c220b756..764e94837 100644 --- a/src/preprocessing/assertion_pipeline.h +++ b/src/preprocessing/assertion_pipeline.h @@ -25,7 +25,7 @@ #include "proof/trust_node.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { class ProofGenerator; namespace smt { @@ -206,6 +206,6 @@ class AssertionPipeline : protected EnvObj }; /* class AssertionPipeline */ } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PREPROCESSING__ASSERTION_PIPELINE_H */ diff --git a/src/preprocessing/learned_literal_manager.cpp b/src/preprocessing/learned_literal_manager.cpp index c40414bac..a632d5d85 100644 --- a/src/preprocessing/learned_literal_manager.cpp +++ b/src/preprocessing/learned_literal_manager.cpp @@ -19,7 +19,7 @@ #include "theory/rewriter.h" #include "theory/trust_substitutions.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { LearnedLiteralManager::LearnedLiteralManager(Env& env) @@ -50,4 +50,4 @@ std::vector LearnedLiteralManager::getLearnedLiterals() const } } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/preprocessing/learned_literal_manager.h b/src/preprocessing/learned_literal_manager.h index 5e7898da4..22d9fad91 100644 --- a/src/preprocessing/learned_literal_manager.h +++ b/src/preprocessing/learned_literal_manager.h @@ -22,7 +22,7 @@ #include "expr/node.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { /** @@ -62,6 +62,6 @@ class LearnedLiteralManager : protected EnvObj }; } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PREPROCESSING__LEARNED_LITERAL_MANAGER_H */ diff --git a/src/preprocessing/passes/ackermann.cpp b/src/preprocessing/passes/ackermann.cpp index 57469ab11..f1b1e2257 100644 --- a/src/preprocessing/passes/ackermann.cpp +++ b/src/preprocessing/passes/ackermann.cpp @@ -34,10 +34,10 @@ #include "preprocessing/assertion_pipeline.h" #include "preprocessing/preprocessing_pass_context.h" -using namespace cvc5; -using namespace cvc5::theory; +using namespace cvc5::internal; +using namespace cvc5::internal::theory; -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -339,4 +339,4 @@ PreprocessingPassResult Ackermann::applyInternal( } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/preprocessing/passes/ackermann.h b/src/preprocessing/passes/ackermann.h index dc9375d5c..348e75bae 100644 --- a/src/preprocessing/passes/ackermann.h +++ b/src/preprocessing/passes/ackermann.h @@ -34,7 +34,7 @@ #include "theory/logic_info.h" #include "theory/substitutions.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -81,6 +81,6 @@ class Ackermann : public PreprocessingPass } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PREPROCESSING__PASSES__ACKERMANN_H */ diff --git a/src/preprocessing/passes/apply_substs.cpp b/src/preprocessing/passes/apply_substs.cpp index 82122fa7f..c44fea087 100644 --- a/src/preprocessing/passes/apply_substs.cpp +++ b/src/preprocessing/passes/apply_substs.cpp @@ -24,7 +24,7 @@ #include "smt/env.h" #include "theory/substitutions.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -65,4 +65,4 @@ PreprocessingPassResult ApplySubsts::applyInternal( } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/preprocessing/passes/apply_substs.h b/src/preprocessing/passes/apply_substs.h index 67b7996f5..a98b76da0 100644 --- a/src/preprocessing/passes/apply_substs.h +++ b/src/preprocessing/passes/apply_substs.h @@ -23,7 +23,7 @@ #include "preprocessing/preprocessing_pass.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { class PreprocessingPassContext; @@ -47,6 +47,6 @@ class ApplySubsts : public PreprocessingPass } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/preprocessing/passes/bool_to_bv.cpp b/src/preprocessing/passes/bool_to_bv.cpp index 8b26e564f..002048fc9 100644 --- a/src/preprocessing/passes/bool_to_bv.cpp +++ b/src/preprocessing/passes/bool_to_bv.cpp @@ -28,10 +28,10 @@ #include "theory/rewriter.h" #include "theory/theory.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { -using namespace cvc5::theory; +using namespace cvc5::internal::theory; BoolToBV::BoolToBV(PreprocessingPassContext* preprocContext) : PreprocessingPass(preprocContext, "bool-to-bv"), @@ -419,4 +419,4 @@ BoolToBV::Statistics::Statistics(StatisticsRegistry& reg) } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/preprocessing/passes/bool_to_bv.h b/src/preprocessing/passes/bool_to_bv.h index 06c4dd1c1..1d2b601f9 100644 --- a/src/preprocessing/passes/bool_to_bv.h +++ b/src/preprocessing/passes/bool_to_bv.h @@ -24,7 +24,7 @@ #include "preprocessing/preprocessing_pass.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -121,6 +121,6 @@ class BoolToBV : public PreprocessingPass } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PREPROCESSING__PASSES__BOOL_TO_BV_H */ diff --git a/src/preprocessing/passes/bv_eager_atoms.cpp b/src/preprocessing/passes/bv_eager_atoms.cpp index 665b32faa..f9bd453cc 100644 --- a/src/preprocessing/passes/bv_eager_atoms.cpp +++ b/src/preprocessing/passes/bv_eager_atoms.cpp @@ -23,7 +23,7 @@ #include "theory/theory_engine.h" #include "theory/theory_model.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -51,4 +51,4 @@ PreprocessingPassResult BvEagerAtoms::applyInternal( } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/preprocessing/passes/bv_eager_atoms.h b/src/preprocessing/passes/bv_eager_atoms.h index ca2f8b5a6..9358283ec 100644 --- a/src/preprocessing/passes/bv_eager_atoms.h +++ b/src/preprocessing/passes/bv_eager_atoms.h @@ -23,7 +23,7 @@ #include "preprocessing/preprocessing_pass.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -39,6 +39,6 @@ class BvEagerAtoms : public PreprocessingPass } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PREPROCESSING__PASSES__BV_EAGER_ATOMS_H */ diff --git a/src/preprocessing/passes/bv_gauss.cpp b/src/preprocessing/passes/bv_gauss.cpp index e49cc5c44..34b1248ce 100644 --- a/src/preprocessing/passes/bv_gauss.cpp +++ b/src/preprocessing/passes/bv_gauss.cpp @@ -29,11 +29,11 @@ #include "theory/rewriter.h" #include "util/bitvector.h" -using namespace cvc5; -using namespace cvc5::theory; -using namespace cvc5::theory::bv; +using namespace cvc5::internal; +using namespace cvc5::internal::theory; +using namespace cvc5::internal::theory::bv; -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -699,7 +699,7 @@ PreprocessingPassResult BVGauss::applyInternal( { Node a = assertions.back(); assertions.pop_back(); - cvc5::Kind k = a.getKind(); + cvc5::internal::Kind k = a.getKind(); if (k == kind::AND) { @@ -795,4 +795,4 @@ PreprocessingPassResult BVGauss::applyInternal( } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/preprocessing/passes/bv_gauss.h b/src/preprocessing/passes/bv_gauss.h index 0078770fb..a35b4127e 100644 --- a/src/preprocessing/passes/bv_gauss.h +++ b/src/preprocessing/passes/bv_gauss.h @@ -25,7 +25,7 @@ #include "preprocessing/preprocessing_pass.h" #include "util/integer.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -120,6 +120,6 @@ class BVGauss : public PreprocessingPass } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/preprocessing/passes/bv_intro_pow2.cpp b/src/preprocessing/passes/bv_intro_pow2.cpp index fdc6d22d4..5b332ca83 100644 --- a/src/preprocessing/passes/bv_intro_pow2.cpp +++ b/src/preprocessing/passes/bv_intro_pow2.cpp @@ -25,12 +25,12 @@ #include "preprocessing/preprocessing_pass_context.h" #include "theory/bv/theory_bv_utils.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { using NodeMap = std::unordered_map; -using namespace cvc5::theory; +using namespace cvc5::internal::theory; BvIntroPow2::BvIntroPow2(PreprocessingPassContext* preprocContext) : PreprocessingPass(preprocContext, "bv-intro-pow2"){}; @@ -142,4 +142,4 @@ Node BvIntroPow2::pow2Rewrite(Node node, std::unordered_map& cache) } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/preprocessing/passes/bv_intro_pow2.h b/src/preprocessing/passes/bv_intro_pow2.h index b3e23f70c..42c1ddf5d 100644 --- a/src/preprocessing/passes/bv_intro_pow2.h +++ b/src/preprocessing/passes/bv_intro_pow2.h @@ -24,7 +24,7 @@ #include "preprocessing/preprocessing_pass.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -57,6 +57,6 @@ class BvIntroPow2 : public PreprocessingPass } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PREPROCESSING__PASSES__BV_INTRO_POW2_H */ diff --git a/src/preprocessing/passes/bv_to_bool.cpp b/src/preprocessing/passes/bv_to_bool.cpp index 881732bfc..3b21b9b5d 100644 --- a/src/preprocessing/passes/bv_to_bool.cpp +++ b/src/preprocessing/passes/bv_to_bool.cpp @@ -30,12 +30,12 @@ #include "theory/rewriter.h" #include "theory/theory.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { using namespace std; -using namespace cvc5::theory; +using namespace cvc5::internal::theory; BVToBool::BVToBool(PreprocessingPassContext* preprocContext) : PreprocessingPass(preprocContext, "bv-to-bool"), @@ -299,4 +299,4 @@ BVToBool::Statistics::Statistics(StatisticsRegistry& reg) } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/preprocessing/passes/bv_to_bool.h b/src/preprocessing/passes/bv_to_bool.h index cca79c900..2e852916a 100644 --- a/src/preprocessing/passes/bv_to_bool.h +++ b/src/preprocessing/passes/bv_to_bool.h @@ -22,7 +22,7 @@ #include "preprocessing/preprocessing_pass.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -71,6 +71,6 @@ class BVToBool : public PreprocessingPass } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PREPROCESSING__PASSES__BV_TO_BOOL_H */ diff --git a/src/preprocessing/passes/bv_to_int.cpp b/src/preprocessing/passes/bv_to_int.cpp index 547125290..88d087977 100644 --- a/src/preprocessing/passes/bv_to_int.cpp +++ b/src/preprocessing/passes/bv_to_int.cpp @@ -32,13 +32,13 @@ #include "theory/bv/theory_bv_rewrite_rules_simplification.h" #include "theory/rewriter.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { using namespace std; -using namespace cvc5::theory; -using namespace cvc5::theory::bv; +using namespace cvc5::internal::theory; +using namespace cvc5::internal::theory::bv; BVToInt::BVToInt(PreprocessingPassContext* preprocContext) : PreprocessingPass(preprocContext, "bv-to-int"), @@ -107,4 +107,4 @@ void BVToInt::addFinalizeAssertions( } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/preprocessing/passes/bv_to_int.h b/src/preprocessing/passes/bv_to_int.h index 24fc185b5..588f21498 100644 --- a/src/preprocessing/passes/bv_to_int.h +++ b/src/preprocessing/passes/bv_to_int.h @@ -24,7 +24,7 @@ #include "preprocessing/preprocessing_pass_context.h" #include "theory/bv/int_blaster.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -51,6 +51,6 @@ class BVToInt : public PreprocessingPass } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal #endif /* __CVC5__PREPROCESSING__PASSES__BV_TO_INT_H */ diff --git a/src/preprocessing/passes/extended_rewriter_pass.cpp b/src/preprocessing/passes/extended_rewriter_pass.cpp index 447c17052..e2058aea5 100644 --- a/src/preprocessing/passes/extended_rewriter_pass.cpp +++ b/src/preprocessing/passes/extended_rewriter_pass.cpp @@ -21,7 +21,7 @@ #include "preprocessing/assertion_pipeline.h" #include "preprocessing/preprocessing_pass_context.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -45,4 +45,4 @@ PreprocessingPassResult ExtRewPre::applyInternal( } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/preprocessing/passes/extended_rewriter_pass.h b/src/preprocessing/passes/extended_rewriter_pass.h index 02986aea1..74201a3b2 100644 --- a/src/preprocessing/passes/extended_rewriter_pass.h +++ b/src/preprocessing/passes/extended_rewriter_pass.h @@ -22,7 +22,7 @@ #include "preprocessing/preprocessing_pass.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -38,6 +38,6 @@ class ExtRewPre : public PreprocessingPass } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PREPROCESSING__PASSES__EXTENDED_REWRITER_PASS_H */ diff --git a/src/preprocessing/passes/foreign_theory_rewrite.cpp b/src/preprocessing/passes/foreign_theory_rewrite.cpp index 70ad0fea3..5dfd5dc4e 100644 --- a/src/preprocessing/passes/foreign_theory_rewrite.cpp +++ b/src/preprocessing/passes/foreign_theory_rewrite.cpp @@ -24,11 +24,11 @@ #include "theory/rewriter.h" #include "theory/strings/arith_entail.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { -using namespace cvc5::theory; +using namespace cvc5::internal::theory; ForeignTheoryRewriter::ForeignTheoryRewriter(Env& env) : EnvObj(env), d_cache(userContext()) @@ -161,4 +161,4 @@ PreprocessingPassResult ForeignTheoryRewrite::applyInternal( } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/preprocessing/passes/foreign_theory_rewrite.h b/src/preprocessing/passes/foreign_theory_rewrite.h index 81f5282ef..c0f6a6e91 100644 --- a/src/preprocessing/passes/foreign_theory_rewrite.h +++ b/src/preprocessing/passes/foreign_theory_rewrite.h @@ -25,7 +25,7 @@ #include "preprocessing/preprocessing_pass.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -72,6 +72,6 @@ class ForeignTheoryRewrite : public PreprocessingPass } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PREPROCESSING__PASSES__FOREIGN_THEORY_REWRITE_H */ diff --git a/src/preprocessing/passes/fun_def_fmf.cpp b/src/preprocessing/passes/fun_def_fmf.cpp index 7e8f3ffab..b557fbc8d 100644 --- a/src/preprocessing/passes/fun_def_fmf.cpp +++ b/src/preprocessing/passes/fun_def_fmf.cpp @@ -27,11 +27,11 @@ #include "theory/rewriter.h" using namespace std; -using namespace cvc5::kind; -using namespace cvc5::theory; -using namespace cvc5::theory::quantifiers; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::theory; +using namespace cvc5::internal::theory::quantifiers; -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -467,4 +467,4 @@ void FunDefFmf::getConstraints(Node n, } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/preprocessing/passes/fun_def_fmf.h b/src/preprocessing/passes/fun_def_fmf.h index 9b51cd73e..49ab4fc44 100644 --- a/src/preprocessing/passes/fun_def_fmf.h +++ b/src/preprocessing/passes/fun_def_fmf.h @@ -23,7 +23,7 @@ #include "expr/node.h" #include "preprocessing/preprocessing_pass.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -101,6 +101,6 @@ class FunDefFmf : public PreprocessingPass } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PREPROCESSING__PASSES__SYGUS_INFERENCE_H_ */ diff --git a/src/preprocessing/passes/global_negate.cpp b/src/preprocessing/passes/global_negate.cpp index cd8ecc73f..ee5aef3df 100644 --- a/src/preprocessing/passes/global_negate.cpp +++ b/src/preprocessing/passes/global_negate.cpp @@ -22,10 +22,10 @@ #include "theory/rewriter.h" using namespace std; -using namespace cvc5::kind; -using namespace cvc5::theory; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::theory; -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -125,4 +125,4 @@ PreprocessingPassResult GlobalNegate::applyInternal( } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/preprocessing/passes/global_negate.h b/src/preprocessing/passes/global_negate.h index c7febf95d..05891a553 100644 --- a/src/preprocessing/passes/global_negate.h +++ b/src/preprocessing/passes/global_negate.h @@ -30,7 +30,7 @@ #include "expr/node.h" #include "preprocessing/preprocessing_pass.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -49,6 +49,6 @@ class GlobalNegate : public PreprocessingPass } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PREPROCESSING_PASSES__GLOBAL_NEGATE_H */ diff --git a/src/preprocessing/passes/ho_elim.cpp b/src/preprocessing/passes/ho_elim.cpp index e122b33d6..7782cd918 100644 --- a/src/preprocessing/passes/ho_elim.cpp +++ b/src/preprocessing/passes/ho_elim.cpp @@ -26,9 +26,9 @@ #include "theory/rewriter.h" #include "theory/uf/theory_uf_rewriter.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -553,4 +553,4 @@ TypeNode HoElim::getUSort(TypeNode tn) } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/preprocessing/passes/ho_elim.h b/src/preprocessing/passes/ho_elim.h index 80f8cda70..aa3a6fbbf 100644 --- a/src/preprocessing/passes/ho_elim.h +++ b/src/preprocessing/passes/ho_elim.h @@ -27,7 +27,7 @@ #include "expr/node.h" #include "preprocessing/preprocessing_pass.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -151,6 +151,6 @@ class HoElim : public PreprocessingPass } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal #endif /* __CVC5__PREPROCESSING__PASSES__HO_ELIM_PASS_H */ diff --git a/src/preprocessing/passes/int_to_bv.cpp b/src/preprocessing/passes/int_to_bv.cpp index b5b25b2f3..6f1f56bb3 100644 --- a/src/preprocessing/passes/int_to_bv.cpp +++ b/src/preprocessing/passes/int_to_bv.cpp @@ -35,12 +35,12 @@ #include "util/bitvector.h" #include "util/rational.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { using namespace std; -using namespace cvc5::theory; +using namespace cvc5::internal::theory; namespace { @@ -288,4 +288,4 @@ PreprocessingPassResult IntToBV::applyInternal( } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/preprocessing/passes/int_to_bv.h b/src/preprocessing/passes/int_to_bv.h index 43830f03b..bd48b5598 100644 --- a/src/preprocessing/passes/int_to_bv.h +++ b/src/preprocessing/passes/int_to_bv.h @@ -25,7 +25,7 @@ #include "expr/node.h" #include "preprocessing/preprocessing_pass.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -44,6 +44,6 @@ class IntToBV : public PreprocessingPass } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PREPROCESSING__PASSES__INT_TO_BV_H */ diff --git a/src/preprocessing/passes/ite_removal.cpp b/src/preprocessing/passes/ite_removal.cpp index c7ec46337..cb8f74cf8 100644 --- a/src/preprocessing/passes/ite_removal.cpp +++ b/src/preprocessing/passes/ite_removal.cpp @@ -25,11 +25,11 @@ #include "theory/rewriter.h" #include "theory/theory_preprocessor.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { -using namespace cvc5::theory; +using namespace cvc5::internal::theory; // TODO (project #42): note this preprocessing pass is deprecated IteRemoval::IteRemoval(PreprocessingPassContext* preprocContext) @@ -71,4 +71,4 @@ PreprocessingPassResult IteRemoval::applyInternal(AssertionPipeline* assertions) } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/preprocessing/passes/ite_removal.h b/src/preprocessing/passes/ite_removal.h index 0371d11c7..934239639 100644 --- a/src/preprocessing/passes/ite_removal.h +++ b/src/preprocessing/passes/ite_removal.h @@ -20,7 +20,7 @@ #include "preprocessing/preprocessing_pass.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -35,6 +35,6 @@ class IteRemoval : public PreprocessingPass } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal #endif // CVC5__PREPROCESSING__PASSES__ITE_REMOVAL_H diff --git a/src/preprocessing/passes/ite_simp.cpp b/src/preprocessing/passes/ite_simp.cpp index 97de3c206..f185379c6 100644 --- a/src/preprocessing/passes/ite_simp.cpp +++ b/src/preprocessing/passes/ite_simp.cpp @@ -26,10 +26,10 @@ #include "theory/theory_engine.h" using namespace std; -using namespace cvc5; -using namespace cvc5::theory; +using namespace cvc5::internal; +using namespace cvc5::internal::theory; -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -336,4 +336,4 @@ PreprocessingPassResult ITESimp::applyInternal( } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/preprocessing/passes/ite_simp.h b/src/preprocessing/passes/ite_simp.h index 65a483e74..3c3ac9456 100644 --- a/src/preprocessing/passes/ite_simp.h +++ b/src/preprocessing/passes/ite_simp.h @@ -22,7 +22,7 @@ #include "preprocessing/util/ite_utilities.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -55,6 +55,6 @@ class ITESimp : public PreprocessingPass } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/preprocessing/passes/learned_rewrite.cpp b/src/preprocessing/passes/learned_rewrite.cpp index a9c3b6e63..1d373eb38 100644 --- a/src/preprocessing/passes/learned_rewrite.cpp +++ b/src/preprocessing/passes/learned_rewrite.cpp @@ -23,10 +23,10 @@ #include "theory/rewriter.h" #include "util/rational.h" -using namespace cvc5::theory; -using namespace cvc5::kind; +using namespace cvc5::internal::theory; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -418,4 +418,4 @@ Node LearnedRewrite::returnRewriteLearned(Node n, Node nr, LearnedRewriteId id) } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/preprocessing/passes/learned_rewrite.h b/src/preprocessing/passes/learned_rewrite.h index 4f3a51d58..a0c2c2f85 100644 --- a/src/preprocessing/passes/learned_rewrite.h +++ b/src/preprocessing/passes/learned_rewrite.h @@ -24,7 +24,7 @@ #include -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -103,6 +103,6 @@ class LearnedRewrite : public PreprocessingPass } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PREPROCESSING__PASSES__LEARNED_REWRITE_H */ diff --git a/src/preprocessing/passes/miplib_trick.cpp b/src/preprocessing/passes/miplib_trick.cpp index a20d9f3f6..68b1c61da 100644 --- a/src/preprocessing/passes/miplib_trick.cpp +++ b/src/preprocessing/passes/miplib_trick.cpp @@ -34,10 +34,10 @@ #include "util/rational.h" using namespace std; -using namespace cvc5::kind; -using namespace cvc5::theory; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::theory; -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -660,4 +660,4 @@ MipLibTrick::Statistics::Statistics(StatisticsRegistry& reg) } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/preprocessing/passes/miplib_trick.h b/src/preprocessing/passes/miplib_trick.h index 65779f90d..a7d32b8ea 100644 --- a/src/preprocessing/passes/miplib_trick.h +++ b/src/preprocessing/passes/miplib_trick.h @@ -21,7 +21,7 @@ #include "expr/node.h" #include "preprocessing/preprocessing_pass.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -57,6 +57,6 @@ class MipLibTrick : public PreprocessingPass } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PREPROCESSING__PASSES__MIPLIB_TRICK_H */ diff --git a/src/preprocessing/passes/nl_ext_purify.cpp b/src/preprocessing/passes/nl_ext_purify.cpp index ad1821bf4..37b265769 100644 --- a/src/preprocessing/passes/nl_ext_purify.cpp +++ b/src/preprocessing/passes/nl_ext_purify.cpp @@ -21,12 +21,12 @@ #include "preprocessing/assertion_pipeline.h" #include "theory/rewriter.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { using namespace std; -using namespace cvc5::theory; +using namespace cvc5::internal::theory; Node NlExtPurify::purifyNlTerms(TNode n, NodeMap& cache, @@ -142,4 +142,4 @@ PreprocessingPassResult NlExtPurify::applyInternal( } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/preprocessing/passes/nl_ext_purify.h b/src/preprocessing/passes/nl_ext_purify.h index ab5a6ac7f..16df926f2 100644 --- a/src/preprocessing/passes/nl_ext_purify.h +++ b/src/preprocessing/passes/nl_ext_purify.h @@ -27,7 +27,7 @@ #include "expr/node.h" #include "preprocessing/preprocessing_pass.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -52,6 +52,6 @@ class NlExtPurify : public PreprocessingPass } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PREPROCESSING__PASSES__NL_EXT_PURIFY_H */ diff --git a/src/preprocessing/passes/non_clausal_simp.cpp b/src/preprocessing/passes/non_clausal_simp.cpp index a71953a0f..5d101b260 100644 --- a/src/preprocessing/passes/non_clausal_simp.cpp +++ b/src/preprocessing/passes/non_clausal_simp.cpp @@ -31,10 +31,10 @@ #include "theory/theory_model.h" #include "theory/trust_substitutions.h" -using namespace cvc5; -using namespace cvc5::theory; +using namespace cvc5::internal; +using namespace cvc5::internal::theory; -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -486,4 +486,4 @@ Node NonClausalSimp::processRewrittenLearnedLit(TrustNode trn) } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/preprocessing/passes/non_clausal_simp.h b/src/preprocessing/passes/non_clausal_simp.h index 4f1c3ae7b..bf8616ba4 100644 --- a/src/preprocessing/passes/non_clausal_simp.h +++ b/src/preprocessing/passes/non_clausal_simp.h @@ -23,7 +23,7 @@ #include "preprocessing/preprocessing_pass.h" #include "proof/trust_node.h" -namespace cvc5 { +namespace cvc5::internal { class LazyCDProof; class ProofNodeManager; @@ -97,6 +97,6 @@ class NonClausalSimp : public PreprocessingPass } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/preprocessing/passes/pseudo_boolean_processor.cpp b/src/preprocessing/passes/pseudo_boolean_processor.cpp index 34c6d55c3..6db5b4b40 100644 --- a/src/preprocessing/passes/pseudo_boolean_processor.cpp +++ b/src/preprocessing/passes/pseudo_boolean_processor.cpp @@ -25,12 +25,12 @@ #include "theory/arith/normal_form.h" #include "theory/rewriter.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { -using namespace cvc5::theory; -using namespace cvc5::theory::arith; +using namespace cvc5::internal::theory; +using namespace cvc5::internal::theory::arith; PseudoBooleanProcessor::PseudoBooleanProcessor( PreprocessingPassContext* preprocContext) @@ -419,4 +419,4 @@ void PseudoBooleanProcessor::clear() } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/preprocessing/passes/pseudo_boolean_processor.h b/src/preprocessing/passes/pseudo_boolean_processor.h index b5bb05138..a9a8b9ce8 100644 --- a/src/preprocessing/passes/pseudo_boolean_processor.h +++ b/src/preprocessing/passes/pseudo_boolean_processor.h @@ -32,7 +32,7 @@ #include "theory/substitutions.h" #include "util/rational.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -110,6 +110,6 @@ class PseudoBooleanProcessor : public PreprocessingPass } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal #endif // CVC5__PREPROCESSING__PASSES__PSEUDO_BOOLEAN_PROCESSOR_H diff --git a/src/preprocessing/passes/quantifiers_preprocess.cpp b/src/preprocessing/passes/quantifiers_preprocess.cpp index f80c4383c..b39a6a7d8 100644 --- a/src/preprocessing/passes/quantifiers_preprocess.cpp +++ b/src/preprocessing/passes/quantifiers_preprocess.cpp @@ -23,12 +23,12 @@ #include "theory/quantifiers/quantifiers_preprocess.h" #include "theory/rewriter.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { using namespace std; -using namespace cvc5::theory; +using namespace cvc5::internal::theory; QuantifiersPreprocess::QuantifiersPreprocess(PreprocessingPassContext* preprocContext) : PreprocessingPass(preprocContext, "quantifiers-preprocess"){}; @@ -58,4 +58,4 @@ PreprocessingPassResult QuantifiersPreprocess::applyInternal( } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/preprocessing/passes/quantifiers_preprocess.h b/src/preprocessing/passes/quantifiers_preprocess.h index 511b51459..126126aa6 100644 --- a/src/preprocessing/passes/quantifiers_preprocess.h +++ b/src/preprocessing/passes/quantifiers_preprocess.h @@ -23,7 +23,7 @@ #include "preprocessing/preprocessing_pass.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -39,6 +39,6 @@ class QuantifiersPreprocess : public PreprocessingPass } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PREPROCESSING__PASSES__QUANTIFIERS_PREPROCESS_H */ diff --git a/src/preprocessing/passes/real_to_int.cpp b/src/preprocessing/passes/real_to_int.cpp index 9b84013cd..c638ad17d 100644 --- a/src/preprocessing/passes/real_to_int.cpp +++ b/src/preprocessing/passes/real_to_int.cpp @@ -27,10 +27,10 @@ #include "theory/theory_model.h" #include "util/rational.h" -using namespace cvc5::kind; -using namespace cvc5::theory; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::theory; -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -213,4 +213,4 @@ PreprocessingPassResult RealToInt::applyInternal( } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/preprocessing/passes/real_to_int.h b/src/preprocessing/passes/real_to_int.h index 4fcc6e254..98477ba71 100644 --- a/src/preprocessing/passes/real_to_int.h +++ b/src/preprocessing/passes/real_to_int.h @@ -26,7 +26,7 @@ #include "expr/node.h" #include "preprocessing/preprocessing_pass.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -49,6 +49,6 @@ class RealToInt : public PreprocessingPass } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PREPROCESSING__PASSES__REAL_TO_INT_H */ diff --git a/src/preprocessing/passes/rewrite.cpp b/src/preprocessing/passes/rewrite.cpp index 0e7aafcc3..dbc8edc4d 100644 --- a/src/preprocessing/passes/rewrite.cpp +++ b/src/preprocessing/passes/rewrite.cpp @@ -20,11 +20,11 @@ #include "preprocessing/assertion_pipeline.h" #include "theory/rewriter.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { -using namespace cvc5::theory; +using namespace cvc5::internal::theory; Rewrite::Rewrite(PreprocessingPassContext* preprocContext) : PreprocessingPass(preprocContext, "rewrite"){}; @@ -43,4 +43,4 @@ PreprocessingPassResult Rewrite::applyInternal( } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/preprocessing/passes/rewrite.h b/src/preprocessing/passes/rewrite.h index fcc250e17..d1bb724bc 100644 --- a/src/preprocessing/passes/rewrite.h +++ b/src/preprocessing/passes/rewrite.h @@ -22,7 +22,7 @@ #include "preprocessing/preprocessing_pass.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -38,6 +38,6 @@ class Rewrite : public PreprocessingPass } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PREPROCESSING__PASSES__REWRITE_H */ diff --git a/src/preprocessing/passes/sep_skolem_emp.cpp b/src/preprocessing/passes/sep_skolem_emp.cpp index 5d3a1112e..2cd28f62b 100644 --- a/src/preprocessing/passes/sep_skolem_emp.cpp +++ b/src/preprocessing/passes/sep_skolem_emp.cpp @@ -28,12 +28,12 @@ #include "theory/theory.h" #include "theory/theory_engine.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { using namespace std; -using namespace cvc5::theory; +using namespace cvc5::internal::theory; namespace { @@ -137,4 +137,4 @@ PreprocessingPassResult SepSkolemEmp::applyInternal( } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/preprocessing/passes/sep_skolem_emp.h b/src/preprocessing/passes/sep_skolem_emp.h index 7dfdb66a2..a0ecddc71 100644 --- a/src/preprocessing/passes/sep_skolem_emp.h +++ b/src/preprocessing/passes/sep_skolem_emp.h @@ -20,7 +20,7 @@ #include "preprocessing/preprocessing_pass.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -36,6 +36,6 @@ class SepSkolemEmp : public PreprocessingPass } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PREPROCESSING__PASSES__SEP_SKOLEM_EMP_H */ diff --git a/src/preprocessing/passes/sort_infer.cpp b/src/preprocessing/passes/sort_infer.cpp index 107e789bb..3be037696 100644 --- a/src/preprocessing/passes/sort_infer.cpp +++ b/src/preprocessing/passes/sort_infer.cpp @@ -25,7 +25,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -85,4 +85,4 @@ PreprocessingPassResult SortInferencePass::applyInternal( } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/preprocessing/passes/sort_infer.h b/src/preprocessing/passes/sort_infer.h index 3f9b2c1ab..bc9ed8704 100644 --- a/src/preprocessing/passes/sort_infer.h +++ b/src/preprocessing/passes/sort_infer.h @@ -18,7 +18,7 @@ #include "preprocessing/preprocessing_pass.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -39,6 +39,6 @@ class SortInferencePass : public PreprocessingPass } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PREPROCESSING__PASSES__SORT_INFERENCE_PASS_H_ */ diff --git a/src/preprocessing/passes/static_learning.cpp b/src/preprocessing/passes/static_learning.cpp index e55a8c001..19e1d640c 100644 --- a/src/preprocessing/passes/static_learning.cpp +++ b/src/preprocessing/passes/static_learning.cpp @@ -23,7 +23,7 @@ #include "theory/rewriter.h" #include "theory/theory_engine.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -98,4 +98,4 @@ void StaticLearning::flattenAnd(TNode node, std::vector& children) } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/preprocessing/passes/static_learning.h b/src/preprocessing/passes/static_learning.h index b44c2c86f..bf7e97eb1 100644 --- a/src/preprocessing/passes/static_learning.h +++ b/src/preprocessing/passes/static_learning.h @@ -21,7 +21,7 @@ #include "context/cdhashset.h" #include "preprocessing/preprocessing_pass.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -44,6 +44,6 @@ class StaticLearning : public PreprocessingPass } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PREPROCESSING__PASSES__STATIC_LEARNING_H */ diff --git a/src/preprocessing/passes/strings_eager_pp.cpp b/src/preprocessing/passes/strings_eager_pp.cpp index ee962c33b..5c779ec33 100644 --- a/src/preprocessing/passes/strings_eager_pp.cpp +++ b/src/preprocessing/passes/strings_eager_pp.cpp @@ -19,9 +19,9 @@ #include "theory/rewriter.h" #include "theory/strings/theory_strings_preprocess.h" -using namespace cvc5::theory; +using namespace cvc5::internal::theory; -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -58,4 +58,4 @@ PreprocessingPassResult StringsEagerPp::applyInternal( } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/preprocessing/passes/strings_eager_pp.h b/src/preprocessing/passes/strings_eager_pp.h index fd89fefc7..09ac18ed1 100644 --- a/src/preprocessing/passes/strings_eager_pp.h +++ b/src/preprocessing/passes/strings_eager_pp.h @@ -20,7 +20,7 @@ #include "preprocessing/preprocessing_pass.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -40,6 +40,6 @@ class StringsEagerPp : public PreprocessingPass } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PREPROCESSING__PASSES__STRINGS_EAGER_PP_H */ diff --git a/src/preprocessing/passes/sygus_inference.cpp b/src/preprocessing/passes/sygus_inference.cpp index cdbd6099e..9891404c6 100644 --- a/src/preprocessing/passes/sygus_inference.cpp +++ b/src/preprocessing/passes/sygus_inference.cpp @@ -28,10 +28,10 @@ #include "theory/smt_engine_subsolver.h" using namespace std; -using namespace cvc5::kind; -using namespace cvc5::theory; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::theory; -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -336,4 +336,4 @@ bool SygusInference::solveSygus(const std::vector& assertions, } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/preprocessing/passes/sygus_inference.h b/src/preprocessing/passes/sygus_inference.h index e657ca99e..ede7f6200 100644 --- a/src/preprocessing/passes/sygus_inference.h +++ b/src/preprocessing/passes/sygus_inference.h @@ -21,7 +21,7 @@ #include "preprocessing/preprocessing_pass.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -64,6 +64,6 @@ class SygusInference : public PreprocessingPass } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PREPROCESSING__PASSES__SYGUS_INFERENCE_H_ */ diff --git a/src/preprocessing/passes/synth_rew_rules.cpp b/src/preprocessing/passes/synth_rew_rules.cpp index 6e752b853..ab8950b76 100644 --- a/src/preprocessing/passes/synth_rew_rules.cpp +++ b/src/preprocessing/passes/synth_rew_rules.cpp @@ -32,9 +32,9 @@ #include "theory/quantifiers/term_util.h" using namespace std; -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -494,4 +494,4 @@ PreprocessingPassResult SynthRewRulesPass::applyInternal( } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/preprocessing/passes/synth_rew_rules.h b/src/preprocessing/passes/synth_rew_rules.h index daaed88d5..581622574 100644 --- a/src/preprocessing/passes/synth_rew_rules.h +++ b/src/preprocessing/passes/synth_rew_rules.h @@ -19,7 +19,7 @@ #include "preprocessing/preprocessing_pass.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -72,6 +72,6 @@ class SynthRewRulesPass : public PreprocessingPass } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PREPROCESSING__PASSES__SYNTH_REW_RULES_H */ diff --git a/src/preprocessing/passes/theory_preprocess.cpp b/src/preprocessing/passes/theory_preprocess.cpp index 2f9d12637..7d0e8290c 100644 --- a/src/preprocessing/passes/theory_preprocess.cpp +++ b/src/preprocessing/passes/theory_preprocess.cpp @@ -24,11 +24,11 @@ #include "theory/rewriter.h" #include "theory/theory_engine.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { -using namespace cvc5::theory; +using namespace cvc5::internal::theory; TheoryPreprocess::TheoryPreprocess(PreprocessingPassContext* preprocContext) : PreprocessingPass(preprocContext, "theory-preprocess"){}; @@ -64,4 +64,4 @@ PreprocessingPassResult TheoryPreprocess::applyInternal( } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/preprocessing/passes/theory_preprocess.h b/src/preprocessing/passes/theory_preprocess.h index 2b284bf91..54327971e 100644 --- a/src/preprocessing/passes/theory_preprocess.h +++ b/src/preprocessing/passes/theory_preprocess.h @@ -22,7 +22,7 @@ #include "preprocessing/preprocessing_pass.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -38,6 +38,6 @@ class TheoryPreprocess : public PreprocessingPass } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PREPROCESSING__PASSES__THEORY_PREPROCESS_H */ diff --git a/src/preprocessing/passes/theory_rewrite_eq.cpp b/src/preprocessing/passes/theory_rewrite_eq.cpp index 9ca1c82ce..51cdea47e 100644 --- a/src/preprocessing/passes/theory_rewrite_eq.cpp +++ b/src/preprocessing/passes/theory_rewrite_eq.cpp @@ -19,9 +19,9 @@ #include "preprocessing/preprocessing_pass_context.h" #include "theory/theory_engine.h" -using namespace cvc5::theory; +using namespace cvc5::internal::theory; -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -146,4 +146,4 @@ TrustNode TheoryRewriteEq::rewriteAssertion(TNode n) } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/preprocessing/passes/theory_rewrite_eq.h b/src/preprocessing/passes/theory_rewrite_eq.h index 73d20f77c..ff0b2d8ed 100644 --- a/src/preprocessing/passes/theory_rewrite_eq.h +++ b/src/preprocessing/passes/theory_rewrite_eq.h @@ -22,7 +22,7 @@ #include "preprocessing/preprocessing_pass.h" #include "proof/trust_node.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -52,6 +52,6 @@ class TheoryRewriteEq : public PreprocessingPass } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PREPROCESSING__PASSES__THEORY_REWRITE_EQ_H */ diff --git a/src/preprocessing/passes/unconstrained_simplifier.cpp b/src/preprocessing/passes/unconstrained_simplifier.cpp index b31e2e865..23a8ff181 100644 --- a/src/preprocessing/passes/unconstrained_simplifier.cpp +++ b/src/preprocessing/passes/unconstrained_simplifier.cpp @@ -31,10 +31,10 @@ #include "util/rational.h" using namespace std; -using namespace cvc5::kind; -using namespace cvc5::theory; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::theory; -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace passes { @@ -879,4 +879,4 @@ PreprocessingPassResult UnconstrainedSimplifier::applyInternal( } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/preprocessing/passes/unconstrained_simplifier.h b/src/preprocessing/passes/unconstrained_simplifier.h index 861a89b7e..4b24d223d 100644 --- a/src/preprocessing/passes/unconstrained_simplifier.h +++ b/src/preprocessing/passes/unconstrained_simplifier.h @@ -30,7 +30,7 @@ #include "theory/substitutions.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { namespace context { class Context; } @@ -72,6 +72,6 @@ class UnconstrainedSimplifier : public PreprocessingPass } // namespace passes } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/preprocessing/preprocessing_pass.cpp b/src/preprocessing/preprocessing_pass.cpp index 06e57c568..074241494 100644 --- a/src/preprocessing/preprocessing_pass.cpp +++ b/src/preprocessing/preprocessing_pass.cpp @@ -23,7 +23,7 @@ #include "smt/solver_engine_scope.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { PreprocessingPassResult PreprocessingPass::apply( @@ -48,4 +48,4 @@ PreprocessingPass::PreprocessingPass(PreprocessingPassContext* preprocContext, PreprocessingPass::~PreprocessingPass() { Assert(smt::solverEngineInScope()); } } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/preprocessing/preprocessing_pass.h b/src/preprocessing/preprocessing_pass.h index bd141261f..f556347a1 100644 --- a/src/preprocessing/preprocessing_pass.h +++ b/src/preprocessing/preprocessing_pass.h @@ -37,7 +37,7 @@ #include "smt/env_obj.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { class AssertionPipeline; @@ -78,6 +78,6 @@ class PreprocessingPass : protected EnvObj }; } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PREPROCESSING__PREPROCESSING_PASS_H */ diff --git a/src/preprocessing/preprocessing_pass_context.cpp b/src/preprocessing/preprocessing_pass_context.cpp index 7d26b4ff0..415610cf8 100644 --- a/src/preprocessing/preprocessing_pass_context.cpp +++ b/src/preprocessing/preprocessing_pass_context.cpp @@ -22,7 +22,7 @@ #include "theory/theory_engine.h" #include "theory/theory_model.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { PreprocessingPassContext::PreprocessingPassContext( @@ -130,4 +130,4 @@ void PreprocessingPassContext::addSubstitutions( } } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/preprocessing/preprocessing_pass_context.h b/src/preprocessing/preprocessing_pass_context.h index 31c0bbc46..6844a326d 100644 --- a/src/preprocessing/preprocessing_pass_context.h +++ b/src/preprocessing/preprocessing_pass_context.h @@ -29,7 +29,7 @@ #include "theory/trust_substitutions.h" #include "util/resource_manager.h" -namespace cvc5 { +namespace cvc5::internal { class Env; class TheoryEngine; @@ -147,6 +147,6 @@ class PreprocessingPassContext : protected EnvObj }; // class PreprocessingPassContext } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PREPROCESSING__PREPROCESSING_PASS_CONTEXT_H */ diff --git a/src/preprocessing/preprocessing_pass_registry.cpp b/src/preprocessing/preprocessing_pass_registry.cpp index b0f9992ca..78e82cad6 100644 --- a/src/preprocessing/preprocessing_pass_registry.cpp +++ b/src/preprocessing/preprocessing_pass_registry.cpp @@ -59,10 +59,10 @@ #include "preprocessing/passes/unconstrained_simplifier.h" #include "preprocessing/preprocessing_pass.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { -using namespace cvc5::preprocessing::passes; +using namespace cvc5::internal::preprocessing::passes; PreprocessingPassRegistry& PreprocessingPassRegistry::getInstance() { @@ -157,4 +157,4 @@ PreprocessingPassRegistry::PreprocessingPassRegistry() } } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/preprocessing/preprocessing_pass_registry.h b/src/preprocessing/preprocessing_pass_registry.h index 06f8a4212..151de49e3 100644 --- a/src/preprocessing/preprocessing_pass_registry.h +++ b/src/preprocessing/preprocessing_pass_registry.h @@ -24,7 +24,7 @@ #include #include -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { class PreprocessingPass; @@ -95,6 +95,6 @@ class PreprocessingPassRegistry { }; // class PreprocessingPassRegistry } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PREPROCESSING__PREPROCESSING_PASS_REGISTRY_H */ diff --git a/src/preprocessing/util/ite_utilities.cpp b/src/preprocessing/util/ite_utilities.cpp index 8436c7ec2..77bb23768 100644 --- a/src/preprocessing/util/ite_utilities.cpp +++ b/src/preprocessing/util/ite_utilities.cpp @@ -30,7 +30,7 @@ #include "util/rational.h" using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace util { @@ -1884,4 +1884,4 @@ ITECareSimplifier::CareSetPtr ITECareSimplifier::CareSetPtr::mkNew( } // namespace util } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/preprocessing/util/ite_utilities.h b/src/preprocessing/util/ite_utilities.h index d1a93a2c2..a19683d44 100644 --- a/src/preprocessing/util/ite_utilities.h +++ b/src/preprocessing/util/ite_utilities.h @@ -32,7 +32,7 @@ #include "util/hash.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { @@ -426,6 +426,6 @@ class ITECareSimplifier } // namespace util } // namespace preprocessing -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/printer/ast/ast_printer.cpp b/src/printer/ast/ast_printer.cpp index 542dfc906..129e28252 100644 --- a/src/printer/ast/ast_printer.cpp +++ b/src/printer/ast/ast_printer.cpp @@ -27,7 +27,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace printer { namespace ast { @@ -115,24 +115,25 @@ void AstPrinter::toStream(std::ostream& out, }/* AstPrinter::toStream(TNode) */ template -static bool tryToStream(std::ostream& out, const Command* c); +static bool tryToStream(std::ostream& out, const cvc5::Command* c); template -static bool tryToStream(std::ostream& out, const CommandStatus* s); +static bool tryToStream(std::ostream& out, const cvc5::CommandStatus* s); -void AstPrinter::toStream(std::ostream& out, const CommandStatus* s) const +void AstPrinter::toStream(std::ostream& out, const cvc5::CommandStatus* s) const { - if(tryToStream(out, s) || - tryToStream(out, s) || - tryToStream(out, s) || - tryToStream(out, s)) { + if (tryToStream(out, s) + || tryToStream(out, s) + || tryToStream(out, s) + || tryToStream(out, s)) + { return; } - out << "ERROR: don't know how to print a CommandStatus of class: " + out << "ERROR: don't know how to print a cvc5::CommandStatus of class: " << typeid(*s).name() << endl; -}/* AstPrinter::toStream(CommandStatus*) */ +} /* AstPrinter::toStream(cvc5::CommandStatus*) */ void AstPrinter::toStream(std::ostream& out, const smt::Model& m) const { @@ -172,13 +173,13 @@ void AstPrinter::toStreamModelTerm(std::ostream& out, void AstPrinter::toStreamCmdEmpty(std::ostream& out, const std::string& name) const { - out << "EmptyCommand(" << name << ')' << std::endl; + out << "Emptycvc5::Command(" << name << ')' << std::endl; } void AstPrinter::toStreamCmdEcho(std::ostream& out, const std::string& output) const { - out << "EchoCommand(" << output << ')' << std::endl; + out << "Echocvc5::Command(" << output << ')' << std::endl; } void AstPrinter::toStreamCmdAssert(std::ostream& out, Node n) const @@ -229,10 +230,10 @@ void AstPrinter::toStreamCmdQuit(std::ostream& out) const } void AstPrinter::toStreamCmdDeclarationSequence( - std::ostream& out, const std::vector& sequence) const + std::ostream& out, const std::vector& sequence) const { out << "DeclarationSequence[" << endl; - for (CommandSequence::const_iterator i = sequence.cbegin(); + for (cvc5::CommandSequence::const_iterator i = sequence.cbegin(); i != sequence.cend(); ++i) { @@ -242,10 +243,10 @@ void AstPrinter::toStreamCmdDeclarationSequence( } void AstPrinter::toStreamCmdCommandSequence( - std::ostream& out, const std::vector& sequence) const + std::ostream& out, const std::vector& sequence) const { - out << "CommandSequence[" << endl; - for (CommandSequence::const_iterator i = sequence.cbegin(); + out << "cvc5::CommandSequence[" << endl; + for (cvc5::CommandSequence::const_iterator i = sequence.cbegin(); i != sequence.cend(); ++i) { @@ -371,7 +372,7 @@ void AstPrinter::toStreamCmdGetOption(std::ostream& out, void AstPrinter::toStreamCmdDatatypeDeclaration( std::ostream& out, const std::vector& datatypes) const { - out << "DatatypeDeclarationCommand(["; + out << "DatatypeDeclarationcvc5::Command(["; for (const TypeNode& t : datatypes) { out << t << ";" << endl; @@ -424,7 +425,7 @@ void AstPrinter::toStreamWithLetify(std::ostream& out, } template -static bool tryToStream(std::ostream& out, const Command* c) +static bool tryToStream(std::ostream& out, const cvc5::Command* c) { if(typeid(*c) == typeid(T)) { toStream(out, dynamic_cast(c)); @@ -433,30 +434,31 @@ static bool tryToStream(std::ostream& out, const Command* c) return false; } -static void toStream(std::ostream& out, const CommandSuccess* s) +static void toStream(std::ostream& out, const cvc5::CommandSuccess* s) { - if(Command::printsuccess::getPrintSuccess(out)) { + if (cvc5::Command::printsuccess::getPrintSuccess(out)) + { out << "OK" << endl; } } -static void toStream(std::ostream& out, const CommandInterrupted* s) +static void toStream(std::ostream& out, const cvc5::CommandInterrupted* s) { out << "INTERRUPTED" << endl; } -static void toStream(std::ostream& out, const CommandUnsupported* s) +static void toStream(std::ostream& out, const cvc5::CommandUnsupported* s) { out << "UNSUPPORTED" << endl; } -static void toStream(std::ostream& out, const CommandFailure* s) +static void toStream(std::ostream& out, const cvc5::CommandFailure* s) { out << s->getMessage() << endl; } template -static bool tryToStream(std::ostream& out, const CommandStatus* s) +static bool tryToStream(std::ostream& out, const cvc5::CommandStatus* s) { if(typeid(*s) == typeid(T)) { toStream(out, dynamic_cast(s)); @@ -467,4 +469,4 @@ static bool tryToStream(std::ostream& out, const CommandStatus* s) } // namespace ast } // namespace printer -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/printer/ast/ast_printer.h b/src/printer/ast/ast_printer.h index cf4b532ad..4389777e2 100644 --- a/src/printer/ast/ast_printer.h +++ b/src/printer/ast/ast_printer.h @@ -22,22 +22,22 @@ #include "printer/printer.h" -namespace cvc5 { +namespace cvc5::internal { class LetBinding; namespace printer { namespace ast { -class AstPrinter : public cvc5::Printer +class AstPrinter : public cvc5::internal::Printer { public: - using cvc5::Printer::toStream; + using cvc5::internal::Printer::toStream; void toStream(std::ostream& out, TNode n, int toDepth, size_t dag) const override; - void toStream(std::ostream& out, const CommandStatus* s) const override; + void toStream(std::ostream& out, const cvc5::CommandStatus* s) const override; void toStream(std::ostream& out, const smt::Model& m) const override; /** Print empty command */ @@ -148,11 +148,13 @@ class AstPrinter : public cvc5::Printer /** Print command sequence command */ void toStreamCmdCommandSequence( - std::ostream& out, const std::vector& sequence) const override; + std::ostream& out, + const std::vector& sequence) const override; /** Print declaration sequence command */ void toStreamCmdDeclarationSequence( - std::ostream& out, const std::vector& sequence) const override; + std::ostream& out, + const std::vector& sequence) const override; private: void toStream(std::ostream& out, @@ -186,6 +188,6 @@ class AstPrinter : public cvc5::Printer } // namespace ast } // namespace printer -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PRINTER__AST_PRINTER_H */ diff --git a/src/printer/let_binding.cpp b/src/printer/let_binding.cpp index a807b9d83..17c8f907f 100644 --- a/src/printer/let_binding.cpp +++ b/src/printer/let_binding.cpp @@ -17,7 +17,7 @@ #include -namespace cvc5 { +namespace cvc5::internal { LetBinding::LetBinding(uint32_t thresh) : d_thresh(thresh), @@ -213,4 +213,4 @@ void LetBinding::convertCountToLet() } } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/printer/let_binding.h b/src/printer/let_binding.h index b67ceb129..393b0c91f 100644 --- a/src/printer/let_binding.h +++ b/src/printer/let_binding.h @@ -24,7 +24,7 @@ #include "context/cdlist.h" #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { /** * A flexible let binding class. This class provides functionalities for @@ -158,6 +158,6 @@ class LetBinding NodeIdMap d_letMap; }; -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/printer/printer.cpp b/src/printer/printer.cpp index f543f1be7..accba62ea 100644 --- a/src/printer/printer.cpp +++ b/src/printer/printer.cpp @@ -28,7 +28,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { unique_ptr Printer::d_printers[static_cast(Language::LANG_MAX)]; @@ -524,15 +524,15 @@ void Printer::toStreamCmdDeclareHeap(std::ostream& out, } void Printer::toStreamCmdCommandSequence( - std::ostream& out, const std::vector& sequence) const + std::ostream& out, const std::vector& sequence) const { printUnknownCommand(out, "sequence"); } void Printer::toStreamCmdDeclarationSequence( - std::ostream& out, const std::vector& sequence) const + std::ostream& out, const std::vector& sequence) const { printUnknownCommand(out, "sequence"); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/printer/printer.h b/src/printer/printer.h index c5dd5ddc2..d873b3acc 100644 --- a/src/printer/printer.h +++ b/src/printer/printer.h @@ -29,6 +29,9 @@ namespace cvc5 { class Command; class CommandStatus; + +namespace internal { + class UnsatCore; struct InstantiationList; struct SkolemList; @@ -279,11 +282,11 @@ class Printer /** Print command sequence command */ virtual void toStreamCmdCommandSequence( - std::ostream& out, const std::vector& sequence) const; + std::ostream& out, const std::vector& sequence) const; /** Print declaration sequence command */ virtual void toStreamCmdDeclarationSequence( - std::ostream& out, const std::vector& sequence) const; + std::ostream& out, const std::vector& sequence) const; protected: /** Derived classes can construct, but no one else. */ @@ -330,6 +333,7 @@ class Printer }; /* class Printer */ +} // namespace internal } // namespace cvc5 #endif /* CVC5__PRINTER__PRINTER_H */ diff --git a/src/printer/smt2/smt2_printer.cpp b/src/printer/smt2/smt2_printer.cpp index 7145471dd..f7ef49c88 100644 --- a/src/printer/smt2/smt2_printer.cpp +++ b/src/printer/smt2/smt2_printer.cpp @@ -60,7 +60,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace printer { namespace smt2 { @@ -331,7 +331,7 @@ void Smt2Printer::toStream(std::ostream& out, } else { - out << cvc5::quoteSymbol(dt.getName()); + out << cvc5::internal::quoteSymbol(dt.getName()); } break; } @@ -473,7 +473,7 @@ void Smt2Printer::toStream(std::ostream& out, out << '('; } if(n.getAttribute(expr::VarNameAttr(), name)) { - out << cvc5::quoteSymbol(name); + out << cvc5::internal::quoteSymbol(name); } if(n.getNumChildren() != 0) { for(unsigned i = 0; i < n.getNumChildren(); ++i) { @@ -544,7 +544,7 @@ void Smt2Printer::toStream(std::ostream& out, // abstract value std::string s; n.getAttribute(expr::VarNameAttr(), s); - out << "(as @" << cvc5::quoteSymbol(s) << " " << n.getType() << ")"; + out << "(as @" << cvc5::internal::quoteSymbol(s) << " " << n.getType() << ")"; return; } else if (n.isVar()) @@ -553,7 +553,7 @@ void Smt2Printer::toStream(std::ostream& out, string s; if (n.getAttribute(expr::VarNameAttr(), s)) { - out << cvc5::quoteSymbol(s); + out << cvc5::internal::quoteSymbol(s); } else { @@ -1283,7 +1283,7 @@ std::string Smt2Printer::smtKindStringOf(const Node& n, Variant v) Kind k = n.getKind(); if (n.getNumChildren() > 0 && n[0].getType().isSequence()) { - // this method parallels api::Term::getKind + // this method parallels cvc5::Term::getKind switch (k) { case kind::STRING_CONCAT: return "seq.concat"; @@ -1314,27 +1314,31 @@ void Smt2Printer::toStreamType(std::ostream& out, TypeNode tn) const } template -static bool tryToStream(std::ostream& out, const Command* c); +static bool tryToStream(std::ostream& out, const cvc5::Command* c); template -static bool tryToStream(std::ostream& out, const Command* c, Variant v); +static bool tryToStream(std::ostream& out, const cvc5::Command* c, Variant v); template -static bool tryToStream(std::ostream& out, const CommandStatus* s, Variant v); +static bool tryToStream(std::ostream& out, + const cvc5::CommandStatus* s, + Variant v); -void Smt2Printer::toStream(std::ostream& out, const CommandStatus* s) const +void Smt2Printer::toStream(std::ostream& out, + const cvc5::CommandStatus* s) const { - if (tryToStream(out, s, d_variant) || - tryToStream(out, s, d_variant) || - tryToStream(out, s, d_variant) || - tryToStream(out, s, d_variant) || - tryToStream(out, s, d_variant)) { + if (tryToStream(out, s, d_variant) + || tryToStream(out, s, d_variant) + || tryToStream(out, s, d_variant) + || tryToStream(out, s, d_variant) + || tryToStream(out, s, d_variant)) + { return; } - out << "ERROR: don't know how to print a CommandStatus of class: " + out << "ERROR: don't know how to print a cvc5::CommandStatus of class: " << typeid(*s).name() << endl; -}/* Smt2Printer::toStream(CommandStatus*) */ +} /* Smt2Printer::toStream(cvc5::CommandStatus*) */ void Smt2Printer::toStream(std::ostream& out, const UnsatCore& core) const { @@ -1345,7 +1349,7 @@ void Smt2Printer::toStream(std::ostream& out, const UnsatCore& core) const const std::vector& cnames = core.getCoreNames(); for (const std::string& cn : cnames) { - out << cvc5::quoteSymbol(cn) << std::endl; + out << cvc5::internal::quoteSymbol(cn) << std::endl; } } else @@ -1493,16 +1497,16 @@ void Smt2Printer::toStreamCmdQuit(std::ostream& out) const } void Smt2Printer::toStreamCmdCommandSequence( - std::ostream& out, const std::vector& sequence) const + std::ostream& out, const std::vector& sequence) const { - for (Command* i : sequence) + for (cvc5::Command* i : sequence) { out << *i; } } void Smt2Printer::toStreamCmdDeclarationSequence( - std::ostream& out, const std::vector& sequence) const + std::ostream& out, const std::vector& sequence) const { toStreamCmdCommandSequence(out, sequence); } @@ -1511,7 +1515,7 @@ void Smt2Printer::toStreamCmdDeclareFunction(std::ostream& out, const std::string& id, TypeNode type) const { - out << "(declare-fun " << cvc5::quoteSymbol(id) << " ("; + out << "(declare-fun " << cvc5::internal::quoteSymbol(id) << " ("; if (type.isFunction()) { const vector argTypes = type.getArgTypes(); @@ -1534,7 +1538,7 @@ void Smt2Printer::toStreamCmdDeclarePool( TypeNode type, const std::vector& initValue) const { - out << "(declare-pool " << cvc5::quoteSymbol(id) << ' ' << type << " ("; + out << "(declare-pool " << cvc5::internal::quoteSymbol(id) << ' ' << type << " ("; for (size_t i = 0, n = initValue.size(); i < n; ++i) { if (i != 0) { @@ -1551,7 +1555,7 @@ void Smt2Printer::toStreamCmdDefineFunction(std::ostream& out, TypeNode range, Node formula) const { - out << "(define-fun " << cvc5::quoteSymbol(id) << " ("; + out << "(define-fun " << cvc5::internal::quoteSymbol(id) << " ("; if (!formals.empty()) { vector::const_iterator i = formals.cbegin(); @@ -1657,7 +1661,7 @@ void Smt2Printer::toStreamCmdDefineType(std::ostream& out, const std::vector& params, TypeNode t) const { - out << "(define-sort " << cvc5::quoteSymbol(id) << " ("; + out << "(define-sort " << cvc5::internal::quoteSymbol(id) << " ("; if (params.size() > 0) { copy( @@ -1781,7 +1785,7 @@ void Smt2Printer::toStream(std::ostream& out, const DType& dt) const { out << " "; } - out << "(" << cvc5::quoteSymbol(cons.getName()); + out << "(" << cvc5::internal::quoteSymbol(cons.getName()); for (size_t j = 0, nargs = cons.getNumArgs(); j < nargs; j++) { const DTypeSelector& arg = cons[j]; @@ -1814,7 +1818,7 @@ void Smt2Printer::toStreamCmdDatatypeDeclaration( { Assert(t.isDatatype()); const DType& d = t.getDType(); - out << "(" << cvc5::quoteSymbol(d.getName()); + out << "(" << cvc5::internal::quoteSymbol(d.getName()); out << " " << d.getNumParameters() << ")"; } out << ") ("; @@ -1859,7 +1863,7 @@ void Smt2Printer::toStreamCmdEmpty(std::ostream& out, void Smt2Printer::toStreamCmdEcho(std::ostream& out, const std::string& output) const { - out << "(echo " << cvc5::quoteString(output) << ')' << std::endl; + out << "(echo " << cvc5::internal::quoteString(output) << ')' << std::endl; } /* @@ -2003,7 +2007,7 @@ void Smt2Printer::toStreamCmdGetInterpol(std::ostream& out, Node conj, TypeNode sygusType) const { - out << "(get-interpolant " << cvc5::quoteSymbol(name) << ' ' << conj; + out << "(get-interpolant " << cvc5::internal::quoteSymbol(name) << ' ' << conj; if (!sygusType.isNull()) { out << ' ' << sygusGrammarString(sygusType); @@ -2053,7 +2057,7 @@ void Smt2Printer::toStreamCmdGetQuantifierElimination(std::ostream& out, */ template -static bool tryToStream(std::ostream& out, const Command* c) +static bool tryToStream(std::ostream& out, const cvc5::Command* c) { if(typeid(*c) == typeid(T)) { toStream(out, dynamic_cast(c)); @@ -2063,7 +2067,7 @@ static bool tryToStream(std::ostream& out, const Command* c) } template -static bool tryToStream(std::ostream& out, const Command* c, Variant v) +static bool tryToStream(std::ostream& out, const cvc5::Command* c, Variant v) { if(typeid(*c) == typeid(T)) { toStream(out, dynamic_cast(c), v); @@ -2072,19 +2076,26 @@ static bool tryToStream(std::ostream& out, const Command* c, Variant v) return false; } -static void toStream(std::ostream& out, const CommandSuccess* s, Variant v) +static void toStream(std::ostream& out, + const cvc5::CommandSuccess* s, + Variant v) { - if(Command::printsuccess::getPrintSuccess(out)) { + if (cvc5::Command::printsuccess::getPrintSuccess(out)) + { out << "success" << endl; } } -static void toStream(std::ostream& out, const CommandInterrupted* s, Variant v) +static void toStream(std::ostream& out, + const cvc5::CommandInterrupted* s, + Variant v) { out << "interrupted" << endl; } -static void toStream(std::ostream& out, const CommandUnsupported* s, Variant v) +static void toStream(std::ostream& out, + const cvc5::CommandUnsupported* s, + Variant v) { #ifdef CVC5_COMPETITION_MODE // if in competition mode, lie and say we're ok @@ -2098,20 +2109,27 @@ static void toStream(std::ostream& out, const CommandUnsupported* s, Variant v) static void errorToStream(std::ostream& out, std::string message, Variant v) { - out << "(error " << cvc5::quoteString(message) << ')' << endl; + out << "(error " << cvc5::internal::quoteString(message) << ')' << endl; } -static void toStream(std::ostream& out, const CommandFailure* s, Variant v) { +static void toStream(std::ostream& out, + const cvc5::CommandFailure* s, + Variant v) +{ errorToStream(out, s->getMessage(), v); } -static void toStream(std::ostream& out, const CommandRecoverableFailure* s, - Variant v) { +static void toStream(std::ostream& out, + const cvc5::CommandRecoverableFailure* s, + Variant v) +{ errorToStream(out, s->getMessage(), v); } template -static bool tryToStream(std::ostream& out, const CommandStatus* s, Variant v) +static bool tryToStream(std::ostream& out, + const cvc5::CommandStatus* s, + Variant v) { if(typeid(*s) == typeid(T)) { toStream(out, dynamic_cast(s), v); @@ -2122,4 +2140,4 @@ static bool tryToStream(std::ostream& out, const CommandStatus* s, Variant v) } // namespace smt2 } // namespace printer -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/printer/smt2/smt2_printer.h b/src/printer/smt2/smt2_printer.h index ec403fe00..91a17266e 100644 --- a/src/printer/smt2/smt2_printer.h +++ b/src/printer/smt2/smt2_printer.h @@ -20,7 +20,7 @@ #include "printer/printer.h" -namespace cvc5 { +namespace cvc5::internal { class LetBinding; @@ -34,16 +34,16 @@ enum Variant // support for the string standard }; /* enum Variant */ -class Smt2Printer : public cvc5::Printer +class Smt2Printer : public cvc5::internal::Printer { public: Smt2Printer(Variant variant = no_variant) : d_variant(variant) {} - using cvc5::Printer::toStream; + using cvc5::internal::Printer::toStream; void toStream(std::ostream& out, TNode n, int toDepth, size_t dag) const override; - void toStream(std::ostream& out, const CommandStatus* s) const override; + void toStream(std::ostream& out, const cvc5::CommandStatus* s) const override; void toStream(std::ostream& out, const smt::Model& m) const override; /** * Writes the unsat core to the stream out. @@ -248,11 +248,13 @@ class Smt2Printer : public cvc5::Printer /** Print command sequence command */ void toStreamCmdCommandSequence( - std::ostream& out, const std::vector& sequence) const override; + std::ostream& out, + const std::vector& sequence) const override; /** Print declaration sequence command */ void toStreamCmdDeclarationSequence( - std::ostream& out, const std::vector& sequence) const override; + std::ostream& out, + const std::vector& sequence) const override; /** * Get the string for a kind k, which returns how the kind k is printed in @@ -318,6 +320,6 @@ class Smt2Printer : public cvc5::Printer } // namespace smt2 } // namespace printer -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PRINTER__SMT2_PRINTER_H */ diff --git a/src/printer/tptp/tptp_printer.cpp b/src/printer/tptp/tptp_printer.cpp index ef94bf54f..f8688240d 100644 --- a/src/printer/tptp/tptp_printer.cpp +++ b/src/printer/tptp/tptp_printer.cpp @@ -28,7 +28,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace printer { namespace tptp { @@ -99,4 +99,4 @@ void TptpPrinter::toStream(std::ostream& out, const UnsatCore& core) const } // namespace tptp } // namespace printer -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/printer/tptp/tptp_printer.h b/src/printer/tptp/tptp_printer.h index 1896edab7..f58fa2e78 100644 --- a/src/printer/tptp/tptp_printer.h +++ b/src/printer/tptp/tptp_printer.h @@ -22,14 +22,14 @@ #include "printer/printer.h" -namespace cvc5 { +namespace cvc5::internal { namespace printer { namespace tptp { -class TptpPrinter : public cvc5::Printer +class TptpPrinter : public cvc5::internal::Printer { public: - using cvc5::Printer::toStream; + using cvc5::internal::Printer::toStream; void toStream(std::ostream& out, TNode n, int toDepth, @@ -64,6 +64,6 @@ class TptpPrinter : public cvc5::Printer } // namespace tptp } // namespace printer -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PRINTER__TPTP_PRINTER_H */ diff --git a/src/proof/alethe/alethe_node_converter.cpp b/src/proof/alethe/alethe_node_converter.cpp index d78c185a4..27bc6fc6a 100644 --- a/src/proof/alethe/alethe_node_converter.cpp +++ b/src/proof/alethe/alethe_node_converter.cpp @@ -17,7 +17,7 @@ #include "expr/node_algorithm.h" -namespace cvc5 { +namespace cvc5::internal { namespace proof { AletheNodeConverter::AletheNodeConverter() {} @@ -35,4 +35,4 @@ Node AletheNodeConverter::postConvert(Node n) bool AletheNodeConverter::shouldTraverse(Node n) { return expr::hasClosure(n); } } // namespace proof -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/proof/alethe/alethe_node_converter.h b/src/proof/alethe/alethe_node_converter.h index 310bc70ff..7384c4d93 100644 --- a/src/proof/alethe/alethe_node_converter.h +++ b/src/proof/alethe/alethe_node_converter.h @@ -24,7 +24,7 @@ #include "expr/node.h" #include "expr/node_converter.h" -namespace cvc5 { +namespace cvc5::internal { namespace proof { /** @@ -43,6 +43,6 @@ class AletheNodeConverter : public NodeConverter }; } // namespace proof -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/proof/alethe/alethe_nosubtype_node_converter.cpp b/src/proof/alethe/alethe_nosubtype_node_converter.cpp index e8c115ebe..ba4eff0a9 100644 --- a/src/proof/alethe/alethe_nosubtype_node_converter.cpp +++ b/src/proof/alethe/alethe_nosubtype_node_converter.cpp @@ -15,7 +15,7 @@ #include "proof/alethe/alethe_nosubtype_node_converter.h" -namespace cvc5 { +namespace cvc5::internal { namespace proof { Node AletheNoSubtypeNodeConverter::postConvert(Node n) @@ -57,4 +57,4 @@ Node AletheNoSubtypeNodeConverter::postConvert(Node n) } } // namespace proof -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/proof/alethe/alethe_nosubtype_node_converter.h b/src/proof/alethe/alethe_nosubtype_node_converter.h index aef7efe12..c1c70293b 100644 --- a/src/proof/alethe/alethe_nosubtype_node_converter.h +++ b/src/proof/alethe/alethe_nosubtype_node_converter.h @@ -21,7 +21,7 @@ #include "expr/node.h" #include "expr/node_converter.h" -namespace cvc5 { +namespace cvc5::internal { namespace proof { /** @@ -41,6 +41,6 @@ class AletheNoSubtypeNodeConverter : public NodeConverter }; } // namespace proof -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/proof/alethe/alethe_post_processor.cpp b/src/proof/alethe/alethe_post_processor.cpp index 6e98ed8a1..a78e5657b 100644 --- a/src/proof/alethe/alethe_post_processor.cpp +++ b/src/proof/alethe/alethe_post_processor.cpp @@ -24,9 +24,9 @@ #include "theory/builtin/proof_checker.h" #include "util/rational.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace proof { @@ -1849,4 +1849,4 @@ void AletheProofPostprocess::process(std::shared_ptr pf) } // namespace proof -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/proof/alethe/alethe_post_processor.h b/src/proof/alethe/alethe_post_processor.h index 7819c20bb..1bdf98666 100644 --- a/src/proof/alethe/alethe_post_processor.h +++ b/src/proof/alethe/alethe_post_processor.h @@ -20,7 +20,7 @@ #include "proof/alethe/alethe_proof_rule.h" #include "proof/proof_node_updater.h" -namespace cvc5 { +namespace cvc5::internal { namespace proof { @@ -152,6 +152,6 @@ class AletheProofPostprocess } // namespace proof -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/proof/alethe/alethe_printer.cpp b/src/proof/alethe/alethe_printer.cpp index 2fd898bfd..ee62b8851 100644 --- a/src/proof/alethe/alethe_printer.cpp +++ b/src/proof/alethe/alethe_printer.cpp @@ -20,7 +20,7 @@ #include "proof/alethe/alethe_proof_rule.h" -namespace cvc5 { +namespace cvc5::internal { namespace proof { @@ -257,4 +257,4 @@ std::string AletheProofPrinter::printInternal( } // namespace proof -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/proof/alethe/alethe_printer.h b/src/proof/alethe/alethe_printer.h index f96c5f7d9..8cd671fe5 100644 --- a/src/proof/alethe/alethe_printer.h +++ b/src/proof/alethe/alethe_printer.h @@ -20,7 +20,7 @@ #include "proof/proof_node.h" -namespace cvc5 { +namespace cvc5::internal { namespace proof { @@ -77,6 +77,6 @@ class AletheProofPrinter } // namespace proof -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC4__PROOF__ALETHE_PROOF_PRINTER_H */ diff --git a/src/proof/alethe/alethe_proof_rule.cpp b/src/proof/alethe/alethe_proof_rule.cpp index 313839dec..496c002b3 100644 --- a/src/proof/alethe/alethe_proof_rule.cpp +++ b/src/proof/alethe/alethe_proof_rule.cpp @@ -19,7 +19,7 @@ #include "proof/proof_checker.h" -namespace cvc5 { +namespace cvc5::internal { namespace proof { @@ -142,4 +142,4 @@ AletheRule getAletheRule(Node n) } // namespace proof -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/proof/alethe/alethe_proof_rule.h b/src/proof/alethe/alethe_proof_rule.h index d9515bd44..a24cb34c0 100644 --- a/src/proof/alethe/alethe_proof_rule.h +++ b/src/proof/alethe/alethe_proof_rule.h @@ -22,7 +22,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace proof { @@ -428,6 +428,6 @@ AletheRule getAletheRule(Node n); } // namespace proof -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC4__PROOF__ALETHE_PROOF_RULE_H */ diff --git a/src/proof/annotation_proof_generator.cpp b/src/proof/annotation_proof_generator.cpp index e9467276b..b634ebe74 100644 --- a/src/proof/annotation_proof_generator.cpp +++ b/src/proof/annotation_proof_generator.cpp @@ -19,7 +19,7 @@ #include "proof/proof_node.h" #include "proof/proof_node_manager.h" -namespace cvc5 { +namespace cvc5::internal { AnnotationProofGenerator::AnnotationProofGenerator(ProofNodeManager* pnm, context::Context* c, @@ -84,4 +84,4 @@ bool AnnotationProofGenerator::hasProofFor(Node f) std::string AnnotationProofGenerator::identify() const { return d_name; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/proof/annotation_proof_generator.h b/src/proof/annotation_proof_generator.h index fb737dc44..5abd0b6de 100644 --- a/src/proof/annotation_proof_generator.h +++ b/src/proof/annotation_proof_generator.h @@ -23,7 +23,7 @@ #include "proof/proof_generator.h" #include "proof/trust_node.h" -namespace cvc5 { +namespace cvc5::internal { class ProofNodeManager; @@ -97,6 +97,6 @@ class AnnotationProofGenerator : public ProofGenerator NodeProofNodeMap d_proofs; }; -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PROOF__ANNOTATION_PROOF_GENERATOR_H */ diff --git a/src/proof/assumption_proof_generator.cpp b/src/proof/assumption_proof_generator.cpp index 84adb676e..6558fedba 100644 --- a/src/proof/assumption_proof_generator.cpp +++ b/src/proof/assumption_proof_generator.cpp @@ -17,7 +17,7 @@ #include "proof/proof_node_manager.h" -namespace cvc5 { +namespace cvc5::internal { AssumptionProofGenerator::AssumptionProofGenerator(ProofNodeManager* pnm) : d_pnm(pnm) @@ -33,4 +33,4 @@ std::string AssumptionProofGenerator::identify() const return "AssumptionProofGenerator"; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/proof/assumption_proof_generator.h b/src/proof/assumption_proof_generator.h index 218e5ffc0..b414db127 100644 --- a/src/proof/assumption_proof_generator.h +++ b/src/proof/assumption_proof_generator.h @@ -20,7 +20,7 @@ #include "proof/proof_generator.h" -namespace cvc5 { +namespace cvc5::internal { class ProofNodeManager; @@ -41,6 +41,6 @@ class AssumptionProofGenerator : public ProofGenerator ProofNodeManager* d_pnm; }; -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PROOF__ASSUMPTION_PROOF_GENERATOR_H */ diff --git a/src/proof/buffered_proof_generator.cpp b/src/proof/buffered_proof_generator.cpp index d6f54fb34..ca101e34b 100644 --- a/src/proof/buffered_proof_generator.cpp +++ b/src/proof/buffered_proof_generator.cpp @@ -18,7 +18,7 @@ #include "proof/proof.h" #include "proof/proof_node_manager.h" -namespace cvc5 { +namespace cvc5::internal { BufferedProofGenerator::BufferedProofGenerator(context::Context* c, ProofNodeManager* pnm) @@ -100,4 +100,4 @@ bool BufferedProofGenerator::hasProofFor(Node f) return true; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/proof/buffered_proof_generator.h b/src/proof/buffered_proof_generator.h index 9d13faff4..174ffbb01 100644 --- a/src/proof/buffered_proof_generator.h +++ b/src/proof/buffered_proof_generator.h @@ -21,7 +21,7 @@ #include "context/cdhashmap.h" #include "proof/proof_generator.h" -namespace cvc5 { +namespace cvc5::internal { class ProofNodeManager; class ProofStep; @@ -59,6 +59,6 @@ class BufferedProofGenerator : public ProofGenerator ProofNodeManager* d_pnm; }; -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PROOF__BUFFERED_PROOF_GENERATOR_H */ diff --git a/src/proof/clause_id.h b/src/proof/clause_id.h index 03a74fb59..d66264287 100644 --- a/src/proof/clause_id.h +++ b/src/proof/clause_id.h @@ -21,7 +21,7 @@ #ifndef CVC5__PROOF__CLAUSE_ID_H #define CVC5__PROOF__CLAUSE_ID_H -namespace cvc5 { +namespace cvc5::internal { /** * A ClauseId is a shared identifier between the proofs module and the sat @@ -36,6 +36,6 @@ const ClauseId ClauseIdEmpty(-1); const ClauseId ClauseIdUndef(-2); const ClauseId ClauseIdError(-3); -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PROOF__CLAUSE_ID_H */ diff --git a/src/proof/conv_proof_generator.cpp b/src/proof/conv_proof_generator.cpp index 67f6d9678..81b0ae980 100644 --- a/src/proof/conv_proof_generator.cpp +++ b/src/proof/conv_proof_generator.cpp @@ -23,9 +23,9 @@ #include "proof/proof_node.h" #include "proof/proof_node_algorithm.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { std::ostream& operator<<(std::ostream& out, TConvPolicy tcpol) { @@ -621,4 +621,4 @@ std::string TConvProofGenerator::toStringDebug() const return ss.str(); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/proof/conv_proof_generator.h b/src/proof/conv_proof_generator.h index f23a661ae..ebd6d1077 100644 --- a/src/proof/conv_proof_generator.h +++ b/src/proof/conv_proof_generator.h @@ -22,7 +22,7 @@ #include "proof/lazy_proof.h" #include "proof/proof_generator.h" -namespace cvc5 { +namespace cvc5::internal { class ProofNodeManager; class TermContext; @@ -251,6 +251,6 @@ class TConvProofGenerator : public ProofGenerator std::string toStringDebug() const; }; -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PROOF__CONV_PROOF_GENERATOR_H */ diff --git a/src/proof/conv_seq_proof_generator.cpp b/src/proof/conv_seq_proof_generator.cpp index 491e454e6..5c7f1faad 100644 --- a/src/proof/conv_seq_proof_generator.cpp +++ b/src/proof/conv_seq_proof_generator.cpp @@ -19,7 +19,7 @@ #include "proof/proof_node_manager.h" -namespace cvc5 { +namespace cvc5::internal { TConvSeqProofGenerator::TConvSeqProofGenerator( ProofNodeManager* pnm, @@ -168,4 +168,4 @@ TrustNode TConvSeqProofGenerator::mkTrustRewriteSequence( std::string TConvSeqProofGenerator::identify() const { return d_name; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/proof/conv_seq_proof_generator.h b/src/proof/conv_seq_proof_generator.h index ac8663b58..76d51ac2d 100644 --- a/src/proof/conv_seq_proof_generator.h +++ b/src/proof/conv_seq_proof_generator.h @@ -23,7 +23,7 @@ #include "proof/proof_generator.h" #include "proof/trust_node.h" -namespace cvc5 { +namespace cvc5::internal { class ProofNodeManager; @@ -116,6 +116,6 @@ class TConvSeqProofGenerator : public ProofGenerator std::string d_name; }; -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PROOF__CONV_SEQ_PROOF_GENERATOR_H */ diff --git a/src/proof/dot/dot_printer.cpp b/src/proof/dot/dot_printer.cpp index c5f97711d..79268a58d 100644 --- a/src/proof/dot/dot_printer.cpp +++ b/src/proof/dot/dot_printer.cpp @@ -24,7 +24,7 @@ #include "proof/proof_node_manager.h" #include "theory/builtin/proof_checker.h" -namespace cvc5 { +namespace cvc5::internal { namespace proof { DotPrinter::DotPrinter() @@ -336,4 +336,4 @@ void DotPrinter::ruleArguments(std::ostringstream& currentArguments, } } // namespace proof -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/proof/dot/dot_printer.h b/src/proof/dot/dot_printer.h index c3ec82e2d..fb255855a 100644 --- a/src/proof/dot/dot_printer.h +++ b/src/proof/dot/dot_printer.h @@ -23,7 +23,7 @@ #include "printer/let_binding.h" #include "proof/proof_node.h" -namespace cvc5 { +namespace cvc5::internal { namespace proof { class DotPrinter @@ -102,6 +102,6 @@ class DotPrinter }; } // namespace proof -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/proof/eager_proof_generator.cpp b/src/proof/eager_proof_generator.cpp index 36ef1bf58..eff34e8f7 100644 --- a/src/proof/eager_proof_generator.cpp +++ b/src/proof/eager_proof_generator.cpp @@ -19,7 +19,7 @@ #include "proof/proof_node.h" #include "proof/proof_node_manager.h" -namespace cvc5 { +namespace cvc5::internal { EagerProofGenerator::EagerProofGenerator(ProofNodeManager* pnm, context::Context* c, @@ -166,4 +166,4 @@ TrustNode EagerProofGenerator::mkTrustNodeSplit(Node f) std::string EagerProofGenerator::identify() const { return d_name; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/proof/eager_proof_generator.h b/src/proof/eager_proof_generator.h index 9ebc89bd0..35714b845 100644 --- a/src/proof/eager_proof_generator.h +++ b/src/proof/eager_proof_generator.h @@ -24,7 +24,7 @@ #include "proof/proof_rule.h" #include "proof/trust_node.h" -namespace cvc5 { +namespace cvc5::internal { class ProofNode; class ProofNodeManager; @@ -204,6 +204,6 @@ class EagerProofGenerator : public ProofGenerator NodeProofNodeMap d_proofs; }; -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PROOF__PROOF_GENERATOR_H */ diff --git a/src/proof/lazy_proof.cpp b/src/proof/lazy_proof.cpp index 5b218c885..28cdad555 100644 --- a/src/proof/lazy_proof.cpp +++ b/src/proof/lazy_proof.cpp @@ -19,9 +19,9 @@ #include "proof/proof_node.h" #include "proof/proof_node_manager.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { LazyCDProof::LazyCDProof(ProofNodeManager* pnm, ProofGenerator* dpg, @@ -255,4 +255,4 @@ bool LazyCDProof::hasGenerator(Node fact) const return it != d_gens.end(); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/proof/lazy_proof.h b/src/proof/lazy_proof.h index 60170aa11..a390cbed4 100644 --- a/src/proof/lazy_proof.h +++ b/src/proof/lazy_proof.h @@ -21,7 +21,7 @@ #include "context/cdhashset.h" #include "proof/proof.h" -namespace cvc5 { +namespace cvc5::internal { class ProofGenerator; class ProofNodeManager; @@ -121,6 +121,6 @@ class LazyCDProof : public CDProof ProofNodeSet d_allVisited; }; -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PROOF__LAZY_PROOF_H */ diff --git a/src/proof/lazy_proof_chain.cpp b/src/proof/lazy_proof_chain.cpp index a29e3cdd1..ad19faead 100644 --- a/src/proof/lazy_proof_chain.cpp +++ b/src/proof/lazy_proof_chain.cpp @@ -22,7 +22,7 @@ #include "proof/proof_node_algorithm.h" #include "proof/proof_node_manager.h" -namespace cvc5 { +namespace cvc5::internal { LazyCDProofChain::LazyCDProofChain(ProofNodeManager* pnm, bool cyclic, @@ -382,4 +382,4 @@ std::shared_ptr LazyCDProofChain::getProofForInternal(Node fact, std::string LazyCDProofChain::identify() const { return d_name; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/proof/lazy_proof_chain.h b/src/proof/lazy_proof_chain.h index 114e2310e..5e23cb7e1 100644 --- a/src/proof/lazy_proof_chain.h +++ b/src/proof/lazy_proof_chain.h @@ -22,7 +22,7 @@ #include "proof/proof.h" -namespace cvc5 { +namespace cvc5::internal { class ProofNodeManager; @@ -164,6 +164,6 @@ class LazyCDProofChain : public CDProof std::string d_name; }; -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PROOF__LAZY_PROOF_CHAIN_H */ diff --git a/src/proof/lazy_tree_proof_generator.cpp b/src/proof/lazy_tree_proof_generator.cpp index 996a60513..280aa3653 100644 --- a/src/proof/lazy_tree_proof_generator.cpp +++ b/src/proof/lazy_tree_proof_generator.cpp @@ -23,7 +23,7 @@ #include "proof/proof_node.h" #include "proof/proof_node_manager.h" -namespace cvc5 { +namespace cvc5::internal { LazyTreeProofGenerator::LazyTreeProofGenerator(ProofNodeManager* pnm, const std::string& name) @@ -149,4 +149,4 @@ std::ostream& operator<<(std::ostream& os, const LazyTreeProofGenerator& ltpg) return os; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/proof/lazy_tree_proof_generator.h b/src/proof/lazy_tree_proof_generator.h index 4f603fc2d..f5bc67b4f 100644 --- a/src/proof/lazy_tree_proof_generator.h +++ b/src/proof/lazy_tree_proof_generator.h @@ -24,7 +24,7 @@ #include "proof/proof_generator.h" #include "proof/proof_node_manager.h" -namespace cvc5 { +namespace cvc5::internal { namespace detail { /** * A single node in the proof tree created by the LazyTreeProofGenerator. @@ -211,6 +211,6 @@ class LazyTreeProofGenerator : public ProofGenerator */ std::ostream& operator<<(std::ostream& os, const LazyTreeProofGenerator& ltpg); -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/proof/lfsc/lfsc_list_sc_node_converter.cpp b/src/proof/lfsc/lfsc_list_sc_node_converter.cpp index bf72fb85a..9a466038c 100644 --- a/src/proof/lfsc/lfsc_list_sc_node_converter.cpp +++ b/src/proof/lfsc/lfsc_list_sc_node_converter.cpp @@ -15,7 +15,7 @@ #include "proof/lfsc/lfsc_list_sc_node_converter.h" -namespace cvc5 { +namespace cvc5::internal { namespace proof { LfscListScNodeConverter::LfscListScNodeConverter( @@ -125,4 +125,4 @@ Node LfscListScNodeConverter::mkOperatorFor(const std::string& name, } } // namespace proof -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/proof/lfsc/lfsc_list_sc_node_converter.h b/src/proof/lfsc/lfsc_list_sc_node_converter.h index fe0f18878..a1a68380b 100644 --- a/src/proof/lfsc/lfsc_list_sc_node_converter.h +++ b/src/proof/lfsc/lfsc_list_sc_node_converter.h @@ -20,7 +20,7 @@ #include "expr/node_converter.h" #include "proof/lfsc/lfsc_node_converter.h" -namespace cvc5 { +namespace cvc5::internal { namespace proof { /** @@ -81,6 +81,6 @@ class LfscListScNodeConverter : public NodeConverter }; } // namespace proof -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/proof/lfsc/lfsc_node_converter.cpp b/src/proof/lfsc/lfsc_node_converter.cpp index 047cc1f36..9a2453eb6 100644 --- a/src/proof/lfsc/lfsc_node_converter.cpp +++ b/src/proof/lfsc/lfsc_node_converter.cpp @@ -39,9 +39,9 @@ #include "util/regexp.h" #include "util/string.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace proof { LfscNodeConverter::LfscNodeConverter() @@ -1200,4 +1200,4 @@ size_t LfscNodeConverter::getOrAssignIndexForVar(Node v) } } // namespace proof -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/proof/lfsc/lfsc_node_converter.h b/src/proof/lfsc/lfsc_node_converter.h index 44250b8aa..8a1add912 100644 --- a/src/proof/lfsc/lfsc_node_converter.h +++ b/src/proof/lfsc/lfsc_node_converter.h @@ -24,7 +24,7 @@ #include "expr/node_converter.h" #include "expr/type_node.h" -namespace cvc5 { +namespace cvc5::internal { namespace proof { /** @@ -176,6 +176,6 @@ class LfscNodeConverter : public NodeConverter }; } // namespace proof -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/proof/lfsc/lfsc_post_processor.cpp b/src/proof/lfsc/lfsc_post_processor.cpp index 3e5aa5f8a..6691f4a74 100644 --- a/src/proof/lfsc/lfsc_post_processor.cpp +++ b/src/proof/lfsc/lfsc_post_processor.cpp @@ -22,9 +22,9 @@ #include "proof/proof_node_manager.h" #include "proof/proof_node_updater.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace proof { LfscProofPostprocessCallback::LfscProofPostprocessCallback( @@ -419,4 +419,4 @@ void LfscProofPostprocess::process(std::shared_ptr pf) } } // namespace proof -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/proof/lfsc/lfsc_post_processor.h b/src/proof/lfsc/lfsc_post_processor.h index 3776cf75b..6a658fc8d 100644 --- a/src/proof/lfsc/lfsc_post_processor.h +++ b/src/proof/lfsc/lfsc_post_processor.h @@ -24,7 +24,7 @@ #include "proof/lfsc/lfsc_util.h" #include "proof/proof_node_updater.h" -namespace cvc5 { +namespace cvc5::internal { class ProofChecker; @@ -98,6 +98,6 @@ class LfscProofPostprocess }; } // namespace proof -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/proof/lfsc/lfsc_print_channel.cpp b/src/proof/lfsc/lfsc_print_channel.cpp index 47961062e..77abdb562 100644 --- a/src/proof/lfsc/lfsc_print_channel.cpp +++ b/src/proof/lfsc/lfsc_print_channel.cpp @@ -19,7 +19,7 @@ #include "proof/lfsc/lfsc_util.h" -namespace cvc5 { +namespace cvc5::internal { namespace proof { LfscPrintChannelOut::LfscPrintChannelOut(std::ostream& out) : d_out(out) {} @@ -160,4 +160,4 @@ void LfscPrintChannelPre::printOpenRule(const ProofNode* pn) } } // namespace proof -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/proof/lfsc/lfsc_print_channel.h b/src/proof/lfsc/lfsc_print_channel.h index 655fa192c..016120ace 100644 --- a/src/proof/lfsc/lfsc_print_channel.h +++ b/src/proof/lfsc/lfsc_print_channel.h @@ -26,7 +26,7 @@ #include "proof/lfsc/lfsc_util.h" #include "proof/proof_node.h" -namespace cvc5 { +namespace cvc5::internal { namespace proof { /** @@ -123,6 +123,6 @@ class LfscPrintChannelPre : public LfscPrintChannel }; } // namespace proof -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/proof/lfsc/lfsc_printer.cpp b/src/proof/lfsc/lfsc_printer.cpp index 329b9106f..52b64fe5b 100644 --- a/src/proof/lfsc/lfsc_printer.cpp +++ b/src/proof/lfsc/lfsc_printer.cpp @@ -25,9 +25,9 @@ #include "proof/lfsc/lfsc_list_sc_node_converter.h" #include "proof/lfsc/lfsc_print_channel.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace proof { LfscPrinter::LfscPrinter(LfscNodeConverter& ltp) @@ -783,4 +783,4 @@ void LfscPrinter::printType(std::ostream& out, TypeNode tn) } } // namespace proof -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/proof/lfsc/lfsc_printer.h b/src/proof/lfsc/lfsc_printer.h index 3a6e36764..a21afaec5 100644 --- a/src/proof/lfsc/lfsc_printer.h +++ b/src/proof/lfsc/lfsc_printer.h @@ -28,7 +28,7 @@ #include "proof/print_expr.h" #include "proof/proof_node.h" -namespace cvc5 { +namespace cvc5::internal { namespace proof { class LfscPrintChannel; @@ -171,6 +171,6 @@ class LfscPrinter }; } // namespace proof -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/proof/lfsc/lfsc_util.cpp b/src/proof/lfsc/lfsc_util.cpp index aca884ddc..8010d1cf7 100644 --- a/src/proof/lfsc/lfsc_util.cpp +++ b/src/proof/lfsc/lfsc_util.cpp @@ -18,9 +18,9 @@ #include "proof/proof_checker.h" #include "util/rational.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace proof { const char* toString(LfscRule id) @@ -88,4 +88,4 @@ bool LfscProofLetifyTraverseCallback::shouldTraverse(const ProofNode* pn) } } // namespace proof -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/proof/lfsc/lfsc_util.h b/src/proof/lfsc/lfsc_util.h index c97c07489..730d39f98 100644 --- a/src/proof/lfsc/lfsc_util.h +++ b/src/proof/lfsc/lfsc_util.h @@ -24,7 +24,7 @@ #include "expr/node.h" #include "proof/proof_letify.h" -namespace cvc5 { +namespace cvc5::internal { namespace proof { /** @@ -100,6 +100,6 @@ class LfscProofLetifyTraverseCallback : public ProofLetifyTraverseCallback }; } // namespace proof -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/proof/method_id.cpp b/src/proof/method_id.cpp index 042df92bb..5ce479221 100644 --- a/src/proof/method_id.cpp +++ b/src/proof/method_id.cpp @@ -18,9 +18,9 @@ #include "proof/proof_checker.h" #include "util/rational.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { const char* toString(MethodId id) { @@ -118,4 +118,4 @@ void addMethodIds(std::vector& args, } } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/proof/method_id.h b/src/proof/method_id.h index fe7a9a90d..6a713aa7f 100644 --- a/src/proof/method_id.h +++ b/src/proof/method_id.h @@ -20,7 +20,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { /** * Identifiers for rewriters and substitutions, which we abstractly @@ -105,6 +105,6 @@ void addMethodIds(std::vector& args, MethodId ida, MethodId idr); -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PROOF__METHOD_ID_H */ diff --git a/src/proof/print_expr.cpp b/src/proof/print_expr.cpp index becd9195a..320d67eba 100644 --- a/src/proof/print_expr.cpp +++ b/src/proof/print_expr.cpp @@ -15,7 +15,7 @@ #include "proof/print_expr.h" -namespace cvc5 { +namespace cvc5::internal { namespace proof { PExprStream::PExprStream(std::vector& stream, Node tt, Node ff) @@ -55,4 +55,4 @@ PExprStream& PExprStream::operator<<(PExpr p) } } // namespace proof -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/proof/print_expr.h b/src/proof/print_expr.h index 409b95e49..7305895b0 100644 --- a/src/proof/print_expr.h +++ b/src/proof/print_expr.h @@ -24,7 +24,7 @@ #include "expr/node.h" #include "proof/proof_node.h" -namespace cvc5 { +namespace cvc5::internal { namespace proof { /** @@ -81,6 +81,6 @@ class PExprStream }; } // namespace proof -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/proof/proof.cpp b/src/proof/proof.cpp index d6724d51d..6ad5dceb1 100644 --- a/src/proof/proof.cpp +++ b/src/proof/proof.cpp @@ -19,9 +19,9 @@ #include "proof/proof_node.h" #include "proof/proof_node_manager.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { CDProof::CDProof(ProofNodeManager* pnm, context::Context* c, @@ -485,4 +485,4 @@ Node CDProof::getSymmFact(TNode f) std::string CDProof::identify() const { return d_name; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/proof/proof.h b/src/proof/proof.h index 109f60713..6bd778e01 100644 --- a/src/proof/proof.h +++ b/src/proof/proof.h @@ -25,7 +25,7 @@ #include "proof/proof_generator.h" #include "proof/proof_step_buffer.h" -namespace cvc5 { +namespace cvc5::internal { class ProofNode; class ProofNodeManager; @@ -275,6 +275,6 @@ class CDProof : public ProofGenerator void notifyNewProof(Node expected); }; -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PROOF__PROOF_MANAGER_H */ diff --git a/src/proof/proof_checker.cpp b/src/proof/proof_checker.cpp index 189bc5e87..776bf198f 100644 --- a/src/proof/proof_checker.cpp +++ b/src/proof/proof_checker.cpp @@ -21,9 +21,9 @@ #include "smt/smt_statistics_registry.h" #include "util/rational.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { Node ProofRuleChecker::check(PfRule id, const std::vector& children, @@ -355,4 +355,4 @@ bool ProofChecker::isPedanticFailure(PfRule id, return false; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/proof/proof_checker.h b/src/proof/proof_checker.h index a32f23fe4..b71f79869 100644 --- a/src/proof/proof_checker.h +++ b/src/proof/proof_checker.h @@ -24,7 +24,7 @@ #include "proof/proof_rule.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { class ProofChecker; class ProofNode; @@ -212,6 +212,6 @@ class ProofChecker bool enableOutput); }; -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PROOF__PROOF_CHECKER_H */ diff --git a/src/proof/proof_ensure_closed.cpp b/src/proof/proof_ensure_closed.cpp index 3df32a0a9..54760892f 100644 --- a/src/proof/proof_ensure_closed.cpp +++ b/src/proof/proof_ensure_closed.cpp @@ -23,7 +23,7 @@ #include "proof/proof_node.h" #include "proof/proof_node_algorithm.h" -namespace cvc5 { +namespace cvc5::internal { /** * Ensure closed with respect to assumptions, internal version, which @@ -180,4 +180,4 @@ void pfnEnsureClosedWrt(ProofNode* pn, ensureClosedWrtInternal(Node::null(), nullptr, pn, assumps, c, ctx, false); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/proof/proof_ensure_closed.h b/src/proof/proof_ensure_closed.h index 14850de9b..dbe48e8d1 100644 --- a/src/proof/proof_ensure_closed.h +++ b/src/proof/proof_ensure_closed.h @@ -20,7 +20,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { class ProofGenerator; class ProofNode; @@ -68,6 +68,6 @@ void pfnEnsureClosedWrt(ProofNode* pn, const std::vector& assumps, const char* c, const char* ctx); -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PROOF__PROOF_ENSURE_CLOSED_H */ diff --git a/src/proof/proof_generator.cpp b/src/proof/proof_generator.cpp index bbfde7986..367c17750 100644 --- a/src/proof/proof_generator.cpp +++ b/src/proof/proof_generator.cpp @@ -22,7 +22,7 @@ #include "proof/proof_node.h" #include "proof/proof_node_algorithm.h" -namespace cvc5 { +namespace cvc5::internal { std::ostream& operator<<(std::ostream& out, CDPOverwrite opol) { @@ -74,4 +74,4 @@ bool ProofGenerator::addProofTo(Node f, return false; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/proof/proof_generator.h b/src/proof/proof_generator.h index a8fe43909..d24fa310c 100644 --- a/src/proof/proof_generator.h +++ b/src/proof/proof_generator.h @@ -20,7 +20,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { class CDProof; class ProofNode; @@ -108,6 +108,6 @@ class ProofGenerator virtual std::string identify() const = 0; }; -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PROOF__PROOF_GENERATOR_H */ diff --git a/src/proof/proof_letify.cpp b/src/proof/proof_letify.cpp index c6269631c..e5459504c 100644 --- a/src/proof/proof_letify.cpp +++ b/src/proof/proof_letify.cpp @@ -15,7 +15,7 @@ #include "proof/proof_letify.h" -namespace cvc5 { +namespace cvc5::internal { namespace proof { bool ProofLetifyTraverseCallback::shouldTraverse(const ProofNode* pn) @@ -121,4 +121,4 @@ void ProofLetify::convertProofCountToLet( } } // namespace proof -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/proof/proof_letify.h b/src/proof/proof_letify.h index cfe1259e5..a229dd5c0 100644 --- a/src/proof/proof_letify.h +++ b/src/proof/proof_letify.h @@ -24,7 +24,7 @@ #include "expr/node.h" #include "proof/proof_node.h" -namespace cvc5 { +namespace cvc5::internal { namespace proof { /** @@ -93,6 +93,6 @@ class ProofLetify }; } // namespace proof -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/proof/proof_node.cpp b/src/proof/proof_node.cpp index a857b252a..94a59e973 100644 --- a/src/proof/proof_node.cpp +++ b/src/proof/proof_node.cpp @@ -18,7 +18,7 @@ #include "proof/proof_node_algorithm.h" #include "proof/proof_node_to_sexpr.h" -namespace cvc5 { +namespace cvc5::internal { ProofNode::ProofNode(PfRule id, const std::vector>& children, @@ -92,4 +92,4 @@ size_t ProofNodeHashFunction::operator()(const ProofNode* pfn) const return static_cast(ret); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/proof/proof_node.h b/src/proof/proof_node.h index 5f7aaec3d..0b749b9d4 100644 --- a/src/proof/proof_node.h +++ b/src/proof/proof_node.h @@ -23,7 +23,7 @@ #include "expr/node.h" #include "proof/proof_rule.h" -namespace cvc5 { +namespace cvc5::internal { class ProofNodeManager; class ProofNode; @@ -143,6 +143,6 @@ inline size_t ProofNodeHashFunction::operator()( */ std::ostream& operator<<(std::ostream& out, const ProofNode& pn); -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PROOF__PROOF_NODE_H */ diff --git a/src/proof/proof_node_algorithm.cpp b/src/proof/proof_node_algorithm.cpp index 069bd1ba2..7ebda844e 100644 --- a/src/proof/proof_node_algorithm.cpp +++ b/src/proof/proof_node_algorithm.cpp @@ -17,7 +17,7 @@ #include "proof/proof_node.h" -namespace cvc5 { +namespace cvc5::internal { namespace expr { void getFreeAssumptions(ProofNode* pn, std::vector& assump) @@ -326,4 +326,4 @@ bool isSingletonClause(TNode res, } } // namespace expr -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/proof/proof_node_algorithm.h b/src/proof/proof_node_algorithm.h index b2e20c478..a6aaac75e 100644 --- a/src/proof/proof_node_algorithm.h +++ b/src/proof/proof_node_algorithm.h @@ -22,7 +22,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { class ProofNode; @@ -120,6 +120,6 @@ bool isSingletonClause(TNode res, const std::vector& args); } // namespace expr -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PROOF__PROOF_NODE_ALGORITHM_H */ diff --git a/src/proof/proof_node_manager.cpp b/src/proof/proof_node_manager.cpp index 36944cdd1..0a264d204 100644 --- a/src/proof/proof_node_manager.cpp +++ b/src/proof/proof_node_manager.cpp @@ -24,9 +24,9 @@ #include "proof/proof_node_algorithm.h" #include "theory/rewriter.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { ProofNodeManager::ProofNodeManager(const Options& opts, theory::Rewriter* rr, @@ -485,4 +485,4 @@ bool ProofNodeManager::updateNodeInternal( return true; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/proof/proof_node_manager.h b/src/proof/proof_node_manager.h index 5926a5f2e..3a75c2b68 100644 --- a/src/proof/proof_node_manager.h +++ b/src/proof/proof_node_manager.h @@ -23,7 +23,7 @@ #include "expr/node.h" #include "proof/proof_rule.h" -namespace cvc5 { +namespace cvc5::internal { class ProofChecker; class ProofNode; @@ -231,6 +231,6 @@ class ProofNodeManager bool needsCheck); }; -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PROOF__PROOF_NODE_H */ diff --git a/src/proof/proof_node_to_sexpr.cpp b/src/proof/proof_node_to_sexpr.cpp index 910af3d90..fa4469618 100644 --- a/src/proof/proof_node_to_sexpr.cpp +++ b/src/proof/proof_node_to_sexpr.cpp @@ -23,9 +23,9 @@ #include "proof/proof_node.h" #include "theory/builtin/proof_checker.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { ProofNodeToSExpr::ProofNodeToSExpr() { @@ -308,4 +308,4 @@ ProofNodeToSExpr::ArgFormat ProofNodeToSExpr::getArgumentFormat( return ArgFormat::DEFAULT; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/proof/proof_node_to_sexpr.h b/src/proof/proof_node_to_sexpr.h index 83d719aaf..77a20de58 100644 --- a/src/proof/proof_node_to_sexpr.h +++ b/src/proof/proof_node_to_sexpr.h @@ -27,7 +27,7 @@ #include "theory/inference_id.h" #include "theory/theory_id.h" -namespace cvc5 { +namespace cvc5::internal { class ProofNode; @@ -109,6 +109,6 @@ class ProofNodeToSExpr ArgFormat getArgumentFormat(const ProofNode* pn, size_t i); }; -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PROOF__PROOF_RULE_H */ diff --git a/src/proof/proof_node_updater.cpp b/src/proof/proof_node_updater.cpp index 3e8c394ff..e550a3cd1 100644 --- a/src/proof/proof_node_updater.cpp +++ b/src/proof/proof_node_updater.cpp @@ -20,7 +20,7 @@ #include "proof/proof_node_algorithm.h" #include "proof/proof_node_manager.h" -namespace cvc5 { +namespace cvc5::internal { ProofNodeUpdaterCallback::ProofNodeUpdaterCallback() {} ProofNodeUpdaterCallback::~ProofNodeUpdaterCallback() {} @@ -285,4 +285,4 @@ void ProofNodeUpdater::setDebugFreeAssumptions( d_debugFreeAssumps = true; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/proof/proof_node_updater.h b/src/proof/proof_node_updater.h index 603583715..85e3703f8 100644 --- a/src/proof/proof_node_updater.h +++ b/src/proof/proof_node_updater.h @@ -24,7 +24,7 @@ #include "expr/node.h" #include "proof/proof_node.h" -namespace cvc5 { +namespace cvc5::internal { class CDProof; class ProofNode; @@ -159,6 +159,6 @@ class ProofNodeUpdater bool d_autoSym; }; -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/proof/proof_rule.cpp b/src/proof/proof_rule.cpp index fd143350c..2d26c780f 100644 --- a/src/proof/proof_rule.cpp +++ b/src/proof/proof_rule.cpp @@ -17,7 +17,7 @@ #include -namespace cvc5 { +namespace cvc5::internal { const char* toString(PfRule id) { @@ -222,4 +222,4 @@ size_t PfRuleHashFunction::operator()(PfRule id) const return static_cast(id); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/proof/proof_rule.h b/src/proof/proof_rule.h index a42b99c35..546f966b9 100644 --- a/src/proof/proof_rule.h +++ b/src/proof/proof_rule.h @@ -20,7 +20,7 @@ #include -namespace cvc5 { +namespace cvc5::internal { /** * \verbatim embed:rst:leading-asterisk @@ -53,8 +53,8 @@ namespace cvc5 { * theory, including the theory of equality. * * The "core rules" include two distinguished rules which have special status: - * (1) :cpp:enumerator:`ASSUME `, which represents an open - * leaf in a proof; and (2) :cpp:enumerator:`SCOPE `, which + * (1) :cpp:enumerator:`ASSUME `, which represents an open + * leaf in a proof; and (2) :cpp:enumerator:`SCOPE `, which * encloses a scope (a subproof) with a set of scoped assumptions. The core rules additionally correspond to * generic operations that are done internally on nodes, e.g. calling * Rewriter::rewrite. @@ -77,7 +77,7 @@ enum class PfRule : uint32_t * open leaf in a proof that is not (yet) justified. An assume leaf is * analogous to a free variable in a term, where we say "F is a free * assumption in proof P" if it contains an application of F that is not - * bound by :cpp:enumerator:`SCOPE ` (see below). + * bound by :cpp:enumerator:`SCOPE ` (see below). * \endverbatim */ ASSUME, @@ -92,7 +92,7 @@ enum class PfRule : uint32_t * \dots F_n}{\neg (F_1 \land \dots \land F_n)}{if $F=\bot$} * * This rule has a dual purpose with :cpp:enumerator:`ASSUME - * `. It is a way to close assumptions in a proof. We + * `. It is a way to close assumptions in a proof. We * require that :math:`F_1 \dots F_n` are free assumptions in P and say that * :math:`F_1 \dots F_n` are not free in ``(SCOPE P)``. In other words, they * are bound by this application. For example, the proof node: @@ -205,7 +205,7 @@ enum class PfRule : uint32_t * where :math:`ids` and :math:`idr` are method identifiers. * * We rewrite only on the Skolem form of :math:`F`, similar to - * :cpp:enumerator:`MACRO_SR_EQ_INTRO `. + * :cpp:enumerator:`MACRO_SR_EQ_INTRO `. * \endverbatim */ MACRO_SR_PRED_ELIM, @@ -225,7 +225,7 @@ enum class PfRule : uint32_t * \texttt{Rewriter::rewrite}(\texttt{toOriginal}(G'))` where :math:`F'` and * :math:`G'` are the result of each side of the equation above. Here, * original forms are used in a similar manner to - * :cpp:enumerator:`MACRO_SR_PRED_INTRO ` + * :cpp:enumerator:`MACRO_SR_PRED_INTRO ` * above. \endverbatim */ MACRO_SR_PRED_TRANSFORM, @@ -510,11 +510,11 @@ enum class PfRule : uint32_t * where * * - let :math:`C_1 \dots C_n` be nodes viewed as clauses, as defined in - * :cpp:enumerator:`RESOLUTION ` + * :cpp:enumerator:`RESOLUTION ` * - let :math:`C_1 \diamond{L,\mathit{pol}} C_2` represent the resolution of * :math:`C_1` with :math:`C_2` with pivot :math:`L` and polarity * :math:`pol`, as defined in - * :cpp:enumerator:`RESOLUTION ` + * :cpp:enumerator:`RESOLUTION ` * - let :math:`C_1'` be equal, in its set representation, to :math:`C_1`, * - for each :math:`i > 1`, let :math:`C_i'` be equal, it its set * representation, to :math:`C_{i-1} \diamond{L_{i-1},\mathit{pol}_{i-1}} @@ -530,7 +530,7 @@ enum class PfRule : uint32_t * **Boolean -- N-ary Resolution + Factoring + Reordering unchecked** * * Same as :cpp:enumerator:`MACRO_RESOLUTION - * `, but not checked by the internal proof + * `, but not checked by the internal proof * checker. \endverbatim */ MACRO_RESOLUTION_TRUST, @@ -553,8 +553,8 @@ enum class PfRule : uint32_t * \inferrule{F_1, (F_1 = F_2) \mid -}{F_2} * * Note this can optionally be seen as a macro for - * :cpp:enumerator:`EQUIV_ELIM1 ` + - * :cpp:enumerator:`RESOLUTION `. + * :cpp:enumerator:`EQUIV_ELIM1 ` + + * :cpp:enumerator:`RESOLUTION `. * \endverbatim */ EQ_RESOLVE, @@ -566,8 +566,8 @@ enum class PfRule : uint32_t * \inferrule{F_1, (F_1 \rightarrow F_2) \mid -}{F_2} * * Note this can optionally be seen as a macro for - * :cpp:enumerator:`IMPLIES_ELIM ` + - * :cpp:enumerator:`RESOLUTION `. + * :cpp:enumerator:`IMPLIES_ELIM ` + + * :cpp:enumerator:`RESOLUTION `. * \endverbatim */ MODUS_PONENS, @@ -1936,7 +1936,7 @@ enum class PfRule : uint32_t * **Arithmetic -- Coverings -- Recursive interval** * * See :cpp:enumerator:`ARITH_NL_COVERING_DIRECT - * ` for the necessary definitions. + * ` for the necessary definitions. * * .. math:: * \inferrule{\texttt{Cell}, \texttt{Covering} \mid -}{\bot} @@ -1995,6 +1995,6 @@ struct PfRuleHashFunction size_t operator()(PfRule id) const; }; /* struct PfRuleHashFunction */ -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PROOF__PROOF_RULE_H */ diff --git a/src/proof/proof_set.h b/src/proof/proof_set.h index 4015e0466..2065ba97b 100644 --- a/src/proof/proof_set.h +++ b/src/proof/proof_set.h @@ -24,7 +24,7 @@ #include "context/context.h" #include "proof/proof_node_manager.h" -namespace cvc5 { +namespace cvc5::internal { /** * A (context-dependent) set of proofs, which is used for memory @@ -71,6 +71,6 @@ class CDProofSet std::string d_namePrefix; }; -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PROOF__LAZY_PROOF_SET_H */ diff --git a/src/proof/proof_step_buffer.cpp b/src/proof/proof_step_buffer.cpp index 0de55f043..88741f19f 100644 --- a/src/proof/proof_step_buffer.cpp +++ b/src/proof/proof_step_buffer.cpp @@ -18,9 +18,9 @@ #include "proof/proof.h" #include "proof/proof_checker.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { ProofStep::ProofStep() : d_rule(PfRule::UNKNOWN) {} ProofStep::ProofStep(PfRule r, @@ -159,4 +159,4 @@ void ProofStepBuffer::clear() d_allSteps.clear(); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/proof/proof_step_buffer.h b/src/proof/proof_step_buffer.h index 227de5f96..bbe91c502 100644 --- a/src/proof/proof_step_buffer.h +++ b/src/proof/proof_step_buffer.h @@ -23,7 +23,7 @@ #include "expr/node.h" #include "proof/proof_rule.h" -namespace cvc5 { +namespace cvc5::internal { class ProofChecker; @@ -127,6 +127,6 @@ class ProofStepBuffer std::unordered_set d_allSteps; }; -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PROOF__PROOF_STEP_BUFFER_H */ diff --git a/src/proof/theory_proof_step_buffer.cpp b/src/proof/theory_proof_step_buffer.cpp index 1f6dc6442..56248b922 100644 --- a/src/proof/theory_proof_step_buffer.cpp +++ b/src/proof/theory_proof_step_buffer.cpp @@ -17,9 +17,9 @@ #include "proof/proof.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { TheoryProofStepBuffer::TheoryProofStepBuffer(ProofChecker* pc, bool ensureUnique, @@ -242,4 +242,4 @@ Node TheoryProofStepBuffer::elimDoubleNegLit(Node n) return n; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/proof/theory_proof_step_buffer.h b/src/proof/theory_proof_step_buffer.h index e4b4debd0..f40abbbbc 100644 --- a/src/proof/theory_proof_step_buffer.h +++ b/src/proof/theory_proof_step_buffer.h @@ -24,7 +24,7 @@ #include "proof/proof_step_buffer.h" #include "theory/builtin/proof_checker.h" -namespace cvc5 { +namespace cvc5::internal { /** * Class used to speculatively try and buffer a set of proof steps before * sending them to a proof object, extended with theory-specfic proof rule @@ -115,6 +115,6 @@ class TheoryProofStepBuffer : public ProofStepBuffer Node elimDoubleNegLit(Node n); }; -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PROOF__THEORY_PROOF_STEP_BUFFER_H */ diff --git a/src/proof/trust_node.cpp b/src/proof/trust_node.cpp index ce9917584..c1b946b0f 100644 --- a/src/proof/trust_node.cpp +++ b/src/proof/trust_node.cpp @@ -18,7 +18,7 @@ #include "proof/proof_ensure_closed.h" #include "proof/proof_generator.h" -namespace cvc5 { +namespace cvc5::internal { const char* toString(TrustNodeKind tnk) { @@ -151,4 +151,4 @@ std::ostream& operator<<(std::ostream& out, TrustNode n) return out; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/proof/trust_node.h b/src/proof/trust_node.h index ae3e81d78..666d67144 100644 --- a/src/proof/trust_node.h +++ b/src/proof/trust_node.h @@ -20,7 +20,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { class ProofGenerator; class ProofNode; @@ -173,6 +173,6 @@ class TrustNode */ std::ostream& operator<<(std::ostream& out, TrustNode n); -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PROOF__TRUST_NODE_H */ diff --git a/src/proof/unsat_core.cpp b/src/proof/unsat_core.cpp index 499af3049..163f80646 100644 --- a/src/proof/unsat_core.cpp +++ b/src/proof/unsat_core.cpp @@ -21,7 +21,7 @@ #include "printer/printer.h" #include "smt/solver_engine_scope.h" -namespace cvc5 { +namespace cvc5::internal { UnsatCore::UnsatCore(const std::vector& core) : d_useNames(false), d_core(core), d_names() @@ -61,4 +61,4 @@ std::ostream& operator<<(std::ostream& out, const UnsatCore& core) { return out; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/proof/unsat_core.h b/src/proof/unsat_core.h index 6810f5bad..bdfbf3d08 100644 --- a/src/proof/unsat_core.h +++ b/src/proof/unsat_core.h @@ -23,7 +23,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { /** * An unsat core, which can optionally be initialized as a list of names @@ -69,6 +69,6 @@ class UnsatCore /** Print the unsat core to stream out */ std::ostream& operator<<(std::ostream& out, const UnsatCore& core); -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__UNSAT_CORE_H */ diff --git a/src/prop/README.minisat b/src/prop/README.minisat index 14cb54a03..8c37c455b 100644 --- a/src/prop/README.minisat +++ b/src/prop/README.minisat @@ -4,7 +4,7 @@ This is MiniSAT 2.2.0, downloaded from here: on 11 July 2010. -The code has been modified to put everything in the cvc5::MiniSat +The code has been modified to put everything in the cvc5::internal::MiniSat namespace. The build process has been modified. Other parts have been modified to serve cvc5's purposes. diff --git a/src/prop/cadical.cpp b/src/prop/cadical.cpp index e878abcc2..00950f9ba 100644 --- a/src/prop/cadical.cpp +++ b/src/prop/cadical.cpp @@ -21,7 +21,7 @@ #include "util/resource_manager.h" #include "util/statistics_registry.h" -namespace cvc5 { +namespace cvc5::internal { namespace prop { using CadicalLit = int; @@ -210,4 +210,4 @@ CadicalSolver::Statistics::Statistics(StatisticsRegistry& registry, } } // namespace prop -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/prop/cadical.h b/src/prop/cadical.h index b2181623a..2965e36fd 100644 --- a/src/prop/cadical.h +++ b/src/prop/cadical.h @@ -24,7 +24,7 @@ #include -namespace cvc5 { +namespace cvc5::internal { namespace prop { class CadicalSolver : public SatSolver @@ -106,6 +106,6 @@ class CadicalSolver : public SatSolver }; } // namespace prop -} // namespace cvc5 +} // namespace cvc5::internal #endif // CVC5__PROP__CADICAL_H diff --git a/src/prop/cnf_stream.cpp b/src/prop/cnf_stream.cpp index 327649be9..34cf2042a 100644 --- a/src/prop/cnf_stream.cpp +++ b/src/prop/cnf_stream.cpp @@ -32,7 +32,7 @@ #include "theory/theory.h" #include "theory/theory_engine.h" -namespace cvc5 { +namespace cvc5::internal { namespace prop { CnfStream::CnfStream(Env& env, @@ -747,4 +747,4 @@ CnfStream::Statistics::Statistics(const std::string& name) } } // namespace prop -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/prop/cnf_stream.h b/src/prop/cnf_stream.h index d86f27dda..4416d3d0f 100644 --- a/src/prop/cnf_stream.h +++ b/src/prop/cnf_stream.h @@ -35,7 +35,7 @@ #include "prop/sat_solver_types.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { class Env; @@ -316,6 +316,6 @@ class CnfStream : protected EnvObj }; /* class CnfStream */ } // namespace prop -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PROP__CNF_STREAM_H */ diff --git a/src/prop/cryptominisat.cpp b/src/prop/cryptominisat.cpp index 45e9cc8a5..869a95606 100644 --- a/src/prop/cryptominisat.cpp +++ b/src/prop/cryptominisat.cpp @@ -25,7 +25,7 @@ #include "util/resource_manager.h" #include "util/statistics_registry.h" -namespace cvc5 { +namespace cvc5::internal { namespace prop { using CMSatVar = unsigned; @@ -246,5 +246,5 @@ CryptoMinisatSolver::Statistics::Statistics(StatisticsRegistry& registry, } } // namespace prop -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/prop/cryptominisat.h b/src/prop/cryptominisat.h index 8eaa30e03..22ac0d221 100644 --- a/src/prop/cryptominisat.h +++ b/src/prop/cryptominisat.h @@ -33,7 +33,7 @@ namespace CMSat { class SATSolver; } -namespace cvc5 { +namespace cvc5::internal { namespace prop { class CryptoMinisatSolver : public SatSolver @@ -115,7 +115,7 @@ class CryptoMinisatSolver : public SatSolver }; } // namespace prop -} // namespace cvc5 +} // namespace cvc5::internal #endif // CVC5_USE_CRYPTOMINISAT #endif // CVC5__PROP__CRYPTOMINISAT_H diff --git a/src/prop/kissat.cpp b/src/prop/kissat.cpp index 77bbf5986..1b8507425 100644 --- a/src/prop/kissat.cpp +++ b/src/prop/kissat.cpp @@ -22,7 +22,7 @@ #include "base/check.h" #include "util/statistics_registry.h" -namespace cvc5 { +namespace cvc5::internal { namespace prop { using KissatLit = int32_t; @@ -162,6 +162,6 @@ KissatSolver::Statistics::Statistics(StatisticsRegistry& registry, } } // namespace prop -} // namespace cvc5 +} // namespace cvc5::internal #endif // CVC5_USE_KISSAT diff --git a/src/prop/kissat.h b/src/prop/kissat.h index 9704fb6bc..d529d186b 100644 --- a/src/prop/kissat.h +++ b/src/prop/kissat.h @@ -28,7 +28,7 @@ extern "C" { #include } -namespace cvc5 { +namespace cvc5::internal { namespace prop { class KissatSolver : public SatSolver @@ -95,7 +95,7 @@ class KissatSolver : public SatSolver }; } // namespace prop -} // namespace cvc5 +} // namespace cvc5::internal #endif // CVC5_USE_KISSAT #endif // CVC5__PROP__KISSAT_H diff --git a/src/prop/minisat/core/Dimacs.h b/src/prop/minisat/core/Dimacs.h index 02182fde3..6bcf65e9a 100644 --- a/src/prop/minisat/core/Dimacs.h +++ b/src/prop/minisat/core/Dimacs.h @@ -26,7 +26,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA #include "prop/minisat/utils/ParseUtils.h" #include "prop/minisat/core/SolverTypes.h" -namespace cvc5 { +namespace cvc5::internal { namespace Minisat { //================================================================================================= @@ -86,6 +86,6 @@ static void parse_DIMACS(gzFile input_stream, Solver& S) { //================================================================================================= } -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/prop/minisat/core/Solver.cc b/src/prop/minisat/core/Solver.cc index 64d77e97a..4176ac03c 100644 --- a/src/prop/minisat/core/Solver.cc +++ b/src/prop/minisat/core/Solver.cc @@ -36,9 +36,9 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA #include "prop/minisat/mtl/Sort.h" #include "prop/theory_proxy.h" -using namespace cvc5::prop; +using namespace cvc5::internal::prop; -namespace cvc5 { +namespace cvc5::internal { namespace Minisat { namespace { @@ -65,7 +65,7 @@ static inline void dtviewPropagationHeaderHelper(size_t level, bool incremental) // Writes to Trace macro for propagation tracing static inline void dtviewBoolPropagationHelper(size_t level, Lit& l, - cvc5::prop::TheoryProxy* proxy, + cvc5::internal::prop::TheoryProxy* proxy, bool incremental) { Trace("dtview::prop") << std::string(level + 1 - (incremental ? 1 : 0), ' ') @@ -77,7 +77,7 @@ static inline void dtviewBoolPropagationHelper(size_t level, // Writes to Trace macro for conflict tracing static inline void dtviewPropConflictHelper(size_t level, Clause& confl, - cvc5::prop::TheoryProxy* proxy, + cvc5::internal::prop::TheoryProxy* proxy, bool incremental) { Trace("dtview::conflict") @@ -132,9 +132,9 @@ class ScopedBool // Constructor/Destructor: Solver::Solver(Env& env, - cvc5::prop::TheoryProxy* proxy, - cvc5::context::Context* context, - cvc5::context::UserContext* userContext, + cvc5::internal::prop::TheoryProxy* proxy, + cvc5::internal::context::Context* context, + cvc5::internal::context::UserContext* userContext, ProofNodeManager* pnm, bool enableIncremental) : EnvObj(env), @@ -933,7 +933,7 @@ int Solver::analyze(CRef confl, vec& out_learnt, int& out_btlevel) Trace("pf::sat") << "\n"; } - Trace("pf::sat") << cvc5::push; + Trace("pf::sat") << cvc5::internal::push; for (int j = (p == lit_Undef) ? 0 : 1, size = ca[confl].size(); j < size; j++) @@ -969,7 +969,7 @@ int Solver::analyze(CRef confl, vec& out_learnt, int& out_btlevel) } } } - Trace("pf::sat") << cvc5::pop; + Trace("pf::sat") << cvc5::internal::pop; // Select next clause to look at: while (!seen[var(trail[index--])]); @@ -1212,7 +1212,7 @@ CRef Solver::propagate(TheoryCheckType type) // theory propagation if (type == CHECK_FINAL) { // Do the theory check - theoryCheck(cvc5::theory::Theory::EFFORT_FULL); + theoryCheck(cvc5::internal::theory::Theory::EFFORT_FULL); // Pick up the theory propagated literals (there could be some, // if new lemmas are added) propagateTheory(); @@ -1236,9 +1236,9 @@ CRef Solver::propagate(TheoryCheckType type) if (confl == CRef_Undef && type != CHECK_WITHOUT_THEORY) { // Do the theory check if (type == CHECK_FINAL_FAKE) { - theoryCheck(cvc5::theory::Theory::EFFORT_FULL); + theoryCheck(cvc5::internal::theory::Theory::EFFORT_FULL); } else { - theoryCheck(cvc5::theory::Theory::EFFORT_STANDARD); + theoryCheck(cvc5::internal::theory::Theory::EFFORT_STANDARD); } // Pick up the theory propagated literals propagateTheory(); @@ -1322,7 +1322,7 @@ void Solver::propagateTheory() { | | Note: the propagation queue might be NOT empty |________________________________________________________________________________________________@*/ -void Solver::theoryCheck(cvc5::theory::Theory::Effort effort) +void Solver::theoryCheck(cvc5::internal::theory::Theory::Effort effort) { d_proxy->theoryCheck(effort); } @@ -2002,7 +2002,7 @@ void Solver::pop() --assertionLevel; Trace("minisat") << "in user pop, decreasing assertion level to " << assertionLevel << "\n" - << cvc5::push; + << cvc5::internal::push; while (true) { Trace("minisat") << "== unassigning " << trail.last() << std::endl; Var x = var(trail.last()); @@ -2024,7 +2024,7 @@ void Solver::pop() // Remove the clauses removeClausesAboveLevel(clauses_persistent, assertionLevel); removeClausesAboveLevel(clauses_removable, assertionLevel); - Trace("minisat") << cvc5::pop; + Trace("minisat") << cvc5::internal::pop; // Pop the SAT context to notify everyone d_context->pop(); // SAT context for cvc5 @@ -2245,4 +2245,4 @@ bool Solver::assertionLevelOnly() const } } // namespace Minisat -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/prop/minisat/core/Solver.h b/src/prop/minisat/core/Solver.h index 2f027788e..bb2167d0d 100644 --- a/src/prop/minisat/core/Solver.h +++ b/src/prop/minisat/core/Solver.h @@ -39,15 +39,15 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA #include "theory/theory.h" #include "util/resource_manager.h" -namespace cvc5 { +namespace cvc5::internal { namespace prop { class PropEngine; class TheoryProxy; } // namespace prop -} // namespace cvc5 +} // namespace cvc5::internal -namespace cvc5 { +namespace cvc5::internal { namespace Minisat { //================================================================================================= @@ -56,9 +56,9 @@ namespace Minisat { class Solver : protected EnvObj { /** The only two cvc5 entry points to the private solver data */ - friend class cvc5::prop::PropEngine; - friend class cvc5::prop::TheoryProxy; - friend class cvc5::prop::SatProofManager; + friend class cvc5::internal::prop::PropEngine; + friend class cvc5::internal::prop::TheoryProxy; + friend class cvc5::internal::prop::SatProofManager; public: static CRef TCRef_Undef; @@ -72,10 +72,10 @@ class Solver : protected EnvObj protected: /** The pointer to the proxy that provides interfaces to the SMT engine */ - cvc5::prop::TheoryProxy* d_proxy; + cvc5::internal::prop::TheoryProxy* d_proxy; /** The contexts from the SMT solver */ - cvc5::context::Context* d_context; + cvc5::internal::context::Context* d_context; /** The current assertion level (user) */ int assertionLevel; @@ -87,7 +87,7 @@ class Solver : protected EnvObj Var varFalse; /** The resolution proof manager */ - std::unique_ptr d_pfManager; + std::unique_ptr d_pfManager; public: /** Returns the current user assertion level */ @@ -131,9 +131,9 @@ public: // Constructor/Destructor: // Solver(Env& env, - cvc5::prop::TheoryProxy* proxy, - cvc5::context::Context* context, - cvc5::context::UserContext* userContext, + cvc5::internal::prop::TheoryProxy* proxy, + cvc5::internal::context::Context* context, + cvc5::internal::context::UserContext* userContext, ProofNodeManager* pnm, bool enableIncremental = false); virtual ~Solver(); @@ -150,7 +150,7 @@ public: Var falseVar() const { return varFalse; } /** Retrive the SAT proof manager */ - cvc5::prop::SatProofManager* getProofManager(); + cvc5::internal::prop::SatProofManager* getProofManager(); /** Retrive the refutation proof */ std::shared_ptr getProof(); @@ -499,7 +499,7 @@ protected: CRef propagateBool (); // Perform Boolean propagation. Returns possibly conflicting clause. void propagateTheory (); // Perform Theory propagation. void theoryCheck( - cvc5::theory::Theory::Effort + cvc5::internal::theory::Theory::Effort effort); // Perform a theory satisfiability check. Adds lemmas. CRef updateLemmas (); // Add the lemmas, backtraking if necessary and return a conflict if there is one void cancelUntil (int level); // Backtrack until a certain level. @@ -724,6 +724,6 @@ inline void Solver::toDimacs (const char* file, Lit p, Lit q, Lit r){ ve //================================================================================================= } // namespace Minisat -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/prop/minisat/core/SolverTypes.h b/src/prop/minisat/core/SolverTypes.h index 405d97a56..340531984 100644 --- a/src/prop/minisat/core/SolverTypes.h +++ b/src/prop/minisat/core/SolverTypes.h @@ -31,7 +31,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA #include "prop/minisat/mtl/Map.h" #include "prop/minisat/mtl/Vec.h" -namespace cvc5 { +namespace cvc5::internal { namespace Minisat { class Solver; @@ -177,9 +177,9 @@ inline std::ostream& operator <<(std::ostream& out, Minisat::lbool val) { } } // namespace Minisat -} // namespace cvc5 +} // namespace cvc5::internal -namespace cvc5 { +namespace cvc5::internal { namespace Minisat{ //================================================================================================= @@ -492,6 +492,6 @@ inline void Clause::strengthen(Lit p) //================================================================================================= } -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/prop/minisat/minisat.cpp b/src/prop/minisat/minisat.cpp index b41742cbe..2f7b94628 100644 --- a/src/prop/minisat/minisat.cpp +++ b/src/prop/minisat/minisat.cpp @@ -25,7 +25,7 @@ #include "prop/minisat/simp/SimpSolver.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { namespace prop { //// DPllMinisatSatSolver @@ -348,20 +348,20 @@ void MinisatSatSolver::Statistics::deinit() } } // namespace prop -} // namespace cvc5 +} // namespace cvc5::internal -namespace cvc5 { +namespace cvc5::internal { template <> -prop::SatLiteral toSatLiteral(Minisat::Solver::TLit lit) +prop::SatLiteral toSatLiteral(Minisat::Solver::TLit lit) { return prop::MinisatSatSolver::toSatLiteral(lit); } template <> -void toSatClause( - const cvc5::Minisat::Solver::TClause& minisat_cl, prop::SatClause& sat_cl) +void toSatClause( + const cvc5::internal::Minisat::Solver::TClause& minisat_cl, prop::SatClause& sat_cl) { prop::MinisatSatSolver::toSatClause(minisat_cl, sat_cl); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/prop/minisat/minisat.h b/src/prop/minisat/minisat.h index ef2cca6f0..fdbdb6ad8 100644 --- a/src/prop/minisat/minisat.h +++ b/src/prop/minisat/minisat.h @@ -22,7 +22,7 @@ #include "smt/env_obj.h" #include "util/statistics_registry.h" -namespace cvc5 { +namespace cvc5::internal { template prop::SatLiteral toSatLiteral(typename Solver::TLit lit); @@ -50,7 +50,7 @@ class MinisatSatSolver : public CDCLTSatSolverInterface, protected EnvObj static void toSatClause (const Minisat::Clause& clause, SatClause& sat_clause); void initialize(context::Context* context, TheoryProxy* theoryProxy, - cvc5::context::UserContext* userContext, + cvc5::internal::context::UserContext* userContext, ProofNodeManager* pnm) override; ClauseId addClause(SatClause& clause, bool removable) override; @@ -152,4 +152,4 @@ class MinisatSatSolver : public CDCLTSatSolverInterface, protected EnvObj }; /* class MinisatSatSolver */ } // namespace prop -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/prop/minisat/mtl/Alg.h b/src/prop/minisat/mtl/Alg.h index 69b782da9..2f164b160 100644 --- a/src/prop/minisat/mtl/Alg.h +++ b/src/prop/minisat/mtl/Alg.h @@ -24,7 +24,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA #include "base/check.h" #include "prop/minisat/mtl/Vec.h" -namespace cvc5 { +namespace cvc5::internal { namespace Minisat { //================================================================================================= @@ -82,6 +82,6 @@ static inline void append(const vec& from, vec& to){ copy(from, to, true); //================================================================================================= } -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/prop/minisat/mtl/Alloc.h b/src/prop/minisat/mtl/Alloc.h index f6e6d64b2..8c5b5181c 100644 --- a/src/prop/minisat/mtl/Alloc.h +++ b/src/prop/minisat/mtl/Alloc.h @@ -25,7 +25,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA #include "prop/minisat/mtl/Vec.h" #include "prop/minisat/mtl/XAlloc.h" -namespace cvc5 { +namespace cvc5::internal { namespace Minisat { //================================================================================================= @@ -149,6 +149,6 @@ RegionAllocator::alloc(int size) //================================================================================================= } -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/prop/minisat/mtl/Heap.h b/src/prop/minisat/mtl/Heap.h index 7a88c874d..a24bad95d 100644 --- a/src/prop/minisat/mtl/Heap.h +++ b/src/prop/minisat/mtl/Heap.h @@ -24,7 +24,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA #include "base/check.h" #include "prop/minisat/mtl/Vec.h" -namespace cvc5 { +namespace cvc5::internal { namespace Minisat { //================================================================================================= @@ -156,6 +156,6 @@ class Heap { //================================================================================================= } -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/prop/minisat/mtl/Map.h b/src/prop/minisat/mtl/Map.h index 1c48f3962..c2e506689 100644 --- a/src/prop/minisat/mtl/Map.h +++ b/src/prop/minisat/mtl/Map.h @@ -24,7 +24,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA #include "prop/minisat/mtl/IntTypes.h" #include "prop/minisat/mtl/Vec.h" -namespace cvc5 { +namespace cvc5::internal { namespace Minisat { //================================================================================================= @@ -191,6 +191,6 @@ class Map { //================================================================================================= } -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/prop/minisat/mtl/Queue.h b/src/prop/minisat/mtl/Queue.h index cdbc22600..6ba8a6646 100644 --- a/src/prop/minisat/mtl/Queue.h +++ b/src/prop/minisat/mtl/Queue.h @@ -24,7 +24,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA #include "base/check.h" #include "prop/minisat/mtl/Vec.h" -namespace cvc5 { +namespace cvc5::internal { namespace Minisat { //================================================================================================= @@ -86,6 +86,6 @@ public: //================================================================================================= } -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/prop/minisat/mtl/Sort.h b/src/prop/minisat/mtl/Sort.h index 2b9550d48..d6c548a2f 100644 --- a/src/prop/minisat/mtl/Sort.h +++ b/src/prop/minisat/mtl/Sort.h @@ -26,7 +26,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA //================================================================================================= // Some sorting algorithms for vec's -namespace cvc5 { +namespace cvc5::internal { namespace Minisat { template @@ -94,6 +94,6 @@ template void sort(vec& v) { //================================================================================================= } -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/prop/minisat/mtl/Vec.h b/src/prop/minisat/mtl/Vec.h index 5410981f9..318feb128 100644 --- a/src/prop/minisat/mtl/Vec.h +++ b/src/prop/minisat/mtl/Vec.h @@ -27,7 +27,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA #include "prop/minisat/mtl/IntTypes.h" #include "prop/minisat/mtl/XAlloc.h" -namespace cvc5 { +namespace cvc5::internal { namespace Minisat { //================================================================================================= @@ -147,6 +147,6 @@ void vec::clear(bool dealloc) { //================================================================================================= } -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/prop/minisat/mtl/XAlloc.h b/src/prop/minisat/mtl/XAlloc.h index 300dbb16b..a04c7ea05 100644 --- a/src/prop/minisat/mtl/XAlloc.h +++ b/src/prop/minisat/mtl/XAlloc.h @@ -24,7 +24,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA #include #include -namespace cvc5 { +namespace cvc5::internal { namespace Minisat { //================================================================================================= @@ -42,6 +42,6 @@ static inline void* xrealloc(void *ptr, size_t size) //================================================================================================= } -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/prop/minisat/simp/SimpSolver.cc b/src/prop/minisat/simp/SimpSolver.cc index 558e2ae16..c1e4a93b3 100644 --- a/src/prop/minisat/simp/SimpSolver.cc +++ b/src/prop/minisat/simp/SimpSolver.cc @@ -27,8 +27,8 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA #include "prop/minisat/mtl/Sort.h" #include "prop/minisat/utils/System.h" -using namespace cvc5; -using namespace cvc5::Minisat; +using namespace cvc5::internal; +using namespace cvc5::internal::Minisat; //================================================================================================= // Options: @@ -48,9 +48,9 @@ static DoubleOption opt_simp_garbage_frac(_cat, "simp-gc-frac", "The fraction of // Constructor/Destructor: SimpSolver::SimpSolver(Env& env, - cvc5::prop::TheoryProxy* proxy, - cvc5::context::Context* context, - cvc5::context::UserContext* userContext, + cvc5::internal::prop::TheoryProxy* proxy, + cvc5::internal::context::Context* context, + cvc5::internal::context::UserContext* userContext, ProofNodeManager* pnm, bool enableIncremental) : Solver(env, proxy, context, userContext, pnm, enableIncremental), diff --git a/src/prop/minisat/simp/SimpSolver.h b/src/prop/minisat/simp/SimpSolver.h index deeb98fac..be795681b 100644 --- a/src/prop/minisat/simp/SimpSolver.h +++ b/src/prop/minisat/simp/SimpSolver.h @@ -27,13 +27,13 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA #include "prop/minisat/core/Solver.h" #include "prop/minisat/mtl/Queue.h" -namespace cvc5 { +namespace cvc5::internal { namespace prop { class TheoryProxy; } -} // namespace cvc5 +} // namespace cvc5::internal -namespace cvc5 { +namespace cvc5::internal { namespace Minisat { //================================================================================================= @@ -43,9 +43,9 @@ class SimpSolver : public Solver { // Constructor/Destructor: // SimpSolver(Env& env, - cvc5::prop::TheoryProxy* proxy, - cvc5::context::Context* context, - cvc5::context::UserContext* userContext, + cvc5::internal::prop::TheoryProxy* proxy, + cvc5::internal::context::Context* context, + cvc5::internal::context::UserContext* userContext, ProofNodeManager* pnm, bool enableIncremental = false); ~SimpSolver(); @@ -271,6 +271,6 @@ inline lbool SimpSolver::solve (Lit p, Lit q, Lit r, bool do_simp, bool t //================================================================================================= } // namespace Minisat - } // namespace cvc5 + } // namespace cvc5::internal #endif diff --git a/src/prop/minisat/utils/Options.h b/src/prop/minisat/utils/Options.h index 22e4cd6ee..9a1a89d6c 100644 --- a/src/prop/minisat/utils/Options.h +++ b/src/prop/minisat/utils/Options.h @@ -29,7 +29,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA #include "prop/minisat/mtl/Vec.h" #include "prop/minisat/utils/ParseUtils.h" -namespace cvc5 { +namespace cvc5::internal { namespace Minisat { //================================================================================================== @@ -432,6 +432,6 @@ class BoolOption : public Option //================================================================================================= } -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/prop/minisat/utils/ParseUtils.h b/src/prop/minisat/utils/ParseUtils.h index ae8783e96..cb7f779d0 100644 --- a/src/prop/minisat/utils/ParseUtils.h +++ b/src/prop/minisat/utils/ParseUtils.h @@ -27,7 +27,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA //#include #include -namespace cvc5 { +namespace cvc5::internal { namespace Minisat { //------------------------------------------------------------------------------------------------- @@ -120,6 +120,6 @@ static bool eagerMatch(B& in, const char* str) { //================================================================================================= } -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/prop/opt_clauses_manager.cpp b/src/prop/opt_clauses_manager.cpp index 495b564b3..e3ae842b5 100644 --- a/src/prop/opt_clauses_manager.cpp +++ b/src/prop/opt_clauses_manager.cpp @@ -17,7 +17,7 @@ #include "proof/proof_node.h" -namespace cvc5 { +namespace cvc5::internal { namespace prop { OptimizedClausesManager::OptimizedClausesManager( @@ -82,4 +82,4 @@ void OptimizedClausesManager::contextNotifyPop() } } // namespace prop -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/prop/opt_clauses_manager.h b/src/prop/opt_clauses_manager.h index 935eae1bd..a629f1a3b 100644 --- a/src/prop/opt_clauses_manager.h +++ b/src/prop/opt_clauses_manager.h @@ -22,7 +22,7 @@ #include "expr/node.h" #include "proof/proof.h" -namespace cvc5 { +namespace cvc5::internal { namespace prop { /** @@ -69,6 +69,6 @@ class OptimizedClausesManager : context::ContextNotifyObj }; } // namespace prop -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PROP__OPT_CLAUSES_MANAGER_H */ diff --git a/src/prop/proof_cnf_stream.cpp b/src/prop/proof_cnf_stream.cpp index f6fa0dbb5..511f3db79 100644 --- a/src/prop/proof_cnf_stream.cpp +++ b/src/prop/proof_cnf_stream.cpp @@ -20,7 +20,7 @@ #include "theory/builtin/proof_checker.h" #include "util/rational.h" -namespace cvc5 { +namespace cvc5::internal { namespace prop { ProofCnfStream::ProofCnfStream(Env& env, @@ -1111,4 +1111,4 @@ SatLiteral ProofCnfStream::handleIte(TNode node) } } // namespace prop -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/prop/proof_cnf_stream.h b/src/prop/proof_cnf_stream.h index 9e43cc643..1789e8cd8 100644 --- a/src/prop/proof_cnf_stream.h +++ b/src/prop/proof_cnf_stream.h @@ -30,7 +30,7 @@ #include "prop/sat_proof_manager.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { namespace prop { class SatProofManager; @@ -203,6 +203,6 @@ class ProofCnfStream : protected EnvObj, public ProofGenerator }; } // namespace prop -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/prop/proof_post_processor.cpp b/src/prop/proof_post_processor.cpp index 890ad662c..36b9ead11 100644 --- a/src/prop/proof_post_processor.cpp +++ b/src/prop/proof_post_processor.cpp @@ -17,7 +17,7 @@ #include "theory/builtin/proof_checker.h" -namespace cvc5 { +namespace cvc5::internal { namespace prop { ProofPostprocessCallback::ProofPostprocessCallback( @@ -113,4 +113,4 @@ void ProofPostproccess::process(std::shared_ptr pf) } } // namespace prop -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/prop/proof_post_processor.h b/src/prop/proof_post_processor.h index 0065ed99e..02ef7c2a3 100644 --- a/src/prop/proof_post_processor.h +++ b/src/prop/proof_post_processor.h @@ -24,7 +24,7 @@ #include "proof/proof_node_updater.h" #include "prop/proof_cnf_stream.h" -namespace cvc5 { +namespace cvc5::internal { namespace prop { @@ -109,6 +109,6 @@ class ProofPostproccess }; } // namespace prop -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/prop/prop_engine.cpp b/src/prop/prop_engine.cpp index 12116344c..f6b2e46a1 100644 --- a/src/prop/prop_engine.cpp +++ b/src/prop/prop_engine.cpp @@ -41,7 +41,7 @@ #include "util/resource_manager.h" #include "util/result.h" -namespace cvc5 { +namespace cvc5::internal { namespace prop { /** Keeps a boolean flag scoped */ @@ -688,4 +688,4 @@ std::vector PropEngine::getLearnedZeroLevelLiterals() const } } // namespace prop -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/prop/prop_engine.h b/src/prop/prop_engine.h index 34bce5671..cb0625de8 100644 --- a/src/prop/prop_engine.h +++ b/src/prop/prop_engine.h @@ -30,7 +30,7 @@ #include "theory/skolem_lemma.h" #include "util/result.h" -namespace cvc5 { +namespace cvc5::internal { class ResourceManager; class ProofNodeManager; @@ -379,6 +379,6 @@ class PropEngine : protected EnvObj }; } // namespace prop -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PROP_ENGINE_H */ diff --git a/src/prop/prop_proof_manager.cpp b/src/prop/prop_proof_manager.cpp index c72d20047..decf5a860 100644 --- a/src/prop/prop_proof_manager.cpp +++ b/src/prop/prop_proof_manager.cpp @@ -20,7 +20,7 @@ #include "prop/prop_proof_manager.h" #include "prop/sat_solver.h" -namespace cvc5 { +namespace cvc5::internal { namespace prop { PropPfManager::PropPfManager(context::UserContext* userContext, @@ -110,4 +110,4 @@ std::shared_ptr PropPfManager::getProof() } } // namespace prop -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/prop/prop_proof_manager.h b/src/prop/prop_proof_manager.h index 0af1833c3..7c04771df 100644 --- a/src/prop/prop_proof_manager.h +++ b/src/prop/prop_proof_manager.h @@ -24,7 +24,7 @@ #include "prop/proof_post_processor.h" #include "prop/sat_proof_manager.h" -namespace cvc5 { +namespace cvc5::internal { namespace prop { @@ -93,6 +93,6 @@ class PropPfManager }; /* class PropPfManager */ } // namespace prop -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PROP__PROOF_MANAGER_H */ diff --git a/src/prop/registrar.h b/src/prop/registrar.h index 8ac568927..a718d4e23 100644 --- a/src/prop/registrar.h +++ b/src/prop/registrar.h @@ -23,7 +23,7 @@ #ifndef CVC5__PROP__REGISTRAR_H #define CVC5__PROP__REGISTRAR_H -namespace cvc5 { +namespace cvc5::internal { namespace prop { class Registrar { @@ -40,6 +40,6 @@ public: };/* class NullRegistrar */ } // namespace prop -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PROP__REGISTRAR_H */ diff --git a/src/prop/sat_proof_manager.cpp b/src/prop/sat_proof_manager.cpp index 63967a23f..61d8719df 100644 --- a/src/prop/sat_proof_manager.cpp +++ b/src/prop/sat_proof_manager.cpp @@ -21,7 +21,7 @@ #include "prop/cnf_stream.h" #include "prop/minisat/minisat.h" -namespace cvc5 { +namespace cvc5::internal { namespace prop { SatProofManager::SatProofManager(Env& env, @@ -814,4 +814,4 @@ void SatProofManager::notifyPop() } } // namespace prop -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/prop/sat_proof_manager.h b/src/prop/sat_proof_manager.h index d62905792..e68db690d 100644 --- a/src/prop/sat_proof_manager.h +++ b/src/prop/sat_proof_manager.h @@ -32,7 +32,7 @@ namespace Minisat { class Solver; } -namespace cvc5 { +namespace cvc5::internal { class ProofNodeManager; @@ -604,6 +604,6 @@ class SatProofManager : protected EnvObj }; /* class SatProofManager */ } // namespace prop -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__SAT_PROOF_MANAGER_H */ diff --git a/src/prop/sat_solver.h b/src/prop/sat_solver.h index 4236f0914..47b9b9f22 100644 --- a/src/prop/sat_solver.h +++ b/src/prop/sat_solver.h @@ -28,7 +28,7 @@ #include "prop/sat_solver_types.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { namespace prop { @@ -124,7 +124,7 @@ class CDCLTSatSolverInterface : public SatSolver virtual void initialize(context::Context* context, prop::TheoryProxy* theoryProxy, - cvc5::context::UserContext* userContext, + cvc5::internal::context::UserContext* userContext, ProofNodeManager* pnm) = 0; virtual void push() = 0; @@ -193,6 +193,6 @@ inline std::ostream& operator <<(std::ostream& out, prop::SatValue val) { } } // namespace prop -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PROP__SAT_MODULE_H */ diff --git a/src/prop/sat_solver_factory.cpp b/src/prop/sat_solver_factory.cpp index 1b0b27b49..6c5cbc5e3 100644 --- a/src/prop/sat_solver_factory.cpp +++ b/src/prop/sat_solver_factory.cpp @@ -20,7 +20,7 @@ #include "prop/kissat.h" #include "prop/minisat/minisat.h" -namespace cvc5 { +namespace cvc5::internal { namespace prop { MinisatSatSolver* SatSolverFactory::createCDCLTMinisat( @@ -72,4 +72,4 @@ SatSolver* SatSolverFactory::createKissat(StatisticsRegistry& registry, } } // namespace prop -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/prop/sat_solver_factory.h b/src/prop/sat_solver_factory.h index 419877767..22740e646 100644 --- a/src/prop/sat_solver_factory.h +++ b/src/prop/sat_solver_factory.h @@ -26,7 +26,7 @@ #include "prop/sat_solver.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { namespace prop { class SatSolverFactory @@ -48,6 +48,6 @@ class SatSolverFactory }; /* class SatSolverFactory */ } // namespace prop -} // namespace cvc5 +} // namespace cvc5::internal #endif // CVC5__PROP__SAT_SOLVER_FACTORY_H diff --git a/src/prop/sat_solver_types.cpp b/src/prop/sat_solver_types.cpp index a597ed53f..3bb8dd4d9 100644 --- a/src/prop/sat_solver_types.cpp +++ b/src/prop/sat_solver_types.cpp @@ -18,11 +18,11 @@ #include -namespace cvc5 { +namespace cvc5::internal { namespace prop { bool SatClauseLessThan::operator()(const SatClause& l, const SatClause& r) const { return std::lexicographical_compare(l.begin(), l.end(), r.begin(), r.end()); } } // namespace prop -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/prop/sat_solver_types.h b/src/prop/sat_solver_types.h index 6b2a86536..f28497943 100644 --- a/src/prop/sat_solver_types.h +++ b/src/prop/sat_solver_types.h @@ -30,7 +30,7 @@ #include "cvc5_private.h" -namespace cvc5 { +namespace cvc5::internal { namespace prop { /** @@ -236,4 +236,4 @@ enum SatSolverLifespan }; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/prop/skolem_def_manager.cpp b/src/prop/skolem_def_manager.cpp index b4609ebe8..5a656c344 100644 --- a/src/prop/skolem_def_manager.cpp +++ b/src/prop/skolem_def_manager.cpp @@ -15,7 +15,7 @@ #include "prop/skolem_def_manager.h" -namespace cvc5 { +namespace cvc5::internal { namespace prop { SkolemDefManager::SkolemDefManager(context::Context* context, @@ -190,4 +190,4 @@ void SkolemDefManager::getSkolems(TNode n, std::unordered_set& skolems) } } // namespace prop -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/prop/skolem_def_manager.h b/src/prop/skolem_def_manager.h index 59213302e..7be4841b6 100644 --- a/src/prop/skolem_def_manager.h +++ b/src/prop/skolem_def_manager.h @@ -28,7 +28,7 @@ #include "context/context.h" #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace prop { /** @@ -101,6 +101,6 @@ class SkolemDefManager }; } // namespace prop -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PROP__SKOLEM_DEF_MANAGER_H */ diff --git a/src/prop/theory_proxy.cpp b/src/prop/theory_proxy.cpp index 59790ed7a..1230b575b 100644 --- a/src/prop/theory_proxy.cpp +++ b/src/prop/theory_proxy.cpp @@ -33,7 +33,7 @@ #include "theory/theory_engine.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { namespace prop { TheoryProxy::TheoryProxy(Env& env, @@ -312,4 +312,4 @@ std::vector TheoryProxy::getLearnedZeroLevelLiterals() const } } // namespace prop -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/prop/theory_proxy.h b/src/prop/theory_proxy.h index ab780f4b1..0533da394 100644 --- a/src/prop/theory_proxy.h +++ b/src/prop/theory_proxy.h @@ -31,7 +31,7 @@ #include "theory/theory_preprocessor.h" #include "util/resource_manager.h" -namespace cvc5 { +namespace cvc5::internal { class Env; class TheoryEngine; @@ -211,6 +211,6 @@ class TheoryProxy : protected EnvObj, public Registrar }; /* class TheoryProxy */ } // namespace prop -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/prop/zero_level_learner.cpp b/src/prop/zero_level_learner.cpp index 6d2752ea6..2e08b1fc8 100644 --- a/src/prop/zero_level_learner.cpp +++ b/src/prop/zero_level_learner.cpp @@ -24,7 +24,7 @@ #include "smt/smt_statistics_registry.h" #include "theory/trust_substitutions.h" -namespace cvc5 { +namespace cvc5::internal { namespace prop { ZeroLevelLearner::ZeroLevelLearner(Env& env, PropEngine* propEngine) @@ -177,4 +177,4 @@ std::vector ZeroLevelLearner::getLearnedZeroLevelLiterals() const } } // namespace prop -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/prop/zero_level_learner.h b/src/prop/zero_level_learner.h index 2b0be2fb0..3bb7e5756 100644 --- a/src/prop/zero_level_learner.h +++ b/src/prop/zero_level_learner.h @@ -25,7 +25,7 @@ #include "expr/node.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { namespace prop { class PropEngine; @@ -87,6 +87,6 @@ class ZeroLevelLearner : protected EnvObj }; /* class ZeroLevelLearner */ } // namespace prop -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/smt/abduction_solver.cpp b/src/smt/abduction_solver.cpp index 63030880d..102025e6b 100644 --- a/src/smt/abduction_solver.cpp +++ b/src/smt/abduction_solver.cpp @@ -27,9 +27,9 @@ #include "theory/smt_engine_subsolver.h" #include "theory/trust_substitutions.h" -using namespace cvc5::theory; +using namespace cvc5::internal::theory; -namespace cvc5 { +namespace cvc5::internal { namespace smt { AbductionSolver::AbductionSolver(Env& env) : EnvObj(env) {} @@ -214,4 +214,4 @@ void AbductionSolver::checkAbduct(Node a) } } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/smt/abduction_solver.h b/src/smt/abduction_solver.h index 309b6c971..0fcd4c27e 100644 --- a/src/smt/abduction_solver.h +++ b/src/smt/abduction_solver.h @@ -22,7 +22,7 @@ #include "expr/type_node.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { class SolverEngine; @@ -128,6 +128,6 @@ class AbductionSolver : protected EnvObj }; } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__SMT__ABDUCTION_SOLVER_H */ diff --git a/src/smt/abstract_values.cpp b/src/smt/abstract_values.cpp index b5475efad..d1683235d 100644 --- a/src/smt/abstract_values.cpp +++ b/src/smt/abstract_values.cpp @@ -19,7 +19,7 @@ #include "expr/skolem_manager.h" #include "options/smt_options.h" -namespace cvc5 { +namespace cvc5::internal { namespace smt { AbstractValues::AbstractValues(NodeManager* nm) @@ -56,4 +56,4 @@ Node AbstractValues::mkAbstractValue(TNode n) } } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/smt/abstract_values.h b/src/smt/abstract_values.h index de7ef8587..122b567cd 100644 --- a/src/smt/abstract_values.h +++ b/src/smt/abstract_values.h @@ -24,7 +24,7 @@ #include "expr/node.h" #include "theory/substitutions.h" -namespace cvc5 { +namespace cvc5::internal { namespace smt { /** @@ -77,6 +77,6 @@ class AbstractValues }; } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/smt/assertions.cpp b/src/smt/assertions.cpp index 549b78a19..7247e4379 100644 --- a/src/smt/assertions.cpp +++ b/src/smt/assertions.cpp @@ -28,10 +28,10 @@ #include "smt/solver_engine.h" #include "theory/trust_substitutions.h" -using namespace cvc5::theory; -using namespace cvc5::kind; +using namespace cvc5::internal::theory; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace smt { Assertions::Assertions(Env& env, AbstractValues& absv) @@ -221,4 +221,4 @@ bool Assertions::isProofEnabled() const } } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/smt/assertions.h b/src/smt/assertions.h index 2f80c645c..a7cf0e342 100644 --- a/src/smt/assertions.h +++ b/src/smt/assertions.h @@ -26,7 +26,7 @@ #include "preprocessing/assertion_pipeline.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { namespace smt { class AbstractValues; @@ -186,6 +186,6 @@ class Assertions : protected EnvObj }; } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/smt/check_models.cpp b/src/smt/check_models.cpp index 22718ae04..02ebea042 100644 --- a/src/smt/check_models.cpp +++ b/src/smt/check_models.cpp @@ -26,9 +26,9 @@ #include "theory/theory_engine.h" #include "theory/theory_model.h" -using namespace cvc5::theory; +using namespace cvc5::internal::theory; -namespace cvc5 { +namespace cvc5::internal { namespace smt { CheckModels::CheckModels(Env& e) : EnvObj(e) {} @@ -151,4 +151,4 @@ void CheckModels::checkModel(TheoryModel* m, } } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/smt/check_models.h b/src/smt/check_models.h index 2b3447010..d47d4b520 100644 --- a/src/smt/check_models.h +++ b/src/smt/check_models.h @@ -22,7 +22,7 @@ #include "expr/node.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { class TheoryModel; @@ -49,6 +49,6 @@ class CheckModels : protected EnvObj }; } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/smt/command.cpp b/src/smt/command.cpp index b8f7fac8d..eb144a73a 100644 --- a/src/smt/command.cpp +++ b/src/smt/command.cpp @@ -44,7 +44,9 @@ using namespace std; namespace cvc5 { -std::string sexprToString(api::Term sexpr) +using namespace internal; + +std::string sexprToString(cvc5::Term sexpr) { // if sexpr is a constant string, return the stored constant string. We don't // call Term::toString as its result depends on the output language. @@ -58,7 +60,7 @@ std::string sexprToString(api::Term sexpr) } // if sexpr is not a spec constant, make sure it is an array of sub-sexprs - Assert(sexpr.getKind() == api::SEXPR); + Assert(sexpr.getKind() == cvc5::SEXPR); std::stringstream ss; auto it = sexpr.begin(); @@ -202,7 +204,7 @@ bool Command::interrupted() const && dynamic_cast(d_commandStatus) != NULL; } -void Command::invoke(api::Solver* solver, SymbolManager* sm, std::ostream& out) +void Command::invoke(cvc5::Solver* solver, SymbolManager* sm, std::ostream& out) { invoke(solver, sm); if (!(isMuted() && ok())) @@ -231,7 +233,7 @@ void Command::printResult(std::ostream& out) const } } -void Command::resetSolver(api::Solver* solver) +void Command::resetSolver(cvc5::Solver* solver) { std::unique_ptr opts = std::make_unique(); opts->copyValues(*solver->d_originalOptions); @@ -241,29 +243,29 @@ void Command::resetSolver(api::Solver* solver) // CommandExecutor such that this reconstruction can be done within the // CommandExecutor, who actually owns the solver. solver->~Solver(); - new (solver) api::Solver(std::move(opts)); + new (solver) cvc5::Solver(std::move(opts)); } -Node Command::termToNode(const api::Term& term) { return term.getNode(); } +Node Command::termToNode(const cvc5::Term& term) { return term.getNode(); } std::vector Command::termVectorToNodes( - const std::vector& terms) + const std::vector& terms) { - return api::Term::termVectorToNodes(terms); + return cvc5::Term::termVectorToNodes(terms); } -TypeNode Command::sortToTypeNode(const api::Sort& sort) +TypeNode Command::sortToTypeNode(const cvc5::Sort& sort) { return sort.getTypeNode(); } std::vector Command::sortVectorToTypeNodes( - const std::vector& sorts) + const std::vector& sorts) { - return api::Sort::sortVectorToTypeNodes(sorts); + return cvc5::Sort::sortVectorToTypeNodes(sorts); } -TypeNode Command::grammarToTypeNode(api::Grammar* grammar) +TypeNode Command::grammarToTypeNode(cvc5::Grammar* grammar) { return grammar == nullptr ? TypeNode::null() : sortToTypeNode(grammar->resolve()); @@ -275,7 +277,7 @@ TypeNode Command::grammarToTypeNode(api::Grammar* grammar) EmptyCommand::EmptyCommand(std::string name) : d_name(name) {} std::string EmptyCommand::getName() const { return d_name; } -void EmptyCommand::invoke(api::Solver* solver, SymbolManager* sm) +void EmptyCommand::invoke(cvc5::Solver* solver, SymbolManager* sm) { /* empty commands have no implementation */ d_commandStatus = CommandSuccess::instance(); @@ -300,17 +302,17 @@ EchoCommand::EchoCommand(std::string output) : d_output(output) {} std::string EchoCommand::getOutput() const { return d_output; } -void EchoCommand::invoke(api::Solver* solver, SymbolManager* sm) +void EchoCommand::invoke(cvc5::Solver* solver, SymbolManager* sm) { /* we don't have an output stream here, nothing to do */ d_commandStatus = CommandSuccess::instance(); } -void EchoCommand::invoke(api::Solver* solver, +void EchoCommand::invoke(cvc5::Solver* solver, SymbolManager* sm, std::ostream& out) { - out << cvc5::quoteString(d_output) << std::endl; + out << cvc5::internal::quoteString(d_output) << std::endl; Trace("dtview::command") << "* ~COMMAND: echo |" << d_output << "|~" << std::endl; d_commandStatus = CommandSuccess::instance(); @@ -333,10 +335,10 @@ void EchoCommand::toStream(std::ostream& out, /* class AssertCommand */ /* -------------------------------------------------------------------------- */ -AssertCommand::AssertCommand(const api::Term& t) : d_term(t) {} +AssertCommand::AssertCommand(const cvc5::Term& t) : d_term(t) {} -api::Term AssertCommand::getTerm() const { return d_term; } -void AssertCommand::invoke(api::Solver* solver, SymbolManager* sm) +cvc5::Term AssertCommand::getTerm() const { return d_term; } +void AssertCommand::invoke(cvc5::Solver* solver, SymbolManager* sm) { try { @@ -365,7 +367,7 @@ void AssertCommand::toStream(std::ostream& out, /* class PushCommand */ /* -------------------------------------------------------------------------- */ -void PushCommand::invoke(api::Solver* solver, SymbolManager* sm) +void PushCommand::invoke(cvc5::Solver* solver, SymbolManager* sm) { try { @@ -393,7 +395,7 @@ void PushCommand::toStream(std::ostream& out, /* class PopCommand */ /* -------------------------------------------------------------------------- */ -void PopCommand::invoke(api::Solver* solver, SymbolManager* sm) +void PopCommand::invoke(cvc5::Solver* solver, SymbolManager* sm) { try { @@ -423,7 +425,7 @@ void PopCommand::toStream(std::ostream& out, CheckSatCommand::CheckSatCommand() {} -void CheckSatCommand::invoke(api::Solver* solver, SymbolManager* sm) +void CheckSatCommand::invoke(cvc5::Solver* solver, SymbolManager* sm) { Trace("dtview::command") << "* ~COMMAND: " << getCommandName() << "~" << std::endl; @@ -438,7 +440,7 @@ void CheckSatCommand::invoke(api::Solver* solver, SymbolManager* sm) } } -api::Result CheckSatCommand::getResult() const { return d_result; } +cvc5::Result CheckSatCommand::getResult() const { return d_result; } void CheckSatCommand::printResult(std::ostream& out) const { @@ -474,23 +476,23 @@ void CheckSatCommand::toStream(std::ostream& out, /* class CheckSatAssumingCommand */ /* -------------------------------------------------------------------------- */ -CheckSatAssumingCommand::CheckSatAssumingCommand(api::Term term) +CheckSatAssumingCommand::CheckSatAssumingCommand(cvc5::Term term) : d_terms({term}) { } CheckSatAssumingCommand::CheckSatAssumingCommand( - const std::vector& terms) + const std::vector& terms) : d_terms(terms) { } -const std::vector& CheckSatAssumingCommand::getTerms() const +const std::vector& CheckSatAssumingCommand::getTerms() const { return d_terms; } -void CheckSatAssumingCommand::invoke(api::Solver* solver, SymbolManager* sm) +void CheckSatAssumingCommand::invoke(cvc5::Solver* solver, SymbolManager* sm) { Trace("dtview::command") << "* ~COMMAND: (check-sat-assuming ( " << d_terms << " )~" << std::endl; @@ -505,7 +507,7 @@ void CheckSatAssumingCommand::invoke(api::Solver* solver, SymbolManager* sm) } } -api::Result CheckSatAssumingCommand::getResult() const +cvc5::Result CheckSatAssumingCommand::getResult() const { Trace("dtview::command") << "* ~RESULT: " << d_result << "~" << std::endl; return d_result; @@ -549,16 +551,16 @@ void CheckSatAssumingCommand::toStream(std::ostream& out, /* -------------------------------------------------------------------------- */ DeclareSygusVarCommand::DeclareSygusVarCommand(const std::string& id, - api::Term var, - api::Sort sort) + cvc5::Term var, + cvc5::Sort sort) : DeclarationDefinitionCommand(id), d_var(var), d_sort(sort) { } -api::Term DeclareSygusVarCommand::getVar() const { return d_var; } -api::Sort DeclareSygusVarCommand::getSort() const { return d_sort; } +cvc5::Term DeclareSygusVarCommand::getVar() const { return d_var; } +cvc5::Sort DeclareSygusVarCommand::getSort() const { return d_sort; } -void DeclareSygusVarCommand::invoke(api::Solver* solver, SymbolManager* sm) +void DeclareSygusVarCommand::invoke(cvc5::Solver* solver, SymbolManager* sm) { d_commandStatus = CommandSuccess::instance(); } @@ -587,11 +589,11 @@ void DeclareSygusVarCommand::toStream(std::ostream& out, /* -------------------------------------------------------------------------- */ SynthFunCommand::SynthFunCommand(const std::string& id, - api::Term fun, - const std::vector& vars, - api::Sort sort, + cvc5::Term fun, + const std::vector& vars, + cvc5::Sort sort, bool isInv, - api::Grammar* g) + cvc5::Grammar* g) : DeclarationDefinitionCommand(id), d_fun(fun), d_vars(vars), @@ -601,19 +603,19 @@ SynthFunCommand::SynthFunCommand(const std::string& id, { } -api::Term SynthFunCommand::getFunction() const { return d_fun; } +cvc5::Term SynthFunCommand::getFunction() const { return d_fun; } -const std::vector& SynthFunCommand::getVars() const +const std::vector& SynthFunCommand::getVars() const { return d_vars; } -api::Sort SynthFunCommand::getSort() const { return d_sort; } +cvc5::Sort SynthFunCommand::getSort() const { return d_sort; } bool SynthFunCommand::isInv() const { return d_isInv; } -const api::Grammar* SynthFunCommand::getGrammar() const { return d_grammar; } +const cvc5::Grammar* SynthFunCommand::getGrammar() const { return d_grammar; } -void SynthFunCommand::invoke(api::Solver* solver, SymbolManager* sm) +void SynthFunCommand::invoke(cvc5::Solver* solver, SymbolManager* sm) { sm->addFunctionToSynthesize(d_fun); d_commandStatus = CommandSuccess::instance(); @@ -648,13 +650,13 @@ void SynthFunCommand::toStream(std::ostream& out, /* class SygusConstraintCommand */ /* -------------------------------------------------------------------------- */ -SygusConstraintCommand::SygusConstraintCommand(const api::Term& t, +SygusConstraintCommand::SygusConstraintCommand(const cvc5::Term& t, bool isAssume) : d_term(t), d_isAssume(isAssume) { } -void SygusConstraintCommand::invoke(api::Solver* solver, SymbolManager* sm) +void SygusConstraintCommand::invoke(cvc5::Solver* solver, SymbolManager* sm) { try { @@ -674,7 +676,7 @@ void SygusConstraintCommand::invoke(api::Solver* solver, SymbolManager* sm) } } -api::Term SygusConstraintCommand::getTerm() const { return d_term; } +cvc5::Term SygusConstraintCommand::getTerm() const { return d_term; } Command* SygusConstraintCommand::clone() const { @@ -707,20 +709,20 @@ void SygusConstraintCommand::toStream(std::ostream& out, /* -------------------------------------------------------------------------- */ SygusInvConstraintCommand::SygusInvConstraintCommand( - const std::vector& predicates) + const std::vector& predicates) : d_predicates(predicates) { } -SygusInvConstraintCommand::SygusInvConstraintCommand(const api::Term& inv, - const api::Term& pre, - const api::Term& trans, - const api::Term& post) - : SygusInvConstraintCommand(std::vector{inv, pre, trans, post}) +SygusInvConstraintCommand::SygusInvConstraintCommand(const cvc5::Term& inv, + const cvc5::Term& pre, + const cvc5::Term& trans, + const cvc5::Term& post) + : SygusInvConstraintCommand(std::vector{inv, pre, trans, post}) { } -void SygusInvConstraintCommand::invoke(api::Solver* solver, SymbolManager* sm) +void SygusInvConstraintCommand::invoke(cvc5::Solver* solver, SymbolManager* sm) { try { @@ -734,7 +736,7 @@ void SygusInvConstraintCommand::invoke(api::Solver* solver, SymbolManager* sm) } } -const std::vector& SygusInvConstraintCommand::getPredicates() const +const std::vector& SygusInvConstraintCommand::getPredicates() const { return d_predicates; } @@ -766,7 +768,7 @@ void SygusInvConstraintCommand::toStream(std::ostream& out, /* class CheckSynthCommand */ /* -------------------------------------------------------------------------- */ -void CheckSynthCommand::invoke(api::Solver* solver, SymbolManager* sm) +void CheckSynthCommand::invoke(cvc5::Solver* solver, SymbolManager* sm) { try { @@ -795,19 +797,19 @@ void CheckSynthCommand::invoke(api::Solver* solver, SymbolManager* sm) if (d_result.hasSolution() && options::sygusOut() != options::SygusSolutionOutMode::STATUS) { - std::vector synthFuns = sm->getFunctionsToSynthesize(); + std::vector synthFuns = sm->getFunctionsToSynthesize(); d_solution << "(" << std::endl; Printer* p = Printer::getPrinter(Language::LANG_SYGUS_V2); - for (api::Term& f : synthFuns) + for (cvc5::Term& f : synthFuns) { - api::Term sol = solver->getSynthSolution(f); - std::vector formals; - if (sol.getKind() == api::LAMBDA) + cvc5::Term sol = solver->getSynthSolution(f); + std::vector formals; + if (sol.getKind() == cvc5::LAMBDA) { formals.insert(formals.end(), sol[0].begin(), sol[0].end()); sol = sol[1]; } - api::Sort rangeSort = f.getSort(); + cvc5::Sort rangeSort = f.getSort(); if (rangeSort.isFunction()) { rangeSort = rangeSort.getFunctionCodomainSort(); @@ -827,7 +829,7 @@ void CheckSynthCommand::invoke(api::Solver* solver, SymbolManager* sm) } } -api::SynthResult CheckSynthCommand::getResult() const { return d_result; } +cvc5::SynthResult CheckSynthCommand::getResult() const { return d_result; } void CheckSynthCommand::printResult(std::ostream& out) const { if (!ok()) @@ -866,7 +868,7 @@ void CheckSynthCommand::toStream(std::ostream& out, /* class ResetCommand */ /* -------------------------------------------------------------------------- */ -void ResetCommand::invoke(api::Solver* solver, SymbolManager* sm) +void ResetCommand::invoke(cvc5::Solver* solver, SymbolManager* sm) { try { @@ -895,7 +897,7 @@ void ResetCommand::toStream(std::ostream& out, /* class ResetAssertionsCommand */ /* -------------------------------------------------------------------------- */ -void ResetAssertionsCommand::invoke(api::Solver* solver, SymbolManager* sm) +void ResetAssertionsCommand::invoke(cvc5::Solver* solver, SymbolManager* sm) { try { @@ -931,7 +933,7 @@ void ResetAssertionsCommand::toStream(std::ostream& out, /* class QuitCommand */ /* -------------------------------------------------------------------------- */ -void QuitCommand::invoke(api::Solver* solver, SymbolManager* sm) +void QuitCommand::invoke(cvc5::Solver* solver, SymbolManager* sm) { d_commandStatus = CommandSuccess::instance(); } @@ -966,7 +968,7 @@ void CommandSequence::addCommand(Command* cmd) } void CommandSequence::clear() { d_commandSequence.clear(); } -void CommandSequence::invoke(api::Solver* solver, SymbolManager* sm) +void CommandSequence::invoke(cvc5::Solver* solver, SymbolManager* sm) { for (; d_index < d_commandSequence.size(); ++d_index) { @@ -984,7 +986,7 @@ void CommandSequence::invoke(api::Solver* solver, SymbolManager* sm) d_commandStatus = CommandSuccess::instance(); } -void CommandSequence::invoke(api::Solver* solver, +void CommandSequence::invoke(cvc5::Solver* solver, SymbolManager* sm, std::ostream& out) { @@ -1076,16 +1078,16 @@ std::string DeclarationDefinitionCommand::getSymbol() const { return d_symbol; } /* -------------------------------------------------------------------------- */ DeclareFunctionCommand::DeclareFunctionCommand(const std::string& id, - api::Term func, - api::Sort sort) + cvc5::Term func, + cvc5::Sort sort) : DeclarationDefinitionCommand(id), d_func(func), d_sort(sort) { } -api::Term DeclareFunctionCommand::getFunction() const { return d_func; } -api::Sort DeclareFunctionCommand::getSort() const { return d_sort; } +cvc5::Term DeclareFunctionCommand::getFunction() const { return d_func; } +cvc5::Sort DeclareFunctionCommand::getSort() const { return d_sort; } -void DeclareFunctionCommand::invoke(api::Solver* solver, SymbolManager* sm) +void DeclareFunctionCommand::invoke(cvc5::Solver* solver, SymbolManager* sm) { // mark that it will be printed in the model sm->addModelDeclarationTerm(d_func); @@ -1118,9 +1120,9 @@ void DeclareFunctionCommand::toStream(std::ostream& out, /* -------------------------------------------------------------------------- */ DeclarePoolCommand::DeclarePoolCommand(const std::string& id, - api::Term func, - api::Sort sort, - const std::vector& initValue) + cvc5::Term func, + cvc5::Sort sort, + const std::vector& initValue) : DeclarationDefinitionCommand(id), d_func(func), d_sort(sort), @@ -1128,14 +1130,14 @@ DeclarePoolCommand::DeclarePoolCommand(const std::string& id, { } -api::Term DeclarePoolCommand::getFunction() const { return d_func; } -api::Sort DeclarePoolCommand::getSort() const { return d_sort; } -const std::vector& DeclarePoolCommand::getInitialValue() const +cvc5::Term DeclarePoolCommand::getFunction() const { return d_func; } +cvc5::Sort DeclarePoolCommand::getSort() const { return d_sort; } +const std::vector& DeclarePoolCommand::getInitialValue() const { return d_initValue; } -void DeclarePoolCommand::invoke(api::Solver* solver, SymbolManager* sm) +void DeclarePoolCommand::invoke(cvc5::Solver* solver, SymbolManager* sm) { // Notice that the pool is already declared by the parser so that it the // symbol is bound eagerly. This is analogous to DeclareSygusVarCommand. @@ -1173,14 +1175,14 @@ void DeclarePoolCommand::toStream(std::ostream& out, DeclareSortCommand::DeclareSortCommand(const std::string& id, size_t arity, - api::Sort sort) + cvc5::Sort sort) : DeclarationDefinitionCommand(id), d_arity(arity), d_sort(sort) { } size_t DeclareSortCommand::getArity() const { return d_arity; } -api::Sort DeclareSortCommand::getSort() const { return d_sort; } -void DeclareSortCommand::invoke(api::Solver* solver, SymbolManager* sm) +cvc5::Sort DeclareSortCommand::getSort() const { return d_sort; } +void DeclareSortCommand::invoke(cvc5::Solver* solver, SymbolManager* sm) { // mark that it will be printed in the model, if it is an uninterpreted // sort (arity 0) @@ -1214,25 +1216,25 @@ void DeclareSortCommand::toStream(std::ostream& out, /* class DefineSortCommand */ /* -------------------------------------------------------------------------- */ -DefineSortCommand::DefineSortCommand(const std::string& id, api::Sort sort) +DefineSortCommand::DefineSortCommand(const std::string& id, cvc5::Sort sort) : DeclarationDefinitionCommand(id), d_params(), d_sort(sort) { } DefineSortCommand::DefineSortCommand(const std::string& id, - const std::vector& params, - api::Sort sort) + const std::vector& params, + cvc5::Sort sort) : DeclarationDefinitionCommand(id), d_params(params), d_sort(sort) { } -const std::vector& DefineSortCommand::getParameters() const +const std::vector& DefineSortCommand::getParameters() const { return d_params; } -api::Sort DefineSortCommand::getSort() const { return d_sort; } -void DefineSortCommand::invoke(api::Solver* solver, SymbolManager* sm) +cvc5::Sort DefineSortCommand::getSort() const { return d_sort; } +void DefineSortCommand::invoke(cvc5::Solver* solver, SymbolManager* sm) { d_commandStatus = CommandSuccess::instance(); } @@ -1258,8 +1260,8 @@ void DefineSortCommand::toStream(std::ostream& out, /* -------------------------------------------------------------------------- */ DefineFunctionCommand::DefineFunctionCommand(const std::string& id, - api::Sort sort, - api::Term formula) + cvc5::Sort sort, + cvc5::Term formula) : DeclarationDefinitionCommand(id), d_formals(), d_sort(sort), @@ -1269,9 +1271,9 @@ DefineFunctionCommand::DefineFunctionCommand(const std::string& id, DefineFunctionCommand::DefineFunctionCommand( const std::string& id, - const std::vector& formals, - api::Sort sort, - api::Term formula) + const std::vector& formals, + cvc5::Sort sort, + cvc5::Term formula) : DeclarationDefinitionCommand(id), d_formals(formals), d_sort(sort), @@ -1279,21 +1281,21 @@ DefineFunctionCommand::DefineFunctionCommand( { } -const std::vector& DefineFunctionCommand::getFormals() const +const std::vector& DefineFunctionCommand::getFormals() const { return d_formals; } -api::Sort DefineFunctionCommand::getSort() const { return d_sort; } +cvc5::Sort DefineFunctionCommand::getSort() const { return d_sort; } -api::Term DefineFunctionCommand::getFormula() const { return d_formula; } +cvc5::Term DefineFunctionCommand::getFormula() const { return d_formula; } -void DefineFunctionCommand::invoke(api::Solver* solver, SymbolManager* sm) +void DefineFunctionCommand::invoke(cvc5::Solver* solver, SymbolManager* sm) { try { bool global = sm->getGlobalDeclarations(); - api::Term fun = + cvc5::Term fun = solver->defineFun(d_symbol, d_formals, d_sort, d_formula, global); sm->getSymbolTable()->bind(d_symbol, fun, global); d_commandStatus = CommandSuccess::instance(); @@ -1332,7 +1334,7 @@ void DefineFunctionCommand::toStream(std::ostream& out, /* -------------------------------------------------------------------------- */ DefineFunctionRecCommand::DefineFunctionRecCommand( - api::Term func, const std::vector& formals, api::Term formula) + cvc5::Term func, const std::vector& formals, cvc5::Term formula) { d_funcs.push_back(func); d_formals.push_back(formals); @@ -1340,30 +1342,30 @@ DefineFunctionRecCommand::DefineFunctionRecCommand( } DefineFunctionRecCommand::DefineFunctionRecCommand( - const std::vector& funcs, - const std::vector>& formals, - const std::vector& formulas) + const std::vector& funcs, + const std::vector>& formals, + const std::vector& formulas) : d_funcs(funcs), d_formals(formals), d_formulas(formulas) { } -const std::vector& DefineFunctionRecCommand::getFunctions() const +const std::vector& DefineFunctionRecCommand::getFunctions() const { return d_funcs; } -const std::vector>& +const std::vector>& DefineFunctionRecCommand::getFormals() const { return d_formals; } -const std::vector& DefineFunctionRecCommand::getFormulas() const +const std::vector& DefineFunctionRecCommand::getFormulas() const { return d_formulas; } -void DefineFunctionRecCommand::invoke(api::Solver* solver, SymbolManager* sm) +void DefineFunctionRecCommand::invoke(cvc5::Solver* solver, SymbolManager* sm) { try { @@ -1394,7 +1396,7 @@ void DefineFunctionRecCommand::toStream(std::ostream& out, { std::vector> formals; formals.reserve(d_formals.size()); - for (const std::vector& formal : d_formals) + for (const std::vector& formal : d_formals) { formals.push_back(termVectorToNodes(formal)); } @@ -1405,15 +1407,15 @@ void DefineFunctionRecCommand::toStream(std::ostream& out, /* -------------------------------------------------------------------------- */ /* class DeclareHeapCommand */ /* -------------------------------------------------------------------------- */ -DeclareHeapCommand::DeclareHeapCommand(api::Sort locSort, api::Sort dataSort) +DeclareHeapCommand::DeclareHeapCommand(cvc5::Sort locSort, cvc5::Sort dataSort) : d_locSort(locSort), d_dataSort(dataSort) { } -api::Sort DeclareHeapCommand::getLocationSort() const { return d_locSort; } -api::Sort DeclareHeapCommand::getDataSort() const { return d_dataSort; } +cvc5::Sort DeclareHeapCommand::getLocationSort() const { return d_locSort; } +cvc5::Sort DeclareHeapCommand::getDataSort() const { return d_dataSort; } -void DeclareHeapCommand::invoke(api::Solver* solver, SymbolManager* sm) +void DeclareHeapCommand::invoke(cvc5::Solver* solver, SymbolManager* sm) { solver->declareSepHeap(d_locSort, d_dataSort); } @@ -1441,9 +1443,9 @@ void DeclareHeapCommand::toStream(std::ostream& out, /* class SimplifyCommand */ /* -------------------------------------------------------------------------- */ -SimplifyCommand::SimplifyCommand(api::Term term) : d_term(term) {} -api::Term SimplifyCommand::getTerm() const { return d_term; } -void SimplifyCommand::invoke(api::Solver* solver, SymbolManager* sm) +SimplifyCommand::SimplifyCommand(cvc5::Term term) : d_term(term) {} +cvc5::Term SimplifyCommand::getTerm() const { return d_term; } +void SimplifyCommand::invoke(cvc5::Solver* solver, SymbolManager* sm) { try { @@ -1456,7 +1458,7 @@ void SimplifyCommand::invoke(api::Solver* solver, SymbolManager* sm) } } -api::Term SimplifyCommand::getResult() const { return d_result; } +cvc5::Term SimplifyCommand::getResult() const { return d_result; } void SimplifyCommand::printResult(std::ostream& out) const { if (!ok()) @@ -1490,38 +1492,38 @@ void SimplifyCommand::toStream(std::ostream& out, /* class GetValueCommand */ /* -------------------------------------------------------------------------- */ -GetValueCommand::GetValueCommand(api::Term term) : d_terms() +GetValueCommand::GetValueCommand(cvc5::Term term) : d_terms() { d_terms.push_back(term); } -GetValueCommand::GetValueCommand(const std::vector& terms) +GetValueCommand::GetValueCommand(const std::vector& terms) : d_terms(terms) { PrettyCheckArgument( terms.size() >= 1, terms, "cannot get-value of an empty set of terms"); } -const std::vector& GetValueCommand::getTerms() const +const std::vector& GetValueCommand::getTerms() const { return d_terms; } -void GetValueCommand::invoke(api::Solver* solver, SymbolManager* sm) +void GetValueCommand::invoke(cvc5::Solver* solver, SymbolManager* sm) { try { - std::vector result = solver->getValue(d_terms); + std::vector result = solver->getValue(d_terms); Assert(result.size() == d_terms.size()); for (int i = 0, size = d_terms.size(); i < size; i++) { - api::Term request = d_terms[i]; - api::Term value = result[i]; - result[i] = solver->mkTerm(api::SEXPR, {request, value}); + cvc5::Term request = d_terms[i]; + cvc5::Term value = result[i]; + result[i] = solver->mkTerm(cvc5::SEXPR, {request, value}); } - d_result = solver->mkTerm(api::SEXPR, {result}); + d_result = solver->mkTerm(cvc5::SEXPR, {result}); d_commandStatus = CommandSuccess::instance(); } - catch (api::CVC5ApiRecoverableException& e) + catch (cvc5::CVC5ApiRecoverableException& e) { d_commandStatus = new CommandRecoverableFailure(e.what()); } @@ -1531,7 +1533,7 @@ void GetValueCommand::invoke(api::Solver* solver, SymbolManager* sm) } } -api::Term GetValueCommand::getResult() const { return d_result; } +cvc5::Term GetValueCommand::getResult() const { return d_result; } void GetValueCommand::printResult(std::ostream& out) const { if (!ok()) @@ -1569,34 +1571,34 @@ void GetValueCommand::toStream(std::ostream& out, /* -------------------------------------------------------------------------- */ GetAssignmentCommand::GetAssignmentCommand() {} -void GetAssignmentCommand::invoke(api::Solver* solver, SymbolManager* sm) +void GetAssignmentCommand::invoke(cvc5::Solver* solver, SymbolManager* sm) { try { - std::map enames = sm->getExpressionNames(); - std::vector terms; + std::map enames = sm->getExpressionNames(); + std::vector terms; std::vector names; - for (const std::pair& e : enames) + for (const std::pair& e : enames) { terms.push_back(e.first); names.push_back(e.second); } // Must use vector version of getValue to ensure error is thrown regardless // of whether terms is empty. - std::vector values = solver->getValue(terms); + std::vector values = solver->getValue(terms); Assert(values.size() == names.size()); - std::vector sexprs; + std::vector sexprs; for (size_t i = 0, nterms = terms.size(); i < nterms; i++) { // Treat the expression name as a variable name as opposed to a string // constant to avoid printing double quotes around the name. - api::Term name = solver->mkVar(solver->getBooleanSort(), names[i]); - sexprs.push_back(solver->mkTerm(api::SEXPR, {name, values[i]})); + cvc5::Term name = solver->mkVar(solver->getBooleanSort(), names[i]); + sexprs.push_back(solver->mkTerm(cvc5::SEXPR, {name, values[i]})); } - d_result = solver->mkTerm(api::SEXPR, sexprs); + d_result = solver->mkTerm(cvc5::SEXPR, sexprs); d_commandStatus = CommandSuccess::instance(); } - catch (api::CVC5ApiRecoverableException& e) + catch (cvc5::CVC5ApiRecoverableException& e) { d_commandStatus = new CommandRecoverableFailure(e.what()); } @@ -1606,7 +1608,7 @@ void GetAssignmentCommand::invoke(api::Solver* solver, SymbolManager* sm) } } -api::Term GetAssignmentCommand::getResult() const { return d_result; } +cvc5::Term GetAssignmentCommand::getResult() const { return d_result; } void GetAssignmentCommand::printResult(std::ostream& out) const { if (!ok()) @@ -1644,16 +1646,16 @@ void GetAssignmentCommand::toStream(std::ostream& out, /* -------------------------------------------------------------------------- */ GetModelCommand::GetModelCommand() {} -void GetModelCommand::invoke(api::Solver* solver, SymbolManager* sm) +void GetModelCommand::invoke(cvc5::Solver* solver, SymbolManager* sm) { try { - std::vector declareSorts = sm->getModelDeclareSorts(); - std::vector declareTerms = sm->getModelDeclareTerms(); + std::vector declareSorts = sm->getModelDeclareSorts(); + std::vector declareTerms = sm->getModelDeclareTerms(); d_result = solver->getModel(declareSorts, declareTerms); d_commandStatus = CommandSuccess::instance(); } - catch (api::CVC5ApiRecoverableException& e) + catch (cvc5::CVC5ApiRecoverableException& e) { d_commandStatus = new CommandRecoverableFailure(e.what()); } @@ -1697,14 +1699,14 @@ void GetModelCommand::toStream(std::ostream& out, /* -------------------------------------------------------------------------- */ BlockModelCommand::BlockModelCommand() {} -void BlockModelCommand::invoke(api::Solver* solver, SymbolManager* sm) +void BlockModelCommand::invoke(cvc5::Solver* solver, SymbolManager* sm) { try { solver->blockModel(); d_commandStatus = CommandSuccess::instance(); } - catch (api::CVC5ApiRecoverableException& e) + catch (cvc5::CVC5ApiRecoverableException& e) { d_commandStatus = new CommandRecoverableFailure(e.what()); } @@ -1735,7 +1737,7 @@ void BlockModelCommand::toStream(std::ostream& out, /* -------------------------------------------------------------------------- */ BlockModelValuesCommand::BlockModelValuesCommand( - const std::vector& terms) + const std::vector& terms) : d_terms(terms) { PrettyCheckArgument(terms.size() >= 1, @@ -1743,18 +1745,18 @@ BlockModelValuesCommand::BlockModelValuesCommand( "cannot block-model-values of an empty set of terms"); } -const std::vector& BlockModelValuesCommand::getTerms() const +const std::vector& BlockModelValuesCommand::getTerms() const { return d_terms; } -void BlockModelValuesCommand::invoke(api::Solver* solver, SymbolManager* sm) +void BlockModelValuesCommand::invoke(cvc5::Solver* solver, SymbolManager* sm) { try { solver->blockModelValues(d_terms); d_commandStatus = CommandSuccess::instance(); } - catch (api::CVC5ApiRecoverableException& e) + catch (cvc5::CVC5ApiRecoverableException& e) { d_commandStatus = new CommandRecoverableFailure(e.what()); } @@ -1789,14 +1791,14 @@ void BlockModelValuesCommand::toStream(std::ostream& out, /* -------------------------------------------------------------------------- */ GetProofCommand::GetProofCommand() {} -void GetProofCommand::invoke(api::Solver* solver, SymbolManager* sm) +void GetProofCommand::invoke(cvc5::Solver* solver, SymbolManager* sm) { try { d_result = solver->getProof(); d_commandStatus = CommandSuccess::instance(); } - catch (api::CVC5ApiRecoverableException& e) + catch (cvc5::CVC5ApiRecoverableException& e) { d_commandStatus = new CommandRecoverableFailure(e.what()); } @@ -1839,15 +1841,15 @@ void GetProofCommand::toStream(std::ostream& out, /* -------------------------------------------------------------------------- */ GetInstantiationsCommand::GetInstantiationsCommand() : d_solver(nullptr) {} -bool GetInstantiationsCommand::isEnabled(api::Solver* solver, - const api::Result& res) +bool GetInstantiationsCommand::isEnabled(cvc5::Solver* solver, + const cvc5::Result& res) { return (res.isSat() || (res.isUnknown() - && res.getUnknownExplanation() == api::Result::INCOMPLETE)) + && res.getUnknownExplanation() == cvc5::Result::INCOMPLETE)) || res.isUnsat(); } -void GetInstantiationsCommand::invoke(api::Solver* solver, SymbolManager* sm) +void GetInstantiationsCommand::invoke(cvc5::Solver* solver, SymbolManager* sm) { try { @@ -1898,27 +1900,27 @@ void GetInstantiationsCommand::toStream(std::ostream& out, /* -------------------------------------------------------------------------- */ GetInterpolantCommand::GetInterpolantCommand(const std::string& name, - api::Term conj) + Term conj) : d_name(name), d_conj(conj), d_sygus_grammar(nullptr) { } GetInterpolantCommand::GetInterpolantCommand(const std::string& name, - api::Term conj, - api::Grammar* g) + Term conj, + Grammar* g) : d_name(name), d_conj(conj), d_sygus_grammar(g) { } -api::Term GetInterpolantCommand::getConjecture() const { return d_conj; } +Term GetInterpolantCommand::getConjecture() const { return d_conj; } -const api::Grammar* GetInterpolantCommand::getGrammar() const +const Grammar* GetInterpolantCommand::getGrammar() const { return d_sygus_grammar; } -api::Term GetInterpolantCommand::getResult() const { return d_result; } +Term GetInterpolantCommand::getResult() const { return d_result; } -void GetInterpolantCommand::invoke(api::Solver* solver, SymbolManager* sm) +void GetInterpolantCommand::invoke(Solver* solver, SymbolManager* sm) { try { @@ -1991,9 +1993,9 @@ void GetInterpolantCommand::toStream(std::ostream& out, GetInterpolantNextCommand::GetInterpolantNextCommand() {} -api::Term GetInterpolantNextCommand::getResult() const { return d_result; } +Term GetInterpolantNextCommand::getResult() const { return d_result; } -void GetInterpolantNextCommand::invoke(api::Solver* solver, SymbolManager* sm) +void GetInterpolantNextCommand::invoke(Solver* solver, SymbolManager* sm) { try { @@ -2054,28 +2056,28 @@ void GetInterpolantNextCommand::toStream(std::ostream& out, /* class GetAbductCommand */ /* -------------------------------------------------------------------------- */ -GetAbductCommand::GetAbductCommand(const std::string& name, api::Term conj) +GetAbductCommand::GetAbductCommand(const std::string& name, cvc5::Term conj) : d_name(name), d_conj(conj), d_sygus_grammar(nullptr) { } GetAbductCommand::GetAbductCommand(const std::string& name, - api::Term conj, - api::Grammar* g) + cvc5::Term conj, + cvc5::Grammar* g) : d_name(name), d_conj(conj), d_sygus_grammar(g) { } -api::Term GetAbductCommand::getConjecture() const { return d_conj; } +cvc5::Term GetAbductCommand::getConjecture() const { return d_conj; } -const api::Grammar* GetAbductCommand::getGrammar() const +const cvc5::Grammar* GetAbductCommand::getGrammar() const { return d_sygus_grammar; } std::string GetAbductCommand::getAbductName() const { return d_name; } -api::Term GetAbductCommand::getResult() const { return d_result; } +cvc5::Term GetAbductCommand::getResult() const { return d_result; } -void GetAbductCommand::invoke(api::Solver* solver, SymbolManager* sm) +void GetAbductCommand::invoke(cvc5::Solver* solver, SymbolManager* sm) { try { @@ -2144,9 +2146,9 @@ void GetAbductCommand::toStream(std::ostream& out, GetAbductNextCommand::GetAbductNextCommand() {} -api::Term GetAbductNextCommand::getResult() const { return d_result; } +cvc5::Term GetAbductNextCommand::getResult() const { return d_result; } -void GetAbductNextCommand::invoke(api::Solver* solver, SymbolManager* sm) +void GetAbductNextCommand::invoke(cvc5::Solver* solver, SymbolManager* sm) { try { @@ -2212,14 +2214,14 @@ GetQuantifierEliminationCommand::GetQuantifierEliminationCommand() { } GetQuantifierEliminationCommand::GetQuantifierEliminationCommand( - const api::Term& term, bool doFull) + const cvc5::Term& term, bool doFull) : d_term(term), d_doFull(doFull) { } -api::Term GetQuantifierEliminationCommand::getTerm() const { return d_term; } +cvc5::Term GetQuantifierEliminationCommand::getTerm() const { return d_term; } bool GetQuantifierEliminationCommand::getDoFull() const { return d_doFull; } -void GetQuantifierEliminationCommand::invoke(api::Solver* solver, +void GetQuantifierEliminationCommand::invoke(cvc5::Solver* solver, SymbolManager* sm) { try @@ -2240,7 +2242,7 @@ void GetQuantifierEliminationCommand::invoke(api::Solver* solver, } } -api::Term GetQuantifierEliminationCommand::getResult() const +cvc5::Term GetQuantifierEliminationCommand::getResult() const { return d_result; } @@ -2284,14 +2286,14 @@ void GetQuantifierEliminationCommand::toStream(std::ostream& out, GetUnsatAssumptionsCommand::GetUnsatAssumptionsCommand() {} -void GetUnsatAssumptionsCommand::invoke(api::Solver* solver, SymbolManager* sm) +void GetUnsatAssumptionsCommand::invoke(cvc5::Solver* solver, SymbolManager* sm) { try { d_result = solver->getUnsatAssumptions(); d_commandStatus = CommandSuccess::instance(); } - catch (api::CVC5ApiRecoverableException& e) + catch (cvc5::CVC5ApiRecoverableException& e) { d_commandStatus = new CommandRecoverableFailure(e.what()); } @@ -2301,7 +2303,7 @@ void GetUnsatAssumptionsCommand::invoke(api::Solver* solver, SymbolManager* sm) } } -std::vector GetUnsatAssumptionsCommand::getResult() const +std::vector GetUnsatAssumptionsCommand::getResult() const { return d_result; } @@ -2343,7 +2345,7 @@ void GetUnsatAssumptionsCommand::toStream(std::ostream& out, /* -------------------------------------------------------------------------- */ GetUnsatCoreCommand::GetUnsatCoreCommand() : d_sm(nullptr) {} -void GetUnsatCoreCommand::invoke(api::Solver* solver, SymbolManager* sm) +void GetUnsatCoreCommand::invoke(cvc5::Solver* solver, SymbolManager* sm) { try { @@ -2352,7 +2354,7 @@ void GetUnsatCoreCommand::invoke(api::Solver* solver, SymbolManager* sm) d_commandStatus = CommandSuccess::instance(); } - catch (api::CVC5ApiRecoverableException& e) + catch (cvc5::CVC5ApiRecoverableException& e) { d_commandStatus = new CommandRecoverableFailure(e.what()); } @@ -2387,7 +2389,7 @@ void GetUnsatCoreCommand::printResult(std::ostream& out) const } } -const std::vector& GetUnsatCoreCommand::getUnsatCore() const +const std::vector& GetUnsatCoreCommand::getUnsatCore() const { // of course, this will be empty if the command hasn't been invoked yet return d_result; @@ -2419,7 +2421,7 @@ void GetUnsatCoreCommand::toStream(std::ostream& out, /* -------------------------------------------------------------------------- */ GetDifficultyCommand::GetDifficultyCommand() : d_sm(nullptr) {} -void GetDifficultyCommand::invoke(api::Solver* solver, SymbolManager* sm) +void GetDifficultyCommand::invoke(cvc5::Solver* solver, SymbolManager* sm) { try { @@ -2428,7 +2430,7 @@ void GetDifficultyCommand::invoke(api::Solver* solver, SymbolManager* sm) d_commandStatus = CommandSuccess::instance(); } - catch (api::CVC5ApiRecoverableException& e) + catch (cvc5::CVC5ApiRecoverableException& e) { d_commandStatus = new CommandRecoverableFailure(e.what()); } @@ -2447,7 +2449,7 @@ void GetDifficultyCommand::printResult(std::ostream& out) const else { out << "(" << std::endl; - for (const std::pair& d : d_result) + for (const std::pair& d : d_result) { out << "("; // use name if it has one @@ -2466,7 +2468,7 @@ void GetDifficultyCommand::printResult(std::ostream& out) const } } -const std::map& GetDifficultyCommand::getDifficultyMap() +const std::map& GetDifficultyCommand::getDifficultyMap() const { return d_result; @@ -2498,7 +2500,7 @@ void GetDifficultyCommand::toStream(std::ostream& out, /* -------------------------------------------------------------------------- */ GetLearnedLiteralsCommand::GetLearnedLiteralsCommand() {} -void GetLearnedLiteralsCommand::invoke(api::Solver* solver, SymbolManager* sm) +void GetLearnedLiteralsCommand::invoke(cvc5::Solver* solver, SymbolManager* sm) { try { @@ -2506,7 +2508,7 @@ void GetLearnedLiteralsCommand::invoke(api::Solver* solver, SymbolManager* sm) d_commandStatus = CommandSuccess::instance(); } - catch (api::CVC5ApiRecoverableException& e) + catch (cvc5::CVC5ApiRecoverableException& e) { d_commandStatus = new CommandRecoverableFailure(e.what()); } @@ -2525,7 +2527,7 @@ void GetLearnedLiteralsCommand::printResult(std::ostream& out) const else { out << "(" << std::endl; - for (const api::Term& lit : d_result) + for (const cvc5::Term& lit : d_result) { out << lit << std::endl; } @@ -2533,7 +2535,7 @@ void GetLearnedLiteralsCommand::printResult(std::ostream& out) const } } -const std::vector& GetLearnedLiteralsCommand::getLearnedLiterals() +const std::vector& GetLearnedLiteralsCommand::getLearnedLiterals() const { return d_result; @@ -2564,14 +2566,14 @@ void GetLearnedLiteralsCommand::toStream(std::ostream& out, /* -------------------------------------------------------------------------- */ GetAssertionsCommand::GetAssertionsCommand() {} -void GetAssertionsCommand::invoke(api::Solver* solver, SymbolManager* sm) +void GetAssertionsCommand::invoke(cvc5::Solver* solver, SymbolManager* sm) { try { stringstream ss; - const vector v = solver->getAssertions(); + const vector v = solver->getAssertions(); ss << "(\n"; - copy(v.begin(), v.end(), ostream_iterator(ss, "\n")); + copy(v.begin(), v.end(), ostream_iterator(ss, "\n")); ss << ")\n"; d_result = ss.str(); d_commandStatus = CommandSuccess::instance(); @@ -2625,7 +2627,7 @@ SetBenchmarkLogicCommand::SetBenchmarkLogicCommand(std::string logic) } std::string SetBenchmarkLogicCommand::getLogic() const { return d_logic; } -void SetBenchmarkLogicCommand::invoke(api::Solver* solver, SymbolManager* sm) +void SetBenchmarkLogicCommand::invoke(cvc5::Solver* solver, SymbolManager* sm) { try { @@ -2668,19 +2670,19 @@ SetInfoCommand::SetInfoCommand(const std::string& flag, const std::string& SetInfoCommand::getFlag() const { return d_flag; } const std::string& SetInfoCommand::getValue() const { return d_value; } -void SetInfoCommand::invoke(api::Solver* solver, SymbolManager* sm) +void SetInfoCommand::invoke(cvc5::Solver* solver, SymbolManager* sm) { try { solver->setInfo(d_flag, d_value); d_commandStatus = CommandSuccess::instance(); } - catch (api::CVC5ApiUnsupportedException&) + catch (cvc5::CVC5ApiUnsupportedException&) { // As per SMT-LIB spec, silently accept unknown set-info keys d_commandStatus = CommandSuccess::instance(); } - catch (api::CVC5ApiRecoverableException& e) + catch (cvc5::CVC5ApiRecoverableException& e) { d_commandStatus = new CommandRecoverableFailure(e.getMessage()); } @@ -2711,21 +2713,21 @@ void SetInfoCommand::toStream(std::ostream& out, GetInfoCommand::GetInfoCommand(std::string flag) : d_flag(flag) {} std::string GetInfoCommand::getFlag() const { return d_flag; } -void GetInfoCommand::invoke(api::Solver* solver, SymbolManager* sm) +void GetInfoCommand::invoke(cvc5::Solver* solver, SymbolManager* sm) { try { - std::vector v; + std::vector v; v.push_back(solver->mkString(":" + d_flag)); v.push_back(solver->mkString(solver->getInfo(d_flag))); - d_result = sexprToString(solver->mkTerm(api::SEXPR, {v})); + d_result = sexprToString(solver->mkTerm(cvc5::SEXPR, {v})); d_commandStatus = CommandSuccess::instance(); } - catch (api::CVC5ApiUnsupportedException&) + catch (cvc5::CVC5ApiUnsupportedException&) { d_commandStatus = new CommandUnsupported(); } - catch (api::CVC5ApiRecoverableException& e) + catch (cvc5::CVC5ApiRecoverableException& e) { d_commandStatus = new CommandRecoverableFailure(e.getMessage()); } @@ -2777,18 +2779,18 @@ SetOptionCommand::SetOptionCommand(const std::string& flag, const std::string& SetOptionCommand::getFlag() const { return d_flag; } const std::string& SetOptionCommand::getValue() const { return d_value; } -void SetOptionCommand::invoke(api::Solver* solver, SymbolManager* sm) +void SetOptionCommand::invoke(cvc5::Solver* solver, SymbolManager* sm) { try { solver->setOption(d_flag, d_value); d_commandStatus = CommandSuccess::instance(); } - catch (api::CVC5ApiUnsupportedException&) + catch (cvc5::CVC5ApiUnsupportedException&) { d_commandStatus = new CommandUnsupported(); } - catch (api::CVC5ApiRecoverableException& e) + catch (cvc5::CVC5ApiRecoverableException& e) { d_commandStatus = new CommandRecoverableFailure(e.getMessage()); } @@ -2819,14 +2821,14 @@ void SetOptionCommand::toStream(std::ostream& out, GetOptionCommand::GetOptionCommand(std::string flag) : d_flag(flag) {} std::string GetOptionCommand::getFlag() const { return d_flag; } -void GetOptionCommand::invoke(api::Solver* solver, SymbolManager* sm) +void GetOptionCommand::invoke(cvc5::Solver* solver, SymbolManager* sm) { try { d_result = solver->getOption(d_flag); d_commandStatus = CommandSuccess::instance(); } - catch (api::CVC5ApiUnsupportedException&) + catch (cvc5::CVC5ApiUnsupportedException&) { d_commandStatus = new CommandUnsupported(); } @@ -2871,24 +2873,24 @@ void GetOptionCommand::toStream(std::ostream& out, /* -------------------------------------------------------------------------- */ DatatypeDeclarationCommand::DatatypeDeclarationCommand( - const api::Sort& datatype) + const cvc5::Sort& datatype) : d_datatypes() { d_datatypes.push_back(datatype); } DatatypeDeclarationCommand::DatatypeDeclarationCommand( - const std::vector& datatypes) + const std::vector& datatypes) : d_datatypes(datatypes) { } -const std::vector& DatatypeDeclarationCommand::getDatatypes() const +const std::vector& DatatypeDeclarationCommand::getDatatypes() const { return d_datatypes; } -void DatatypeDeclarationCommand::invoke(api::Solver* solver, SymbolManager* sm) +void DatatypeDeclarationCommand::invoke(cvc5::Solver* solver, SymbolManager* sm) { d_commandStatus = CommandSuccess::instance(); } diff --git a/src/smt/command.h b/src/smt/command.h index 66877f425..e4bab01a9 100644 --- a/src/smt/command.h +++ b/src/smt/command.h @@ -33,10 +33,8 @@ namespace cvc5 { -namespace api { class Solver; class Term; -} // namespace api class SymbolManager; class Command; @@ -53,7 +51,7 @@ class Model; * @param sexpr the symbolic expression to convert * @return the symbolic expression as string */ -std::string sexprToString(api::Term sexpr) CVC5_EXPORT; +std::string sexprToString(cvc5::Term sexpr) CVC5_EXPORT; std::ostream& operator<<(std::ostream&, const Command&) CVC5_EXPORT; std::ostream& operator<<(std::ostream&, const Command*) CVC5_EXPORT; @@ -129,8 +127,9 @@ class CVC5_EXPORT CommandStatus public: virtual ~CommandStatus() {} - void toStream(std::ostream& out, - Language language = Language::LANG_AUTO) const; + void toStream( + std::ostream& out, + internal::Language language = internal::Language::LANG_AUTO) const; virtual CommandStatus& clone() const = 0; }; /* class CommandStatus */ @@ -209,18 +208,19 @@ class CVC5_EXPORT Command /** * Invoke the command on the solver and symbol manager sm. */ - virtual void invoke(api::Solver* solver, SymbolManager* sm) = 0; + virtual void invoke(cvc5::Solver* solver, SymbolManager* sm) = 0; /** * Same as above, and prints the result to output stream out. */ - virtual void invoke(api::Solver* solver, + virtual void invoke(cvc5::Solver* solver, SymbolManager* sm, std::ostream& out); - virtual void toStream(std::ostream& out, - int toDepth = -1, - size_t dag = 1, - Language language = Language::LANG_AUTO) const = 0; + virtual void toStream( + std::ostream& out, + int toDepth = -1, + size_t dag = 1, + internal::Language language = internal::Language::LANG_AUTO) const = 0; std::string toString() const; @@ -280,24 +280,24 @@ class CVC5_EXPORT Command * Reset the given solver in-place (keep the object at the same memory * location). */ - static void resetSolver(api::Solver* solver); + static void resetSolver(cvc5::Solver* solver); protected: // These methods rely on Command being a friend of classes in the API. // Subclasses of command should use these methods for conversions, // which is currently necessary for e.g. printing commands. - /** Helper to convert a Term to an internal Node */ - static Node termToNode(const api::Term& term); + /** Helper to convert a Term to an internal internal::Node */ + static internal::Node termToNode(const cvc5::Term& term); /** Helper to convert a vector of Terms to internal Nodes. */ - static std::vector termVectorToNodes( - const std::vector& terms); - /** Helper to convert a Sort to an internal TypeNode */ - static TypeNode sortToTypeNode(const api::Sort& sort); + static std::vector termVectorToNodes( + const std::vector& terms); + /** Helper to convert a Sort to an internal internal::TypeNode */ + static internal::TypeNode sortToTypeNode(const cvc5::Sort& sort); /** Helper to convert a vector of Sorts to internal TypeNodes. */ - static std::vector sortVectorToTypeNodes( - const std::vector& sorts); - /** Helper to convert a Grammar to an internal TypeNode */ - static TypeNode grammarToTypeNode(api::Grammar* grammar); + static std::vector sortVectorToTypeNodes( + const std::vector& sorts); + /** Helper to convert a Grammar to an internal internal::TypeNode */ + static internal::TypeNode grammarToTypeNode(cvc5::Grammar* grammar); }; /* class Command */ /** @@ -309,13 +309,14 @@ class CVC5_EXPORT EmptyCommand : public Command public: EmptyCommand(std::string name = ""); std::string getName() const; - void invoke(api::Solver* solver, SymbolManager* sm) override; + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; Command* clone() const override; std::string getCommandName() const override; void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; protected: std::string d_name; @@ -328,8 +329,8 @@ class CVC5_EXPORT EchoCommand : public Command std::string getOutput() const; - void invoke(api::Solver* solver, SymbolManager* sm) override; - void invoke(api::Solver* solver, + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; + void invoke(cvc5::Solver* solver, SymbolManager* sm, std::ostream& out) override; @@ -338,7 +339,8 @@ class CVC5_EXPORT EchoCommand : public Command void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; protected: std::string d_output; @@ -347,45 +349,48 @@ class CVC5_EXPORT EchoCommand : public Command class CVC5_EXPORT AssertCommand : public Command { protected: - api::Term d_term; + cvc5::Term d_term; public: - AssertCommand(const api::Term& t); + AssertCommand(const cvc5::Term& t); - api::Term getTerm() const; + cvc5::Term getTerm() const; - void invoke(api::Solver* solver, SymbolManager* sm) override; + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; Command* clone() const override; std::string getCommandName() const override; void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; }; /* class AssertCommand */ class CVC5_EXPORT PushCommand : public Command { public: - void invoke(api::Solver* solver, SymbolManager* sm) override; + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; Command* clone() const override; std::string getCommandName() const override; void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; }; /* class PushCommand */ class CVC5_EXPORT PopCommand : public Command { public: - void invoke(api::Solver* solver, SymbolManager* sm) override; + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; Command* clone() const override; std::string getCommandName() const override; void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; }; /* class PopCommand */ class CVC5_EXPORT DeclarationDefinitionCommand : public Command @@ -396,130 +401,137 @@ class CVC5_EXPORT DeclarationDefinitionCommand : public Command public: DeclarationDefinitionCommand(const std::string& id); - void invoke(api::Solver* solver, SymbolManager* sm) override = 0; + void invoke(cvc5::Solver* solver, SymbolManager* sm) override = 0; std::string getSymbol() const; }; /* class DeclarationDefinitionCommand */ class CVC5_EXPORT DeclareFunctionCommand : public DeclarationDefinitionCommand { protected: - api::Term d_func; - api::Sort d_sort; + cvc5::Term d_func; + cvc5::Sort d_sort; public: - DeclareFunctionCommand(const std::string& id, api::Term func, api::Sort sort); - api::Term getFunction() const; - api::Sort getSort() const; + DeclareFunctionCommand(const std::string& id, + cvc5::Term func, + cvc5::Sort sort); + cvc5::Term getFunction() const; + cvc5::Sort getSort() const; - void invoke(api::Solver* solver, SymbolManager* sm) override; + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; Command* clone() const override; std::string getCommandName() const override; void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; }; /* class DeclareFunctionCommand */ class CVC5_EXPORT DeclarePoolCommand : public DeclarationDefinitionCommand { protected: - api::Term d_func; - api::Sort d_sort; - std::vector d_initValue; + cvc5::Term d_func; + cvc5::Sort d_sort; + std::vector d_initValue; public: DeclarePoolCommand(const std::string& id, - api::Term func, - api::Sort sort, - const std::vector& initValue); - api::Term getFunction() const; - api::Sort getSort() const; - const std::vector& getInitialValue() const; - - void invoke(api::Solver* solver, SymbolManager* sm) override; + cvc5::Term func, + cvc5::Sort sort, + const std::vector& initValue); + cvc5::Term getFunction() const; + cvc5::Sort getSort() const; + const std::vector& getInitialValue() const; + + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; Command* clone() const override; std::string getCommandName() const override; void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; }; /* class DeclarePoolCommand */ class CVC5_EXPORT DeclareSortCommand : public DeclarationDefinitionCommand { protected: size_t d_arity; - api::Sort d_sort; + cvc5::Sort d_sort; public: - DeclareSortCommand(const std::string& id, size_t arity, api::Sort sort); + DeclareSortCommand(const std::string& id, size_t arity, cvc5::Sort sort); size_t getArity() const; - api::Sort getSort() const; + cvc5::Sort getSort() const; - void invoke(api::Solver* solver, SymbolManager* sm) override; + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; Command* clone() const override; std::string getCommandName() const override; void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; }; /* class DeclareSortCommand */ class CVC5_EXPORT DefineSortCommand : public DeclarationDefinitionCommand { protected: - std::vector d_params; - api::Sort d_sort; + std::vector d_params; + cvc5::Sort d_sort; public: - DefineSortCommand(const std::string& id, api::Sort sort); + DefineSortCommand(const std::string& id, cvc5::Sort sort); DefineSortCommand(const std::string& id, - const std::vector& params, - api::Sort sort); + const std::vector& params, + cvc5::Sort sort); - const std::vector& getParameters() const; - api::Sort getSort() const; + const std::vector& getParameters() const; + cvc5::Sort getSort() const; - void invoke(api::Solver* solver, SymbolManager* sm) override; + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; Command* clone() const override; std::string getCommandName() const override; void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; }; /* class DefineSortCommand */ class CVC5_EXPORT DefineFunctionCommand : public DeclarationDefinitionCommand { public: DefineFunctionCommand(const std::string& id, - api::Sort sort, - api::Term formula); + cvc5::Sort sort, + cvc5::Term formula); DefineFunctionCommand(const std::string& id, - const std::vector& formals, - api::Sort sort, - api::Term formula); + const std::vector& formals, + cvc5::Sort sort, + cvc5::Term formula); - const std::vector& getFormals() const; - api::Sort getSort() const; - api::Term getFormula() const; + const std::vector& getFormals() const; + cvc5::Sort getSort() const; + cvc5::Term getFormula() const; - void invoke(api::Solver* solver, SymbolManager* sm) override; + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; Command* clone() const override; std::string getCommandName() const override; void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; protected: /** The formal arguments for the function we are defining */ - std::vector d_formals; + std::vector d_formals; /** The co-domain sort of the function we are defining */ - api::Sort d_sort; + cvc5::Sort d_sort; /** The formula corresponding to the body of the function we are defining */ - api::Term d_formula; + cvc5::Term d_formula; }; /* class DefineFunctionCommand */ /** @@ -530,32 +542,33 @@ class CVC5_EXPORT DefineFunctionCommand : public DeclarationDefinitionCommand class CVC5_EXPORT DefineFunctionRecCommand : public Command { public: - DefineFunctionRecCommand(api::Term func, - const std::vector& formals, - api::Term formula); - DefineFunctionRecCommand(const std::vector& funcs, - const std::vector >& formals, - const std::vector& formula); - - const std::vector& getFunctions() const; - const std::vector >& getFormals() const; - const std::vector& getFormulas() const; - - void invoke(api::Solver* solver, SymbolManager* sm) override; + DefineFunctionRecCommand(cvc5::Term func, + const std::vector& formals, + cvc5::Term formula); + DefineFunctionRecCommand(const std::vector& funcs, + const std::vector >& formals, + const std::vector& formula); + + const std::vector& getFunctions() const; + const std::vector >& getFormals() const; + const std::vector& getFormulas() const; + + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; Command* clone() const override; std::string getCommandName() const override; void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; protected: /** functions we are defining */ - std::vector d_funcs; + std::vector d_funcs; /** formal arguments for each of the functions we are defining */ - std::vector > d_formals; + std::vector > d_formals; /** formulas corresponding to the bodies of the functions we are defining */ - std::vector d_formulas; + std::vector d_formulas; }; /* class DefineFunctionRecCommand */ /** @@ -567,22 +580,23 @@ class CVC5_EXPORT DefineFunctionRecCommand : public Command class CVC5_EXPORT DeclareHeapCommand : public Command { public: - DeclareHeapCommand(api::Sort locSort, api::Sort dataSort); - api::Sort getLocationSort() const; - api::Sort getDataSort() const; - void invoke(api::Solver* solver, SymbolManager* sm) override; + DeclareHeapCommand(cvc5::Sort locSort, cvc5::Sort dataSort); + cvc5::Sort getLocationSort() const; + cvc5::Sort getDataSort() const; + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; Command* clone() const override; std::string getCommandName() const override; void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; protected: /** The location sort */ - api::Sort d_locSort; + cvc5::Sort d_locSort; /** The data sort */ - api::Sort d_dataSort; + cvc5::Sort d_dataSort; }; /** @@ -593,18 +607,19 @@ class CVC5_EXPORT CheckSatCommand : public Command { public: CheckSatCommand(); - api::Result getResult() const; - void invoke(api::Solver* solver, SymbolManager* sm) override; + cvc5::Result getResult() const; + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; void printResult(std::ostream& out) const override; Command* clone() const override; std::string getCommandName() const override; void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; private: - api::Result d_result; + cvc5::Result d_result; }; /* class CheckSatCommand */ /** @@ -615,44 +630,46 @@ class CVC5_EXPORT CheckSatCommand : public Command class CVC5_EXPORT CheckSatAssumingCommand : public Command { public: - CheckSatAssumingCommand(api::Term term); - CheckSatAssumingCommand(const std::vector& terms); + CheckSatAssumingCommand(cvc5::Term term); + CheckSatAssumingCommand(const std::vector& terms); - const std::vector& getTerms() const; - api::Result getResult() const; - void invoke(api::Solver* solver, SymbolManager* sm) override; + const std::vector& getTerms() const; + cvc5::Result getResult() const; + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; void printResult(std::ostream& out) const override; Command* clone() const override; std::string getCommandName() const override; void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; private: - std::vector d_terms; - api::Result d_result; + std::vector d_terms; + cvc5::Result d_result; }; /* class CheckSatAssumingCommand */ class CVC5_EXPORT QueryCommand : public Command { protected: - api::Term d_term; - api::Result d_result; + cvc5::Term d_term; + cvc5::Result d_result; public: - QueryCommand(const api::Term& t); + QueryCommand(const cvc5::Term& t); - api::Term getTerm() const; - api::Result getResult() const; - void invoke(api::Solver* solver, SymbolManager* sm) override; + cvc5::Term getTerm() const; + cvc5::Result getResult() const; + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; void printResult(std::ostream& out) const override; Command* clone() const override; std::string getCommandName() const override; void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; }; /* class QueryCommand */ /* ------------------- sygus commands ------------------ */ @@ -661,17 +678,19 @@ class CVC5_EXPORT QueryCommand : public Command class CVC5_EXPORT DeclareSygusVarCommand : public DeclarationDefinitionCommand { public: - DeclareSygusVarCommand(const std::string& id, api::Term var, api::Sort sort); + DeclareSygusVarCommand(const std::string& id, + cvc5::Term var, + cvc5::Sort sort); /** returns the declared variable */ - api::Term getVar() const; + cvc5::Term getVar() const; /** returns the declared variable's sort */ - api::Sort getSort() const; + cvc5::Sort getSort() const; /** invokes this command * * The declared sygus variable is communicated to the SMT engine in case a * synthesis conjecture is built later on. */ - void invoke(api::Solver* solver, SymbolManager* sm) override; + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; /** creates a copy of this command */ Command* clone() const override; /** returns this command's name */ @@ -680,13 +699,14 @@ class CVC5_EXPORT DeclareSygusVarCommand : public DeclarationDefinitionCommand void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; protected: /** the declared variable */ - api::Term d_var; + cvc5::Term d_var; /** the declared variable's sort */ - api::Sort d_sort; + cvc5::Sort d_sort; }; /** Declares a sygus function-to-synthesize @@ -698,28 +718,28 @@ class CVC5_EXPORT SynthFunCommand : public DeclarationDefinitionCommand { public: SynthFunCommand(const std::string& id, - api::Term fun, - const std::vector& vars, - api::Sort sort, + cvc5::Term fun, + const std::vector& vars, + cvc5::Sort sort, bool isInv, - api::Grammar* g); + cvc5::Grammar* g); /** returns the function-to-synthesize */ - api::Term getFunction() const; + cvc5::Term getFunction() const; /** returns the input variables of the function-to-synthesize */ - const std::vector& getVars() const; + const std::vector& getVars() const; /** returns the sygus sort of the function-to-synthesize */ - api::Sort getSort() const; + cvc5::Sort getSort() const; /** returns whether the function-to-synthesize should be an invariant */ bool isInv() const; /** Get the sygus grammar given for the synth fun command */ - const api::Grammar* getGrammar() const; + const cvc5::Grammar* getGrammar() const; /** invokes this command * * The declared function-to-synthesize is communicated to the SMT engine in * case a synthesis conjecture is built later on. */ - void invoke(api::Solver* solver, SymbolManager* sm) override; + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; /** creates a copy of this command */ Command* clone() const override; /** returns this command's name */ @@ -728,34 +748,35 @@ class CVC5_EXPORT SynthFunCommand : public DeclarationDefinitionCommand void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; protected: /** the function-to-synthesize */ - api::Term d_fun; + cvc5::Term d_fun; /** the input variables of the function-to-synthesize */ - std::vector d_vars; + std::vector d_vars; /** sort of the function-to-synthesize */ - api::Sort d_sort; + cvc5::Sort d_sort; /** whether the function-to-synthesize should be an invariant */ bool d_isInv; /** optional grammar for the possible values of the function-to-sytnhesize */ - api::Grammar* d_grammar; + cvc5::Grammar* d_grammar; }; /** Declares a sygus constraint */ class CVC5_EXPORT SygusConstraintCommand : public Command { public: - SygusConstraintCommand(const api::Term& t, bool isAssume = false); + SygusConstraintCommand(const cvc5::Term& t, bool isAssume = false); /** returns the declared constraint */ - api::Term getTerm() const; + cvc5::Term getTerm() const; /** invokes this command * * The declared constraint is communicated to the SMT engine in case a * synthesis conjecture is built later on. */ - void invoke(api::Solver* solver, SymbolManager* sm) override; + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; /** creates a copy of this command */ Command* clone() const override; /** returns this command's name */ @@ -764,11 +785,12 @@ class CVC5_EXPORT SygusConstraintCommand : public Command void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; protected: /** the declared constraint */ - api::Term d_term; + cvc5::Term d_term; /** true if this is a sygus assumption */ bool d_isAssume; }; @@ -786,20 +808,20 @@ class CVC5_EXPORT SygusConstraintCommand : public Command class CVC5_EXPORT SygusInvConstraintCommand : public Command { public: - SygusInvConstraintCommand(const std::vector& predicates); - SygusInvConstraintCommand(const api::Term& inv, - const api::Term& pre, - const api::Term& trans, - const api::Term& post); + SygusInvConstraintCommand(const std::vector& predicates); + SygusInvConstraintCommand(const cvc5::Term& inv, + const cvc5::Term& pre, + const cvc5::Term& trans, + const cvc5::Term& post); /** returns the place holder predicates */ - const std::vector& getPredicates() const; + const std::vector& getPredicates() const; /** invokes this command * * The place holders are communicated to the SMT engine and the actual * invariant constraint is built, in case an actual synthesis conjecture is * built later on. */ - void invoke(api::Solver* solver, SymbolManager* sm) override; + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; /** creates a copy of this command */ Command* clone() const override; /** returns this command's name */ @@ -808,13 +830,14 @@ class CVC5_EXPORT SygusInvConstraintCommand : public Command void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; protected: /** the place holder predicates with which to build the actual constraint * (i.e. the invariant, precondition, transition relation and postcondition) */ - std::vector d_predicates; + std::vector d_predicates; }; /** Declares a synthesis conjecture */ @@ -823,7 +846,7 @@ class CVC5_EXPORT CheckSynthCommand : public Command public: CheckSynthCommand(bool isNext = false) : d_isNext(isNext){}; /** returns the result of the check-synth call */ - api::SynthResult getResult() const; + cvc5::SynthResult getResult() const; /** prints the result of the check-synth-call */ void printResult(std::ostream& out) const override; /** invokes this command @@ -834,7 +857,7 @@ class CVC5_EXPORT CheckSynthCommand : public Command * and then perform a satisfiability check, whose result is stored in * d_result. */ - void invoke(api::Solver* solver, SymbolManager* sm) override; + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; /** creates a copy of this command */ Command* clone() const override; /** returns this command's name */ @@ -843,13 +866,14 @@ class CVC5_EXPORT CheckSynthCommand : public Command void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; protected: /** Whether this is a check-synth-next call */ bool d_isNext; /** result of the check-synth call */ - api::SynthResult d_result; + cvc5::SynthResult d_result; /** string stream that stores the output of the solution */ std::stringstream d_solution; }; @@ -860,77 +884,81 @@ class CVC5_EXPORT CheckSynthCommand : public Command class CVC5_EXPORT SimplifyCommand : public Command { protected: - api::Term d_term; - api::Term d_result; + cvc5::Term d_term; + cvc5::Term d_result; public: - SimplifyCommand(api::Term term); + SimplifyCommand(cvc5::Term term); - api::Term getTerm() const; - api::Term getResult() const; - void invoke(api::Solver* solver, SymbolManager* sm) override; + cvc5::Term getTerm() const; + cvc5::Term getResult() const; + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; void printResult(std::ostream& out) const override; Command* clone() const override; std::string getCommandName() const override; void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; }; /* class SimplifyCommand */ class CVC5_EXPORT GetValueCommand : public Command { protected: - std::vector d_terms; - api::Term d_result; + std::vector d_terms; + cvc5::Term d_result; public: - GetValueCommand(api::Term term); - GetValueCommand(const std::vector& terms); + GetValueCommand(cvc5::Term term); + GetValueCommand(const std::vector& terms); - const std::vector& getTerms() const; - api::Term getResult() const; - void invoke(api::Solver* solver, SymbolManager* sm) override; + const std::vector& getTerms() const; + cvc5::Term getResult() const; + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; void printResult(std::ostream& out) const override; Command* clone() const override; std::string getCommandName() const override; void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; }; /* class GetValueCommand */ class CVC5_EXPORT GetAssignmentCommand : public Command { protected: - api::Term d_result; + cvc5::Term d_result; public: GetAssignmentCommand(); - api::Term getResult() const; - void invoke(api::Solver* solver, SymbolManager* sm) override; + cvc5::Term getResult() const; + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; void printResult(std::ostream& out) const override; Command* clone() const override; std::string getCommandName() const override; void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; }; /* class GetAssignmentCommand */ class CVC5_EXPORT GetModelCommand : public Command { public: GetModelCommand(); - void invoke(api::Solver* solver, SymbolManager* sm) override; + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; void printResult(std::ostream& out) const override; Command* clone() const override; std::string getCommandName() const override; void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; protected: /** Result of printing the model */ @@ -943,33 +971,35 @@ class CVC5_EXPORT BlockModelCommand : public Command public: BlockModelCommand(); - void invoke(api::Solver* solver, SymbolManager* sm) override; + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; Command* clone() const override; std::string getCommandName() const override; void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; }; /* class BlockModelCommand */ /** The command to block model values. */ class CVC5_EXPORT BlockModelValuesCommand : public Command { public: - BlockModelValuesCommand(const std::vector& terms); + BlockModelValuesCommand(const std::vector& terms); - const std::vector& getTerms() const; - void invoke(api::Solver* solver, SymbolManager* sm) override; + const std::vector& getTerms() const; + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; Command* clone() const override; std::string getCommandName() const override; void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; protected: /** The terms we are blocking */ - std::vector d_terms; + std::vector d_terms; }; /* class BlockModelValuesCommand */ class CVC5_EXPORT GetProofCommand : public Command @@ -977,7 +1007,7 @@ class CVC5_EXPORT GetProofCommand : public Command public: GetProofCommand(); - void invoke(api::Solver* solver, SymbolManager* sm) override; + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; void printResult(std::ostream& out) const override; @@ -986,7 +1016,8 @@ class CVC5_EXPORT GetProofCommand : public Command void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; private: /** the result of the getProof call */ @@ -998,18 +1029,19 @@ class CVC5_EXPORT GetInstantiationsCommand : public Command public: GetInstantiationsCommand(); - static bool isEnabled(api::Solver* solver, const api::Result& res); - void invoke(api::Solver* solver, SymbolManager* sm) override; + static bool isEnabled(cvc5::Solver* solver, const cvc5::Result& res); + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; void printResult(std::ostream& out) const override; Command* clone() const override; std::string getCommandName() const override; void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; protected: - api::Solver* d_solver; + cvc5::Solver* d_solver; }; /* class GetInstantiationsCommand */ /** The command (get-interpolant s B (G)?) @@ -1024,38 +1056,39 @@ class CVC5_EXPORT GetInstantiationsCommand : public Command class CVC5_EXPORT GetInterpolantCommand : public Command { public: - GetInterpolantCommand(const std::string& name, api::Term conj); + GetInterpolantCommand(const std::string& name, Term conj); /** The argument g is the grammar of the interpolation query */ GetInterpolantCommand(const std::string& name, - api::Term conj, - api::Grammar* g); + Term conj, + Grammar* g); /** Get the conjecture of the interpolation query */ - api::Term getConjecture() const; + cvc5::Term getConjecture() const; /** Get the sygus grammar given for the interpolation query */ - const api::Grammar* getGrammar() const; + const cvc5::Grammar* getGrammar() const; /** Get the result of the query, which is the solution to the interpolation * query. */ - api::Term getResult() const; + cvc5::Term getResult() const; - void invoke(api::Solver* solver, SymbolManager* sm) override; + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; void printResult(std::ostream& out) const override; Command* clone() const override; std::string getCommandName() const override; void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; protected: /** The name of the interpolation predicate */ std::string d_name; /** The conjecture of the interpolation query */ - api::Term d_conj; + cvc5::Term d_conj; /** The (optional) grammar of the interpolation query */ - api::Grammar* d_sygus_grammar; + cvc5::Grammar* d_sygus_grammar; /** the return expression of the command */ - api::Term d_result; + cvc5::Term d_result; }; /* class GetInterpolCommand */ /** The command (get-interpolant-next) */ @@ -1067,22 +1100,23 @@ class CVC5_EXPORT GetInterpolantNextCommand : public Command * Get the result of the query, which is the solution to the interpolation * query. */ - api::Term getResult() const; + cvc5::Term getResult() const; - void invoke(api::Solver* solver, SymbolManager* sm) override; + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; void printResult(std::ostream& out) const override; Command* clone() const override; std::string getCommandName() const override; void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; protected: /** The name of the interpolation predicate */ std::string d_name; /** the return expression of the command */ - api::Term d_result; + cvc5::Term d_result; }; /** The command (get-abduct s B (G)?) @@ -1100,37 +1134,38 @@ class CVC5_EXPORT GetInterpolantNextCommand : public Command class CVC5_EXPORT GetAbductCommand : public Command { public: - GetAbductCommand(const std::string& name, api::Term conj); - GetAbductCommand(const std::string& name, api::Term conj, api::Grammar* g); + GetAbductCommand(const std::string& name, cvc5::Term conj); + GetAbductCommand(const std::string& name, cvc5::Term conj, cvc5::Grammar* g); /** Get the conjecture of the abduction query */ - api::Term getConjecture() const; + cvc5::Term getConjecture() const; /** Get the grammar given for the abduction query */ - const api::Grammar* getGrammar() const; + const cvc5::Grammar* getGrammar() const; /** Get the name of the abduction predicate for the abduction query */ std::string getAbductName() const; /** Get the result of the query, which is the solution to the abduction query. */ - api::Term getResult() const; + cvc5::Term getResult() const; - void invoke(api::Solver* solver, SymbolManager* sm) override; + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; void printResult(std::ostream& out) const override; Command* clone() const override; std::string getCommandName() const override; void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; protected: /** The name of the abduction predicate */ std::string d_name; /** The conjecture of the abduction query */ - api::Term d_conj; + cvc5::Term d_conj; /** The (optional) grammar of the abduction query */ - api::Grammar* d_sygus_grammar; + cvc5::Grammar* d_sygus_grammar; /** the return expression of the command */ - api::Term d_result; + cvc5::Term d_result; }; /* class GetAbductCommand */ /** The command (get-abduct-next) */ @@ -1141,39 +1176,40 @@ class CVC5_EXPORT GetAbductNextCommand : public Command /** * Get the result of the query, which is the solution to the abduction query. */ - api::Term getResult() const; + cvc5::Term getResult() const; - void invoke(api::Solver* solver, SymbolManager* sm) override; + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; void printResult(std::ostream& out) const override; Command* clone() const override; std::string getCommandName() const override; void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; protected: /** The name of the abduction predicate */ std::string d_name; /** the return expression of the command */ - api::Term d_result; + cvc5::Term d_result; }; class CVC5_EXPORT GetQuantifierEliminationCommand : public Command { protected: - api::Term d_term; + cvc5::Term d_term; bool d_doFull; - api::Term d_result; + cvc5::Term d_result; public: GetQuantifierEliminationCommand(); - GetQuantifierEliminationCommand(const api::Term& term, bool doFull); + GetQuantifierEliminationCommand(const cvc5::Term& term, bool doFull); - api::Term getTerm() const; + cvc5::Term getTerm() const; bool getDoFull() const; - void invoke(api::Solver* solver, SymbolManager* sm) override; - api::Term getResult() const; + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; + cvc5::Term getResult() const; void printResult(std::ostream& out) const override; Command* clone() const override; @@ -1181,34 +1217,36 @@ class CVC5_EXPORT GetQuantifierEliminationCommand : public Command void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; }; /* class GetQuantifierEliminationCommand */ class CVC5_EXPORT GetUnsatAssumptionsCommand : public Command { public: GetUnsatAssumptionsCommand(); - void invoke(api::Solver* solver, SymbolManager* sm) override; - std::vector getResult() const; + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; + std::vector getResult() const; void printResult(std::ostream& out) const override; Command* clone() const override; std::string getCommandName() const override; void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; protected: - std::vector d_result; + std::vector d_result; }; /* class GetUnsatAssumptionsCommand */ class CVC5_EXPORT GetUnsatCoreCommand : public Command { public: GetUnsatCoreCommand(); - const std::vector& getUnsatCore() const; + const std::vector& getUnsatCore() const; - void invoke(api::Solver* solver, SymbolManager* sm) override; + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; void printResult(std::ostream& out) const override; Command* clone() const override; @@ -1216,22 +1254,23 @@ class CVC5_EXPORT GetUnsatCoreCommand : public Command void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; protected: /** The symbol manager we were invoked with */ SymbolManager* d_sm; /** the result of the unsat core call */ - std::vector d_result; + std::vector d_result; }; /* class GetUnsatCoreCommand */ class CVC5_EXPORT GetDifficultyCommand : public Command { public: GetDifficultyCommand(); - const std::map& getDifficultyMap() const; + const std::map& getDifficultyMap() const; - void invoke(api::Solver* solver, SymbolManager* sm) override; + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; void printResult(std::ostream& out) const override; Command* clone() const override; @@ -1239,22 +1278,23 @@ class CVC5_EXPORT GetDifficultyCommand : public Command void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; protected: /** The symbol manager we were invoked with */ SymbolManager* d_sm; /** the result of the get difficulty call */ - std::map d_result; + std::map d_result; }; class CVC5_EXPORT GetLearnedLiteralsCommand : public Command { public: GetLearnedLiteralsCommand(); - const std::vector& getLearnedLiterals() const; + const std::vector& getLearnedLiterals() const; - void invoke(api::Solver* solver, SymbolManager* sm) override; + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; void printResult(std::ostream& out) const override; Command* clone() const override; @@ -1262,11 +1302,12 @@ class CVC5_EXPORT GetLearnedLiteralsCommand : public Command void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; protected: /** the result of the get learned literals call */ - std::vector d_result; + std::vector d_result; }; class CVC5_EXPORT GetAssertionsCommand : public Command @@ -1277,7 +1318,7 @@ class CVC5_EXPORT GetAssertionsCommand : public Command public: GetAssertionsCommand(); - void invoke(api::Solver* solver, SymbolManager* sm) override; + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; std::string getResult() const; void printResult(std::ostream& out) const override; Command* clone() const override; @@ -1285,7 +1326,8 @@ class CVC5_EXPORT GetAssertionsCommand : public Command void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; }; /* class GetAssertionsCommand */ class CVC5_EXPORT SetBenchmarkLogicCommand : public Command @@ -1297,13 +1339,14 @@ class CVC5_EXPORT SetBenchmarkLogicCommand : public Command SetBenchmarkLogicCommand(std::string logic); std::string getLogic() const; - void invoke(api::Solver* solver, SymbolManager* sm) override; + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; Command* clone() const override; std::string getCommandName() const override; void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; }; /* class SetBenchmarkLogicCommand */ class CVC5_EXPORT SetInfoCommand : public Command @@ -1318,13 +1361,14 @@ class CVC5_EXPORT SetInfoCommand : public Command const std::string& getFlag() const; const std::string& getValue() const; - void invoke(api::Solver* solver, SymbolManager* sm) override; + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; Command* clone() const override; std::string getCommandName() const override; void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; }; /* class SetInfoCommand */ class CVC5_EXPORT GetInfoCommand : public Command @@ -1339,14 +1383,15 @@ class CVC5_EXPORT GetInfoCommand : public Command std::string getFlag() const; std::string getResult() const; - void invoke(api::Solver* solver, SymbolManager* sm) override; + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; void printResult(std::ostream& out) const override; Command* clone() const override; std::string getCommandName() const override; void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; }; /* class GetInfoCommand */ class CVC5_EXPORT SetOptionCommand : public Command @@ -1361,13 +1406,14 @@ class CVC5_EXPORT SetOptionCommand : public Command const std::string& getFlag() const; const std::string& getValue() const; - void invoke(api::Solver* solver, SymbolManager* sm) override; + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; Command* clone() const override; std::string getCommandName() const override; void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; }; /* class SetOptionCommand */ class CVC5_EXPORT GetOptionCommand : public Command @@ -1382,72 +1428,77 @@ class CVC5_EXPORT GetOptionCommand : public Command std::string getFlag() const; std::string getResult() const; - void invoke(api::Solver* solver, SymbolManager* sm) override; + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; void printResult(std::ostream& out) const override; Command* clone() const override; std::string getCommandName() const override; void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; }; /* class GetOptionCommand */ class CVC5_EXPORT DatatypeDeclarationCommand : public Command { private: - std::vector d_datatypes; + std::vector d_datatypes; public: - DatatypeDeclarationCommand(const api::Sort& datatype); + DatatypeDeclarationCommand(const cvc5::Sort& datatype); - DatatypeDeclarationCommand(const std::vector& datatypes); - const std::vector& getDatatypes() const; - void invoke(api::Solver* solver, SymbolManager* sm) override; + DatatypeDeclarationCommand(const std::vector& datatypes); + const std::vector& getDatatypes() const; + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; Command* clone() const override; std::string getCommandName() const override; void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; }; /* class DatatypeDeclarationCommand */ class CVC5_EXPORT ResetCommand : public Command { public: ResetCommand() {} - void invoke(api::Solver* solver, SymbolManager* sm) override; + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; Command* clone() const override; std::string getCommandName() const override; void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; }; /* class ResetCommand */ class CVC5_EXPORT ResetAssertionsCommand : public Command { public: ResetAssertionsCommand() {} - void invoke(api::Solver* solver, SymbolManager* sm) override; + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; Command* clone() const override; std::string getCommandName() const override; void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; }; /* class ResetAssertionsCommand */ class CVC5_EXPORT QuitCommand : public Command { public: QuitCommand() {} - void invoke(api::Solver* solver, SymbolManager* sm) override; + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; Command* clone() const override; std::string getCommandName() const override; void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; }; /* class QuitCommand */ class CVC5_EXPORT CommandSequence : public Command @@ -1465,8 +1516,8 @@ class CVC5_EXPORT CommandSequence : public Command void addCommand(Command* cmd); void clear(); - void invoke(api::Solver* solver, SymbolManager* sm) override; - void invoke(api::Solver* solver, + void invoke(cvc5::Solver* solver, SymbolManager* sm) override; + void invoke(cvc5::Solver* solver, SymbolManager* sm, std::ostream& out) override; @@ -1484,7 +1535,8 @@ class CVC5_EXPORT CommandSequence : public Command void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; }; /* class CommandSequence */ class CVC5_EXPORT DeclarationSequence : public CommandSequence @@ -1492,7 +1544,8 @@ class CVC5_EXPORT DeclarationSequence : public CommandSequence void toStream(std::ostream& out, int toDepth = -1, size_t dag = 1, - Language language = Language::LANG_AUTO) const override; + internal::Language language = + internal::Language::LANG_AUTO) const override; }; } // namespace cvc5 diff --git a/src/smt/difficulty_post_processor.cpp b/src/smt/difficulty_post_processor.cpp index 6d1882a4e..ccd6a4c5d 100644 --- a/src/smt/difficulty_post_processor.cpp +++ b/src/smt/difficulty_post_processor.cpp @@ -19,10 +19,10 @@ #include "smt/env.h" #include "util/rational.h" -using namespace cvc5::kind; -using namespace cvc5::theory; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::theory; -namespace cvc5 { +namespace cvc5::internal { namespace smt { DifficultyPostprocessCallback::DifficultyPostprocessCallback() @@ -74,4 +74,4 @@ void DifficultyPostprocessCallback::getDifficultyMap( } } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/smt/difficulty_post_processor.h b/src/smt/difficulty_post_processor.h index ef1c9a9ea..dcad8994f 100644 --- a/src/smt/difficulty_post_processor.h +++ b/src/smt/difficulty_post_processor.h @@ -23,7 +23,7 @@ #include "proof/proof_node_updater.h" -namespace cvc5 { +namespace cvc5::internal { namespace smt { /** @@ -83,6 +83,6 @@ class DifficultyPostprocessCallback : public ProofNodeUpdaterCallback }; } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/smt/env.cpp b/src/smt/env.cpp index 29c232011..24905d4b3 100644 --- a/src/smt/env.cpp +++ b/src/smt/env.cpp @@ -32,9 +32,9 @@ #include "util/resource_manager.h" #include "util/statistics_registry.h" -using namespace cvc5::smt; +using namespace cvc5::internal::smt; -namespace cvc5 { +namespace cvc5::internal { Env::Env(NodeManager* nm, const Options* opts) : d_context(new context::Context()), @@ -156,7 +156,7 @@ std::ostream& Env::output(OutputTag tag) const { return *d_options.base.out; } - return cvc5::null_os; + return cvc5::internal::null_os; } bool Env::isVerboseOn(int64_t level) const @@ -170,7 +170,7 @@ std::ostream& Env::verbose(int64_t level) const { return *d_options.base.err; } - return cvc5::null_os; + return cvc5::internal::null_os; } std::ostream& Env::warning() const @@ -256,4 +256,4 @@ theory::TheoryId Env::theoryOf(TNode node) const node, d_options.theory.theoryOfMode, d_uninterpretedSortOwner); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/smt/env.h b/src/smt/env.h index 391c0b6f3..155b16ec2 100644 --- a/src/smt/env.h +++ b/src/smt/env.h @@ -27,7 +27,7 @@ #include "theory/theory_id.h" #include "util/statistics_registry.h" -namespace cvc5 { +namespace cvc5::internal { class NodeManager; class StatisticsRegistry; @@ -157,14 +157,14 @@ class Env /** * Return the output stream for the given output tag (as a string). If the * output tag is enabled, this returns the output stream from the `out` - * option. Otherwise, a null stream (`cvc5::null_os`) is returned. + * option. Otherwise, a null stream (`cvc5::internal::null_os`) is returned. */ std::ostream& output(const std::string& tag) const; /** * Return the output stream for the given output tag. If the output tag is * enabled, this returns the output stream from the `out` option. Otherwise, - * a null stream (`cvc5::null_os`) is returned. The user of this method needs + * a null stream (`cvc5::internal::null_os`) is returned. The user of this method needs * to make sure that a proper S-expression is printed. */ std::ostream& output(OutputTag tag) const; @@ -178,7 +178,7 @@ class Env /** * Return the output stream for the given verbosity level. If the verbosity * level is enabled, this returns the output stream from the `err` option. - * Otherwise, a null stream (`cvc5::null_os`) is returned. + * Otherwise, a null stream (`cvc5::internal::null_os`) is returned. */ std::ostream& verbose(int64_t level) const; @@ -322,7 +322,7 @@ class Env */ Options d_options; /** - * A pointer to the original options object as stored in the api::Solver. + * A pointer to the original options object as stored in the cvc5::Solver. * The referenced objects holds the options as initially parsed before being * changed, e.g., by setDefaults(). */ @@ -333,6 +333,6 @@ class Env theory::TheoryId d_uninterpretedSortOwner; }; /* class Env */ -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__SMT__ENV_H */ diff --git a/src/smt/env_obj.cpp b/src/smt/env_obj.cpp index 8af3bdfd0..258449ad7 100644 --- a/src/smt/env_obj.cpp +++ b/src/smt/env_obj.cpp @@ -20,7 +20,7 @@ #include "smt/env.h" #include "theory/rewriter.h" -namespace cvc5 { +namespace cvc5::internal { EnvObj::EnvObj(Env& env) : d_env(env) {} @@ -86,4 +86,4 @@ std::ostream& EnvObj::verbose(int64_t level) const std::ostream& EnvObj::warning() const { return verbose(0); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/smt/env_obj.h b/src/smt/env_obj.h index 2c88f45b4..5ad20f415 100644 --- a/src/smt/env_obj.h +++ b/src/smt/env_obj.h @@ -22,7 +22,7 @@ #include #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { class Env; class LogicInfo; @@ -110,5 +110,5 @@ class EnvObj Env& d_env; }; -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/smt/expand_definitions.cpp b/src/smt/expand_definitions.cpp index 7bf8ad787..a78819d55 100644 --- a/src/smt/expand_definitions.cpp +++ b/src/smt/expand_definitions.cpp @@ -27,11 +27,11 @@ #include "theory/theory.h" #include "util/resource_manager.h" -using namespace cvc5::preprocessing; -using namespace cvc5::theory; -using namespace cvc5::kind; +using namespace cvc5::internal::preprocessing; +using namespace cvc5::internal::theory; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace smt { ExpandDefs::ExpandDefs(Env& env) : EnvObj(env), d_tpg(nullptr) {} @@ -181,4 +181,4 @@ void ExpandDefs::enableProofs() } } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/smt/expand_definitions.h b/src/smt/expand_definitions.h index 669f56430..c9feb79f9 100644 --- a/src/smt/expand_definitions.h +++ b/src/smt/expand_definitions.h @@ -24,7 +24,7 @@ #include "proof/trust_node.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { class ProofNodeManager; class TConvProofGenerator; @@ -67,6 +67,6 @@ class ExpandDefs : protected EnvObj }; } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/smt/interpolation_solver.cpp b/src/smt/interpolation_solver.cpp index e7589ff89..9e3a4ebc0 100644 --- a/src/smt/interpolation_solver.cpp +++ b/src/smt/interpolation_solver.cpp @@ -27,9 +27,9 @@ #include "theory/smt_engine_subsolver.h" #include "theory/trust_substitutions.h" -using namespace cvc5::theory; +using namespace cvc5::internal::theory; -namespace cvc5 { +namespace cvc5::internal { namespace smt { InterpolationSolver::InterpolationSolver(Env& env) : EnvObj(env) {} @@ -142,4 +142,4 @@ void InterpolationSolver::checkInterpol(Node interpol, } } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/smt/interpolation_solver.h b/src/smt/interpolation_solver.h index f41cea180..38e254eeb 100644 --- a/src/smt/interpolation_solver.h +++ b/src/smt/interpolation_solver.h @@ -22,7 +22,7 @@ #include "expr/type_node.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -96,6 +96,6 @@ class InterpolationSolver : protected EnvObj }; } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__SMT__INTERPOLATION_SOLVER_H */ diff --git a/src/smt/listeners.cpp b/src/smt/listeners.cpp index 628457a31..24ad6f187 100644 --- a/src/smt/listeners.cpp +++ b/src/smt/listeners.cpp @@ -18,7 +18,7 @@ #include "smt/solver_engine.h" #include "smt/solver_engine_scope.h" -namespace cvc5 { +namespace cvc5::internal { namespace smt { ResourceOutListener::ResourceOutListener(SolverEngine& slv) : d_slv(slv) {} @@ -31,4 +31,4 @@ void ResourceOutListener::notify() } } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/smt/listeners.h b/src/smt/listeners.h index a20051bd7..5c27b4ae7 100644 --- a/src/smt/listeners.h +++ b/src/smt/listeners.h @@ -23,7 +23,7 @@ #include "base/listener.h" #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { class OutputManager; class SolverEngine; @@ -44,6 +44,6 @@ class ResourceOutListener : public Listener }; } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/smt/logic_exception.h b/src/smt/logic_exception.h index 6e2f3f606..7441c0eb1 100644 --- a/src/smt/logic_exception.h +++ b/src/smt/logic_exception.h @@ -22,9 +22,9 @@ #include "base/exception.h" -namespace cvc5 { +namespace cvc5::internal { -class LogicException : public cvc5::Exception +class LogicException : public cvc5::internal::Exception { public: LogicException() : @@ -41,6 +41,6 @@ class LogicException : public cvc5::Exception } }; /* class LogicException */ -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__SMT__LOGIC_EXCEPTION_H */ diff --git a/src/smt/model.cpp b/src/smt/model.cpp index 69dddded8..c31fe19da 100644 --- a/src/smt/model.cpp +++ b/src/smt/model.cpp @@ -19,7 +19,7 @@ #include "options/io_utils.h" #include "printer/printer.h" -namespace cvc5 { +namespace cvc5::internal { namespace smt { Model::Model(bool isKnownSat, const std::string& inputName) @@ -90,4 +90,4 @@ const std::vector& Model::getDeclaredTerms() const } } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/smt/model.h b/src/smt/model.h index 5275ea680..67379d2b5 100644 --- a/src/smt/model.h +++ b/src/smt/model.h @@ -23,7 +23,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace smt { class Model; @@ -113,6 +113,6 @@ class Model { }; } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__SMT__MODEL_H */ diff --git a/src/smt/model_blocker.cpp b/src/smt/model_blocker.cpp index d5f70315e..4cd3f20a2 100644 --- a/src/smt/model_blocker.cpp +++ b/src/smt/model_blocker.cpp @@ -21,9 +21,9 @@ #include "theory/rewriter.h" #include "theory/theory_model.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { ModelBlocker::ModelBlocker(Env& e) : EnvObj(e) {} @@ -302,4 +302,4 @@ Node ModelBlocker::getModelBlocker(const std::vector& assertions, return blocker; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/smt/model_blocker.h b/src/smt/model_blocker.h index 5e41de6a3..b6b1f8d0f 100644 --- a/src/smt/model_blocker.h +++ b/src/smt/model_blocker.h @@ -24,7 +24,7 @@ #include "options/smt_options.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { class TheoryModel; @@ -72,6 +72,6 @@ class ModelBlocker : protected EnvObj const std::vector& exprToBlock = std::vector()); }; /* class TheoryModelCoreBuilder */ -} // namespace cvc5 +} // namespace cvc5::internal #endif /* __CVC5__THEORY__MODEL_BLOCKER_H */ diff --git a/src/smt/model_core_builder.cpp b/src/smt/model_core_builder.cpp index 96d675d18..afc0e6336 100644 --- a/src/smt/model_core_builder.cpp +++ b/src/smt/model_core_builder.cpp @@ -17,9 +17,9 @@ #include "theory/subs_minimize.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { ModelCoreBuilder::ModelCoreBuilder(Env& env) : EnvObj(env) {} @@ -111,4 +111,4 @@ bool ModelCoreBuilder::setModelCore(const std::vector& assertions, return false; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/smt/model_core_builder.h b/src/smt/model_core_builder.h index 8a0ca5c8a..e90e18005 100644 --- a/src/smt/model_core_builder.h +++ b/src/smt/model_core_builder.h @@ -25,7 +25,7 @@ #include "smt/env_obj.h" #include "theory/theory_model.h" -namespace cvc5 { +namespace cvc5::internal { /** * A utility for building model cores. @@ -62,6 +62,6 @@ class ModelCoreBuilder : protected EnvObj options::ModelCoresMode mode); }; /* class TheoryModelCoreBuilder */ -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__MODEL_CORE_BUILDER_H */ diff --git a/src/smt/optimization_solver.cpp b/src/smt/optimization_solver.cpp index 382c0e9b8..405ff6dc4 100644 --- a/src/smt/optimization_solver.cpp +++ b/src/smt/optimization_solver.cpp @@ -27,9 +27,9 @@ #include "smt/solver_engine.h" #include "theory/smt_engine_subsolver.h" -using namespace cvc5::theory; -using namespace cvc5::omt; -namespace cvc5 { +using namespace cvc5::internal::theory; +using namespace cvc5::internal::omt; +namespace cvc5::internal { namespace smt { std::ostream& operator<<(std::ostream& out, const OptimizationResult& result) @@ -378,4 +378,4 @@ Result OptimizationSolver::optimizeParetoNaiveGIA() } } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/smt/optimization_solver.h b/src/smt/optimization_solver.h index f919bad19..39480919e 100644 --- a/src/smt/optimization_solver.h +++ b/src/smt/optimization_solver.h @@ -24,7 +24,7 @@ #include "expr/type_node.h" #include "util/result.h" -namespace cvc5 { +namespace cvc5::internal { class Env; class SolverEngine; @@ -323,6 +323,6 @@ class OptimizationSolver }; } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__SMT__OPTIMIZATION_SOLVER_H */ diff --git a/src/smt/preprocess_proof_generator.cpp b/src/smt/preprocess_proof_generator.cpp index 19a776587..4086025de 100644 --- a/src/smt/preprocess_proof_generator.cpp +++ b/src/smt/preprocess_proof_generator.cpp @@ -26,7 +26,7 @@ #include "smt/env.h" #include "theory/quantifiers/extended_rewrite.h" -namespace cvc5 { +namespace cvc5::internal { namespace smt { PreprocessProofGenerator::PreprocessProofGenerator( @@ -265,4 +265,4 @@ void PreprocessProofGenerator::checkEagerPedantic(PfRule r) } } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/smt/preprocess_proof_generator.h b/src/smt/preprocess_proof_generator.h index 928ea7bf3..0bc275b56 100644 --- a/src/smt/preprocess_proof_generator.h +++ b/src/smt/preprocess_proof_generator.h @@ -26,7 +26,7 @@ #include "proof/trust_node.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { class LazyCDProof; class ProofNodeManager; @@ -141,6 +141,6 @@ class PreprocessProofGenerator : protected EnvObj, public ProofGenerator }; } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/smt/preprocessor.cpp b/src/smt/preprocessor.cpp index 249037a18..5a81df8a8 100644 --- a/src/smt/preprocessor.cpp +++ b/src/smt/preprocessor.cpp @@ -28,10 +28,10 @@ #include "theory/rewriter.h" using namespace std; -using namespace cvc5::theory; -using namespace cvc5::kind; +using namespace cvc5::internal::theory; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace smt { Preprocessor::Preprocessor(Env& env, @@ -159,4 +159,4 @@ void Preprocessor::enableProofs(PreprocessProofGenerator* pppg) } } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/smt/preprocessor.h b/src/smt/preprocessor.h index 92be021d5..c41a848cb 100644 --- a/src/smt/preprocessor.h +++ b/src/smt/preprocessor.h @@ -25,7 +25,7 @@ #include "smt/process_assertions.h" #include "theory/booleans/circuit_propagator.h" -namespace cvc5 { +namespace cvc5::internal { class TheoryEngine; @@ -132,6 +132,6 @@ class Preprocessor : protected EnvObj }; } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/smt/print_benchmark.cpp b/src/smt/print_benchmark.cpp index e16b66139..fa9a50a78 100644 --- a/src/smt/print_benchmark.cpp +++ b/src/smt/print_benchmark.cpp @@ -19,9 +19,9 @@ #include "expr/node_algorithm.h" #include "printer/printer.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace smt { void PrintBenchmark::printAssertions(std::ostream& out, @@ -281,4 +281,4 @@ void PrintBenchmark::printBenchmark(std::ostream& out, } } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/smt/print_benchmark.h b/src/smt/print_benchmark.h index 387b3cccc..4a1310e1a 100644 --- a/src/smt/print_benchmark.h +++ b/src/smt/print_benchmark.h @@ -23,7 +23,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { class Printer; @@ -132,6 +132,6 @@ class PrintBenchmark }; } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__SMT__PRINT_BENCHMARK_H */ diff --git a/src/smt/process_assertions.cpp b/src/smt/process_assertions.cpp index d0d2cf6e2..5fa63d945 100644 --- a/src/smt/process_assertions.cpp +++ b/src/smt/process_assertions.cpp @@ -37,11 +37,11 @@ #include "theory/theory_engine.h" using namespace std; -using namespace cvc5::preprocessing; -using namespace cvc5::theory; -using namespace cvc5::kind; +using namespace cvc5::internal::preprocessing; +using namespace cvc5::internal::theory; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace smt { /** Useful for counting the number of recursive calls. */ @@ -505,4 +505,4 @@ PreprocessingPassResult ProcessAssertions::applyPass(const std::string& pname, } } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/smt/process_assertions.h b/src/smt/process_assertions.h index 4195e001e..8adfa6be8 100644 --- a/src/smt/process_assertions.h +++ b/src/smt/process_assertions.h @@ -26,7 +26,7 @@ #include "smt/env_obj.h" #include "util/resource_manager.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { class AssertionPipeline; @@ -121,6 +121,6 @@ class ProcessAssertions : protected EnvObj }; } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/smt/proof_final_callback.cpp b/src/smt/proof_final_callback.cpp index 12c6d9384..2b9635b7e 100644 --- a/src/smt/proof_final_callback.cpp +++ b/src/smt/proof_final_callback.cpp @@ -22,10 +22,10 @@ #include "theory/builtin/proof_checker.h" #include "theory/theory_id.h" -using namespace cvc5::kind; -using namespace cvc5::theory; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::theory; -namespace cvc5 { +namespace cvc5::internal { namespace smt { ProofFinalCallback::ProofFinalCallback(ProofNodeManager* pnm) @@ -146,4 +146,4 @@ bool ProofFinalCallback::wasPedanticFailure(std::ostream& out) const } } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/smt/proof_final_callback.h b/src/smt/proof_final_callback.h index a1e6b1f69..4bebe15c0 100644 --- a/src/smt/proof_final_callback.h +++ b/src/smt/proof_final_callback.h @@ -26,7 +26,7 @@ #include "theory/inference_id.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { namespace smt { /** Final callback class, for stats and pedantic checking */ @@ -74,6 +74,6 @@ class ProofFinalCallback : public ProofNodeUpdaterCallback }; } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/smt/proof_manager.cpp b/src/smt/proof_manager.cpp index a4278b55a..6613469af 100644 --- a/src/smt/proof_manager.cpp +++ b/src/smt/proof_manager.cpp @@ -34,7 +34,7 @@ #include "smt/preprocess_proof_generator.h" #include "smt/proof_post_processor.h" -namespace cvc5 { +namespace cvc5::internal { namespace smt { PfManager::PfManager(Env& env) @@ -316,4 +316,4 @@ void PfManager::getAssertions(Assertions& as, } } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/smt/proof_manager.h b/src/smt/proof_manager.h index 266644668..d840a72e3 100644 --- a/src/smt/proof_manager.h +++ b/src/smt/proof_manager.h @@ -22,7 +22,7 @@ #include "expr/node.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { class ProofChecker; class ProofNode; @@ -160,6 +160,6 @@ class PfManager : protected EnvObj }; /* class SolverEngine */ } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__SMT__PROOF_MANAGER_H */ diff --git a/src/smt/proof_post_processor.cpp b/src/smt/proof_post_processor.cpp index 3c62d86c4..4de8a1923 100644 --- a/src/smt/proof_post_processor.cpp +++ b/src/smt/proof_post_processor.cpp @@ -30,10 +30,10 @@ #include "theory/theory.h" #include "util/rational.h" -using namespace cvc5::kind; -using namespace cvc5::theory; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::theory; -namespace cvc5 { +namespace cvc5::internal { namespace smt { ProofPostprocessCallback::ProofPostprocessCallback(Env& env, @@ -1275,4 +1275,4 @@ void ProofPostproccess::setEliminateRule(PfRule rule) } } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/smt/proof_post_processor.h b/src/smt/proof_post_processor.h index e81e51588..dc7c74752 100644 --- a/src/smt/proof_post_processor.h +++ b/src/smt/proof_post_processor.h @@ -29,7 +29,7 @@ #include "theory/inference_id.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { namespace rewriter { class RewriteDb; @@ -283,6 +283,6 @@ class ProofPostproccess : protected EnvObj }; } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/smt/quant_elim_solver.cpp b/src/smt/quant_elim_solver.cpp index 8d198d69b..22c339207 100644 --- a/src/smt/quant_elim_solver.cpp +++ b/src/smt/quant_elim_solver.cpp @@ -25,10 +25,10 @@ #include "util/string.h" #include "expr/subtype_elim_node_converter.h" -using namespace cvc5::theory; -using namespace cvc5::kind; +using namespace cvc5::internal::theory; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace smt { QuantElimSolver::QuantElimSolver(Env& env, SmtSolver& sms) @@ -142,4 +142,4 @@ Node QuantElimSolver::getQuantifierElimination(Assertions& as, } } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/smt/quant_elim_solver.h b/src/smt/quant_elim_solver.h index 3c9c5989e..a44adcce4 100644 --- a/src/smt/quant_elim_solver.h +++ b/src/smt/quant_elim_solver.h @@ -22,7 +22,7 @@ #include "smt/assertions.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { namespace smt { class SmtSolver; @@ -101,6 +101,6 @@ class QuantElimSolver : protected EnvObj }; } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__SMT__QUANT_ELIM_SOLVER_H */ diff --git a/src/smt/set_defaults.cpp b/src/smt/set_defaults.cpp index 9f5e7cbe2..32fafc75b 100644 --- a/src/smt/set_defaults.cpp +++ b/src/smt/set_defaults.cpp @@ -40,9 +40,9 @@ #include "smt/logic_exception.h" #include "theory/theory.h" -using namespace cvc5::theory; +using namespace cvc5::internal::theory; -namespace cvc5 { +namespace cvc5::internal { namespace smt { SetDefaults::SetDefaults(Env& env, bool isInternalSubsolver) @@ -1763,4 +1763,4 @@ void SetDefaults::notifyModifyOption(const std::string& x, } } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/smt/set_defaults.h b/src/smt/set_defaults.h index 2603214fd..aac2aa680 100644 --- a/src/smt/set_defaults.h +++ b/src/smt/set_defaults.h @@ -20,7 +20,7 @@ #include "smt/env_obj.h" #include "theory/logic_info.h" -namespace cvc5 { +namespace cvc5::internal { namespace smt { /** @@ -156,6 +156,6 @@ class SetDefaults : protected EnvObj }; } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__SMT__SET_DEFAULTS_H */ diff --git a/src/smt/smt_mode.cpp b/src/smt/smt_mode.cpp index b971e14ac..0d55d7408 100644 --- a/src/smt/smt_mode.cpp +++ b/src/smt/smt_mode.cpp @@ -17,7 +17,7 @@ #include -namespace cvc5 { +namespace cvc5::internal { std::ostream& operator<<(std::ostream& out, SmtMode m) { @@ -36,4 +36,4 @@ std::ostream& operator<<(std::ostream& out, SmtMode m) return out; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/smt/smt_mode.h b/src/smt/smt_mode.h index 8937c798c..a2c814312 100644 --- a/src/smt/smt_mode.h +++ b/src/smt/smt_mode.h @@ -20,7 +20,7 @@ #include -namespace cvc5 { +namespace cvc5::internal { /** * The mode of the solver, which is an extension of Figure 4.1 on @@ -55,6 +55,6 @@ enum class SmtMode */ std::ostream& operator<<(std::ostream& out, SmtMode m); -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/smt/smt_solver.cpp b/src/smt/smt_solver.cpp index f65e07d9e..894f3dd21 100644 --- a/src/smt/smt_solver.cpp +++ b/src/smt/smt_solver.cpp @@ -31,7 +31,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace smt { SmtSolver::SmtSolver(Env& env, @@ -265,4 +265,4 @@ theory::QuantifiersEngine* SmtSolver::getQuantifiersEngine() Preprocessor* SmtSolver::getPreprocessor() { return &d_pp; } } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/smt/smt_solver.h b/src/smt/smt_solver.h index 10625f4bd..9e071be8f 100644 --- a/src/smt/smt_solver.h +++ b/src/smt/smt_solver.h @@ -25,7 +25,7 @@ #include "theory/logic_info.h" #include "util/result.h" -namespace cvc5 { +namespace cvc5::internal { class SolverEngine; class Env; @@ -129,6 +129,6 @@ class SmtSolver }; } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__SMT__SMT_SOLVER_H */ diff --git a/src/smt/smt_statistics_registry.cpp b/src/smt/smt_statistics_registry.cpp index 74f60ba75..b66f869d9 100644 --- a/src/smt/smt_statistics_registry.cpp +++ b/src/smt/smt_statistics_registry.cpp @@ -18,11 +18,11 @@ #include "smt/solver_engine_scope.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { StatisticsRegistry& smtStatisticsRegistry() { return smt::SolverEngineScope::currentStatisticsRegistry(); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/smt/smt_statistics_registry.h b/src/smt/smt_statistics_registry.h index d2b598209..c5b70762c 100644 --- a/src/smt/smt_statistics_registry.h +++ b/src/smt/smt_statistics_registry.h @@ -20,7 +20,7 @@ #include "util/statistics_registry.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { /** * This returns the StatisticsRegistry attached to the currently in scope @@ -29,4 +29,4 @@ namespace cvc5 { */ StatisticsRegistry& smtStatisticsRegistry(); -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/smt/solver_engine.cpp b/src/smt/solver_engine.cpp index f1f98c741..247950476 100644 --- a/src/smt/solver_engine.cpp +++ b/src/smt/solver_engine.cpp @@ -74,13 +74,13 @@ #include "base/configuration_private.h" using namespace std; -using namespace cvc5::smt; -using namespace cvc5::preprocessing; -using namespace cvc5::prop; -using namespace cvc5::context; -using namespace cvc5::theory; +using namespace cvc5::internal::smt; +using namespace cvc5::internal::preprocessing; +using namespace cvc5::internal::prop; +using namespace cvc5::internal::context; +using namespace cvc5::internal::theory; -namespace cvc5 { +namespace cvc5::internal { SolverEngine::SolverEngine(NodeManager* nm, const Options* optr) : d_env(new Env(nm, optr)), @@ -1884,4 +1884,4 @@ const Printer& SolverEngine::getPrinter() const { return d_env->getPrinter(); } theory::Rewriter* SolverEngine::getRewriter() { return d_env->getRewriter(); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/smt/solver_engine.h b/src/smt/solver_engine.h index 6837c97a7..5bdc3201b 100644 --- a/src/smt/solver_engine.h +++ b/src/smt/solver_engine.h @@ -33,6 +33,10 @@ namespace cvc5 { +class Solver; + +namespace internal { + template class NodeTemplate; typedef NodeTemplate Node; @@ -50,10 +54,6 @@ struct InstantiationList; /* -------------------------------------------------------------------------- */ -namespace api { -class Solver; -} // namespace api - /* -------------------------------------------------------------------------- */ namespace context { @@ -109,9 +109,9 @@ class QuantifiersEngine; class CVC5_EXPORT SolverEngine { - friend class ::cvc5::api::Solver; - friend class ::cvc5::smt::SolverEngineState; - friend class ::cvc5::smt::SolverEngineScope; + friend class cvc5::Solver; + friend class smt::SolverEngineState; + friend class smt::SolverEngineScope; /* ....................................................................... */ public: @@ -877,7 +877,7 @@ class CVC5_EXPORT SolverEngine SolverEngine& operator=(const SolverEngine&) = delete; /** Set solver instance that owns this SolverEngine. */ - void setSolver(api::Solver* solver) { d_solver = solver; } + void setSolver(cvc5::Solver* solver) { d_solver = solver; } /** Get a pointer to the (new) PfManager owned by this SolverEngine. */ smt::PfManager* getPfManager() { return d_pfManager.get(); }; @@ -1048,7 +1048,7 @@ class CVC5_EXPORT SolverEngine /* Members -------------------------------------------------------------- */ /** Solver instance that owns this SolverEngine instance. */ - api::Solver* d_solver = nullptr; + cvc5::Solver* d_solver = nullptr; /** * The environment object, which contains all utilities that are globally @@ -1119,6 +1119,7 @@ class CVC5_EXPORT SolverEngine /* -------------------------------------------------------------------------- */ +} // namespace internal } // namespace cvc5 #endif /* CVC5__SMT_ENGINE_H */ diff --git a/src/smt/solver_engine_scope.cpp b/src/smt/solver_engine_scope.cpp index 1709e7ac7..bcd5f4404 100644 --- a/src/smt/solver_engine_scope.cpp +++ b/src/smt/solver_engine_scope.cpp @@ -23,7 +23,7 @@ #include "base/output.h" #include "smt/solver_engine.h" -namespace cvc5 { +namespace cvc5::internal { namespace smt { thread_local SolverEngine* s_slvEngine_current = nullptr; @@ -65,4 +65,4 @@ StatisticsRegistry& SolverEngineScope::currentStatisticsRegistry() } } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/smt/solver_engine_scope.h b/src/smt/solver_engine_scope.h index 309321dc3..39f9faf8c 100644 --- a/src/smt/solver_engine_scope.h +++ b/src/smt/solver_engine_scope.h @@ -24,7 +24,7 @@ #include "expr/node_manager.h" #include "options/options.h" -namespace cvc5 { +namespace cvc5::internal { class SolverEngine; class StatisticsRegistry; @@ -56,6 +56,6 @@ class SolverEngineScope }; /* class SolverEngineScope */ } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__SMT__SMT_ENGINE_SCOPE_H */ diff --git a/src/smt/solver_engine_state.cpp b/src/smt/solver_engine_state.cpp index 68a40b009..306b069c2 100644 --- a/src/smt/solver_engine_state.cpp +++ b/src/smt/solver_engine_state.cpp @@ -23,7 +23,7 @@ #include "smt/env.h" #include "smt/solver_engine.h" -namespace cvc5 { +namespace cvc5::internal { namespace smt { SolverEngineState::SolverEngineState(Env& env, SolverEngine& slv) @@ -322,4 +322,4 @@ void SolverEngineState::doPendingPops() } } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/smt/solver_engine_state.h b/src/smt/solver_engine_state.h index fe638181e..312aa484f 100644 --- a/src/smt/solver_engine_state.h +++ b/src/smt/solver_engine_state.h @@ -26,7 +26,7 @@ #include "util/result.h" #include "util/synth_result.h" -namespace cvc5 { +namespace cvc5::internal { class SolverEngine; @@ -250,6 +250,6 @@ class SolverEngineState : protected EnvObj }; } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/smt/solver_engine_stats.cpp b/src/smt/solver_engine_stats.cpp index 645103327..089919e75 100644 --- a/src/smt/solver_engine_stats.cpp +++ b/src/smt/solver_engine_stats.cpp @@ -17,7 +17,7 @@ #include "smt/smt_statistics_registry.h" -namespace cvc5 { +namespace cvc5::internal { namespace smt { SolverEngineStatistics::SolverEngineStatistics(const std::string& name) @@ -44,4 +44,4 @@ SolverEngineStatistics::SolverEngineStatistics(const std::string& name) } } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/smt/solver_engine_stats.h b/src/smt/solver_engine_stats.h index 7701f7c07..e9a7f6d43 100644 --- a/src/smt/solver_engine_stats.h +++ b/src/smt/solver_engine_stats.h @@ -20,7 +20,7 @@ #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { namespace smt { struct SolverEngineStatistics @@ -50,6 +50,6 @@ struct SolverEngineStatistics }; /* struct SolverEngineStatistics */ } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__SMT__SMT_ENGINE_STATS_H */ diff --git a/src/smt/sygus_solver.cpp b/src/smt/sygus_solver.cpp index f1762fb58..a96f2fe25 100644 --- a/src/smt/sygus_solver.cpp +++ b/src/smt/sygus_solver.cpp @@ -35,10 +35,10 @@ #include "theory/rewriter.h" #include "theory/smt_engine_subsolver.h" -using namespace cvc5::theory; -using namespace cvc5::kind; +using namespace cvc5::internal::theory; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace smt { SygusSolver::SygusSolver(Env& env, SmtSolver& sms) @@ -512,4 +512,4 @@ std::vector SygusSolver::listToVector(const NodeList& list) } } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/smt/sygus_solver.h b/src/smt/sygus_solver.h index 6530f532b..b0b2361ff 100644 --- a/src/smt/sygus_solver.h +++ b/src/smt/sygus_solver.h @@ -26,7 +26,7 @@ #include "smt/env_obj.h" #include "util/synth_result.h" -namespace cvc5 { +namespace cvc5::internal { class SolverEngine; @@ -246,6 +246,6 @@ class SygusSolver : protected EnvObj }; } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__SMT__SYGUS_SOLVER_H */ diff --git a/src/smt/term_formula_removal.cpp b/src/smt/term_formula_removal.cpp index e15afaafa..9fec26f62 100644 --- a/src/smt/term_formula_removal.cpp +++ b/src/smt/term_formula_removal.cpp @@ -28,7 +28,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { RemoveTermFormulas::RemoveTermFormulas(Env& env) : EnvObj(env), @@ -516,4 +516,4 @@ ProofGenerator* RemoveTermFormulas::getTConvProofGenerator() bool RemoveTermFormulas::isProofEnabled() const { return d_tpg != nullptr; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/smt/term_formula_removal.h b/src/smt/term_formula_removal.h index 31f9bfc3d..554dec21c 100644 --- a/src/smt/term_formula_removal.h +++ b/src/smt/term_formula_removal.h @@ -29,7 +29,7 @@ #include "theory/skolem_lemma.h" #include "util/hash.h" -namespace cvc5 { +namespace cvc5::internal { class LazyCDProof; class ProofNodeManager; @@ -227,4 +227,4 @@ class RemoveTermFormulas : protected EnvObj bool isProofEnabled() const; }; /* class RemoveTTE */ -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/smt/unsat_core_manager.cpp b/src/smt/unsat_core_manager.cpp index 75cf725ee..a10955528 100644 --- a/src/smt/unsat_core_manager.cpp +++ b/src/smt/unsat_core_manager.cpp @@ -18,7 +18,7 @@ #include "proof/proof_node_algorithm.h" #include "smt/assertions.h" -namespace cvc5 { +namespace cvc5::internal { namespace smt { void UnsatCoreManager::getUnsatCore(std::shared_ptr pfn, @@ -111,4 +111,4 @@ void UnsatCoreManager::getRelevantInstantiations( } } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/smt/unsat_core_manager.h b/src/smt/unsat_core_manager.h index 3b0c00e31..f31f521d0 100644 --- a/src/smt/unsat_core_manager.h +++ b/src/smt/unsat_core_manager.h @@ -23,7 +23,7 @@ #include "proof/proof_node.h" #include "theory/quantifiers/instantiation_list.h" -namespace cvc5 { +namespace cvc5::internal { namespace smt { @@ -69,6 +69,6 @@ class UnsatCoreManager }; /* class UnsatCoreManager */ } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__SMT__UNSAT_CORE_MANAGER_H */ diff --git a/src/smt/witness_form.cpp b/src/smt/witness_form.cpp index 07700a9e7..0afb92ca1 100644 --- a/src/smt/witness_form.cpp +++ b/src/smt/witness_form.cpp @@ -19,7 +19,7 @@ #include "smt/env.h" #include "theory/rewriter.h" -namespace cvc5 { +namespace cvc5::internal { namespace smt { WitnessFormGenerator::WitnessFormGenerator(Env& env) @@ -158,4 +158,4 @@ ProofGenerator* WitnessFormGenerator::convertExistsInternal(Node exists) } } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/smt/witness_form.h b/src/smt/witness_form.h index b2ee28c48..0a63775ec 100644 --- a/src/smt/witness_form.h +++ b/src/smt/witness_form.h @@ -24,7 +24,7 @@ #include "proof/proof.h" #include "proof/proof_generator.h" -namespace cvc5 { +namespace cvc5::internal { class Env; @@ -107,6 +107,6 @@ class WitnessFormGenerator : public ProofGenerator }; } // namespace smt -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/smt_util/boolean_simplification.cpp b/src/smt_util/boolean_simplification.cpp index a9568f991..e1900f00c 100644 --- a/src/smt_util/boolean_simplification.cpp +++ b/src/smt_util/boolean_simplification.cpp @@ -15,7 +15,7 @@ #include "smt_util/boolean_simplification.h" -namespace cvc5 { +namespace cvc5::internal { bool BooleanSimplification::push_back_associative_commute_recursive( Node n, std::vector& buffer, Kind k, Kind notK, bool negateNode) @@ -60,4 +60,4 @@ bool BooleanSimplification::push_back_associative_commute_recursive( return true; }/* BooleanSimplification::push_back_associative_commute_recursive() */ -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/smt_util/boolean_simplification.h b/src/smt_util/boolean_simplification.h index 39324844e..8f54b4f17 100644 --- a/src/smt_util/boolean_simplification.h +++ b/src/smt_util/boolean_simplification.h @@ -24,7 +24,7 @@ #include "base/check.h" #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { /** * A class to contain a number of useful functions for simple @@ -221,6 +221,6 @@ class BooleanSimplification { };/* class BooleanSimplification */ -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__BOOLEAN_SIMPLIFICATION_H */ diff --git a/src/theory/arith/approx_simplex.cpp b/src/theory/arith/approx_simplex.cpp index c43a6494d..227b89160 100644 --- a/src/theory/arith/approx_simplex.cpp +++ b/src/theory/arith/approx_simplex.cpp @@ -38,7 +38,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -355,7 +355,7 @@ public: } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal /* Begin the declaration of GLPK specific code. */ #ifdef CVC5_USE_GLPK @@ -363,7 +363,7 @@ extern "C" { #include }/* extern "C" */ -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -517,12 +517,12 @@ private: } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /*#ifdef CVC5_USE_GLPK */ /* End the declaration of GLPK specific code. */ /* Begin GPLK/NOGLPK Glue code. */ -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { ApproximateSimplex* ApproximateSimplex::mkApproximateSimplexSolver(const ArithVariables& vars, TreeLog& l, ApproximateStatistics& s){ @@ -541,12 +541,12 @@ bool ApproximateSimplex::enabled() { } } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal /* End GPLK/NOGLPK Glue code. */ /* Begin GPLK implementation. */ #ifdef CVC5_USE_GLPK -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -3078,6 +3078,6 @@ void ApproxGLPK::tryCut(int nid, CutInfo& cut) } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /*#ifdef CVC5_USE_GLPK */ /* End GPLK implementation. */ diff --git a/src/theory/arith/approx_simplex.h b/src/theory/arith/approx_simplex.h index f2a35f823..96b59b4b6 100644 --- a/src/theory/arith/approx_simplex.h +++ b/src/theory/arith/approx_simplex.h @@ -29,7 +29,7 @@ #include "util/rational.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -165,4 +165,4 @@ class ApproximateSimplex{ } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/arith_evaluator.cpp b/src/theory/arith/arith_evaluator.cpp index 155a6cdce..b07a8abd4 100644 --- a/src/theory/arith/arith_evaluator.cpp +++ b/src/theory/arith/arith_evaluator.cpp @@ -5,7 +5,7 @@ #include "theory/theory.h" #include "util/real_algebraic_number.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -46,4 +46,4 @@ std::optional isExpressionZero(Env& env, } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/arith_evaluator.h b/src/theory/arith/arith_evaluator.h index efc143df7..1d2e97cde 100644 --- a/src/theory/arith/arith_evaluator.h +++ b/src/theory/arith/arith_evaluator.h @@ -9,7 +9,7 @@ #include "expr/node.h" #include "smt/env.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -27,6 +27,6 @@ std::optional isExpressionZero(Env& env, const std::map& model); } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/arith/arith_ite_utils.cpp b/src/theory/arith/arith_ite_utils.cpp index c43f16bd0..efc251914 100644 --- a/src/theory/arith/arith_ite_utils.cpp +++ b/src/theory/arith/arith_ite_utils.cpp @@ -33,7 +33,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -50,7 +50,7 @@ Node ArithIteUtils::applyReduceVariablesInItes(Node n){ } Node ArithIteUtils::reduceVariablesInItes(Node n){ - using namespace cvc5::kind; + using namespace cvc5::internal::kind; if(d_reduceVar.find(n) != d_reduceVar.end()){ Node res = d_reduceVar[n]; return res.isNull() ? n : res; @@ -472,4 +472,4 @@ bool ArithIteUtils::solveBinOr(TNode binor){ } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/arith_ite_utils.h b/src/theory/arith/arith_ite_utils.h index 6cb7a0855..c82477987 100644 --- a/src/theory/arith/arith_ite_utils.h +++ b/src/theory/arith/arith_ite_utils.h @@ -31,7 +31,7 @@ #include "smt/env_obj.h" #include "util/integer.h" -namespace cvc5 { +namespace cvc5::internal { namespace preprocessing { namespace util { class ContainsTermITEVisitor; @@ -113,6 +113,6 @@ private: } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__ARITH__ARITH_ITE_UTILS_H */ diff --git a/src/theory/arith/arith_msum.cpp b/src/theory/arith/arith_msum.cpp index db08f3af0..8262bde24 100644 --- a/src/theory/arith/arith_msum.cpp +++ b/src/theory/arith/arith_msum.cpp @@ -18,9 +18,9 @@ #include "theory/rewriter.h" #include "util/rational.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { bool ArithMSum::getMonomial(Node n, Node& c, Node& v) @@ -316,4 +316,4 @@ void ArithMSum::debugPrintMonomialSum(std::map& msum, const char* c) } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/arith_msum.h b/src/theory/arith/arith_msum.h index ae57ee1cb..20a36c925 100644 --- a/src/theory/arith/arith_msum.h +++ b/src/theory/arith/arith_msum.h @@ -22,7 +22,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { /** Arithmetic utilities regarding monomial sums. @@ -183,6 +183,6 @@ class ArithMSum }; } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__ARITH__MSUM_H */ diff --git a/src/theory/arith/arith_poly_norm.cpp b/src/theory/arith/arith_poly_norm.cpp index c4c8f765e..202a028f4 100644 --- a/src/theory/arith/arith_poly_norm.cpp +++ b/src/theory/arith/arith_poly_norm.cpp @@ -15,9 +15,9 @@ #include "theory/arith/arith_poly_norm.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -265,4 +265,4 @@ bool PolyNorm::isArithPolyNorm(TNode a, TNode b) } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/arith_poly_norm.h b/src/theory/arith/arith_poly_norm.h index 58f5f6c7a..a0fef0c3a 100644 --- a/src/theory/arith/arith_poly_norm.h +++ b/src/theory/arith/arith_poly_norm.h @@ -23,7 +23,7 @@ #include "expr/node.h" #include "util/rational.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -78,6 +78,6 @@ class PolyNorm } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__ARITH__POLY_NORM_H */ diff --git a/src/theory/arith/arith_preprocess.cpp b/src/theory/arith/arith_preprocess.cpp index ba2de9fdf..969c09dd2 100644 --- a/src/theory/arith/arith_preprocess.cpp +++ b/src/theory/arith/arith_preprocess.cpp @@ -19,7 +19,7 @@ #include "theory/arith/inference_manager.h" #include "theory/skolem_lemma.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -80,4 +80,4 @@ bool ArithPreprocess::isReduced(TNode atom) const } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/arith_preprocess.h b/src/theory/arith/arith_preprocess.h index 939306a6e..b0607cdf2 100644 --- a/src/theory/arith/arith_preprocess.h +++ b/src/theory/arith/arith_preprocess.h @@ -23,7 +23,7 @@ #include "theory/arith/operator_elim.h" #include "theory/logic_info.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { class SkolemLemma; @@ -90,6 +90,6 @@ class ArithPreprocess : protected EnvObj } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/arith/arith_rewriter.cpp b/src/theory/arith/arith_rewriter.cpp index 8d634c77a..932a389ea 100644 --- a/src/theory/arith/arith_rewriter.cpp +++ b/src/theory/arith/arith_rewriter.cpp @@ -40,9 +40,9 @@ #include "util/iand.h" #include "util/real_algebraic_number.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -305,7 +305,7 @@ RewriteResponse ArithRewriter::postRewriteTerm(TNode t){ NodeManager::currentNM()->mkConstRealOrInt( t.getType(), Rational(1))); }else if(exp.sgn() > 0 && exp.isIntegral()){ - cvc5::Rational r(expr::NodeValue::MAX_CHILDREN); + cvc5::internal::Rational r(expr::NodeValue::MAX_CHILDREN); if (exp <= r) { unsigned num = exp.getNumerator().toUnsignedInt(); @@ -1080,4 +1080,4 @@ RewriteResponse ArithRewriter::returnRewrite(TNode t, Node ret, Rewrite r) } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/arith_rewriter.h b/src/theory/arith/arith_rewriter.h index 6f2e06ef1..b7fc7947d 100644 --- a/src/theory/arith/arith_rewriter.h +++ b/src/theory/arith/arith_rewriter.h @@ -24,7 +24,7 @@ #include "theory/arith/rewrites.h" #include "theory/theory_rewriter.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -100,6 +100,6 @@ class ArithRewriter : public TheoryRewriter } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__ARITH__ARITH_REWRITER_H */ diff --git a/src/theory/arith/arith_state.cpp b/src/theory/arith/arith_state.cpp index 3d43077e5..74c54c27e 100644 --- a/src/theory/arith/arith_state.cpp +++ b/src/theory/arith/arith_state.cpp @@ -17,7 +17,7 @@ #include "theory/arith/theory_arith_private.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -35,4 +35,4 @@ void ArithState::setParent(TheoryArithPrivate* p) { d_parent = p; } } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/arith_state.h b/src/theory/arith/arith_state.h index 0f0f02f02..bbe8e628b 100644 --- a/src/theory/arith/arith_state.h +++ b/src/theory/arith/arith_state.h @@ -20,7 +20,7 @@ #include "theory/theory_state.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -53,6 +53,6 @@ class ArithState : public TheoryState } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/arith/arith_static_learner.cpp b/src/theory/arith/arith_static_learner.cpp index f33c065a0..6f2866a1c 100644 --- a/src/theory/arith/arith_static_learner.cpp +++ b/src/theory/arith/arith_static_learner.cpp @@ -28,9 +28,9 @@ #include "theory/rewriter.h" using namespace std; -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -271,4 +271,4 @@ void ArithStaticLearner::addBound(TNode n) { } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/arith_static_learner.h b/src/theory/arith/arith_static_learner.h index 7c6bfc47b..703bdbfd9 100644 --- a/src/theory/arith/arith_static_learner.h +++ b/src/theory/arith/arith_static_learner.h @@ -26,7 +26,7 @@ #include "theory/arith/delta_rational.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { namespace context { class Context; } @@ -74,6 +74,6 @@ public: } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__ARITH__ARITH_STATIC_LEARNER_H */ diff --git a/src/theory/arith/arith_utilities.cpp b/src/theory/arith/arith_utilities.cpp index 6f43cfc1b..1faa7f43c 100644 --- a/src/theory/arith/arith_utilities.cpp +++ b/src/theory/arith/arith_utilities.cpp @@ -17,9 +17,9 @@ #include -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -337,4 +337,4 @@ Node multConstants(const Node& c1, const Node& c2) } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/arith_utilities.h b/src/theory/arith/arith_utilities.h index c8746d6c9..138cd5fbe 100644 --- a/src/theory/arith/arith_utilities.h +++ b/src/theory/arith/arith_utilities.h @@ -30,7 +30,7 @@ #include "util/integer.h" #include "util/rational.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -340,6 +340,6 @@ Node multConstants(const Node& c1, const Node& c2); } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__ARITH__ARITH_UTILITIES_H */ diff --git a/src/theory/arith/arithvar.cpp b/src/theory/arith/arithvar.cpp index 5c0ee10e0..0871cec6a 100644 --- a/src/theory/arith/arithvar.cpp +++ b/src/theory/arith/arithvar.cpp @@ -20,7 +20,7 @@ #include #include -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -33,4 +33,4 @@ bool debugIsASet(const std::vector& variables){ } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/arithvar.h b/src/theory/arith/arithvar.h index b95c39e9e..230d505b4 100644 --- a/src/theory/arith/arithvar.h +++ b/src/theory/arith/arithvar.h @@ -27,7 +27,7 @@ #include "util/index.h" #include "util/rational.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -42,4 +42,4 @@ extern bool debugIsASet(const ArithVarVec& variables); } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/arithvar_node_map.h b/src/theory/arith/arithvar_node_map.h index c8b7f62a4..cf36335b6 100644 --- a/src/theory/arith/arithvar_node_map.h +++ b/src/theory/arith/arithvar_node_map.h @@ -27,7 +27,7 @@ #include "context/cdhashmap.h" #include "context/cdo.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -90,6 +90,6 @@ public: } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__ARITH__ARITHVAR_NODE_MAP_H */ diff --git a/src/theory/arith/attempt_solution_simplex.cpp b/src/theory/arith/attempt_solution_simplex.cpp index 8d7ad5e74..2e518095d 100644 --- a/src/theory/arith/attempt_solution_simplex.cpp +++ b/src/theory/arith/attempt_solution_simplex.cpp @@ -27,7 +27,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -149,4 +149,4 @@ Result::Status AttemptSolutionSDP::attempt( } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/attempt_solution_simplex.h b/src/theory/arith/attempt_solution_simplex.h index a68b7d536..482ff3e55 100644 --- a/src/theory/arith/attempt_solution_simplex.h +++ b/src/theory/arith/attempt_solution_simplex.h @@ -59,7 +59,7 @@ #include "theory/arith/simplex.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -97,4 +97,4 @@ private: } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/bound_counts.h b/src/theory/arith/bound_counts.h index 9a707df85..3310ee2a0 100644 --- a/src/theory/arith/bound_counts.h +++ b/src/theory/arith/bound_counts.h @@ -23,7 +23,7 @@ #include "theory/arith/arithvar.h" #include "util/dense_map.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -232,4 +232,4 @@ public: } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/bound_inference.cpp b/src/theory/arith/bound_inference.cpp index 4423cae61..a368fec86 100644 --- a/src/theory/arith/bound_inference.cpp +++ b/src/theory/arith/bound_inference.cpp @@ -19,9 +19,9 @@ #include "theory/arith/normal_form.h" #include "theory/rewriter.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -243,4 +243,4 @@ std::ostream& operator<<(std::ostream& os, const BoundInference& bi) } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/bound_inference.h b/src/theory/arith/bound_inference.h index a3043ee93..4514e45ee 100644 --- a/src/theory/arith/bound_inference.h +++ b/src/theory/arith/bound_inference.h @@ -23,7 +23,7 @@ #include "expr/node.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -114,6 +114,6 @@ std::ostream& operator<<(std::ostream& os, const BoundInference& bi); } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/arith/branch_and_bound.cpp b/src/theory/arith/branch_and_bound.cpp index 83c20330b..4863c57d7 100644 --- a/src/theory/arith/branch_and_bound.cpp +++ b/src/theory/arith/branch_and_bound.cpp @@ -22,9 +22,9 @@ #include "theory/rewriter.h" #include "theory/theory.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -140,4 +140,4 @@ bool BranchAndBound::proofsEnabled() const { return d_pnm != nullptr; } } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/branch_and_bound.h b/src/theory/arith/branch_and_bound.h index 52acf6aae..c653bafc5 100644 --- a/src/theory/arith/branch_and_bound.h +++ b/src/theory/arith/branch_and_bound.h @@ -29,7 +29,7 @@ #include "theory/arith/pp_rewrite_eq.h" #include "util/rational.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -70,6 +70,6 @@ class BranchAndBound : protected EnvObj } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/arith/callbacks.cpp b/src/theory/arith/callbacks.cpp index 5b529ab7d..27abf71bd 100644 --- a/src/theory/arith/callbacks.cpp +++ b/src/theory/arith/callbacks.cpp @@ -22,7 +22,7 @@ #include "proof/proof_node.h" #include "theory/arith/theory_arith_private.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -209,4 +209,4 @@ BoundCounts BoundCountingLookup::hasBounds(ArithVar basic) const { } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/callbacks.h b/src/theory/arith/callbacks.h index 049b621c3..ab242c9dc 100644 --- a/src/theory/arith/callbacks.h +++ b/src/theory/arith/callbacks.h @@ -25,7 +25,7 @@ #include "theory/inference_id.h" #include "util/rational.h" -namespace cvc5 { +namespace cvc5::internal { class ProofNode; @@ -202,4 +202,4 @@ public: } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/congruence_manager.cpp b/src/theory/arith/congruence_manager.cpp index 005596a4c..610835e2a 100644 --- a/src/theory/arith/congruence_manager.cpp +++ b/src/theory/arith/congruence_manager.cpp @@ -32,9 +32,9 @@ #include "theory/uf/equality_engine.h" #include "theory/uf/proof_equality_engine.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -711,4 +711,4 @@ std::vector andComponents(TNode an) } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/congruence_manager.h b/src/theory/arith/congruence_manager.h index 995526f49..cf0ec4340 100644 --- a/src/theory/arith/congruence_manager.h +++ b/src/theory/arith/congruence_manager.h @@ -34,7 +34,7 @@ #include "util/dense_map.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { class ProofNodeManager; class EagerProofGenerator; @@ -297,4 +297,4 @@ std::vector andComponents(TNode an); } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/constraint.cpp b/src/theory/arith/constraint.cpp index f412ba817..c0ac9d07a 100644 --- a/src/theory/arith/constraint.cpp +++ b/src/theory/arith/constraint.cpp @@ -35,9 +35,9 @@ #include "theory/rewriter.h" using namespace std; -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -2455,4 +2455,4 @@ std::pair Constraint::unateFarkasSigns(ConstraintCP ca, ConstraintCP c } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/constraint.h b/src/theory/arith/constraint.h index 82ee832b7..7aaa3a8ba 100644 --- a/src/theory/arith/constraint.h +++ b/src/theory/arith/constraint.h @@ -94,7 +94,7 @@ #include "theory/arith/delta_rational.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { class ProofNodeManager; class EagerProofGenerator; @@ -1262,6 +1262,6 @@ class ConstraintDatabase : protected EnvObj } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__ARITH__CONSTRAINT_H */ diff --git a/src/theory/arith/constraint_forward.h b/src/theory/arith/constraint_forward.h index e9a64ce19..e06ef1d63 100644 --- a/src/theory/arith/constraint_forward.h +++ b/src/theory/arith/constraint_forward.h @@ -26,7 +26,7 @@ #include "cvc5_private.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -48,6 +48,6 @@ static constexpr RationalVectorP RationalVectorPSentinel = nullptr; } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__ARITH__CONSTRAINT_FORWARD_H */ diff --git a/src/theory/arith/cut_log.cpp b/src/theory/arith/cut_log.cpp index 880519fbc..fc64dd04f 100644 --- a/src/theory/arith/cut_log.cpp +++ b/src/theory/arith/cut_log.cpp @@ -34,7 +34,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -708,4 +708,4 @@ void DenseVector::print(ostream& out, const DenseMap& v){ } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/cut_log.h b/src/theory/arith/cut_log.h index 7f0e2e586..d99ee89df 100644 --- a/src/theory/arith/cut_log.h +++ b/src/theory/arith/cut_log.h @@ -30,7 +30,7 @@ #include "theory/arith/constraint_forward.h" #include "util/dense_map.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -292,4 +292,4 @@ public: } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/delta_rational.cpp b/src/theory/arith/delta_rational.cpp index 30ef2ddd2..ef1026361 100644 --- a/src/theory/arith/delta_rational.cpp +++ b/src/theory/arith/delta_rational.cpp @@ -22,7 +22,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { std::ostream& operator<<(std::ostream& os, const DeltaRational& dq){ return os << "(" << dq.getNoninfinitesimalPart() @@ -107,4 +107,4 @@ Integer DeltaRational::euclidianDivideRemainder(const DeltaRational& y) const } } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/delta_rational.h b/src/theory/arith/delta_rational.h index 7872ca01e..b57409173 100644 --- a/src/theory/arith/delta_rational.h +++ b/src/theory/arith/delta_rational.h @@ -27,7 +27,7 @@ #include "util/integer.h" #include "util/rational.h" -namespace cvc5 { +namespace cvc5::internal { class DeltaRational; @@ -47,20 +47,20 @@ class DeltaRationalException : public Exception { */ class DeltaRational { private: - cvc5::Rational c; - cvc5::Rational k; + cvc5::internal::Rational c; + cvc5::internal::Rational k; public: DeltaRational() : c(0,1), k(0,1) {} - DeltaRational(const cvc5::Rational& base) : c(base), k(0, 1) {} - DeltaRational(const cvc5::Rational& base, const cvc5::Rational& coeff) + DeltaRational(const cvc5::internal::Rational& base) : c(base), k(0, 1) {} + DeltaRational(const cvc5::internal::Rational& base, const cvc5::internal::Rational& coeff) : c(base), k(coeff) { } - const cvc5::Rational& getInfinitesimalPart() const { return k; } + const cvc5::internal::Rational& getInfinitesimalPart() const { return k; } - const cvc5::Rational& getNoninfinitesimalPart() const { return c; } + const cvc5::internal::Rational& getNoninfinitesimalPart() const { return c; } int sgn() const { int s = getNoninfinitesimalPart().sgn(); @@ -98,14 +98,14 @@ public: } DeltaRational operator+(const DeltaRational& other) const{ - cvc5::Rational tmpC = c + other.c; - cvc5::Rational tmpK = k + other.k; + cvc5::internal::Rational tmpC = c + other.c; + cvc5::internal::Rational tmpK = k + other.k; return DeltaRational(tmpC, tmpK); } DeltaRational operator*(const Rational& a) const{ - cvc5::Rational tmpC = a * c; - cvc5::Rational tmpK = a * k; + cvc5::internal::Rational tmpC = a * c; + cvc5::internal::Rational tmpK = a * k; return DeltaRational(tmpC, tmpK); } @@ -128,7 +128,7 @@ public: DeltaRational operator-(const DeltaRational& a) const{ - cvc5::Rational negOne(cvc5::Integer(-1)); + cvc5::internal::Rational negOne(cvc5::internal::Integer(-1)); return *(this) + (a * negOne); } @@ -137,14 +137,14 @@ public: } DeltaRational operator/(const Rational& a) const{ - cvc5::Rational tmpC = c / a; - cvc5::Rational tmpK = k / a; + cvc5::internal::Rational tmpC = c / a; + cvc5::internal::Rational tmpK = k / a; return DeltaRational(tmpC, tmpK); } DeltaRational operator/(const Integer& a) const{ - cvc5::Rational tmpC = c / a; - cvc5::Rational tmpK = k / a; + cvc5::internal::Rational tmpC = c / a; + cvc5::internal::Rational tmpK = k / a; return DeltaRational(tmpC, tmpK); } @@ -205,7 +205,7 @@ public: return *(this); } - DeltaRational& operator*=(const cvc5::Rational& a) + DeltaRational& operator*=(const cvc5::internal::Rational& a) { c *= a; k *= a; @@ -300,4 +300,4 @@ public: std::ostream& operator<<(std::ostream& os, const DeltaRational& n); -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/dio_solver.cpp b/src/theory/arith/dio_solver.cpp index bf0483823..cb5db0555 100644 --- a/src/theory/arith/dio_solver.cpp +++ b/src/theory/arith/dio_solver.cpp @@ -27,7 +27,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -829,4 +829,4 @@ Node DioSolver::trailIndexToEquality(TrailIndex i) const { } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/dio_solver.h b/src/theory/arith/dio_solver.h index 0ee79380e..8f17d4e4d 100644 --- a/src/theory/arith/dio_solver.h +++ b/src/theory/arith/dio_solver.h @@ -31,7 +31,7 @@ #include "util/rational.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { namespace context { class Context; } @@ -420,6 +420,6 @@ public: } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__ARITH__DIO_SOLVER_H */ diff --git a/src/theory/arith/dual_simplex.cpp b/src/theory/arith/dual_simplex.cpp index ea870fac7..7502ffe8d 100644 --- a/src/theory/arith/dual_simplex.cpp +++ b/src/theory/arith/dual_simplex.cpp @@ -26,7 +26,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -242,4 +242,4 @@ bool DualSimplexDecisionProcedure::searchForFeasibleSolution(uint32_t remainingI } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/dual_simplex.h b/src/theory/arith/dual_simplex.h index a7a2aa793..986b053ea 100644 --- a/src/theory/arith/dual_simplex.h +++ b/src/theory/arith/dual_simplex.h @@ -58,7 +58,7 @@ #include "theory/arith/simplex.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -117,4 +117,4 @@ private: } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/equality_solver.cpp b/src/theory/arith/equality_solver.cpp index 8e5cc9a28..352fc452f 100644 --- a/src/theory/arith/equality_solver.cpp +++ b/src/theory/arith/equality_solver.cpp @@ -17,9 +17,9 @@ #include "theory/arith/inference_manager.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -133,4 +133,4 @@ void EqualitySolver::EqualitySolverNotify::eqNotifyConstantTermMerge(TNode t1, } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/equality_solver.h b/src/theory/arith/equality_solver.h index 8528650f0..0401066c4 100644 --- a/src/theory/arith/equality_solver.h +++ b/src/theory/arith/equality_solver.h @@ -26,7 +26,7 @@ #include "theory/ee_setup_info.h" #include "theory/uf/equality_engine.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -111,6 +111,6 @@ class EqualitySolver : protected EnvObj } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/arith/error_set.cpp b/src/theory/arith/error_set.cpp index c2b7d7cba..951fdae3b 100644 --- a/src/theory/arith/error_set.cpp +++ b/src/theory/arith/error_set.cpp @@ -23,7 +23,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -487,4 +487,4 @@ void ErrorSet::pushFocusInto(ArithVarVec& vec) const{ } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/error_set.h b/src/theory/arith/error_set.h index 36a75f12f..0773d6dbe 100644 --- a/src/theory/arith/error_set.h +++ b/src/theory/arith/error_set.h @@ -33,7 +33,7 @@ #include "util/bin_heap.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -418,4 +418,4 @@ private: } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/fc_simplex.cpp b/src/theory/arith/fc_simplex.cpp index 940a82fb3..5e4fa2238 100644 --- a/src/theory/arith/fc_simplex.cpp +++ b/src/theory/arith/fc_simplex.cpp @@ -24,7 +24,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -784,4 +784,4 @@ const Rational& FCSimplexDecisionProcedure::focusCoefficient(ArithVar nb) const } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/fc_simplex.h b/src/theory/arith/fc_simplex.h index 9cba57b2d..bcade31dd 100644 --- a/src/theory/arith/fc_simplex.h +++ b/src/theory/arith/fc_simplex.h @@ -62,7 +62,7 @@ #include "util/dense_map.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -256,4 +256,4 @@ private: } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/infer_bounds.cpp b/src/theory/arith/infer_bounds.cpp index 21f698e45..5e195f2f5 100644 --- a/src/theory/arith/infer_bounds.cpp +++ b/src/theory/arith/infer_bounds.cpp @@ -19,9 +19,9 @@ #include "theory/arith/infer_bounds.h" #include "theory/rewriter.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -268,4 +268,4 @@ std::ostream& operator<<(std::ostream& os, const Algorithms a){ } /* namespace arith */ } /* namespace theory */ -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/infer_bounds.h b/src/theory/arith/infer_bounds.h index 22b0b5d54..dfab0a3c6 100644 --- a/src/theory/arith/infer_bounds.h +++ b/src/theory/arith/infer_bounds.h @@ -28,7 +28,7 @@ #include "util/integer.h" #include "util/rational.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -161,4 +161,4 @@ private: } /* namespace arith */ } /* namespace theory */ -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/inference_manager.cpp b/src/theory/arith/inference_manager.cpp index 4b0667aaa..f9d852362 100644 --- a/src/theory/arith/inference_manager.cpp +++ b/src/theory/arith/inference_manager.cpp @@ -20,7 +20,7 @@ #include "theory/arith/theory_arith.h" #include "theory/rewriter.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -166,4 +166,4 @@ bool InferenceManager::hasPropagated(TNode lit) const } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/inference_manager.h b/src/theory/arith/inference_manager.h index 11532fd72..84e07a728 100644 --- a/src/theory/arith/inference_manager.h +++ b/src/theory/arith/inference_manager.h @@ -23,7 +23,7 @@ #include "theory/inference_id.h" #include "theory/inference_manager_buffered.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -128,6 +128,6 @@ class InferenceManager : public InferenceManagerBuffered } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/arith/kinds b/src/theory/arith/kinds index cd26d8033..b70c6c61d 100644 --- a/src/theory/arith/kinds +++ b/src/theory/arith/kinds @@ -4,13 +4,13 @@ # src/theory/builtin/kinds. # -theory THEORY_ARITH ::cvc5::theory::arith::TheoryArith "theory/arith/theory_arith.h" +theory THEORY_ARITH ::cvc5::internal::theory::arith::TheoryArith "theory/arith/theory_arith.h" typechecker "theory/arith/theory_arith_type_rules.h" properties stable-infinite properties check propagate ppStaticLearn presolve notifyRestart -rewriter ::cvc5::theory::arith::ArithRewriter "theory/arith/arith_rewriter.h" +rewriter ::cvc5::internal::theory::arith::ArithRewriter "theory/arith/arith_rewriter.h" operator ADD 2: "arithmetic addition (N-ary)" operator MULT 2: "arithmetic multiplication (N-ary)" @@ -47,9 +47,9 @@ operator SQRT 1 "square root" constant DIVISIBLE_OP \ struct \ Divisible \ - ::cvc5::DivisibleHashFunction \ + ::cvc5::internal::DivisibleHashFunction \ "util/divisible.h" \ - "operator for the divisibility-by-k predicate; payload is an instance of the cvc5::Divisible class" + "operator for the divisibility-by-k predicate; payload is an instance of the cvc5::internal::Divisible class" sort REAL_TYPE \ Cardinality::REALS \ @@ -67,30 +67,30 @@ sort INTEGER_TYPE \ constant CONST_RATIONAL \ class \ Rational+ \ - ::cvc5::RationalHashFunction \ + ::cvc5::internal::RationalHashFunction \ "util/rational.h" \ - "a multiple-precision rational constant; payload is an instance of the cvc5::Rational class" + "a multiple-precision rational constant; payload is an instance of the cvc5::internal::Rational class" constant CONST_INTEGER \ class \ Rational+ \ - ::cvc5::RationalHashFunction \ + ::cvc5::internal::RationalHashFunction \ "util/rational.h" \ - "a multiple-precision integer constant; payload is an instance of the cvc5::Rational class" + "a multiple-precision integer constant; payload is an instance of the cvc5::internal::Rational class" constant REAL_ALGEBRAIC_NUMBER_OP \ class \ RealAlgebraicNumber+ \ - ::cvc5::RealAlgebraicNumberHashFunction \ + ::cvc5::internal::RealAlgebraicNumberHashFunction \ "util/real_algebraic_number.h" \ - "a real algebraic number constant; payload is an instance of the cvc5::RealAlgebraicNumber class" -parameterized REAL_ALGEBRAIC_NUMBER REAL_ALGEBRAIC_NUMBER_OP 0 "a real algebraic number constant; payload is an instance of the cvc5::RealAlgebraicNumber class" + "a real algebraic number constant; payload is an instance of the cvc5::internal::RealAlgebraicNumber class" +parameterized REAL_ALGEBRAIC_NUMBER REAL_ALGEBRAIC_NUMBER_OP 0 "a real algebraic number constant; payload is an instance of the cvc5::internal::RealAlgebraicNumber class" enumerator REAL_TYPE \ - "::cvc5::theory::arith::RationalEnumerator" \ + "::cvc5::internal::theory::arith::RationalEnumerator" \ "theory/arith/type_enumerator.h" enumerator INTEGER_TYPE \ - "::cvc5::theory::arith::IntegerEnumerator" \ + "::cvc5::internal::theory::arith::IntegerEnumerator" \ "theory/arith/type_enumerator.h" operator LT 2 "less than, x < y" @@ -102,9 +102,9 @@ operator GEQ 2 "greater than or equal, x >= y" constant INDEXED_ROOT_PREDICATE_OP \ struct \ IndexedRootPredicate \ - ::cvc5::IndexedRootPredicateHashFunction \ + ::cvc5::internal::IndexedRootPredicateHashFunction \ "util/indexed_root_predicate.h" \ - "operator for the indexed root predicate; payload is an instance of the cvc5::IndexedRootPredicate class" + "operator for the indexed root predicate; payload is an instance of the cvc5::internal::IndexedRootPredicate class" parameterized INDEXED_ROOT_PREDICATE INDEXED_ROOT_PREDICATE_OP 2 "indexed root predicate; first parameter is a INDEXED_ROOT_PREDICATE_OP, second is a real variable compared to zero, third is a polynomial" operator IS_INTEGER 1 "term-is-integer predicate (parameter is a real-sorted term)" @@ -118,40 +118,40 @@ operator TO_REAL 1 "cast term to real (parameter is an integer-sorted term; this # This way, we avoid having 2 nested TO_REAL nodess as a result of Solver::mkTerm(TO_REAL, Solver::mkReal(int val)) operator CAST_TO_REAL 1 "cast term to real same as TO_REAL, but it is used internally, whereas TO_REAL is accessible in the API" -typerule ADD ::cvc5::theory::arith::ArithOperatorTypeRule -typerule MULT ::cvc5::theory::arith::ArithOperatorTypeRule -typerule NONLINEAR_MULT ::cvc5::theory::arith::ArithOperatorTypeRule -typerule SUB ::cvc5::theory::arith::ArithOperatorTypeRule -typerule NEG ::cvc5::theory::arith::ArithOperatorTypeRule -typerule DIVISION ::cvc5::theory::arith::ArithOperatorTypeRule -typerule POW ::cvc5::theory::arith::ArithOperatorTypeRule +typerule ADD ::cvc5::internal::theory::arith::ArithOperatorTypeRule +typerule MULT ::cvc5::internal::theory::arith::ArithOperatorTypeRule +typerule NONLINEAR_MULT ::cvc5::internal::theory::arith::ArithOperatorTypeRule +typerule SUB ::cvc5::internal::theory::arith::ArithOperatorTypeRule +typerule NEG ::cvc5::internal::theory::arith::ArithOperatorTypeRule +typerule DIVISION ::cvc5::internal::theory::arith::ArithOperatorTypeRule +typerule POW ::cvc5::internal::theory::arith::ArithOperatorTypeRule -typerule CONST_RATIONAL ::cvc5::theory::arith::ArithConstantTypeRule -typerule CONST_INTEGER ::cvc5::theory::arith::ArithConstantTypeRule +typerule CONST_RATIONAL ::cvc5::internal::theory::arith::ArithConstantTypeRule +typerule CONST_INTEGER ::cvc5::internal::theory::arith::ArithConstantTypeRule -typerule REAL_ALGEBRAIC_NUMBER_OP ::cvc5::theory::arith::ArithRealAlgebraicNumberOpTypeRule -typerule REAL_ALGEBRAIC_NUMBER ::cvc5::theory::arith::ArithRealAlgebraicNumberTypeRule +typerule REAL_ALGEBRAIC_NUMBER_OP ::cvc5::internal::theory::arith::ArithRealAlgebraicNumberOpTypeRule +typerule REAL_ALGEBRAIC_NUMBER ::cvc5::internal::theory::arith::ArithRealAlgebraicNumberTypeRule -typerule LT ::cvc5::theory::arith::ArithRelationTypeRule -typerule LEQ ::cvc5::theory::arith::ArithRelationTypeRule -typerule GT ::cvc5::theory::arith::ArithRelationTypeRule -typerule GEQ ::cvc5::theory::arith::ArithRelationTypeRule +typerule LT ::cvc5::internal::theory::arith::ArithRelationTypeRule +typerule LEQ ::cvc5::internal::theory::arith::ArithRelationTypeRule +typerule GT ::cvc5::internal::theory::arith::ArithRelationTypeRule +typerule GEQ ::cvc5::internal::theory::arith::ArithRelationTypeRule typerule INDEXED_ROOT_PREDICATE_OP "SimpleTypeRule" -typerule INDEXED_ROOT_PREDICATE ::cvc5::theory::arith::IndexedRootPredicateTypeRule +typerule INDEXED_ROOT_PREDICATE ::cvc5::internal::theory::arith::IndexedRootPredicateTypeRule -typerule TO_REAL ::cvc5::theory::arith::ArithOperatorTypeRule -typerule CAST_TO_REAL ::cvc5::theory::arith::ArithOperatorTypeRule -typerule TO_INTEGER ::cvc5::theory::arith::ArithOperatorTypeRule +typerule TO_REAL ::cvc5::internal::theory::arith::ArithOperatorTypeRule +typerule CAST_TO_REAL ::cvc5::internal::theory::arith::ArithOperatorTypeRule +typerule TO_INTEGER ::cvc5::internal::theory::arith::ArithOperatorTypeRule typerule IS_INTEGER "SimpleTypeRule" -typerule ABS ::cvc5::theory::arith::ArithOperatorTypeRule +typerule ABS ::cvc5::internal::theory::arith::ArithOperatorTypeRule typerule INTS_DIVISION "SimpleTypeRule" typerule INTS_MODULUS "SimpleTypeRule" typerule DIVISIBLE "SimpleTypeRule" typerule DIVISIBLE_OP "SimpleTypeRule" -typerule DIVISION_TOTAL ::cvc5::theory::arith::ArithOperatorTypeRule +typerule DIVISION_TOTAL ::cvc5::internal::theory::arith::ArithOperatorTypeRule typerule INTS_DIVISION_TOTAL "SimpleTypeRule" typerule INTS_MODULUS_TOTAL "SimpleTypeRule" @@ -174,7 +174,7 @@ typerule SQRT "SimpleTypeRule" nullaryoperator PI "pi" -typerule PI ::cvc5::theory::arith::RealNullaryOperatorTypeRule +typerule PI ::cvc5::internal::theory::arith::RealNullaryOperatorTypeRule # Integer AND, which is parameterized by a (positive) bitwidth k. # ((_ iand k) i1 i2) is equivalent to: @@ -183,12 +183,12 @@ typerule PI ::cvc5::theory::arith::RealNullaryOperatorTypeRule constant IAND_OP \ struct \ IntAnd \ - "::cvc5::UnsignedHashFunction< ::cvc5::IntAnd >" \ + "::cvc5::internal::UnsignedHashFunction< ::cvc5::internal::IntAnd >" \ "util/iand.h" \ - "operator for integer AND; payload is an instance of the cvc5::IntAnd class" + "operator for integer AND; payload is an instance of the cvc5::internal::IntAnd class" parameterized IAND IAND_OP 2 "integer version of AND operator; first parameter is an IAND_OP, second and third are integer terms" -typerule IAND_OP ::cvc5::theory::arith::IAndOpTypeRule -typerule IAND ::cvc5::theory::arith::IAndTypeRule +typerule IAND_OP ::cvc5::internal::theory::arith::IAndOpTypeRule +typerule IAND ::cvc5::internal::theory::arith::IAndTypeRule endtheory diff --git a/src/theory/arith/linear_equality.cpp b/src/theory/arith/linear_equality.cpp index b0636880a..6fb7a0b45 100644 --- a/src/theory/arith/linear_equality.cpp +++ b/src/theory/arith/linear_equality.cpp @@ -21,7 +21,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -1372,4 +1372,4 @@ void LinearEqualityModule::directlyAddToCoefficient(ArithVar row, ArithVar col, } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/linear_equality.h b/src/theory/arith/linear_equality.h index e4ca4fa60..a18298fc5 100644 --- a/src/theory/arith/linear_equality.h +++ b/src/theory/arith/linear_equality.h @@ -39,7 +39,7 @@ #include "theory/arith/tableau.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -759,4 +759,4 @@ public: } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/matrix.cpp b/src/theory/arith/matrix.cpp index 455baa12d..cc57c9cef 100644 --- a/src/theory/arith/matrix.cpp +++ b/src/theory/arith/matrix.cpp @@ -16,7 +16,7 @@ #include "theory/arith/matrix.h" using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -26,4 +26,4 @@ bool NoEffectCCCB::canUseRow(RowIndex ridx) const { return false; } } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/matrix.h b/src/theory/arith/matrix.h index 0328c0e58..2e1ebf609 100644 --- a/src/theory/arith/matrix.h +++ b/src/theory/arith/matrix.h @@ -28,7 +28,7 @@ #include "util/dense_map.h" #include "util/index.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -368,8 +368,8 @@ public: typedef MatrixEntry Entry; protected: - typedef cvc5::theory::arith::RowVector RowVectorT; - typedef cvc5::theory::arith::ColumnVector ColumnVectorT; + typedef cvc5::internal::theory::arith::RowVector RowVectorT; + typedef cvc5::internal::theory::arith::ColumnVector ColumnVectorT; public: typedef typename RowVectorT::const_iterator RowIterator; @@ -999,4 +999,4 @@ protected: } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/nl/coverings/cdcac.cpp b/src/theory/arith/nl/coverings/cdcac.cpp index dbadb78a1..5980e96eb 100644 --- a/src/theory/arith/nl/coverings/cdcac.cpp +++ b/src/theory/arith/nl/coverings/cdcac.cpp @@ -25,19 +25,19 @@ #include "theory/arith/nl/nl_model.h" #include "theory/rewriter.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; namespace std { /** Generic streaming operator for std::vector. */ template std::ostream& operator<<(std::ostream& os, const std::vector& v) { - cvc5::container_to_stream(os, v); + cvc5::internal::container_to_stream(os, v); return os; } } // namespace std -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -763,6 +763,6 @@ std::vector CDCAC::isolateRealRoots( } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/arith/nl/coverings/cdcac.h b/src/theory/arith/nl/coverings/cdcac.h index e7f57095d..8d9041261 100644 --- a/src/theory/arith/nl/coverings/cdcac.h +++ b/src/theory/arith/nl/coverings/cdcac.h @@ -33,7 +33,7 @@ #include "theory/arith/nl/coverings/proof_generator.h" #include "theory/arith/nl/coverings/variable_ordering.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -239,7 +239,7 @@ class CDCAC : protected EnvObj } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/arith/nl/coverings/cdcac_utils.cpp b/src/theory/arith/nl/coverings/cdcac_utils.cpp index a65673b16..5701a197a 100644 --- a/src/theory/arith/nl/coverings/cdcac_utils.cpp +++ b/src/theory/arith/nl/coverings/cdcac_utils.cpp @@ -21,7 +21,7 @@ #include "theory/arith/nl/coverings/projections.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -461,6 +461,6 @@ void makeFinestSquareFreeBasis(CACInterval& lhs, CACInterval& rhs) } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/arith/nl/coverings/cdcac_utils.h b/src/theory/arith/nl/coverings/cdcac_utils.h index 16c01fe62..a99bb04d0 100644 --- a/src/theory/arith/nl/coverings/cdcac_utils.h +++ b/src/theory/arith/nl/coverings/cdcac_utils.h @@ -27,7 +27,7 @@ #include "expr/node.h" #include "theory/arith/nl/coverings/projections.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -108,7 +108,7 @@ void makeFinestSquareFreeBasis(CACInterval& lhs, CACInterval& rhs); } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/arith/nl/coverings/cocoa_converter.cpp b/src/theory/arith/nl/coverings/cocoa_converter.cpp index 4165c1815..7bc8716c7 100644 --- a/src/theory/arith/nl/coverings/cocoa_converter.cpp +++ b/src/theory/arith/nl/coverings/cocoa_converter.cpp @@ -19,7 +19,7 @@ #ifdef CVC5_POLY_IMP #ifdef CVC5_USE_COCOA -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -120,7 +120,7 @@ poly::Polynomial CoCoAConverter::convertImpl(const CoCoA::RingElem& p, } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif #endif diff --git a/src/theory/arith/nl/coverings/cocoa_converter.h b/src/theory/arith/nl/coverings/cocoa_converter.h index 432464fc9..e77d383f8 100644 --- a/src/theory/arith/nl/coverings/cocoa_converter.h +++ b/src/theory/arith/nl/coverings/cocoa_converter.h @@ -29,7 +29,7 @@ #include "base/output.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -134,7 +134,7 @@ class CoCoAConverter } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif #endif diff --git a/src/theory/arith/nl/coverings/constraints.cpp b/src/theory/arith/nl/coverings/constraints.cpp index d857113a3..f2c6312cf 100644 --- a/src/theory/arith/nl/coverings/constraints.cpp +++ b/src/theory/arith/nl/coverings/constraints.cpp @@ -22,7 +22,7 @@ #include "theory/arith/nl/poly_conversion.h" #include "util/poly_util.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -78,6 +78,6 @@ void Constraints::sortConstraints() } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/arith/nl/coverings/constraints.h b/src/theory/arith/nl/coverings/constraints.h index 7fe521a1e..829324f0e 100644 --- a/src/theory/arith/nl/coverings/constraints.h +++ b/src/theory/arith/nl/coverings/constraints.h @@ -27,7 +27,7 @@ #include "theory/arith/nl/poly_conversion.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -86,7 +86,7 @@ class Constraints } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/arith/nl/coverings/lazard_evaluation.cpp b/src/theory/arith/nl/coverings/lazard_evaluation.cpp index 81b305d1b..fa1a1ffd6 100644 --- a/src/theory/arith/nl/coverings/lazard_evaluation.cpp +++ b/src/theory/arith/nl/coverings/lazard_evaluation.cpp @@ -15,7 +15,7 @@ #include "theory/arith/nl/coverings/cocoa_converter.h" -namespace cvc5::theory::arith::nl::coverings { +namespace cvc5::internal::theory::arith::nl::coverings { struct LazardEvaluationStats { @@ -819,11 +819,11 @@ std::vector LazardEvaluation::infeasibleRegions( return combined; } -} // namespace cvc5::theory::arith::nl::coverings +} // namespace cvc5::internal::theory::arith::nl::coverings #else -namespace cvc5::theory::arith::nl::coverings { +namespace cvc5::internal::theory::arith::nl::coverings { /** * Do a very simple wrapper around the regular poly::infeasible_regions. @@ -873,7 +873,7 @@ std::vector LazardEvaluation::infeasibleRegions( return poly::infeasible_regions(q, d_state->d_assignment, sc); } -} // namespace cvc5::theory::arith::nl::coverings +} // namespace cvc5::internal::theory::arith::nl::coverings #endif #endif diff --git a/src/theory/arith/nl/coverings/lazard_evaluation.h b/src/theory/arith/nl/coverings/lazard_evaluation.h index a03630d89..d135db742 100644 --- a/src/theory/arith/nl/coverings/lazard_evaluation.h +++ b/src/theory/arith/nl/coverings/lazard_evaluation.h @@ -25,7 +25,7 @@ #include -namespace cvc5::theory::arith::nl::coverings { +namespace cvc5::internal::theory::arith::nl::coverings { struct LazardEvaluationState; /** @@ -111,7 +111,7 @@ class LazardEvaluation std::unique_ptr d_state; }; -} // namespace cvc5::theory::arith::nl::coverings +} // namespace cvc5::internal::theory::arith::nl::coverings #endif #endif diff --git a/src/theory/arith/nl/coverings/projections.cpp b/src/theory/arith/nl/coverings/projections.cpp index 4340f99b4..7559dac1e 100644 --- a/src/theory/arith/nl/coverings/projections.cpp +++ b/src/theory/arith/nl/coverings/projections.cpp @@ -19,7 +19,7 @@ #include "base/check.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -105,6 +105,6 @@ PolyVector projectionMcCallum(const std::vector& polys) } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/arith/nl/coverings/projections.h b/src/theory/arith/nl/coverings/projections.h index 7df36a607..9f81f5eb6 100644 --- a/src/theory/arith/nl/coverings/projections.h +++ b/src/theory/arith/nl/coverings/projections.h @@ -24,7 +24,7 @@ #include -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -75,7 +75,7 @@ PolyVector projectionMcCallum(const std::vector& polys); } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/arith/nl/coverings/proof_checker.cpp b/src/theory/arith/nl/coverings/proof_checker.cpp index d4f8c6f50..d38bb87dc 100644 --- a/src/theory/arith/nl/coverings/proof_checker.cpp +++ b/src/theory/arith/nl/coverings/proof_checker.cpp @@ -18,9 +18,9 @@ #include "expr/sequence.h" #include "theory/rewriter.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -59,4 +59,4 @@ Node CoveringsProofRuleChecker::checkInternal(PfRule id, } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/nl/coverings/proof_checker.h b/src/theory/arith/nl/coverings/proof_checker.h index cc33787f7..976aaddd9 100644 --- a/src/theory/arith/nl/coverings/proof_checker.h +++ b/src/theory/arith/nl/coverings/proof_checker.h @@ -21,7 +21,7 @@ #include "expr/node.h" #include "proof/proof_checker.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -54,6 +54,6 @@ class CoveringsProofRuleChecker : public ProofRuleChecker } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__STRINGS__PROOF_CHECKER_H */ diff --git a/src/theory/arith/nl/coverings/proof_generator.cpp b/src/theory/arith/nl/coverings/proof_generator.cpp index b91af55a8..c7504b263 100644 --- a/src/theory/arith/nl/coverings/proof_generator.cpp +++ b/src/theory/arith/nl/coverings/proof_generator.cpp @@ -21,9 +21,9 @@ #include "theory/arith/nl/poly_conversion.h" #include "util/indexed_root_predicate.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -242,6 +242,6 @@ std::ostream& operator<<(std::ostream& os, const CoveringsProofGenerator& proof) } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/arith/nl/coverings/proof_generator.h b/src/theory/arith/nl/coverings/proof_generator.h index 46d3843ed..add90035d 100644 --- a/src/theory/arith/nl/coverings/proof_generator.h +++ b/src/theory/arith/nl/coverings/proof_generator.h @@ -29,7 +29,7 @@ #include "proof/proof_set.h" #include "theory/arith/nl/coverings/cdcac_utils.h" -namespace cvc5 { +namespace cvc5::internal { class ProofGenerator; @@ -153,7 +153,7 @@ std::ostream& operator<<(std::ostream& os, const CoveringsProofGenerator& proof) } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif #endif diff --git a/src/theory/arith/nl/coverings/variable_ordering.cpp b/src/theory/arith/nl/coverings/variable_ordering.cpp index 58a42d13d..92da9836f 100644 --- a/src/theory/arith/nl/coverings/variable_ordering.cpp +++ b/src/theory/arith/nl/coverings/variable_ordering.cpp @@ -19,7 +19,7 @@ #include "util/poly_util.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -131,6 +131,6 @@ std::vector VariableOrdering::operator()( } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/arith/nl/coverings/variable_ordering.h b/src/theory/arith/nl/coverings/variable_ordering.h index e3f287f06..1cff09d57 100644 --- a/src/theory/arith/nl/coverings/variable_ordering.h +++ b/src/theory/arith/nl/coverings/variable_ordering.h @@ -25,7 +25,7 @@ #include "theory/arith/nl/coverings/constraints.h" #include "util/poly_util.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -64,7 +64,7 @@ std::vector collectInformation( } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/arith/nl/coverings_solver.cpp b/src/theory/arith/nl/coverings_solver.cpp index b16f1a3c2..3ad21c28b 100644 --- a/src/theory/arith/nl/coverings_solver.cpp +++ b/src/theory/arith/nl/coverings_solver.cpp @@ -25,7 +25,7 @@ #include "theory/inference_id.h" #include "theory/theory.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -256,4 +256,4 @@ void CoveringsSolver::addToModel(TNode var, TNode value) const } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/nl/coverings_solver.h b/src/theory/arith/nl/coverings_solver.h index 73ba352f5..15eb2dd83 100644 --- a/src/theory/arith/nl/coverings_solver.h +++ b/src/theory/arith/nl/coverings_solver.h @@ -25,7 +25,7 @@ #include "theory/arith/nl/coverings/proof_checker.h" #include "theory/arith/nl/equality_substitution.h" -namespace cvc5 { +namespace cvc5::internal { class ProofNodeManager; @@ -119,6 +119,6 @@ class CoveringsSolver: protected EnvObj } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__ARITH__COVERINGS_SOLVER_H */ diff --git a/src/theory/arith/nl/equality_substitution.cpp b/src/theory/arith/nl/equality_substitution.cpp index 0335e8758..c97d4b396 100644 --- a/src/theory/arith/nl/equality_substitution.cpp +++ b/src/theory/arith/nl/equality_substitution.cpp @@ -18,7 +18,7 @@ #include "smt/env.h" #include "theory/arith/arith_utilities.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -216,4 +216,4 @@ void EqualitySubstitution::addToConflictMap(const Node& n, } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/nl/equality_substitution.h b/src/theory/arith/nl/equality_substitution.h index b095af8df..81e2923b6 100644 --- a/src/theory/arith/nl/equality_substitution.h +++ b/src/theory/arith/nl/equality_substitution.h @@ -25,7 +25,7 @@ #include "theory/substitutions.h" #include "theory/theory.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -97,6 +97,6 @@ class EqualitySubstitution : protected EnvObj } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__ARITH__NL__EQUALITY_SUBSTITUTION_H */ diff --git a/src/theory/arith/nl/ext/constraint.cpp b/src/theory/arith/nl/ext/constraint.cpp index c86a9d3a3..c1588abf3 100644 --- a/src/theory/arith/nl/ext/constraint.cpp +++ b/src/theory/arith/nl/ext/constraint.cpp @@ -19,9 +19,9 @@ #include "theory/arith/arith_utilities.h" #include "theory/arith/nl/ext/monomial.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -124,4 +124,4 @@ bool ConstraintDb::isMaximal(Node atom, Node x) const } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/nl/ext/constraint.h b/src/theory/arith/nl/ext/constraint.h index d3ee1df42..d49183ec1 100644 --- a/src/theory/arith/nl/ext/constraint.h +++ b/src/theory/arith/nl/ext/constraint.h @@ -22,7 +22,7 @@ #include "expr/kind.h" #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -85,6 +85,6 @@ class ConstraintDb } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__ARITH__NL_SOLVER_H */ diff --git a/src/theory/arith/nl/ext/ext_state.cpp b/src/theory/arith/nl/ext/ext_state.cpp index 172d09f31..c0ecccc72 100644 --- a/src/theory/arith/nl/ext/ext_state.cpp +++ b/src/theory/arith/nl/ext/ext_state.cpp @@ -25,9 +25,9 @@ #include "theory/arith/nl/nl_model.h" #include "util/rational.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -111,4 +111,4 @@ CDProof* ExtState::getProof() } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/nl/ext/ext_state.h b/src/theory/arith/nl/ext/ext_state.h index ac00f6f87..49f87f09e 100644 --- a/src/theory/arith/nl/ext/ext_state.h +++ b/src/theory/arith/nl/ext/ext_state.h @@ -23,7 +23,7 @@ #include "smt/env.h" #include "theory/arith/nl/ext/monomial.h" -namespace cvc5 { +namespace cvc5::internal { class CDProof; @@ -85,6 +85,6 @@ struct ExtState } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/arith/nl/ext/factoring_check.cpp b/src/theory/arith/nl/ext/factoring_check.cpp index 3a1f00db7..67a5bfb66 100644 --- a/src/theory/arith/nl/ext/factoring_check.cpp +++ b/src/theory/arith/nl/ext/factoring_check.cpp @@ -25,9 +25,9 @@ #include "theory/rewriter.h" #include "util/rational.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -211,4 +211,4 @@ Node FactoringCheck::getFactorSkolem(Node n, CDProof* proof) } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/nl/ext/factoring_check.h b/src/theory/arith/nl/ext/factoring_check.h index 1aa8c17aa..fc16f047e 100644 --- a/src/theory/arith/nl/ext/factoring_check.h +++ b/src/theory/arith/nl/ext/factoring_check.h @@ -21,7 +21,7 @@ #include "expr/node.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { class CDProof; @@ -71,6 +71,6 @@ class FactoringCheck : protected EnvObj } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/arith/nl/ext/monomial.cpp b/src/theory/arith/nl/ext/monomial.cpp index 9d052f0b2..a9051807a 100644 --- a/src/theory/arith/nl/ext/monomial.cpp +++ b/src/theory/arith/nl/ext/monomial.cpp @@ -19,9 +19,9 @@ #include "theory/arith/nl/nl_lemma_utils.h" #include "theory/rewriter.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -335,4 +335,4 @@ Node MonomialDb::mkMonomialRemFactor(Node n, } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/nl/ext/monomial.h b/src/theory/arith/nl/ext/monomial.h index 130cf37bb..3020f960a 100644 --- a/src/theory/arith/nl/ext/monomial.h +++ b/src/theory/arith/nl/ext/monomial.h @@ -21,7 +21,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -145,6 +145,6 @@ class MonomialDb } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__ARITH__NL_MONOMIAL_H */ diff --git a/src/theory/arith/nl/ext/monomial_bounds_check.cpp b/src/theory/arith/nl/ext/monomial_bounds_check.cpp index e101eb752..d44a2434c 100644 --- a/src/theory/arith/nl/ext/monomial_bounds_check.cpp +++ b/src/theory/arith/nl/ext/monomial_bounds_check.cpp @@ -25,9 +25,9 @@ #include "theory/arith/nl/nl_model.h" #include "theory/rewriter.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -579,4 +579,4 @@ void MonomialBoundsCheck::checkResBounds() } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/nl/ext/monomial_bounds_check.h b/src/theory/arith/nl/ext/monomial_bounds_check.h index caf0dd437..36d25df14 100644 --- a/src/theory/arith/nl/ext/monomial_bounds_check.h +++ b/src/theory/arith/nl/ext/monomial_bounds_check.h @@ -20,7 +20,7 @@ #include "smt/env_obj.h" #include "theory/arith/nl/ext/constraint.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -88,6 +88,6 @@ class MonomialBoundsCheck : protected EnvObj } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/arith/nl/ext/monomial_check.cpp b/src/theory/arith/nl/ext/monomial_check.cpp index 418b657a9..adcd084dd 100644 --- a/src/theory/arith/nl/ext/monomial_check.cpp +++ b/src/theory/arith/nl/ext/monomial_check.cpp @@ -24,7 +24,7 @@ #include "theory/arith/nl/nl_model.h" #include "util/rational.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -760,4 +760,4 @@ void MonomialCheck::setMonomialFactor(Node a, } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/nl/ext/monomial_check.h b/src/theory/arith/nl/ext/monomial_check.h index a0b81bfb9..1ddf407cf 100644 --- a/src/theory/arith/nl/ext/monomial_check.h +++ b/src/theory/arith/nl/ext/monomial_check.h @@ -21,7 +21,7 @@ #include "theory/arith/nl/ext/monomial.h" #include "theory/theory_inference.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -196,6 +196,6 @@ class MonomialCheck : protected EnvObj } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/arith/nl/ext/proof_checker.cpp b/src/theory/arith/nl/ext/proof_checker.cpp index bcfd1f2d1..691cff256 100644 --- a/src/theory/arith/nl/ext/proof_checker.cpp +++ b/src/theory/arith/nl/ext/proof_checker.cpp @@ -19,9 +19,9 @@ #include "theory/arith/arith_utilities.h" #include "theory/rewriter.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -159,4 +159,4 @@ Node ExtProofRuleChecker::checkInternal(PfRule id, } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/nl/ext/proof_checker.h b/src/theory/arith/nl/ext/proof_checker.h index bf28cea59..fb09c0b35 100644 --- a/src/theory/arith/nl/ext/proof_checker.h +++ b/src/theory/arith/nl/ext/proof_checker.h @@ -22,7 +22,7 @@ #include "proof/proof_checker.h" #include "proof/proof_node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -52,6 +52,6 @@ class ExtProofRuleChecker : public ProofRuleChecker } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__STRINGS__PROOF_CHECKER_H */ diff --git a/src/theory/arith/nl/ext/split_zero_check.cpp b/src/theory/arith/nl/ext/split_zero_check.cpp index e786eca37..5b8935c27 100644 --- a/src/theory/arith/nl/ext/split_zero_check.cpp +++ b/src/theory/arith/nl/ext/split_zero_check.cpp @@ -23,7 +23,7 @@ #include "theory/arith/nl/nl_model.h" #include "theory/rewriter.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -58,4 +58,4 @@ void SplitZeroCheck::check() } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/nl/ext/split_zero_check.h b/src/theory/arith/nl/ext/split_zero_check.h index 8b6280878..bde649c84 100644 --- a/src/theory/arith/nl/ext/split_zero_check.h +++ b/src/theory/arith/nl/ext/split_zero_check.h @@ -20,7 +20,7 @@ #include "expr/node.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -52,6 +52,6 @@ class SplitZeroCheck : protected EnvObj } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/arith/nl/ext/tangent_plane_check.cpp b/src/theory/arith/nl/ext/tangent_plane_check.cpp index e7c42a830..2dbabd705 100644 --- a/src/theory/arith/nl/ext/tangent_plane_check.cpp +++ b/src/theory/arith/nl/ext/tangent_plane_check.cpp @@ -24,9 +24,9 @@ #include "theory/rewriter.h" #include "util/rational.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -172,4 +172,4 @@ void TangentPlaneCheck::check(bool asWaitingLemmas) } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/nl/ext/tangent_plane_check.h b/src/theory/arith/nl/ext/tangent_plane_check.h index 2832518ad..fd57b061d 100644 --- a/src/theory/arith/nl/ext/tangent_plane_check.h +++ b/src/theory/arith/nl/ext/tangent_plane_check.h @@ -21,7 +21,7 @@ #include "expr/node.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -69,6 +69,6 @@ class TangentPlaneCheck : protected EnvObj } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/arith/nl/ext_theory_callback.cpp b/src/theory/arith/nl/ext_theory_callback.cpp index 48d974bce..b1ec1061a 100644 --- a/src/theory/arith/nl/ext_theory_callback.cpp +++ b/src/theory/arith/nl/ext_theory_callback.cpp @@ -18,9 +18,9 @@ #include "theory/arith/arith_utilities.h" #include "theory/uf/equality_engine.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -135,4 +135,4 @@ bool NlExtTheoryCallback::isExtfReduced( } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/nl/ext_theory_callback.h b/src/theory/arith/nl/ext_theory_callback.h index a810d9d53..5226601a6 100644 --- a/src/theory/arith/nl/ext_theory_callback.h +++ b/src/theory/arith/nl/ext_theory_callback.h @@ -19,7 +19,7 @@ #include "expr/node.h" #include "theory/ext_theory.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace eq { class EqualityEngine; @@ -86,6 +86,6 @@ class NlExtTheoryCallback : public ExtTheoryCallback } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__ARITH__NL__EXT_THEORY_CALLBACK_H */ diff --git a/src/theory/arith/nl/iand_solver.cpp b/src/theory/arith/nl/iand_solver.cpp index 8a8d095ec..0f29f6498 100644 --- a/src/theory/arith/nl/iand_solver.cpp +++ b/src/theory/arith/nl/iand_solver.cpp @@ -27,9 +27,9 @@ #include "util/bitvector.h" #include "util/iand.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -311,4 +311,4 @@ Node IAndSolver::bitwiseLemma(Node i) } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/nl/iand_solver.h b/src/theory/arith/nl/iand_solver.h index 997112fee..b661f8c77 100644 --- a/src/theory/arith/nl/iand_solver.h +++ b/src/theory/arith/nl/iand_solver.h @@ -24,7 +24,7 @@ #include "smt/env_obj.h" #include "theory/arith/nl/iand_utils.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -136,6 +136,6 @@ class IAndSolver : protected EnvObj } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__ARITH__IAND_SOLVER_H */ diff --git a/src/theory/arith/nl/iand_utils.cpp b/src/theory/arith/nl/iand_utils.cpp index 9c9486446..c0ad5d0f8 100644 --- a/src/theory/arith/nl/iand_utils.cpp +++ b/src/theory/arith/nl/iand_utils.cpp @@ -22,9 +22,9 @@ #include "theory/rewriter.h" #include "util/rational.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -273,4 +273,4 @@ Node IAndUtils::twoToKMinusOne(unsigned k) const } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/nl/iand_utils.h b/src/theory/arith/nl/iand_utils.h index d4239f606..772098cd5 100644 --- a/src/theory/arith/nl/iand_utils.h +++ b/src/theory/arith/nl/iand_utils.h @@ -20,7 +20,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -169,6 +169,6 @@ class IAndUtils } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__ARITH__IAND_TABLE_H */ diff --git a/src/theory/arith/nl/icp/candidate.cpp b/src/theory/arith/nl/icp/candidate.cpp index 4d024c155..25a8781bc 100644 --- a/src/theory/arith/nl/icp/candidate.cpp +++ b/src/theory/arith/nl/icp/candidate.cpp @@ -24,7 +24,7 @@ #include "theory/arith/nl/icp/intersection.h" #include "theory/arith/nl/poly_conversion.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -116,6 +116,6 @@ std::ostream& operator<<(std::ostream& os, const Candidate& c) } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/arith/nl/icp/candidate.h b/src/theory/arith/nl/icp/candidate.h index ee8017cb7..fb8c3467f 100644 --- a/src/theory/arith/nl/icp/candidate.h +++ b/src/theory/arith/nl/icp/candidate.h @@ -24,7 +24,7 @@ #include "expr/node.h" #include "theory/arith/nl/icp/intersection.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -79,7 +79,7 @@ std::ostream& operator<<(std::ostream& os, const Candidate& c); } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/arith/nl/icp/contraction_origins.cpp b/src/theory/arith/nl/icp/contraction_origins.cpp index 213736ac3..bdf69b956 100644 --- a/src/theory/arith/nl/icp/contraction_origins.cpp +++ b/src/theory/arith/nl/icp/contraction_origins.cpp @@ -15,7 +15,7 @@ #include "theory/arith/nl/icp/contraction_origins.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -118,4 +118,4 @@ inline std::ostream& operator<<(std::ostream& os, } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/nl/icp/contraction_origins.h b/src/theory/arith/nl/icp/contraction_origins.h index e31e99908..d6d3ee91e 100644 --- a/src/theory/arith/nl/icp/contraction_origins.h +++ b/src/theory/arith/nl/icp/contraction_origins.h @@ -21,7 +21,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -100,6 +100,6 @@ std::ostream& operator<<(std::ostream& os, const ContractionOriginManager& com); } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/arith/nl/icp/icp_solver.cpp b/src/theory/arith/nl/icp/icp_solver.cpp index 1c28b5569..e26d5810e 100644 --- a/src/theory/arith/nl/icp/icp_solver.cpp +++ b/src/theory/arith/nl/icp/icp_solver.cpp @@ -27,7 +27,7 @@ #include "theory/rewriter.h" #include "util/poly_util.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -386,4 +386,4 @@ void ICPSolver::check() } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/nl/icp/icp_solver.h b/src/theory/arith/nl/icp/icp_solver.h index b849255cc..9f72785f4 100644 --- a/src/theory/arith/nl/icp/icp_solver.h +++ b/src/theory/arith/nl/icp/icp_solver.h @@ -30,7 +30,7 @@ #include "theory/arith/nl/icp/intersection.h" #include "theory/arith/nl/poly_conversion.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -156,6 +156,6 @@ class ICPSolver : protected EnvObj } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/arith/nl/icp/intersection.cpp b/src/theory/arith/nl/icp/intersection.cpp index db1bee5c7..5a6d1b950 100644 --- a/src/theory/arith/nl/icp/intersection.cpp +++ b/src/theory/arith/nl/icp/intersection.cpp @@ -25,7 +25,7 @@ #include "base/output.h" #include "theory/arith/nl/poly_conversion.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -222,6 +222,6 @@ PropagationResult intersect_interval_with(poly::Interval& cur, } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/arith/nl/icp/intersection.h b/src/theory/arith/nl/icp/intersection.h index d7242054c..0edfb472f 100644 --- a/src/theory/arith/nl/icp/intersection.h +++ b/src/theory/arith/nl/icp/intersection.h @@ -26,7 +26,7 @@ namespace poly { class Interval; } -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -78,7 +78,7 @@ PropagationResult intersect_interval_with(poly::Interval& cur, } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/arith/nl/icp/interval.h b/src/theory/arith/nl/icp/interval.h index 521a1f8ab..d16a4ad81 100644 --- a/src/theory/arith/nl/icp/interval.h +++ b/src/theory/arith/nl/icp/interval.h @@ -23,7 +23,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -59,7 +59,7 @@ inline std::ostream& operator<<(std::ostream& os, const Interval& i) } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/arith/nl/nl_lemma_utils.cpp b/src/theory/arith/nl/nl_lemma_utils.cpp index 18e296da7..d0051592e 100644 --- a/src/theory/arith/nl/nl_lemma_utils.cpp +++ b/src/theory/arith/nl/nl_lemma_utils.cpp @@ -18,7 +18,7 @@ #include "theory/arith/nl/nl_model.h" #include "theory/arith/nl/nonlinear_extension.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -79,4 +79,4 @@ Node ArgTrie::add(Node d, const std::vector& args) } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/nl/nl_lemma_utils.h b/src/theory/arith/nl/nl_lemma_utils.h index dba5e6ad2..d80cfcf60 100644 --- a/src/theory/arith/nl/nl_lemma_utils.h +++ b/src/theory/arith/nl/nl_lemma_utils.h @@ -22,7 +22,7 @@ #include "expr/node.h" #include "theory/theory_inference.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -145,6 +145,6 @@ class ArgTrie } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__ARITH__NL_LEMMA_UTILS_H */ diff --git a/src/theory/arith/nl/nl_model.cpp b/src/theory/arith/nl/nl_model.cpp index 4a60b0a62..50ddb8d3e 100644 --- a/src/theory/arith/nl/nl_model.cpp +++ b/src/theory/arith/nl/nl_model.cpp @@ -25,9 +25,9 @@ #include "theory/theory_model.h" #include "theory/rewriter.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -1121,4 +1121,4 @@ Node NlModel::getSubstitutedForm(TNode s) const } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/nl/nl_model.h b/src/theory/arith/nl/nl_model.h index a9cc38b36..a643066f1 100644 --- a/src/theory/arith/nl/nl_model.h +++ b/src/theory/arith/nl/nl_model.h @@ -25,7 +25,7 @@ #include "expr/subs.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { namespace context { class Context; @@ -304,6 +304,6 @@ class NlModel : protected EnvObj } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__ARITH__NONLINEAR_EXTENSION_H */ diff --git a/src/theory/arith/nl/nonlinear_extension.cpp b/src/theory/arith/nl/nonlinear_extension.cpp index 6a554272d..3b1742688 100644 --- a/src/theory/arith/nl/nonlinear_extension.cpp +++ b/src/theory/arith/nl/nonlinear_extension.cpp @@ -33,9 +33,9 @@ #include "theory/theory_model.h" #include "util/rational.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -529,4 +529,4 @@ void NonlinearExtension::runStrategy(Theory::Effort effort, } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/nl/nonlinear_extension.h b/src/theory/arith/nl/nonlinear_extension.h index 337f26cb2..45e8f7d91 100644 --- a/src/theory/arith/nl/nonlinear_extension.h +++ b/src/theory/arith/nl/nonlinear_extension.h @@ -42,7 +42,7 @@ #include "theory/theory.h" #include "util/result.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace eq { class EqualityEngine; @@ -267,6 +267,6 @@ class NonlinearExtension : EnvObj } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__ARITH__NONLINEAR_EXTENSION_H */ diff --git a/src/theory/arith/nl/poly_conversion.cpp b/src/theory/arith/nl/poly_conversion.cpp index 0327af22c..7ff8cfa25 100644 --- a/src/theory/arith/nl/poly_conversion.cpp +++ b/src/theory/arith/nl/poly_conversion.cpp @@ -22,14 +22,14 @@ #include "theory/arith/bound_inference.h" #include "util/poly_util.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { -poly::Variable VariableMapper::operator()(const cvc5::Node& n) +poly::Variable VariableMapper::operator()(const cvc5::internal::Node& n) { auto it = mVarCVCpoly.find(n); if (it == mVarCVCpoly.end()) @@ -55,7 +55,7 @@ poly::Variable VariableMapper::operator()(const cvc5::Node& n) return it->second; } -cvc5::Node VariableMapper::operator()(const poly::Variable& n) +cvc5::internal::Node VariableMapper::operator()(const poly::Variable& n) { auto it = mVarpolyCVC.find(n); Assert(it != mVarpolyCVC.end()) @@ -63,7 +63,7 @@ cvc5::Node VariableMapper::operator()(const poly::Variable& n) return it->second; } -cvc5::Node as_cvc_upolynomial(const poly::UPolynomial& p, const cvc5::Node& var) +cvc5::internal::Node as_cvc_upolynomial(const poly::UPolynomial& p, const cvc5::internal::Node& var) { Trace("poly::conversion") << "Converting " << p << " over " << var << std::endl; @@ -89,9 +89,9 @@ cvc5::Node as_cvc_upolynomial(const poly::UPolynomial& p, const cvc5::Node& var) return res; } -poly::UPolynomial as_poly_upolynomial_impl(const cvc5::Node& n, +poly::UPolynomial as_poly_upolynomial_impl(const cvc5::internal::Node& n, poly::Integer& denominator, - const cvc5::Node& var) + const cvc5::internal::Node& var) { denominator = poly::Integer(1); if (n.isVar()) @@ -142,14 +142,14 @@ poly::UPolynomial as_poly_upolynomial_impl(const cvc5::Node& n, return poly::UPolynomial(); } -poly::UPolynomial as_poly_upolynomial(const cvc5::Node& n, - const cvc5::Node& var) +poly::UPolynomial as_poly_upolynomial(const cvc5::internal::Node& n, + const cvc5::internal::Node& var) { poly::Integer denom; return as_poly_upolynomial_impl(n, denom, var); } -poly::Polynomial as_poly_polynomial_impl(const cvc5::Node& n, +poly::Polynomial as_poly_polynomial_impl(const cvc5::internal::Node& n, poly::Integer& denominator, VariableMapper& vm) { @@ -197,12 +197,12 @@ poly::Polynomial as_poly_polynomial_impl(const cvc5::Node& n, } return poly::Polynomial(); } -poly::Polynomial as_poly_polynomial(const cvc5::Node& n, VariableMapper& vm) +poly::Polynomial as_poly_polynomial(const cvc5::internal::Node& n, VariableMapper& vm) { poly::Integer denom; return as_poly_polynomial_impl(n, denom, vm); } -poly::Polynomial as_poly_polynomial(const cvc5::Node& n, +poly::Polynomial as_poly_polynomial(const cvc5::internal::Node& n, VariableMapper& vm, poly::Rational& denominator) { @@ -259,7 +259,7 @@ void collect_monomials(const lp_polynomial_context_t* ctx, } } // namespace -cvc5::Node as_cvc_polynomial(const poly::Polynomial& p, VariableMapper& vm) +cvc5::internal::Node as_cvc_polynomial(const poly::Polynomial& p, VariableMapper& vm) { CollectMonomialData cmd(vm); // Do the actual conversion @@ -276,7 +276,7 @@ cvc5::Node as_cvc_polynomial(const poly::Polynomial& p, VariableMapper& vm) return cmd.d_nm->mkNode(Kind::ADD, cmd.d_terms); } -poly::SignCondition normalize_kind(cvc5::Kind kind, +poly::SignCondition normalize_kind(cvc5::internal::Kind kind, bool negated, poly::Polynomial& lhs) { @@ -824,6 +824,6 @@ poly::IntervalAssignment getBounds(VariableMapper& vm, const BoundInference& bi) } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/arith/nl/poly_conversion.h b/src/theory/arith/nl/poly_conversion.h index f9c82fa1f..5c1b5b1ef 100644 --- a/src/theory/arith/nl/poly_conversion.h +++ b/src/theory/arith/nl/poly_conversion.h @@ -29,7 +29,7 @@ #include "expr/node.h" #include "util/real_algebraic_number.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -41,23 +41,23 @@ namespace nl { struct VariableMapper { /** A mapping from cvc5 variables to poly variables. */ - std::map mVarCVCpoly; + std::map mVarCVCpoly; /** A mapping from poly variables to cvc5 variables. */ - std::map mVarpolyCVC; + std::map mVarpolyCVC; /** Retrieves the according poly variable. */ - poly::Variable operator()(const cvc5::Node& n); + poly::Variable operator()(const cvc5::internal::Node& n); /** Retrieves the according cvc5 variable. */ - cvc5::Node operator()(const poly::Variable& n); + cvc5::internal::Node operator()(const poly::Variable& n); }; -/** Convert a poly univariate polynomial to a cvc5::Node. */ -cvc5::Node as_cvc_upolynomial(const poly::UPolynomial& p, - const cvc5::Node& var); +/** Convert a poly univariate polynomial to a cvc5::internal::Node. */ +cvc5::internal::Node as_cvc_upolynomial(const poly::UPolynomial& p, + const cvc5::internal::Node& var); -/** Convert a cvc5::Node to a poly univariate polynomial. */ -poly::UPolynomial as_poly_upolynomial(const cvc5::Node& n, - const cvc5::Node& var); +/** Convert a cvc5::internal::Node to a poly univariate polynomial. */ +poly::UPolynomial as_poly_upolynomial(const cvc5::internal::Node& n, + const cvc5::internal::Node& var); /** * Constructs a polynomial from the given node. @@ -72,8 +72,8 @@ poly::UPolynomial as_poly_upolynomial(const cvc5::Node& n, * in the context of ICP) the second overload provides the denominator in the * third argument. */ -poly::Polynomial as_poly_polynomial(const cvc5::Node& n, VariableMapper& vm); -poly::Polynomial as_poly_polynomial(const cvc5::Node& n, +poly::Polynomial as_poly_polynomial(const cvc5::internal::Node& n, VariableMapper& vm); +poly::Polynomial as_poly_polynomial(const cvc5::internal::Node& n, VariableMapper& vm, poly::Rational& denominator); @@ -86,7 +86,7 @@ poly::Polynomial as_poly_polynomial(const cvc5::Node& n, * multiplications with one or use NONLINEAR_MULT where regular MULT may be * sufficient), so it may be sensible to rewrite it afterwards. */ -cvc5::Node as_cvc_polynomial(const poly::Polynomial& p, VariableMapper& vm); +cvc5::internal::Node as_cvc_polynomial(const poly::Polynomial& p, VariableMapper& vm); /** * Constructs a constraints (a polynomial and a sign condition) from the given @@ -163,7 +163,7 @@ poly::IntervalAssignment getBounds(VariableMapper& vm, const BoundInference& bi) } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/arith/nl/pow2_solver.cpp b/src/theory/arith/nl/pow2_solver.cpp index cf7243a70..f82e3ce6c 100644 --- a/src/theory/arith/nl/pow2_solver.cpp +++ b/src/theory/arith/nl/pow2_solver.cpp @@ -26,9 +26,9 @@ #include "theory/rewriter.h" #include "util/bitvector.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -196,4 +196,4 @@ Node Pow2Solver::valueBasedLemma(Node i) } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/nl/pow2_solver.h b/src/theory/arith/nl/pow2_solver.h index 42586f206..60b71ec52 100644 --- a/src/theory/arith/nl/pow2_solver.h +++ b/src/theory/arith/nl/pow2_solver.h @@ -22,7 +22,7 @@ #include "expr/node.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -108,6 +108,6 @@ class Pow2Solver : protected EnvObj } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__ARITH__POW2_SOLVER_H */ diff --git a/src/theory/arith/nl/stats.cpp b/src/theory/arith/nl/stats.cpp index b20214f59..e9d9a1123 100644 --- a/src/theory/arith/nl/stats.cpp +++ b/src/theory/arith/nl/stats.cpp @@ -17,7 +17,7 @@ #include "smt/smt_statistics_registry.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -31,4 +31,4 @@ NlStats::NlStats() } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/nl/stats.h b/src/theory/arith/nl/stats.h index 4f30031be..93b83b902 100644 --- a/src/theory/arith/nl/stats.h +++ b/src/theory/arith/nl/stats.h @@ -20,7 +20,7 @@ #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -44,6 +44,6 @@ class NlStats } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__ARITH__NL__STATS_H */ diff --git a/src/theory/arith/nl/strategy.cpp b/src/theory/arith/nl/strategy.cpp index 8ea46099c..ed1697cbc 100644 --- a/src/theory/arith/nl/strategy.cpp +++ b/src/theory/arith/nl/strategy.cpp @@ -20,7 +20,7 @@ #include "base/check.h" #include "options/arith_options.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -186,4 +186,4 @@ StepGenerator Strategy::getStrategy() } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/nl/strategy.h b/src/theory/arith/nl/strategy.h index a0d257d2a..f39545892 100644 --- a/src/theory/arith/nl/strategy.h +++ b/src/theory/arith/nl/strategy.h @@ -21,7 +21,7 @@ #include "options/options.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -184,6 +184,6 @@ class Strategy } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__ARITH__NL__STRATEGY_H */ diff --git a/src/theory/arith/nl/transcendental/exponential_solver.cpp b/src/theory/arith/nl/transcendental/exponential_solver.cpp index ccfc2f265..b869f2e72 100644 --- a/src/theory/arith/nl/transcendental/exponential_solver.cpp +++ b/src/theory/arith/nl/transcendental/exponential_solver.cpp @@ -29,9 +29,9 @@ #include "theory/arith/nl/transcendental/transcendental_state.h" #include "theory/rewriter.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -279,4 +279,4 @@ std::pair ExponentialSolver::getSecantBounds(TNode e, } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/nl/transcendental/exponential_solver.h b/src/theory/arith/nl/transcendental/exponential_solver.h index 196b109ed..66d06b392 100644 --- a/src/theory/arith/nl/transcendental/exponential_solver.h +++ b/src/theory/arith/nl/transcendental/exponential_solver.h @@ -21,7 +21,7 @@ #include "expr/node.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -110,6 +110,6 @@ class ExponentialSolver : protected EnvObj } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__ARITH__TRANSCENDENTAL_SOLVER_H */ diff --git a/src/theory/arith/nl/transcendental/proof_checker.cpp b/src/theory/arith/nl/transcendental/proof_checker.cpp index 547bd3de3..d7b990db3 100644 --- a/src/theory/arith/nl/transcendental/proof_checker.cpp +++ b/src/theory/arith/nl/transcendental/proof_checker.cpp @@ -20,9 +20,9 @@ #include "theory/arith/nl/transcendental/taylor_generator.h" #include "theory/evaluator.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -389,4 +389,4 @@ Node TranscendentalProofRuleChecker::checkInternal( } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/nl/transcendental/proof_checker.h b/src/theory/arith/nl/transcendental/proof_checker.h index 06359e62a..7ac95e0f5 100644 --- a/src/theory/arith/nl/transcendental/proof_checker.h +++ b/src/theory/arith/nl/transcendental/proof_checker.h @@ -22,7 +22,7 @@ #include "proof/proof_checker.h" #include "proof/proof_node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -54,6 +54,6 @@ class TranscendentalProofRuleChecker : public ProofRuleChecker } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__STRINGS__PROOF_CHECKER_H */ diff --git a/src/theory/arith/nl/transcendental/sine_solver.cpp b/src/theory/arith/nl/transcendental/sine_solver.cpp index b937dcb99..183866440 100644 --- a/src/theory/arith/nl/transcendental/sine_solver.cpp +++ b/src/theory/arith/nl/transcendental/sine_solver.cpp @@ -30,9 +30,9 @@ #include "theory/arith/nl/transcendental/transcendental_state.h" #include "theory/rewriter.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -608,4 +608,4 @@ bool SineSolver::hasExactModelValue(TNode n) const } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/nl/transcendental/sine_solver.h b/src/theory/arith/nl/transcendental/sine_solver.h index 9a635b7d0..667796451 100644 --- a/src/theory/arith/nl/transcendental/sine_solver.h +++ b/src/theory/arith/nl/transcendental/sine_solver.h @@ -22,7 +22,7 @@ #include "smt/env_obj.h" #include "theory/arith/nl/transcendental/transcendental_state.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -198,6 +198,6 @@ class SineSolver : protected EnvObj } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__ARITH__TRANSCENDENTAL_SOLVER_H */ diff --git a/src/theory/arith/nl/transcendental/taylor_generator.cpp b/src/theory/arith/nl/transcendental/taylor_generator.cpp index f9ff63cc5..9085e388b 100644 --- a/src/theory/arith/nl/transcendental/taylor_generator.cpp +++ b/src/theory/arith/nl/transcendental/taylor_generator.cpp @@ -20,9 +20,9 @@ #include "theory/evaluator.h" #include "theory/rewriter.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -244,4 +244,4 @@ std::pair TaylorGenerator::getTfModelBounds(Node tf, } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/nl/transcendental/taylor_generator.h b/src/theory/arith/nl/transcendental/taylor_generator.h index ea082d87b..0228b1be3 100644 --- a/src/theory/arith/nl/transcendental/taylor_generator.h +++ b/src/theory/arith/nl/transcendental/taylor_generator.h @@ -18,7 +18,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -118,6 +118,6 @@ class TaylorGenerator } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__ARITH__TRANSCENDENTAL_SOLVER_H */ diff --git a/src/theory/arith/nl/transcendental/transcendental_solver.cpp b/src/theory/arith/nl/transcendental/transcendental_solver.cpp index 28b11d404..0d5a75b86 100644 --- a/src/theory/arith/nl/transcendental/transcendental_solver.cpp +++ b/src/theory/arith/nl/transcendental/transcendental_solver.cpp @@ -29,9 +29,9 @@ #include "theory/arith/nl/transcendental/taylor_generator.h" #include "theory/rewriter.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -510,4 +510,4 @@ void TranscendentalSolver::postProcessModel(std::map& arithModel, } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/nl/transcendental/transcendental_solver.h b/src/theory/arith/nl/transcendental/transcendental_solver.h index 413d4535f..6efbe17f6 100644 --- a/src/theory/arith/nl/transcendental/transcendental_solver.h +++ b/src/theory/arith/nl/transcendental/transcendental_solver.h @@ -24,7 +24,7 @@ #include "theory/arith/nl/transcendental/sine_solver.h" #include "theory/arith/nl/transcendental/transcendental_state.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -220,6 +220,6 @@ class TranscendentalSolver : protected EnvObj } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__ARITH__TRANSCENDENTAL_SOLVER_H */ diff --git a/src/theory/arith/nl/transcendental/transcendental_state.cpp b/src/theory/arith/nl/transcendental/transcendental_state.cpp index 51a1e6a51..dc5d2a495 100644 --- a/src/theory/arith/nl/transcendental/transcendental_state.cpp +++ b/src/theory/arith/nl/transcendental/transcendental_state.cpp @@ -23,9 +23,9 @@ #include "theory/arith/nl/transcendental/taylor_generator.h" #include "theory/rewriter.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -511,4 +511,4 @@ bool TranscendentalState::addModelBoundForPurifyTerm(TNode n, TNode l, TNode u) } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/nl/transcendental/transcendental_state.h b/src/theory/arith/nl/transcendental/transcendental_state.h index 3cb1790d4..9c36245df 100644 --- a/src/theory/arith/nl/transcendental/transcendental_state.h +++ b/src/theory/arith/nl/transcendental/transcendental_state.h @@ -25,7 +25,7 @@ #include "theory/arith/nl/transcendental/proof_checker.h" #include "theory/arith/nl/transcendental/taylor_generator.h" -namespace cvc5 { +namespace cvc5::internal { class CDProof; namespace theory { namespace arith { @@ -281,6 +281,6 @@ class TranscendentalState : protected EnvObj } // namespace nl } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__ARITH__NL__TRANSCENDENTAL__TRANSCENDENTAL_STATE_H */ diff --git a/src/theory/arith/normal_form.cpp b/src/theory/arith/normal_form.cpp index 8f3c98a25..baa5981a2 100644 --- a/src/theory/arith/normal_form.cpp +++ b/src/theory/arith/normal_form.cpp @@ -25,7 +25,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -1424,4 +1424,4 @@ bool Polynomial::isNonlinear() const { } //namespace arith } //namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/normal_form.h b/src/theory/arith/normal_form.h index 545c72a5b..168c651b8 100644 --- a/src/theory/arith/normal_form.h +++ b/src/theory/arith/normal_form.h @@ -29,7 +29,7 @@ #include "theory/arith/delta_rational.h" #include "util/rational.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -1461,6 +1461,6 @@ public: } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__ARITH__NORMAL_FORM_H */ diff --git a/src/theory/arith/operator_elim.cpp b/src/theory/arith/operator_elim.cpp index 18f30344a..178caa42f 100644 --- a/src/theory/arith/operator_elim.cpp +++ b/src/theory/arith/operator_elim.cpp @@ -27,9 +27,9 @@ #include "theory/rewriter.h" #include "theory/theory.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -467,4 +467,4 @@ SkolemLemma OperatorElim::mkSkolemLemma(Node lem, Node k) } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/operator_elim.h b/src/theory/arith/operator_elim.h index dbde6842d..7cae340ff 100644 --- a/src/theory/arith/operator_elim.h +++ b/src/theory/arith/operator_elim.h @@ -24,7 +24,7 @@ #include "theory/logic_info.h" #include "theory/skolem_lemma.h" -namespace cvc5 { +namespace cvc5::internal { class TConvProofGenerator; @@ -136,4 +136,4 @@ class OperatorElim : protected EnvObj, public EagerProofGenerator } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/partial_model.cpp b/src/theory/arith/partial_model.cpp index 72315b6a6..58218a731 100644 --- a/src/theory/arith/partial_model.cpp +++ b/src/theory/arith/partial_model.cpp @@ -23,7 +23,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -687,4 +687,4 @@ void ArithVariables::UpperBoundCleanUp::operator()(AVCPair* p){ } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/partial_model.h b/src/theory/arith/partial_model.h index b88281495..05f3db6be 100644 --- a/src/theory/arith/partial_model.h +++ b/src/theory/arith/partial_model.h @@ -33,7 +33,7 @@ #include "theory/arith/constraint_forward.h" #include "theory/arith/delta_rational.h" -namespace cvc5 { +namespace cvc5::internal { namespace context { class Context; } @@ -415,6 +415,6 @@ private: } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__ARITH__PARTIAL_MODEL_H */ diff --git a/src/theory/arith/pp_rewrite_eq.cpp b/src/theory/arith/pp_rewrite_eq.cpp index a78dd0e79..1b9e6d805 100644 --- a/src/theory/arith/pp_rewrite_eq.cpp +++ b/src/theory/arith/pp_rewrite_eq.cpp @@ -20,7 +20,7 @@ #include "theory/builtin/proof_checker.h" #include "theory/rewriter.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -58,4 +58,4 @@ TrustNode PreprocessRewriteEq::ppRewriteEq(TNode atom) } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/pp_rewrite_eq.h b/src/theory/arith/pp_rewrite_eq.h index 792477440..8ed4cba80 100644 --- a/src/theory/arith/pp_rewrite_eq.h +++ b/src/theory/arith/pp_rewrite_eq.h @@ -24,7 +24,7 @@ #include "proof/proof_node_manager.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -52,6 +52,6 @@ class PreprocessRewriteEq : protected EnvObj } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/arith/proof_checker.cpp b/src/theory/arith/proof_checker.cpp index e9d62ed6f..3cba887dd 100644 --- a/src/theory/arith/proof_checker.cpp +++ b/src/theory/arith/proof_checker.cpp @@ -25,9 +25,9 @@ #include "theory/arith/normal_form.h" #include "theory/arith/operator_elim.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -363,4 +363,4 @@ Node ArithProofRuleChecker::checkInternal(PfRule id, } } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/proof_checker.h b/src/theory/arith/proof_checker.h index 8fa9f21c1..ce4c62298 100644 --- a/src/theory/arith/proof_checker.h +++ b/src/theory/arith/proof_checker.h @@ -21,7 +21,7 @@ #include "expr/node.h" #include "proof/proof_checker.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -44,6 +44,6 @@ class ArithProofRuleChecker : public ProofRuleChecker } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__ARITH__PROOF_CHECKER_H */ diff --git a/src/theory/arith/rewriter/addition.cpp b/src/theory/arith/rewriter/addition.cpp index 9e4cee966..3a2cdbecf 100644 --- a/src/theory/arith/rewriter/addition.cpp +++ b/src/theory/arith/rewriter/addition.cpp @@ -23,7 +23,7 @@ #include "theory/arith/rewriter/ordering.h" #include "util/real_algebraic_number.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace rewriter { @@ -292,4 +292,4 @@ Node distributeMultiplication(const std::vector& factors) } // namespace rewriter } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/rewriter/addition.h b/src/theory/arith/rewriter/addition.h index fa2a75067..f21f560d8 100644 --- a/src/theory/arith/rewriter/addition.h +++ b/src/theory/arith/rewriter/addition.h @@ -25,7 +25,7 @@ #include "theory/arith/rewriter/ordering.h" #include "util/real_algebraic_number.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace rewriter { @@ -94,6 +94,6 @@ Node distributeMultiplication(const std::vector& factors); } // namespace rewriter } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/arith/rewriter/node_utils.cpp b/src/theory/arith/rewriter/node_utils.cpp index 69522b237..b38e2af30 100644 --- a/src/theory/arith/rewriter/node_utils.cpp +++ b/src/theory/arith/rewriter/node_utils.cpp @@ -18,7 +18,7 @@ #include "base/check.h" #include "theory/arith/rewriter/ordering.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace rewriter { @@ -82,4 +82,4 @@ Node mkMultTerm(const RealAlgebraicNumber& multiplicity, } // namespace rewriter } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/rewriter/node_utils.h b/src/theory/arith/rewriter/node_utils.h index a6d311b3d..5a84ac50f 100644 --- a/src/theory/arith/rewriter/node_utils.h +++ b/src/theory/arith/rewriter/node_utils.h @@ -24,7 +24,7 @@ #include "util/rational.h" #include "util/real_algebraic_number.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace rewriter { @@ -155,6 +155,6 @@ Node mkMultTerm(const RealAlgebraicNumber& multiplicity, } // namespace rewriter } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/arith/rewriter/ordering.h b/src/theory/arith/rewriter/ordering.h index 4b7d6c6fa..16a614e8c 100644 --- a/src/theory/arith/rewriter/ordering.h +++ b/src/theory/arith/rewriter/ordering.h @@ -21,7 +21,7 @@ #include "base/check.h" #include "expr/node.h" -namespace cvc5::theory::arith::rewriter { +namespace cvc5::internal::theory::arith::rewriter { /** * Implements an ordering on arithmetic leaf nodes. We expect that values have @@ -109,6 +109,6 @@ struct TermComparator } }; -} // namespace cvc5::theory::arith::rewriter +} // namespace cvc5::internal::theory::arith::rewriter #endif diff --git a/src/theory/arith/rewriter/rewrite_atom.cpp b/src/theory/arith/rewriter/rewrite_atom.cpp index f412abe6b..4307874b8 100644 --- a/src/theory/arith/rewriter/rewrite_atom.cpp +++ b/src/theory/arith/rewriter/rewrite_atom.cpp @@ -18,7 +18,7 @@ #include "base/check.h" #include "theory/arith/rewriter/node_utils.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace rewriter { @@ -352,4 +352,4 @@ Node buildRealInequality(Sum&& sum, Kind k) } // namespace rewriter } // namespace arith } // namespace theory -} // namespace cvc5 \ No newline at end of file +} // namespace cvc5::internal \ No newline at end of file diff --git a/src/theory/arith/rewriter/rewrite_atom.h b/src/theory/arith/rewriter/rewrite_atom.h index 2648228bd..ed50946e0 100644 --- a/src/theory/arith/rewriter/rewrite_atom.h +++ b/src/theory/arith/rewriter/rewrite_atom.h @@ -23,7 +23,7 @@ #include "expr/node.h" #include "theory/arith/rewriter/addition.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace rewriter { @@ -90,6 +90,6 @@ Node buildRealInequality(Sum&& sum, Kind k); } // namespace rewriter } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/arith/rewrites.cpp b/src/theory/arith/rewrites.cpp index 2283cd73a..271c619b9 100644 --- a/src/theory/arith/rewrites.cpp +++ b/src/theory/arith/rewrites.cpp @@ -17,7 +17,7 @@ #include -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -51,4 +51,4 @@ std::ostream& operator<<(std::ostream& out, Rewrite r) } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/rewrites.h b/src/theory/arith/rewrites.h index 996bc4520..157c9a0dc 100644 --- a/src/theory/arith/rewrites.h +++ b/src/theory/arith/rewrites.h @@ -20,7 +20,7 @@ #include -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -84,6 +84,6 @@ std::ostream& operator<<(std::ostream& out, Rewrite r); } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__ARITH__REWRITES_H */ diff --git a/src/theory/arith/simplex.cpp b/src/theory/arith/simplex.cpp index e82a3de39..13894c468 100644 --- a/src/theory/arith/simplex.cpp +++ b/src/theory/arith/simplex.cpp @@ -28,7 +28,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -287,4 +287,4 @@ SimplexDecisionProcedure::sgn_table::const_iterator SimplexDecisionProcedure::fi } } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/simplex.h b/src/theory/arith/simplex.h index 172b080ad..c03a699ce 100644 --- a/src/theory/arith/simplex.h +++ b/src/theory/arith/simplex.h @@ -65,7 +65,7 @@ #include "util/result.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -232,4 +232,4 @@ protected: } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/simplex_update.cpp b/src/theory/arith/simplex_update.cpp index 78e58000e..6bf18465a 100644 --- a/src/theory/arith/simplex_update.cpp +++ b/src/theory/arith/simplex_update.cpp @@ -19,7 +19,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -27,7 +27,7 @@ namespace arith { * Generates a string representation of std::optional and inserts it into a * stream. * - * Note: We define this function here in the cvc5::theory::arith namespace, + * Note: We define this function here in the cvc5::internal::theory::arith namespace, * because it would otherwise not be found for std::optional. This is due * to the argument-dependent lookup rules. * @@ -37,7 +37,7 @@ namespace arith { */ std::ostream& operator<<(std::ostream& out, const std::optional& m) { - return cvc5::operator<<(out, m); + return cvc5::internal::operator<<(out, m); } UpdateInfo::UpdateInfo(): @@ -204,4 +204,4 @@ std::ostream& operator<<(std::ostream& out, WitnessImprovement w){ } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/simplex_update.h b/src/theory/arith/simplex_update.h index 7efa51acb..6c6d7a42a 100644 --- a/src/theory/arith/simplex_update.h +++ b/src/theory/arith/simplex_update.h @@ -35,7 +35,7 @@ #include "theory/arith/constraint_forward.h" #include "theory/arith/delta_rational.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -357,4 +357,4 @@ std::ostream& operator<<(std::ostream& out, const UpdateInfo& up); } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/soi_simplex.cpp b/src/theory/arith/soi_simplex.cpp index bdef50f8d..25ed0ed10 100644 --- a/src/theory/arith/soi_simplex.cpp +++ b/src/theory/arith/soi_simplex.cpp @@ -27,7 +27,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -909,4 +909,4 @@ Result::Status SumOfInfeasibilitiesSPD::sumOfInfeasibilities() } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/soi_simplex.h b/src/theory/arith/soi_simplex.h index c0962c87c..d66063e48 100644 --- a/src/theory/arith/soi_simplex.h +++ b/src/theory/arith/soi_simplex.h @@ -61,7 +61,7 @@ #include "util/dense_map.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -224,4 +224,4 @@ private: } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/tableau.cpp b/src/theory/arith/tableau.cpp index 250c966d4..2847aeb93 100644 --- a/src/theory/arith/tableau.cpp +++ b/src/theory/arith/tableau.cpp @@ -20,7 +20,7 @@ #include "theory/arith/tableau.h" using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -193,4 +193,4 @@ void Tableau::printBasicRow(ArithVar basic, std::ostream& out){ } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/tableau.h b/src/theory/arith/tableau.h index 52920850a..64587ab6e 100644 --- a/src/theory/arith/tableau.h +++ b/src/theory/arith/tableau.h @@ -27,7 +27,7 @@ #include "util/dense_map.h" #include "util/rational.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -160,4 +160,4 @@ private: } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/tableau_sizes.cpp b/src/theory/arith/tableau_sizes.cpp index 6f60c3696..a157999db 100644 --- a/src/theory/arith/tableau_sizes.cpp +++ b/src/theory/arith/tableau_sizes.cpp @@ -20,7 +20,7 @@ #include "theory/arith/tableau_sizes.h" #include "theory/arith/tableau.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -34,4 +34,4 @@ uint32_t TableauSizes::getColumnLength(ArithVar x) const { } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/tableau_sizes.h b/src/theory/arith/tableau_sizes.h index f23966c3c..106482c2c 100644 --- a/src/theory/arith/tableau_sizes.h +++ b/src/theory/arith/tableau_sizes.h @@ -22,7 +22,7 @@ #include "theory/arith/arithvar.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -40,4 +40,4 @@ public: } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/theory_arith.cpp b/src/theory/arith/theory_arith.cpp index 5337a725b..483e429ca 100644 --- a/src/theory/arith/theory_arith.cpp +++ b/src/theory/arith/theory_arith.cpp @@ -30,9 +30,9 @@ #include "theory/theory_model.h" using namespace std; -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -434,4 +434,4 @@ bool TheoryArith::sanityCheckIntegerModel() } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/theory_arith.h b/src/theory/arith/theory_arith.h index 13f4f8ad7..43672f3f9 100644 --- a/src/theory/arith/theory_arith.h +++ b/src/theory/arith/theory_arith.h @@ -26,7 +26,7 @@ #include "theory/arith/pp_rewrite_eq.h" #include "theory/theory.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { namespace nl { @@ -187,4 +187,4 @@ class TheoryArith : public Theory { } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/theory_arith_private.cpp b/src/theory/arith/theory_arith_private.cpp index 1fd44f136..5c43e6ebb 100644 --- a/src/theory/arith/theory_arith_private.cpp +++ b/src/theory/arith/theory_arith_private.cpp @@ -76,9 +76,9 @@ #include "util/statistics_stats.h" using namespace std; -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -4985,4 +4985,4 @@ ArithProofRuleChecker* TheoryArithPrivate::getProofChecker() } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/theory_arith_private.h b/src/theory/arith/theory_arith_private.h index 43b073460..6e11f124d 100644 --- a/src/theory/arith/theory_arith_private.h +++ b/src/theory/arith/theory_arith_private.h @@ -56,7 +56,7 @@ #include "util/result.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { class EagerProofGenerator; @@ -878,4 +878,4 @@ private: } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/theory_arith_type_rules.cpp b/src/theory/arith/theory_arith_type_rules.cpp index c743639e0..c1af3dc3b 100644 --- a/src/theory/arith/theory_arith_type_rules.cpp +++ b/src/theory/arith/theory_arith_type_rules.cpp @@ -17,7 +17,7 @@ #include "util/rational.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -211,4 +211,4 @@ TypeNode IndexedRootPredicateTypeRule::computeType(NodeManager* nodeManager, } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arith/theory_arith_type_rules.h b/src/theory/arith/theory_arith_type_rules.h index d1153f63f..f5f25b290 100644 --- a/src/theory/arith/theory_arith_type_rules.h +++ b/src/theory/arith/theory_arith_type_rules.h @@ -21,7 +21,7 @@ #include "expr/node.h" #include "expr/type_node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -125,6 +125,6 @@ class IndexedRootPredicateTypeRule } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__ARITH__THEORY_ARITH_TYPE_RULES_H */ diff --git a/src/theory/arith/type_enumerator.h b/src/theory/arith/type_enumerator.h index d57c4ba24..0e94ae1d2 100644 --- a/src/theory/arith/type_enumerator.h +++ b/src/theory/arith/type_enumerator.h @@ -24,7 +24,7 @@ #include "util/integer.h" #include "util/rational.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arith { @@ -105,6 +105,6 @@ class IntegerEnumerator : public TypeEnumeratorBase { } // namespace arith } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__ARITH__TYPE_ENUMERATOR_H */ diff --git a/src/theory/arrays/array_info.cpp b/src/theory/arrays/array_info.cpp index e6742a4cf..15db3e1fa 100644 --- a/src/theory/arrays/array_info.cpp +++ b/src/theory/arrays/array_info.cpp @@ -18,7 +18,7 @@ #include "smt/smt_statistics_registry.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arrays { @@ -503,4 +503,4 @@ void ArrayInfo::mergeInfo(const TNode a, const TNode b){ } // namespace arrays } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arrays/array_info.h b/src/theory/arrays/array_info.h index 534bb2ae5..a1136a272 100644 --- a/src/theory/arrays/array_info.h +++ b/src/theory/arrays/array_info.h @@ -27,7 +27,7 @@ #include "expr/node.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arrays { @@ -185,6 +185,6 @@ public: } // namespace arrays } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__ARRAYS__ARRAY_INFO_H */ diff --git a/src/theory/arrays/inference_manager.cpp b/src/theory/arrays/inference_manager.cpp index caef4502b..6df6bac8e 100644 --- a/src/theory/arrays/inference_manager.cpp +++ b/src/theory/arrays/inference_manager.cpp @@ -21,9 +21,9 @@ #include "theory/theory_state.h" #include "theory/uf/equality_engine.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arrays { @@ -132,4 +132,4 @@ void InferenceManager::convert(PfRule& id, } // namespace arrays } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arrays/inference_manager.h b/src/theory/arrays/inference_manager.h index f0e3bfe90..87ee30b57 100644 --- a/src/theory/arrays/inference_manager.h +++ b/src/theory/arrays/inference_manager.h @@ -23,7 +23,7 @@ #include "proof/proof_rule.h" #include "theory/theory_inference_manager.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arrays { @@ -72,6 +72,6 @@ class InferenceManager : public TheoryInferenceManager } // namespace arrays } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/arrays/kinds b/src/theory/arrays/kinds index 67abc149d..f97715bda 100644 --- a/src/theory/arrays/kinds +++ b/src/theory/arrays/kinds @@ -4,25 +4,25 @@ # src/theory/builtin/kinds. # -theory THEORY_ARRAYS ::cvc5::theory::arrays::TheoryArrays "theory/arrays/theory_arrays.h" +theory THEORY_ARRAYS ::cvc5::internal::theory::arrays::TheoryArrays "theory/arrays/theory_arrays.h" typechecker "theory/arrays/theory_arrays_type_rules.h" properties polite stable-infinite parametric properties check presolve -rewriter ::cvc5::theory::arrays::TheoryArraysRewriter "theory/arrays/theory_arrays_rewriter.h" +rewriter ::cvc5::internal::theory::arrays::TheoryArraysRewriter "theory/arrays/theory_arrays_rewriter.h" operator ARRAY_TYPE 2 "array type" cardinality ARRAY_TYPE \ - "::cvc5::theory::arrays::ArraysProperties::computeCardinality(%TYPE%)" \ + "::cvc5::internal::theory::arrays::ArraysProperties::computeCardinality(%TYPE%)" \ "theory/arrays/theory_arrays_type_rules.h" well-founded ARRAY_TYPE \ - "::cvc5::theory::arrays::ArraysProperties::isWellFounded(%TYPE%)" \ - "::cvc5::theory::arrays::ArraysProperties::mkGroundTerm(%TYPE%)" \ + "::cvc5::internal::theory::arrays::ArraysProperties::isWellFounded(%TYPE%)" \ + "::cvc5::internal::theory::arrays::ArraysProperties::mkGroundTerm(%TYPE%)" \ "theory/arrays/theory_arrays_type_rules.h" enumerator ARRAY_TYPE \ - "::cvc5::theory::arrays::ArrayEnumerator" \ + "::cvc5::internal::theory::arrays::ArrayEnumerator" \ "theory/arrays/type_enumerator.h" # select a i is a[i] @@ -38,9 +38,9 @@ operator EQ_RANGE 4 "equality of two arrays over an index range lower/upper" constant STORE_ALL \ class \ ArrayStoreAll \ - ::cvc5::ArrayStoreAllHashFunction \ + ::cvc5::internal::ArrayStoreAllHashFunction \ "expr/array_store_all.h" \ - "array store-all; payload is an instance of the cvc5::ArrayStoreAll class (this is not supported by arrays decision procedure yet, but it is used for returned array models)" + "array store-all; payload is an instance of the cvc5::internal::ArrayStoreAll class (this is not supported by arrays decision procedure yet, but it is used for returned array models)" # used internally by array theory operator ARR_TABLE_FUN 4 "array table function (internal-only symbol)" @@ -52,19 +52,19 @@ operator ARR_TABLE_FUN 4 "array table function (internal-only symbol)" # as a shifted over one. operator ARRAY_LAMBDA 1 "array lambda (internal-only symbol)" -typerule SELECT ::cvc5::theory::arrays::ArraySelectTypeRule -typerule STORE ::cvc5::theory::arrays::ArrayStoreTypeRule -typerule STORE_ALL ::cvc5::theory::arrays::ArrayStoreTypeRule -typerule ARR_TABLE_FUN ::cvc5::theory::arrays::ArrayTableFunTypeRule -typerule ARRAY_LAMBDA ::cvc5::theory::arrays::ArrayLambdaTypeRule -typerule EQ_RANGE ::cvc5::theory::arrays::ArrayEqRangeTypeRule +typerule SELECT ::cvc5::internal::theory::arrays::ArraySelectTypeRule +typerule STORE ::cvc5::internal::theory::arrays::ArrayStoreTypeRule +typerule STORE_ALL ::cvc5::internal::theory::arrays::ArrayStoreTypeRule +typerule ARR_TABLE_FUN ::cvc5::internal::theory::arrays::ArrayTableFunTypeRule +typerule ARRAY_LAMBDA ::cvc5::internal::theory::arrays::ArrayLambdaTypeRule +typerule EQ_RANGE ::cvc5::internal::theory::arrays::ArrayEqRangeTypeRule operator PARTIAL_SELECT_0 0:2 "partial array select, for internal use only" operator PARTIAL_SELECT_1 0:2 "partial array select, for internal use only" -typerule PARTIAL_SELECT_0 ::cvc5::theory::arrays::ArrayPartialSelectTypeRule -typerule PARTIAL_SELECT_1 ::cvc5::theory::arrays::ArrayPartialSelectTypeRule +typerule PARTIAL_SELECT_0 ::cvc5::internal::theory::arrays::ArrayPartialSelectTypeRule +typerule PARTIAL_SELECT_1 ::cvc5::internal::theory::arrays::ArrayPartialSelectTypeRule # store operations that are ordered (by index) over a store-all are constant -construle STORE ::cvc5::theory::arrays::ArrayStoreTypeRule +construle STORE ::cvc5::internal::theory::arrays::ArrayStoreTypeRule endtheory diff --git a/src/theory/arrays/proof_checker.cpp b/src/theory/arrays/proof_checker.cpp index 557a43a02..68b191c2d 100644 --- a/src/theory/arrays/proof_checker.cpp +++ b/src/theory/arrays/proof_checker.cpp @@ -20,7 +20,7 @@ #include "theory/arrays/theory_arrays_rewriter.h" #include "theory/rewriter.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arrays { @@ -115,4 +115,4 @@ Node ArraysProofRuleChecker::checkInternal(PfRule id, } // namespace arrays } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arrays/proof_checker.h b/src/theory/arrays/proof_checker.h index 0b7bef163..cbd16774e 100644 --- a/src/theory/arrays/proof_checker.h +++ b/src/theory/arrays/proof_checker.h @@ -21,7 +21,7 @@ #include "expr/node.h" #include "proof/proof_checker.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arrays { @@ -44,6 +44,6 @@ class ArraysProofRuleChecker : public ProofRuleChecker } // namespace arrays } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__ARRAYS__PROOF_CHECKER_H */ diff --git a/src/theory/arrays/skolem_cache.cpp b/src/theory/arrays/skolem_cache.cpp index efc39e55a..91b267efd 100644 --- a/src/theory/arrays/skolem_cache.cpp +++ b/src/theory/arrays/skolem_cache.cpp @@ -20,9 +20,9 @@ #include "expr/skolem_manager.h" #include "expr/type_node.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arrays { @@ -60,4 +60,4 @@ Node SkolemCache::getEqRangeVar(TNode eqr) } // namespace arrays } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arrays/skolem_cache.h b/src/theory/arrays/skolem_cache.h index f69bd6ffc..c2cf9a4d3 100644 --- a/src/theory/arrays/skolem_cache.h +++ b/src/theory/arrays/skolem_cache.h @@ -20,7 +20,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arrays { @@ -53,6 +53,6 @@ class SkolemCache } // namespace arrays } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/arrays/theory_arrays.cpp b/src/theory/arrays/theory_arrays.cpp index 72b05ec2d..8752779fd 100644 --- a/src/theory/arrays/theory_arrays.cpp +++ b/src/theory/arrays/theory_arrays.cpp @@ -35,7 +35,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arrays { @@ -2236,4 +2236,4 @@ void TheoryArrays::computeRelevantTerms(std::set& termSet) } // namespace arrays } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arrays/theory_arrays.h b/src/theory/arrays/theory_arrays.h index beefda7d6..0b10859c6 100644 --- a/src/theory/arrays/theory_arrays.h +++ b/src/theory/arrays/theory_arrays.h @@ -34,7 +34,7 @@ #include "theory/uf/equality_engine.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arrays { @@ -480,6 +480,6 @@ class TheoryArrays : public Theory { } // namespace arrays } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__ARRAYS__THEORY_ARRAYS_H */ diff --git a/src/theory/arrays/theory_arrays_rewriter.cpp b/src/theory/arrays/theory_arrays_rewriter.cpp index 2047bcb0f..86c554201 100644 --- a/src/theory/arrays/theory_arrays_rewriter.cpp +++ b/src/theory/arrays/theory_arrays_rewriter.cpp @@ -25,7 +25,7 @@ #include "theory/arrays/skolem_cache.h" #include "util/cardinality.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arrays { @@ -689,4 +689,4 @@ TrustNode TheoryArraysRewriter::expandDefinition(Node node) } // namespace arrays } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arrays/theory_arrays_rewriter.h b/src/theory/arrays/theory_arrays_rewriter.h index 2d746e664..9d0e78c08 100644 --- a/src/theory/arrays/theory_arrays_rewriter.h +++ b/src/theory/arrays/theory_arrays_rewriter.h @@ -28,7 +28,7 @@ #include "theory/theory_rewriter.h" #include "theory/type_enumerator.h" -namespace cvc5 { +namespace cvc5::internal { class EagerProofGenerator; @@ -84,6 +84,6 @@ class TheoryArraysRewriter : public TheoryRewriter } // namespace arrays } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__ARRAYS__THEORY_ARRAYS_REWRITER_H */ diff --git a/src/theory/arrays/theory_arrays_type_rules.cpp b/src/theory/arrays/theory_arrays_type_rules.cpp index 331178d89..84cad36b7 100644 --- a/src/theory/arrays/theory_arrays_type_rules.cpp +++ b/src/theory/arrays/theory_arrays_type_rules.cpp @@ -22,7 +22,7 @@ #include "theory/type_enumerator.h" #include "util/cardinality.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arrays { @@ -330,4 +330,4 @@ TypeNode ArrayEqRangeTypeRule::computeType(NodeManager* nodeManager, } // namespace arrays } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arrays/theory_arrays_type_rules.h b/src/theory/arrays/theory_arrays_type_rules.h index d8c75b9f9..2b5bcf362 100644 --- a/src/theory/arrays/theory_arrays_type_rules.h +++ b/src/theory/arrays/theory_arrays_type_rules.h @@ -21,7 +21,7 @@ #include "expr/node.h" #include "expr/type_node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arrays { @@ -68,6 +68,6 @@ struct ArrayEqRangeTypeRule } // namespace arrays } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__ARRAYS__THEORY_ARRAYS_TYPE_RULES_H */ diff --git a/src/theory/arrays/type_enumerator.cpp b/src/theory/arrays/type_enumerator.cpp index c1187f0da..05994f0f6 100644 --- a/src/theory/arrays/type_enumerator.cpp +++ b/src/theory/arrays/type_enumerator.cpp @@ -20,7 +20,7 @@ #include "theory/rewriter.h" #include "theory/type_enumerator.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arrays { @@ -156,4 +156,4 @@ bool ArrayEnumerator::isFinished() } // namespace arrays } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arrays/type_enumerator.h b/src/theory/arrays/type_enumerator.h index 097b16184..1017c4778 100644 --- a/src/theory/arrays/type_enumerator.h +++ b/src/theory/arrays/type_enumerator.h @@ -24,7 +24,7 @@ #include "theory/rewriter.h" #include "theory/type_enumerator.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arrays { @@ -62,6 +62,6 @@ class ArrayEnumerator : public TypeEnumeratorBase } // namespace arrays } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__ARRAYS__TYPE_ENUMERATOR_H */ diff --git a/src/theory/arrays/union_find.cpp b/src/theory/arrays/union_find.cpp index 5abc752d6..d6f1c3524 100644 --- a/src/theory/arrays/union_find.cpp +++ b/src/theory/arrays/union_find.cpp @@ -21,7 +21,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace arrays { @@ -51,4 +51,4 @@ template void UnionFind>::notify(); } // namespace arrays } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/arrays/union_find.h b/src/theory/arrays/union_find.h index c1a09491f..866d3ae86 100644 --- a/src/theory/arrays/union_find.h +++ b/src/theory/arrays/union_find.h @@ -26,7 +26,7 @@ #include "expr/node.h" #include "context/cdo.h" -namespace cvc5 { +namespace cvc5::internal { namespace context { class Context; @@ -135,6 +135,6 @@ inline void UnionFind::setCanon(TNode n, TNode newParent) { } // namespace arrays } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /*CVC5__THEORY__ARRAYS__UNION_FIND_H */ diff --git a/src/theory/assertion.cpp b/src/theory/assertion.cpp index 2022a43fe..1b66c9567 100644 --- a/src/theory/assertion.cpp +++ b/src/theory/assertion.cpp @@ -15,7 +15,7 @@ #include "theory/assertion.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { std::ostream& operator<<(std::ostream& out, const Assertion& a) { @@ -23,4 +23,4 @@ std::ostream& operator<<(std::ostream& out, const Assertion& a) { } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/assertion.h b/src/theory/assertion.h index f7d9b5be0..2187b15d7 100644 --- a/src/theory/assertion.h +++ b/src/theory/assertion.h @@ -20,7 +20,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { /** Information about an assertion for the theories. */ @@ -47,6 +47,6 @@ struct Assertion { std::ostream& operator<<(std::ostream& out, const Assertion& a); } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__ASSERTION_H */ diff --git a/src/theory/atom_requests.cpp b/src/theory/atom_requests.cpp index e0c7c9862..0b9560982 100644 --- a/src/theory/atom_requests.cpp +++ b/src/theory/atom_requests.cpp @@ -18,7 +18,7 @@ #include "theory/atom_requests.h" -using namespace cvc5; +using namespace cvc5::internal; AtomRequests::AtomRequests(context::Context* context) : d_allRequests(context) diff --git a/src/theory/atom_requests.h b/src/theory/atom_requests.h index 63d66f200..6ceb90e93 100644 --- a/src/theory/atom_requests.h +++ b/src/theory/atom_requests.h @@ -26,7 +26,7 @@ #include "context/cdhashset.h" #include "context/cdhashmap.h" -namespace cvc5 { +namespace cvc5::internal { class AtomRequests { @@ -115,4 +115,4 @@ private: }; -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/bags/bag_make_op.cpp b/src/theory/bags/bag_make_op.cpp index 786267976..bae58cf3d 100644 --- a/src/theory/bags/bag_make_op.cpp +++ b/src/theory/bags/bag_make_op.cpp @@ -19,7 +19,7 @@ #include "expr/type_node.h" -namespace cvc5 { +namespace cvc5::internal { std::ostream& operator<<(std::ostream& out, const BagMakeOp& op) { @@ -47,4 +47,4 @@ bool BagMakeOp::operator==(const BagMakeOp& op) const return getType() == op.getType(); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/bags/bag_make_op.h b/src/theory/bags/bag_make_op.h index e4a7e9e8f..87692549a 100644 --- a/src/theory/bags/bag_make_op.h +++ b/src/theory/bags/bag_make_op.h @@ -20,7 +20,7 @@ #include -namespace cvc5 { +namespace cvc5::internal { class TypeNode; @@ -58,6 +58,6 @@ struct BagMakeOpHashFunction size_t operator()(const BagMakeOp& op) const; }; /* struct BagMakeOpHashFunction */ -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__BAG_MAKE_OP_H */ diff --git a/src/theory/bags/bag_reduction.cpp b/src/theory/bags/bag_reduction.cpp index a4fba09b1..d2fcb455e 100644 --- a/src/theory/bags/bag_reduction.cpp +++ b/src/theory/bags/bag_reduction.cpp @@ -21,10 +21,10 @@ #include "theory/quantifiers/fmf/bounded_integers.h" #include "util/rational.h" -using namespace cvc5; -using namespace cvc5::kind; +using namespace cvc5::internal; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bags { @@ -208,4 +208,4 @@ Node BagReduction::reduceCardOperator(Node node, std::vector& asserts) } // namespace bags } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/bags/bag_reduction.h b/src/theory/bags/bag_reduction.h index 694379dfc..c99fa7a38 100644 --- a/src/theory/bags/bag_reduction.h +++ b/src/theory/bags/bag_reduction.h @@ -22,7 +22,7 @@ #include "smt/env_obj.h" #include "theory/bags/inference_manager.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bags { @@ -102,6 +102,6 @@ class BagReduction : EnvObj } // namespace bags } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__BAG_REDUCTION_H */ diff --git a/src/theory/bags/bag_solver.cpp b/src/theory/bags/bag_solver.cpp index f657d0e6a..32257b5b0 100644 --- a/src/theory/bags/bag_solver.cpp +++ b/src/theory/bags/bag_solver.cpp @@ -25,10 +25,10 @@ #include "util/rational.h" using namespace std; -using namespace cvc5::context; -using namespace cvc5::kind; +using namespace cvc5::internal::context; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bags { @@ -337,4 +337,4 @@ void BagSolver::checkProduct(Node n) } // namespace bags } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/bags/bag_solver.h b/src/theory/bags/bag_solver.h index e5dba3896..bd07d225e 100644 --- a/src/theory/bags/bag_solver.h +++ b/src/theory/bags/bag_solver.h @@ -23,7 +23,7 @@ #include "theory/bags/inference_generator.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bags { @@ -134,6 +134,6 @@ class BagSolver : protected EnvObj } // namespace bags } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__BAG__SOLVER_H */ diff --git a/src/theory/bags/bags_rewriter.cpp b/src/theory/bags/bags_rewriter.cpp index 2506f13e2..ba0f4d284 100644 --- a/src/theory/bags/bags_rewriter.cpp +++ b/src/theory/bags/bags_rewriter.cpp @@ -20,9 +20,9 @@ #include "util/rational.h" #include "util/statistics_registry.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bags { @@ -663,4 +663,4 @@ BagsRewriteResponse BagsRewriter::postRewriteProduct(const TNode& n) const } // namespace bags } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/bags/bags_rewriter.h b/src/theory/bags/bags_rewriter.h index be72f4017..5a28f45ca 100644 --- a/src/theory/bags/bags_rewriter.h +++ b/src/theory/bags/bags_rewriter.h @@ -22,7 +22,7 @@ #include "theory/theory_rewriter.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bags { @@ -268,6 +268,6 @@ class BagsRewriter : public TheoryRewriter } // namespace bags } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__BAGS__THEORY_BAGS_REWRITER_H */ diff --git a/src/theory/bags/bags_statistics.cpp b/src/theory/bags/bags_statistics.cpp index 5c351f0ac..d48497387 100644 --- a/src/theory/bags/bags_statistics.cpp +++ b/src/theory/bags/bags_statistics.cpp @@ -17,7 +17,7 @@ #include "smt/smt_statistics_registry.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bags { @@ -29,4 +29,4 @@ BagsStatistics::BagsStatistics() } // namespace bags } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/bags/bags_statistics.h b/src/theory/bags/bags_statistics.h index d2eb33dbe..893851dc3 100644 --- a/src/theory/bags/bags_statistics.h +++ b/src/theory/bags/bags_statistics.h @@ -21,7 +21,7 @@ #include "theory/bags/rewrites.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bags { @@ -39,6 +39,6 @@ class BagsStatistics } // namespace bags } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__BAGS_STATISTICS_H */ diff --git a/src/theory/bags/bags_utils.cpp b/src/theory/bags/bags_utils.cpp index 6514d8d3f..d3a1d137a 100644 --- a/src/theory/bags/bags_utils.cpp +++ b/src/theory/bags/bags_utils.cpp @@ -23,10 +23,10 @@ #include "theory/type_enumerator.h" #include "util/rational.h" -using namespace cvc5::kind; -using namespace cvc5::theory::datatypes; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::theory::datatypes; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bags { @@ -831,4 +831,4 @@ Node BagsUtils::evaluateProduct(TNode n) } // namespace bags } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/bags/bags_utils.h b/src/theory/bags/bags_utils.h index 3b6311ded..c2ff2c16a 100644 --- a/src/theory/bags/bags_utils.h +++ b/src/theory/bags/bags_utils.h @@ -20,7 +20,7 @@ #ifndef CVC5__THEORY__BAGS__UTILS_H #define CVC5__THEORY__BAGS__UTILS_H -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bags { @@ -233,6 +233,6 @@ class BagsUtils }; } // namespace bags } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__BAGS__UTILS_H */ diff --git a/src/theory/bags/card_solver.cpp b/src/theory/bags/card_solver.cpp index 6ec9b7a26..b8b874248 100644 --- a/src/theory/bags/card_solver.cpp +++ b/src/theory/bags/card_solver.cpp @@ -26,10 +26,10 @@ #include "util/rational.h" using namespace std; -using namespace cvc5::context; -using namespace cvc5::kind; +using namespace cvc5::internal::context; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bags { @@ -336,4 +336,4 @@ void CardSolver::checkLeafBag(const std::pair& pair, } // namespace bags } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/bags/card_solver.h b/src/theory/bags/card_solver.h index 9e08fcb62..74103e4fc 100644 --- a/src/theory/bags/card_solver.h +++ b/src/theory/bags/card_solver.h @@ -24,7 +24,7 @@ #include "theory/bags/inference_generator.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bags { @@ -142,6 +142,6 @@ class CardSolver : protected EnvObj } // namespace bags } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__CARD__SOLVER_H */ diff --git a/src/theory/bags/infer_info.cpp b/src/theory/bags/infer_info.cpp index 6b222cd36..7b40f67ec 100644 --- a/src/theory/bags/infer_info.cpp +++ b/src/theory/bags/infer_info.cpp @@ -18,7 +18,7 @@ #include "theory/bags/inference_manager.h" #include "theory/inference_manager_buffered.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bags { @@ -91,4 +91,4 @@ std::ostream& operator<<(std::ostream& out, const InferInfo& ii) } // namespace bags } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/bags/infer_info.h b/src/theory/bags/infer_info.h index d896844f6..e6c52f247 100644 --- a/src/theory/bags/infer_info.h +++ b/src/theory/bags/infer_info.h @@ -25,7 +25,7 @@ #include "theory/inference_id.h" #include "theory/theory_inference.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { class InferenceManagerBuffered; @@ -89,6 +89,6 @@ std::ostream& operator<<(std::ostream& out, const InferInfo& ii); } // namespace bags } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__BAGS__INFER_INFO_H */ diff --git a/src/theory/bags/inference_generator.cpp b/src/theory/bags/inference_generator.cpp index 140b6d0b8..41a6932a5 100644 --- a/src/theory/bags/inference_generator.cpp +++ b/src/theory/bags/inference_generator.cpp @@ -28,10 +28,10 @@ #include "theory/uf/equality_engine.h" #include "util/rational.h" -using namespace cvc5::kind; -using namespace cvc5::theory::datatypes; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::theory::datatypes; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bags { @@ -634,4 +634,4 @@ InferInfo InferenceGenerator::productDown(Node n, Node e) } // namespace bags } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/bags/inference_generator.h b/src/theory/bags/inference_generator.h index 8d67ea4f4..a8471ff3e 100644 --- a/src/theory/bags/inference_generator.h +++ b/src/theory/bags/inference_generator.h @@ -21,7 +21,7 @@ #include "expr/node.h" #include "infer_info.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bags { @@ -354,6 +354,6 @@ class InferenceGenerator } // namespace bags } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__BAGS__INFERENCE_GENERATOR_H */ diff --git a/src/theory/bags/inference_manager.cpp b/src/theory/bags/inference_manager.cpp index 92f5dfd82..ac7421e5c 100644 --- a/src/theory/bags/inference_manager.cpp +++ b/src/theory/bags/inference_manager.cpp @@ -18,9 +18,9 @@ #include "theory/bags/solver_state.h" using namespace std; -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bags { @@ -47,4 +47,4 @@ void InferenceManager::doPending() } // namespace bags } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/bags/inference_manager.h b/src/theory/bags/inference_manager.h index 45827f27b..f3a992b37 100644 --- a/src/theory/bags/inference_manager.h +++ b/src/theory/bags/inference_manager.h @@ -20,7 +20,7 @@ #include "theory/inference_manager_buffered.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bags { @@ -64,6 +64,6 @@ class InferenceManager : public InferenceManagerBuffered } // namespace bags } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__BAGS__INFERENCE_MANAGER_H */ diff --git a/src/theory/bags/kinds b/src/theory/bags/kinds index 345b71e9b..49e1d5624 100644 --- a/src/theory/bags/kinds +++ b/src/theory/bags/kinds @@ -5,10 +5,10 @@ # theory THEORY_BAGS \ - ::cvc5::theory::bags::TheoryBags \ + ::cvc5::internal::theory::bags::TheoryBags \ "theory/bags/theory_bags.h" typechecker "theory/bags/theory_bags_type_rules.h" -rewriter ::cvc5::theory::bags::BagsRewriter \ +rewriter ::cvc5::internal::theory::bags::BagsRewriter \ "theory/bags/bags_rewriter.h" properties parametric @@ -18,21 +18,21 @@ properties check presolve constant BAG_EMPTY \ class \ EmptyBag \ - ::cvc5::EmptyBagHashFunction \ + ::cvc5::internal::EmptyBagHashFunction \ "expr/emptybag.h" \ - "the empty bag constant; payload is an instance of the cvc5::EmptyBag class" + "the empty bag constant; payload is an instance of the cvc5::internal::EmptyBag class" # the type operator BAG_TYPE 1 "bag type, takes as parameter the type of the elements" cardinality BAG_TYPE \ - "::cvc5::theory::bags::BagsProperties::computeCardinality(%TYPE%)" \ + "::cvc5::internal::theory::bags::BagsProperties::computeCardinality(%TYPE%)" \ "theory/bags/theory_bags_type_rules.h" well-founded BAG_TYPE \ - "::cvc5::theory::bags::BagsProperties::isWellFounded(%TYPE%)" \ - "::cvc5::theory::bags::BagsProperties::mkGroundTerm(%TYPE%)" \ + "::cvc5::internal::theory::bags::BagsProperties::isWellFounded(%TYPE%)" \ + "::cvc5::internal::theory::bags::BagsProperties::mkGroundTerm(%TYPE%)" \ "theory/bags/theory_bags_type_rules.h" enumerator BAG_TYPE \ - "::cvc5::theory::bags::BagEnumerator" \ + "::cvc5::internal::theory::bags::BagEnumerator" \ "theory/bags/theory_bags_type_enumerator.h" # operators @@ -54,9 +54,9 @@ operator BAG_DUPLICATE_REMOVAL 1 "eliminate duplicates in a bag (also known as constant BAG_MAKE_OP \ class \ BagMakeOp \ - ::cvc5::BagMakeOpHashFunction \ + ::cvc5::internal::BagMakeOpHashFunction \ "theory/bags/bag_make_op.h" \ - "operator for BAG_MAKE; payload is an instance of the cvc5::BagMakeOp class" + "operator for BAG_MAKE; payload is an instance of the cvc5::internal::BagMakeOp class" parameterized BAG_MAKE BAG_MAKE_OP 2 \ "constructs a bag from one element along with its multiplicity" @@ -89,34 +89,34 @@ operator BAG_FILTER 2 "bag filter operator" # B: a bag of type (Bag T1) operator BAG_FOLD 3 "bag fold operator" -typerule BAG_UNION_MAX ::cvc5::theory::bags::BinaryOperatorTypeRule -typerule BAG_UNION_DISJOINT ::cvc5::theory::bags::BinaryOperatorTypeRule -typerule BAG_INTER_MIN ::cvc5::theory::bags::BinaryOperatorTypeRule -typerule BAG_DIFFERENCE_SUBTRACT ::cvc5::theory::bags::BinaryOperatorTypeRule -typerule BAG_DIFFERENCE_REMOVE ::cvc5::theory::bags::BinaryOperatorTypeRule -typerule BAG_SUBBAG ::cvc5::theory::bags::SubBagTypeRule -typerule BAG_COUNT ::cvc5::theory::bags::CountTypeRule -typerule BAG_MEMBER ::cvc5::theory::bags::MemberTypeRule -typerule BAG_DUPLICATE_REMOVAL ::cvc5::theory::bags::DuplicateRemovalTypeRule +typerule BAG_UNION_MAX ::cvc5::internal::theory::bags::BinaryOperatorTypeRule +typerule BAG_UNION_DISJOINT ::cvc5::internal::theory::bags::BinaryOperatorTypeRule +typerule BAG_INTER_MIN ::cvc5::internal::theory::bags::BinaryOperatorTypeRule +typerule BAG_DIFFERENCE_SUBTRACT ::cvc5::internal::theory::bags::BinaryOperatorTypeRule +typerule BAG_DIFFERENCE_REMOVE ::cvc5::internal::theory::bags::BinaryOperatorTypeRule +typerule BAG_SUBBAG ::cvc5::internal::theory::bags::SubBagTypeRule +typerule BAG_COUNT ::cvc5::internal::theory::bags::CountTypeRule +typerule BAG_MEMBER ::cvc5::internal::theory::bags::MemberTypeRule +typerule BAG_DUPLICATE_REMOVAL ::cvc5::internal::theory::bags::DuplicateRemovalTypeRule typerule BAG_MAKE_OP "SimpleTypeRule" -typerule BAG_MAKE ::cvc5::theory::bags::BagMakeTypeRule -typerule BAG_EMPTY ::cvc5::theory::bags::EmptyBagTypeRule -typerule BAG_CARD ::cvc5::theory::bags::CardTypeRule -typerule BAG_CHOOSE ::cvc5::theory::bags::ChooseTypeRule -typerule BAG_IS_SINGLETON ::cvc5::theory::bags::IsSingletonTypeRule -typerule BAG_FROM_SET ::cvc5::theory::bags::FromSetTypeRule -typerule BAG_TO_SET ::cvc5::theory::bags::ToSetTypeRule -typerule BAG_MAP ::cvc5::theory::bags::BagMapTypeRule -typerule BAG_FILTER ::cvc5::theory::bags::BagFilterTypeRule -typerule BAG_FOLD ::cvc5::theory::bags::BagFoldTypeRule +typerule BAG_MAKE ::cvc5::internal::theory::bags::BagMakeTypeRule +typerule BAG_EMPTY ::cvc5::internal::theory::bags::EmptyBagTypeRule +typerule BAG_CARD ::cvc5::internal::theory::bags::CardTypeRule +typerule BAG_CHOOSE ::cvc5::internal::theory::bags::ChooseTypeRule +typerule BAG_IS_SINGLETON ::cvc5::internal::theory::bags::IsSingletonTypeRule +typerule BAG_FROM_SET ::cvc5::internal::theory::bags::FromSetTypeRule +typerule BAG_TO_SET ::cvc5::internal::theory::bags::ToSetTypeRule +typerule BAG_MAP ::cvc5::internal::theory::bags::BagMapTypeRule +typerule BAG_FILTER ::cvc5::internal::theory::bags::BagFilterTypeRule +typerule BAG_FOLD ::cvc5::internal::theory::bags::BagFoldTypeRule -construle BAG_UNION_DISJOINT ::cvc5::theory::bags::BinaryOperatorTypeRule -construle BAG_MAKE ::cvc5::theory::bags::BagMakeTypeRule +construle BAG_UNION_DISJOINT ::cvc5::internal::theory::bags::BinaryOperatorTypeRule +construle BAG_MAKE ::cvc5::internal::theory::bags::BagMakeTypeRule # bag.product operator returns the cross product of two tables operator TABLE_PRODUCT 2 "table cross product" -typerule TABLE_PRODUCT ::cvc5::theory::bags::TableProductTypeRule +typerule TABLE_PRODUCT ::cvc5::internal::theory::bags::TableProductTypeRule endtheory diff --git a/src/theory/bags/rewrites.cpp b/src/theory/bags/rewrites.cpp index 576f1245c..ac68d9f5d 100644 --- a/src/theory/bags/rewrites.cpp +++ b/src/theory/bags/rewrites.cpp @@ -17,7 +17,7 @@ #include -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bags { @@ -92,4 +92,4 @@ std::ostream& operator<<(std::ostream& out, Rewrite r) } // namespace bags } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/bags/rewrites.h b/src/theory/bags/rewrites.h index e7f2113f9..e56413ab7 100644 --- a/src/theory/bags/rewrites.h +++ b/src/theory/bags/rewrites.h @@ -20,7 +20,7 @@ #include -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bags { @@ -104,6 +104,6 @@ std::ostream& operator<<(std::ostream& out, Rewrite r); } // namespace bags } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__BAGS__REWRITES_H */ diff --git a/src/theory/bags/solver_state.cpp b/src/theory/bags/solver_state.cpp index 8e15a0ebc..acf4c46be 100644 --- a/src/theory/bags/solver_state.cpp +++ b/src/theory/bags/solver_state.cpp @@ -21,9 +21,9 @@ #include "theory/uf/equality_engine.h" using namespace std; -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bags { @@ -139,4 +139,4 @@ void SolverState::reset() } // namespace bags } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/bags/solver_state.h b/src/theory/bags/solver_state.h index d59e4e6bd..6a31a8af0 100644 --- a/src/theory/bags/solver_state.h +++ b/src/theory/bags/solver_state.h @@ -22,7 +22,7 @@ #include "theory/theory_state.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bags { @@ -127,6 +127,6 @@ class SolverState : public TheoryState } // namespace bags } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__BAGS__THEORY_SOLVER_STATE_H */ diff --git a/src/theory/bags/strategy.cpp b/src/theory/bags/strategy.cpp index e2517100b..c0a13d220 100644 --- a/src/theory/bags/strategy.cpp +++ b/src/theory/bags/strategy.cpp @@ -15,7 +15,7 @@ #include "theory/bags/strategy.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bags { @@ -106,4 +106,4 @@ void Strategy::initializeStrategy() } // namespace bags } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/bags/strategy.h b/src/theory/bags/strategy.h index 19bf2b177..801a59c1f 100644 --- a/src/theory/bags/strategy.h +++ b/src/theory/bags/strategy.h @@ -23,7 +23,7 @@ #include "theory/theory.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bags { @@ -94,6 +94,6 @@ class Strategy } // namespace bags } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__BAGS__STRATEGY_H */ diff --git a/src/theory/bags/term_registry.cpp b/src/theory/bags/term_registry.cpp index 7e995eab5..fbcd31e98 100644 --- a/src/theory/bags/term_registry.cpp +++ b/src/theory/bags/term_registry.cpp @@ -20,9 +20,9 @@ #include "theory/bags/solver_state.h" using namespace std; -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bags { @@ -48,4 +48,4 @@ Node TermRegistry::getEmptyBag(TypeNode tn) } // namespace bags } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/bags/term_registry.h b/src/theory/bags/term_registry.h index f36dda1a9..13bdab791 100644 --- a/src/theory/bags/term_registry.h +++ b/src/theory/bags/term_registry.h @@ -24,7 +24,7 @@ #include "expr/node.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bags { @@ -61,6 +61,6 @@ class TermRegistry : protected EnvObj } // namespace bags } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__BAGS__TERM_REGISTRY_H */ diff --git a/src/theory/bags/theory_bags.cpp b/src/theory/bags/theory_bags.cpp index 3dae04861..dacaa9d3a 100644 --- a/src/theory/bags/theory_bags.cpp +++ b/src/theory/bags/theory_bags.cpp @@ -25,9 +25,9 @@ #include "theory/theory_model.h" #include "util/rational.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bags { @@ -501,4 +501,4 @@ void TheoryBags::NotifyClass::eqNotifyDisequal(TNode n1, TNode n2, TNode reason) } // namespace bags } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/bags/theory_bags.h b/src/theory/bags/theory_bags.h index d0d2a83ee..ad2c65e1b 100644 --- a/src/theory/bags/theory_bags.h +++ b/src/theory/bags/theory_bags.h @@ -31,7 +31,7 @@ #include "theory/theory.h" #include "theory/theory_eq_notify.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bags { @@ -143,6 +143,6 @@ class TheoryBags : public Theory } // namespace bags } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__BAGS__THEORY_BAGS_H */ diff --git a/src/theory/bags/theory_bags_type_enumerator.cpp b/src/theory/bags/theory_bags_type_enumerator.cpp index a24981934..1df83a454 100644 --- a/src/theory/bags/theory_bags_type_enumerator.cpp +++ b/src/theory/bags/theory_bags_type_enumerator.cpp @@ -20,9 +20,9 @@ #include "theory_bags_type_enumerator.h" #include "util/rational.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bags { @@ -89,4 +89,4 @@ bool BagEnumerator::isFinished() } // namespace bags } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/bags/theory_bags_type_enumerator.h b/src/theory/bags/theory_bags_type_enumerator.h index 4a5fdde74..b240c7b8f 100644 --- a/src/theory/bags/theory_bags_type_enumerator.h +++ b/src/theory/bags/theory_bags_type_enumerator.h @@ -21,7 +21,7 @@ #include "expr/type_node.h" #include "theory/type_enumerator.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bags { @@ -87,6 +87,6 @@ class BagEnumerator : public TypeEnumeratorBase } // namespace bags } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__BAGS__TYPE_ENUMERATOR_H */ diff --git a/src/theory/bags/theory_bags_type_rules.cpp b/src/theory/bags/theory_bags_type_rules.cpp index b0c79fb1d..350300cab 100644 --- a/src/theory/bags/theory_bags_type_rules.cpp +++ b/src/theory/bags/theory_bags_type_rules.cpp @@ -24,7 +24,7 @@ #include "util/cardinality.h" #include "util/rational.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bags { @@ -511,4 +511,4 @@ Node BagsProperties::mkGroundTerm(TypeNode type) } } // namespace bags } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/bags/theory_bags_type_rules.h b/src/theory/bags/theory_bags_type_rules.h index 8673f7296..d0d7a803b 100644 --- a/src/theory/bags/theory_bags_type_rules.h +++ b/src/theory/bags/theory_bags_type_rules.h @@ -20,7 +20,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { class NodeManager; class TypeNode; @@ -179,6 +179,6 @@ struct BagsProperties } // namespace bags } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__BAGS__THEORY_BAGS_TYPE_RULES_H */ diff --git a/src/theory/booleans/circuit_propagator.cpp b/src/theory/booleans/circuit_propagator.cpp index 36614182e..96cdd6cc8 100644 --- a/src/theory/booleans/circuit_propagator.cpp +++ b/src/theory/booleans/circuit_propagator.cpp @@ -30,7 +30,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace booleans { @@ -815,4 +815,4 @@ void CircuitPropagator::addProof(TNode f, std::shared_ptr pf) } // namespace booleans } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/booleans/circuit_propagator.h b/src/theory/booleans/circuit_propagator.h index bf299c0e1..0ad53b0e0 100644 --- a/src/theory/booleans/circuit_propagator.h +++ b/src/theory/booleans/circuit_propagator.h @@ -31,7 +31,7 @@ #include "proof/trust_node.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { class ProofGenerator; class ProofNode; @@ -261,6 +261,6 @@ class CircuitPropagator : protected EnvObj } // namespace booleans } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__BOOLEANS__CIRCUIT_PROPAGATOR_H */ diff --git a/src/theory/booleans/kinds b/src/theory/booleans/kinds index da5642057..022447fe0 100644 --- a/src/theory/booleans/kinds +++ b/src/theory/booleans/kinds @@ -4,12 +4,12 @@ # src/theory/builtin/kinds. # -theory THEORY_BOOL ::cvc5::theory::booleans::TheoryBool "theory/booleans/theory_bool.h" +theory THEORY_BOOL ::cvc5::internal::theory::booleans::TheoryBool "theory/booleans/theory_bool.h" typechecker "theory/booleans/theory_bool_type_rules.h" properties finite -rewriter ::cvc5::theory::booleans::TheoryBoolRewriter "theory/booleans/theory_bool_rewriter.h" +rewriter ::cvc5::internal::theory::booleans::TheoryBoolRewriter "theory/booleans/theory_bool_rewriter.h" sort BOOLEAN_TYPE \ 2 \ @@ -21,12 +21,12 @@ sort BOOLEAN_TYPE \ constant CONST_BOOLEAN \ skip \ bool \ - ::cvc5::BoolHashFunction \ + ::cvc5::internal::BoolHashFunction \ "util/bool.h" \ "truth and falsity; payload is a (C++) bool" enumerator BOOLEAN_TYPE \ - "::cvc5::theory::booleans::BooleanEnumerator" \ + "::cvc5::internal::theory::booleans::BooleanEnumerator" \ "theory/booleans/type_enumerator.h" operator NOT 1 "logical not" @@ -36,13 +36,13 @@ operator OR 2: "logical or (N-ary)" operator XOR 2 "exclusive or (exactly two parameters)" operator ITE 3 "if-then-else, used for both Boolean and term ITE constructs; first parameter is (Boolean-sorted) condition, second is 'then', third is 'else' and these two parameters must have same base sort" -typerule CONST_BOOLEAN ::cvc5::theory::boolean::BooleanTypeRule +typerule CONST_BOOLEAN ::cvc5::internal::theory::boolean::BooleanTypeRule -typerule NOT ::cvc5::theory::boolean::BooleanTypeRule -typerule AND ::cvc5::theory::boolean::BooleanTypeRule -typerule IMPLIES ::cvc5::theory::boolean::BooleanTypeRule -typerule OR ::cvc5::theory::boolean::BooleanTypeRule -typerule XOR ::cvc5::theory::boolean::BooleanTypeRule -typerule ITE ::cvc5::theory::boolean::IteTypeRule +typerule NOT ::cvc5::internal::theory::boolean::BooleanTypeRule +typerule AND ::cvc5::internal::theory::boolean::BooleanTypeRule +typerule IMPLIES ::cvc5::internal::theory::boolean::BooleanTypeRule +typerule OR ::cvc5::internal::theory::boolean::BooleanTypeRule +typerule XOR ::cvc5::internal::theory::boolean::BooleanTypeRule +typerule ITE ::cvc5::internal::theory::boolean::IteTypeRule endtheory diff --git a/src/theory/booleans/proof_checker.cpp b/src/theory/booleans/proof_checker.cpp index a7fefd47a..0d8d469a0 100644 --- a/src/theory/booleans/proof_checker.cpp +++ b/src/theory/booleans/proof_checker.cpp @@ -17,7 +17,7 @@ #include "expr/skolem_manager.h" #include "theory/rewriter.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace booleans { @@ -939,4 +939,4 @@ Node BoolProofRuleChecker::checkInternal(PfRule id, } // namespace booleans } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/booleans/proof_checker.h b/src/theory/booleans/proof_checker.h index 114ab2e9b..f9ba3477a 100644 --- a/src/theory/booleans/proof_checker.h +++ b/src/theory/booleans/proof_checker.h @@ -21,7 +21,7 @@ #include "expr/node.h" #include "proof/proof_checker.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace booleans { @@ -44,6 +44,6 @@ class BoolProofRuleChecker : public ProofRuleChecker } // namespace booleans } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__BOOLEANS__PROOF_CHECKER_H */ diff --git a/src/theory/booleans/proof_circuit_propagator.cpp b/src/theory/booleans/proof_circuit_propagator.cpp index 487f7928b..06b3a4d05 100644 --- a/src/theory/booleans/proof_circuit_propagator.cpp +++ b/src/theory/booleans/proof_circuit_propagator.cpp @@ -21,9 +21,9 @@ #include "proof/proof_node_manager.h" #include "util/rational.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace booleans { @@ -593,4 +593,4 @@ std::shared_ptr ProofCircuitPropagatorForward::xorEval(bool x, } // namespace booleans } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/booleans/proof_circuit_propagator.h b/src/theory/booleans/proof_circuit_propagator.h index 0bed57078..a3191e61f 100644 --- a/src/theory/booleans/proof_circuit_propagator.h +++ b/src/theory/booleans/proof_circuit_propagator.h @@ -23,7 +23,7 @@ #include "expr/node.h" #include "proof/proof_rule.h" -namespace cvc5 { +namespace cvc5::internal { class ProofNode; class ProofNodeManager; @@ -211,6 +211,6 @@ class ProofCircuitPropagatorForward : public ProofCircuitPropagator } // namespace booleans } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/booleans/theory_bool.cpp b/src/theory/booleans/theory_bool.cpp index 3184a6242..4700bf65f 100644 --- a/src/theory/booleans/theory_bool.cpp +++ b/src/theory/booleans/theory_bool.cpp @@ -28,9 +28,9 @@ #include "theory/valuation.h" #include "util/hash.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace booleans { @@ -81,4 +81,4 @@ std::string TheoryBool::identify() const { return std::string("TheoryBool"); } } // namespace booleans } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/booleans/theory_bool.h b/src/theory/booleans/theory_bool.h index 6c197d797..e6f1ad6c2 100644 --- a/src/theory/booleans/theory_bool.h +++ b/src/theory/booleans/theory_bool.h @@ -23,7 +23,7 @@ #include "theory/booleans/theory_bool_rewriter.h" #include "theory/theory.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace booleans { @@ -52,6 +52,6 @@ class TheoryBool : public Theory { } // namespace booleans } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__BOOLEANS__THEORY_BOOL_H */ diff --git a/src/theory/booleans/theory_bool_rewriter.cpp b/src/theory/booleans/theory_bool_rewriter.cpp index 61d473817..0ff0de3da 100644 --- a/src/theory/booleans/theory_bool_rewriter.cpp +++ b/src/theory/booleans/theory_bool_rewriter.cpp @@ -24,7 +24,7 @@ #include "expr/node_value.h" #include "util/cardinality.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace booleans { @@ -445,4 +445,4 @@ RewriteResponse TheoryBoolRewriter::preRewrite(TNode n) { } // namespace booleans } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/booleans/theory_bool_rewriter.h b/src/theory/booleans/theory_bool_rewriter.h index d3b12db37..3b11616b0 100644 --- a/src/theory/booleans/theory_bool_rewriter.h +++ b/src/theory/booleans/theory_bool_rewriter.h @@ -23,7 +23,7 @@ #include "theory/theory_rewriter.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace booleans { @@ -37,6 +37,6 @@ class TheoryBoolRewriter : public TheoryRewriter } // namespace booleans } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__BOOLEANS__THEORY_BOOL_REWRITER_H */ diff --git a/src/theory/booleans/theory_bool_type_rules.cpp b/src/theory/booleans/theory_bool_type_rules.cpp index 0fe914f2f..25cd896aa 100644 --- a/src/theory/booleans/theory_bool_type_rules.cpp +++ b/src/theory/booleans/theory_bool_type_rules.cpp @@ -17,7 +17,7 @@ #include -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace boolean { @@ -73,4 +73,4 @@ TypeNode IteTypeRule::computeType(NodeManager* nodeManager, TNode n, bool check) } // namespace boolean } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/booleans/theory_bool_type_rules.h b/src/theory/booleans/theory_bool_type_rules.h index 6d8eb0a6d..cbf6c7a97 100644 --- a/src/theory/booleans/theory_bool_type_rules.h +++ b/src/theory/booleans/theory_bool_type_rules.h @@ -21,7 +21,7 @@ #include "expr/node.h" #include "expr/type_node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace boolean { @@ -39,6 +39,6 @@ class IteTypeRule } // namespace boolean } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY_BOOL_TYPE_RULES_H */ diff --git a/src/theory/booleans/type_enumerator.h b/src/theory/booleans/type_enumerator.h index 93b6b875a..b3f514825 100644 --- a/src/theory/booleans/type_enumerator.h +++ b/src/theory/booleans/type_enumerator.h @@ -22,7 +22,7 @@ #include "expr/type_node.h" #include "expr/kind.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace booleans { @@ -64,6 +64,6 @@ class BooleanEnumerator : public TypeEnumeratorBase { } // namespace booleans } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__BOOLEANS__TYPE_ENUMERATOR_H */ diff --git a/src/theory/builtin/kinds b/src/theory/builtin/kinds index 9f1b4fb57..37f030f42 100644 --- a/src/theory/builtin/kinds +++ b/src/theory/builtin/kinds @@ -198,7 +198,7 @@ # is with your type checker: # # cardinality MY_TYPE \ -# ::cvc5::theory::foo::TheoryFoo::CardinalityComputer(%TYPE%) \ +# ::cvc5::internal::theory::foo::TheoryFoo::CardinalityComputer(%TYPE%) \ # "theory/foo/theory_foo_type_rules.h" # # well-founded K wellfoundedness-computer ground-term-computer [header] @@ -242,13 +242,13 @@ # commands. # -theory THEORY_BUILTIN ::cvc5::theory::builtin::TheoryBuiltin "theory/builtin/theory_builtin.h" +theory THEORY_BUILTIN ::cvc5::internal::theory::builtin::TheoryBuiltin "theory/builtin/theory_builtin.h" typechecker "theory/builtin/theory_builtin_type_rules.h" properties stable-infinite # Rewriter responsible for all the terms of the theory -rewriter ::cvc5::theory::builtin::TheoryBuiltinRewriter "theory/builtin/theory_builtin_rewriter.h" +rewriter ::cvc5::internal::theory::builtin::TheoryBuiltinRewriter "theory/builtin/theory_builtin_rewriter.h" sort BUILTIN_OPERATOR_TYPE \ Cardinality::INTEGERS \ @@ -261,18 +261,18 @@ parameterized SORT_TYPE SORT_TAG 0: "specifies types of user-declared 'uninterpr # enough (for now) ? cardinality SORT_TYPE "Cardinality(Cardinality::INTEGERS)" well-founded SORT_TYPE \ - "::cvc5::theory::builtin::SortProperties::isWellFounded(%TYPE%)" \ - "::cvc5::theory::builtin::SortProperties::mkGroundTerm(%TYPE%)" \ + "::cvc5::internal::theory::builtin::SortProperties::isWellFounded(%TYPE%)" \ + "::cvc5::internal::theory::builtin::SortProperties::mkGroundTerm(%TYPE%)" \ "theory/builtin/theory_builtin_type_rules.h" constant UNINTERPRETED_SORT_VALUE \ class \ UninterpretedSortValue \ - ::cvc5::UninterpretedSortValueHashFunction \ + ::cvc5::internal::UninterpretedSortValueHashFunction \ "util/uninterpreted_sort_value.h" \ - "the kind of expressions representing uninterpreted sort values; payload is an instance of the cvc5::AbstractValue class (used in models)" -typerule UNINTERPRETED_SORT_VALUE ::cvc5::theory::builtin::UninterpretedSortValueTypeRule -enumerator SORT_TYPE ::cvc5::theory::builtin::UninterpretedSortEnumerator "theory/builtin/type_enumerator.h" + "the kind of expressions representing uninterpreted sort values; payload is an instance of the cvc5::internal::AbstractValue class (used in models)" +typerule UNINTERPRETED_SORT_VALUE ::cvc5::internal::theory::builtin::UninterpretedSortValueTypeRule +enumerator SORT_TYPE ::cvc5::internal::theory::builtin::UninterpretedSortEnumerator "theory/builtin/type_enumerator.h" # A kind representing "inlined" operators defined with OPERATOR # Conceptually, (EQUAL a b) is actually an (APPLY EQUAL a b), but it's @@ -281,7 +281,7 @@ enumerator SORT_TYPE ::cvc5::theory::builtin::UninterpretedSortEnumerator "theor constant BUILTIN \ skip \ Kind \ - ::cvc5::kind::KindHashFunction \ + ::cvc5::internal::kind::KindHashFunction \ "expr/kind.h" \ "the kind of expressions representing built-in operators" @@ -297,7 +297,7 @@ operator WITNESS 2:3 "a witness expression; first parameter is a BOUND_VAR_LIST, constant TYPE_CONSTANT \ skip \ TypeConstant \ - ::cvc5::TypeConstantHashFunction \ + ::cvc5::internal::TypeConstantHashFunction \ "expr/kind.h" \ "a representation for basic types" sort SEXPR_TYPE \ @@ -305,9 +305,9 @@ sort SEXPR_TYPE \ not-well-founded \ "the type of a symbolic expression" -typerule EQUAL ::cvc5::theory::builtin::EqualityTypeRule -typerule DISTINCT ::cvc5::theory::builtin::DistinctTypeRule -typerule SEXPR ::cvc5::theory::builtin::SExprTypeRule -typerule WITNESS ::cvc5::theory::builtin::WitnessTypeRule +typerule EQUAL ::cvc5::internal::theory::builtin::EqualityTypeRule +typerule DISTINCT ::cvc5::internal::theory::builtin::DistinctTypeRule +typerule SEXPR ::cvc5::internal::theory::builtin::SExprTypeRule +typerule WITNESS ::cvc5::internal::theory::builtin::WitnessTypeRule endtheory diff --git a/src/theory/builtin/proof_checker.cpp b/src/theory/builtin/proof_checker.cpp index 4aa676e39..40f0d35bb 100644 --- a/src/theory/builtin/proof_checker.cpp +++ b/src/theory/builtin/proof_checker.cpp @@ -23,9 +23,9 @@ #include "theory/theory.h" #include "util/rational.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace builtin { @@ -417,4 +417,4 @@ Node BuiltinProofRuleChecker::mkTheoryIdNode(TheoryId tid) } // namespace builtin } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/builtin/proof_checker.h b/src/theory/builtin/proof_checker.h index 59a84c86e..376c80f00 100644 --- a/src/theory/builtin/proof_checker.h +++ b/src/theory/builtin/proof_checker.h @@ -23,7 +23,7 @@ #include "proof/proof_checker.h" #include "proof/proof_node.h" -namespace cvc5 { +namespace cvc5::internal { class Env; @@ -120,6 +120,6 @@ class BuiltinProofRuleChecker : public ProofRuleChecker } // namespace builtin } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__BUILTIN__PROOF_CHECKER_H */ diff --git a/src/theory/builtin/theory_builtin.cpp b/src/theory/builtin/theory_builtin.cpp index e519cbed7..7834c4771 100644 --- a/src/theory/builtin/theory_builtin.cpp +++ b/src/theory/builtin/theory_builtin.cpp @@ -21,7 +21,7 @@ #include "theory/theory_model.h" #include "theory/valuation.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace builtin { @@ -58,4 +58,4 @@ void TheoryBuiltin::finishInit() } // namespace builtin } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/builtin/theory_builtin.h b/src/theory/builtin/theory_builtin.h index 29a3cfb36..7cf64bbb0 100644 --- a/src/theory/builtin/theory_builtin.h +++ b/src/theory/builtin/theory_builtin.h @@ -24,7 +24,7 @@ #include "theory/theory_inference_manager.h" #include "theory/theory_state.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace builtin { @@ -56,6 +56,6 @@ class TheoryBuiltin : public Theory } // namespace builtin } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__BUILTIN__THEORY_BUILTIN_H */ diff --git a/src/theory/builtin/theory_builtin_rewriter.cpp b/src/theory/builtin/theory_builtin_rewriter.cpp index b57f2bf42..2e3565676 100644 --- a/src/theory/builtin/theory_builtin_rewriter.cpp +++ b/src/theory/builtin/theory_builtin_rewriter.cpp @@ -24,7 +24,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace builtin { @@ -115,4 +115,4 @@ Node TheoryBuiltinRewriter::rewriteWitness(TNode node) } // namespace builtin } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/builtin/theory_builtin_rewriter.h b/src/theory/builtin/theory_builtin_rewriter.h index 0f903bc44..0f8402ec5 100644 --- a/src/theory/builtin/theory_builtin_rewriter.h +++ b/src/theory/builtin/theory_builtin_rewriter.h @@ -23,7 +23,7 @@ #include "theory/theory_rewriter.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace builtin { @@ -51,6 +51,6 @@ class TheoryBuiltinRewriter : public TheoryRewriter } // namespace builtin } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__BUILTIN__THEORY_BUILTIN_REWRITER_H */ diff --git a/src/theory/builtin/theory_builtin_type_rules.cpp b/src/theory/builtin/theory_builtin_type_rules.cpp index 00700bef9..d6ad6c4d6 100644 --- a/src/theory/builtin/theory_builtin_type_rules.cpp +++ b/src/theory/builtin/theory_builtin_type_rules.cpp @@ -19,7 +19,7 @@ #include "expr/skolem_manager.h" #include "util/uninterpreted_sort_value.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace builtin { @@ -161,4 +161,4 @@ Node SortProperties::mkGroundTerm(TypeNode type) } // namespace builtin } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/builtin/theory_builtin_type_rules.h b/src/theory/builtin/theory_builtin_type_rules.h index a91cda26b..9016c4189 100644 --- a/src/theory/builtin/theory_builtin_type_rules.h +++ b/src/theory/builtin/theory_builtin_type_rules.h @@ -23,7 +23,7 @@ #include -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace builtin { @@ -66,6 +66,6 @@ class SortProperties } // namespace builtin } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__BUILTIN__THEORY_BUILTIN_TYPE_RULES_H */ diff --git a/src/theory/builtin/type_enumerator.cpp b/src/theory/builtin/type_enumerator.cpp index 1798d9f78..cb2aa9443 100644 --- a/src/theory/builtin/type_enumerator.cpp +++ b/src/theory/builtin/type_enumerator.cpp @@ -18,7 +18,7 @@ #include "theory/builtin/theory_builtin_rewriter.h" #include "util/uninterpreted_sort_value.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace builtin { @@ -72,4 +72,4 @@ bool UninterpretedSortEnumerator::isFinished() } // namespace builtin } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/builtin/type_enumerator.h b/src/theory/builtin/type_enumerator.h index e7b42edca..3f0f98250 100644 --- a/src/theory/builtin/type_enumerator.h +++ b/src/theory/builtin/type_enumerator.h @@ -23,7 +23,7 @@ #include "theory/type_enumerator.h" #include "util/integer.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace builtin { @@ -45,6 +45,6 @@ class UninterpretedSortEnumerator : public TypeEnumeratorBase& bits, TBitblaster* bb) } } -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/bv/bitblast/bitblast_utils.h b/src/theory/bv/bitblast/bitblast_utils.h index 6b532308f..9f9c179a1 100644 --- a/src/theory/bv/bitblast/bitblast_utils.h +++ b/src/theory/bv/bitblast/bitblast_utils.h @@ -21,7 +21,7 @@ #include #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bv { @@ -265,6 +265,6 @@ T inline sLessThanBB(const std::vector&a, const std::vector& b, bool orEqu } // namespace bv } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif // CVC5__THEORY__BV__BITBLAST__BITBLAST_UTILS_H diff --git a/src/theory/bv/bitblast/bitblaster.h b/src/theory/bv/bitblast/bitblaster.h index fddf6c51e..b109ec80d 100644 --- a/src/theory/bv/bitblast/bitblaster.h +++ b/src/theory/bv/bitblast/bitblaster.h @@ -34,7 +34,7 @@ #include "theory/valuation.h" #include "util/resource_manager.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bv { @@ -201,6 +201,6 @@ void TBitblaster::invalidateModelCache() } // namespace bv } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__BV__BITBLAST__BITBLASTER_H */ diff --git a/src/theory/bv/bitblast/node_bitblaster.cpp b/src/theory/bv/bitblast/node_bitblaster.cpp index 898501195..3ac399bf8 100644 --- a/src/theory/bv/bitblast/node_bitblaster.cpp +++ b/src/theory/bv/bitblast/node_bitblaster.cpp @@ -18,7 +18,7 @@ #include "theory/theory_model.h" #include "theory/theory_state.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bv { @@ -178,4 +178,4 @@ Node NodeBitblaster::applyAtomBBStrategy(TNode node) } // namespace bv } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/bv/bitblast/node_bitblaster.h b/src/theory/bv/bitblast/node_bitblaster.h index ecb2970e8..4b8287767 100644 --- a/src/theory/bv/bitblast/node_bitblaster.h +++ b/src/theory/bv/bitblast/node_bitblaster.h @@ -19,7 +19,7 @@ #include "theory/bv/bitblast/bitblaster.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bv { @@ -84,6 +84,6 @@ class NodeBitblaster : public TBitblaster, protected EnvObj } // namespace bv } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/bv/bitblast/proof_bitblaster.cpp b/src/theory/bv/bitblast/proof_bitblaster.cpp index d8f327b29..6e3efc95b 100644 --- a/src/theory/bv/bitblast/proof_bitblaster.cpp +++ b/src/theory/bv/bitblast/proof_bitblaster.cpp @@ -20,7 +20,7 @@ #include "theory/bv/bitblast/bitblast_proof_generator.h" #include "theory/theory_model.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bv { @@ -214,4 +214,4 @@ bool BBProof::isProofsEnabled() const { return d_pnm != nullptr; } } // namespace bv } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/bv/bitblast/proof_bitblaster.h b/src/theory/bv/bitblast/proof_bitblaster.h index 0cf8b40f7..1a6da8165 100644 --- a/src/theory/bv/bitblast/proof_bitblaster.h +++ b/src/theory/bv/bitblast/proof_bitblaster.h @@ -20,7 +20,7 @@ #include "expr/term_context.h" #include "theory/bv/bitblast/node_bitblaster.h" -namespace cvc5 { +namespace cvc5::internal { class TConvProofGenerator; @@ -81,5 +81,5 @@ class BBProof : protected EnvObj } // namespace bv } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/bv/bv_solver.h b/src/theory/bv/bv_solver.h index 535618270..eae3c9616 100644 --- a/src/theory/bv/bv_solver.h +++ b/src/theory/bv/bv_solver.h @@ -23,7 +23,7 @@ #include "smt/env_obj.h" #include "theory/theory.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bv { @@ -118,6 +118,6 @@ class BVSolver : protected EnvObj } // namespace bv } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__BV__BV_SOLVER_H */ diff --git a/src/theory/bv/bv_solver_bitblast.cpp b/src/theory/bv/bv_solver_bitblast.cpp index 0686deaa8..2561e7b6d 100644 --- a/src/theory/bv/bv_solver_bitblast.cpp +++ b/src/theory/bv/bv_solver_bitblast.cpp @@ -22,7 +22,7 @@ #include "theory/bv/theory_bv_utils.h" #include "theory/theory_model.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bv { @@ -411,4 +411,4 @@ void BVSolverBitblast::handleEagerAtom(TNode fact, bool assertFact) } // namespace bv } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/bv/bv_solver_bitblast.h b/src/theory/bv/bv_solver_bitblast.h index b9ae84f23..eceaef9bb 100644 --- a/src/theory/bv/bv_solver_bitblast.h +++ b/src/theory/bv/bv_solver_bitblast.h @@ -29,7 +29,7 @@ #include "theory/bv/bv_solver.h" #include "theory/bv/proof_checker.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bv { @@ -143,6 +143,6 @@ class BVSolverBitblast : public BVSolver } // namespace bv } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/bv/bv_solver_bitblast_internal.cpp b/src/theory/bv/bv_solver_bitblast_internal.cpp index 55d1f16a2..0b9c1c5ab 100644 --- a/src/theory/bv/bv_solver_bitblast_internal.cpp +++ b/src/theory/bv/bv_solver_bitblast_internal.cpp @@ -23,7 +23,7 @@ #include "theory/bv/theory_bv_utils.h" #include "theory/theory_model.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bv { @@ -206,4 +206,4 @@ BVProofRuleChecker* BVSolverBitblastInternal::getProofChecker() } // namespace bv } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/bv/bv_solver_bitblast_internal.h b/src/theory/bv/bv_solver_bitblast_internal.h index 08c618880..04007cf7b 100644 --- a/src/theory/bv/bv_solver_bitblast_internal.h +++ b/src/theory/bv/bv_solver_bitblast_internal.h @@ -24,7 +24,7 @@ #include "theory/bv/bv_solver.h" #include "theory/bv/proof_checker.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bv { @@ -85,6 +85,6 @@ class BVSolverBitblastInternal : public BVSolver } // namespace bv } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/bv/int_blaster.cpp b/src/theory/bv/int_blaster.cpp index a0596b3b6..920d73d03 100644 --- a/src/theory/bv/int_blaster.cpp +++ b/src/theory/bv/int_blaster.cpp @@ -33,11 +33,11 @@ #include "util/iand.h" #include "util/rational.h" -using namespace cvc5::kind; -using namespace cvc5::theory; -using namespace cvc5::theory::bv; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::theory; +using namespace cvc5::internal::theory::bv; -namespace cvc5 { +namespace cvc5::internal { namespace { @@ -1090,4 +1090,4 @@ Node IntBlaster::createBVNotNode(Node n, uint64_t bvsize) return d_nm->mkNode(kind::SUB, maxInt(bvsize), n); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/bv/int_blaster.h b/src/theory/bv/int_blaster.h index fb7291f6e..ba3e3ea66 100644 --- a/src/theory/bv/int_blaster.h +++ b/src/theory/bv/int_blaster.h @@ -25,7 +25,7 @@ #include "smt/env_obj.h" #include "theory/arith/nl/iand_utils.h" -namespace cvc5 { +namespace cvc5::internal { /* ** Converts bit-vector formulas to integer formulas. @@ -371,6 +371,6 @@ class IntBlaster : protected EnvObj }; -} // namespace cvc5 +} // namespace cvc5::internal #endif /* __CVC5__THEORY__BV__INT_BLASTER_H */ diff --git a/src/theory/bv/kinds b/src/theory/bv/kinds index 9590d5522..90eeeefc9 100644 --- a/src/theory/bv/kinds +++ b/src/theory/bv/kinds @@ -4,38 +4,38 @@ # src/theory/builtin/kinds. # -theory THEORY_BV ::cvc5::theory::bv::TheoryBV "theory/bv/theory_bv.h" +theory THEORY_BV ::cvc5::internal::theory::bv::TheoryBV "theory/bv/theory_bv.h" typechecker "theory/bv/theory_bv_type_rules.h" properties finite properties check propagate presolve ppStaticLearn -rewriter ::cvc5::theory::bv::TheoryBVRewriter "theory/bv/theory_bv_rewriter.h" +rewriter ::cvc5::internal::theory::bv::TheoryBVRewriter "theory/bv/theory_bv_rewriter.h" constant BITVECTOR_TYPE \ struct \ BitVectorSize \ - "::cvc5::UnsignedHashFunction< ::cvc5::BitVectorSize >" \ + "::cvc5::internal::UnsignedHashFunction< ::cvc5::internal::BitVectorSize >" \ "util/bitvector.h" \ "bit-vector type" cardinality BITVECTOR_TYPE \ - "::cvc5::theory::bv::CardinalityComputer::computeCardinality(%TYPE%)" \ + "::cvc5::internal::theory::bv::CardinalityComputer::computeCardinality(%TYPE%)" \ "theory/bv/theory_bv_type_rules.h" constant CONST_BITVECTOR \ class \ BitVector \ - ::cvc5::BitVectorHashFunction \ + ::cvc5::internal::BitVectorHashFunction \ "util/bitvector.h" \ - "a fixed-width bit-vector constant; payload is an instance of the cvc5::BitVector class" + "a fixed-width bit-vector constant; payload is an instance of the cvc5::internal::BitVector class" enumerator BITVECTOR_TYPE \ - "::cvc5::theory::bv::BitVectorEnumerator" \ + "::cvc5::internal::theory::bv::BitVectorEnumerator" \ "theory/bv/type_enumerator.h" well-founded BITVECTOR_TYPE \ true \ - "(*cvc5::theory::TypeEnumerator(%TYPE%))" \ + "(*cvc5::internal::theory::TypeEnumerator(%TYPE%))" \ "theory/type_enumerator.h" ### non-parameterized operator kinds ------------------------------------------ @@ -105,148 +105,148 @@ operator BITVECTOR_EAGER_ATOM 1 "formula to be treated as a bv atom via eager bi constant BITVECTOR_BITOF_OP \ struct \ BitVectorBitOf \ - ::cvc5::BitVectorBitOfHashFunction \ + ::cvc5::internal::BitVectorBitOfHashFunction \ "util/bitvector.h" \ - "operator for the bit-vector boolean bit extract; payload is an instance of the cvc5::BitVectorBitOf class" + "operator for the bit-vector boolean bit extract; payload is an instance of the cvc5::internal::BitVectorBitOf class" parameterized BITVECTOR_BITOF BITVECTOR_BITOF_OP 1 "bit-vector boolean bit extract; first parameter is a BITVECTOR_BITOF_OP, second is a bit-vector term" constant BITVECTOR_EXTRACT_OP \ struct \ BitVectorExtract \ - ::cvc5::BitVectorExtractHashFunction \ + ::cvc5::internal::BitVectorExtractHashFunction \ "util/bitvector.h" \ - "operator for the bit-vector extract; payload is an instance of the cvc5::BitVectorExtract class" + "operator for the bit-vector extract; payload is an instance of the cvc5::internal::BitVectorExtract class" parameterized BITVECTOR_EXTRACT BITVECTOR_EXTRACT_OP 1 "bit-vector extract; first parameter is a BITVECTOR_EXTRACT_OP, second is a bit-vector term" constant BITVECTOR_REPEAT_OP \ struct \ BitVectorRepeat \ - "::cvc5::UnsignedHashFunction< ::cvc5::BitVectorRepeat >" \ + "::cvc5::internal::UnsignedHashFunction< ::cvc5::internal::BitVectorRepeat >" \ "util/bitvector.h" \ - "operator for the bit-vector repeat; payload is an instance of the cvc5::BitVectorRepeat class" + "operator for the bit-vector repeat; payload is an instance of the cvc5::internal::BitVectorRepeat class" parameterized BITVECTOR_REPEAT BITVECTOR_REPEAT_OP 1 "bit-vector repeat; first parameter is a BITVECTOR_REPEAT_OP, second is a bit-vector term" constant BITVECTOR_ROTATE_LEFT_OP \ struct \ BitVectorRotateLeft \ - "::cvc5::UnsignedHashFunction< ::cvc5::BitVectorRotateLeft >" \ + "::cvc5::internal::UnsignedHashFunction< ::cvc5::internal::BitVectorRotateLeft >" \ "util/bitvector.h" \ - "operator for the bit-vector rotate left; payload is an instance of the cvc5::BitVectorRotateLeft class" + "operator for the bit-vector rotate left; payload is an instance of the cvc5::internal::BitVectorRotateLeft class" parameterized BITVECTOR_ROTATE_LEFT BITVECTOR_ROTATE_LEFT_OP 1 "bit-vector rotate left; first parameter is a BITVECTOR_ROTATE_LEFT_OP, second is a bit-vector term" constant BITVECTOR_ROTATE_RIGHT_OP \ struct \ BitVectorRotateRight \ - "::cvc5::UnsignedHashFunction< ::cvc5::BitVectorRotateRight >" \ + "::cvc5::internal::UnsignedHashFunction< ::cvc5::internal::BitVectorRotateRight >" \ "util/bitvector.h" \ - "operator for the bit-vector rotate right; payload is an instance of the cvc5::BitVectorRotateRight class" + "operator for the bit-vector rotate right; payload is an instance of the cvc5::internal::BitVectorRotateRight class" parameterized BITVECTOR_ROTATE_RIGHT BITVECTOR_ROTATE_RIGHT_OP 1 "bit-vector rotate right; first parameter is a BITVECTOR_ROTATE_RIGHT_OP, second is a bit-vector term" constant BITVECTOR_SIGN_EXTEND_OP \ struct \ BitVectorSignExtend \ - "::cvc5::UnsignedHashFunction< ::cvc5::BitVectorSignExtend >" \ + "::cvc5::internal::UnsignedHashFunction< ::cvc5::internal::BitVectorSignExtend >" \ "util/bitvector.h" \ - "operator for the bit-vector sign-extend; payload is an instance of the cvc5::BitVectorSignExtend class" + "operator for the bit-vector sign-extend; payload is an instance of the cvc5::internal::BitVectorSignExtend class" parameterized BITVECTOR_SIGN_EXTEND BITVECTOR_SIGN_EXTEND_OP 1 "bit-vector sign-extend; first parameter is a BITVECTOR_SIGN_EXTEND_OP, second is a bit-vector term" constant BITVECTOR_ZERO_EXTEND_OP \ struct \ BitVectorZeroExtend \ - "::cvc5::UnsignedHashFunction< ::cvc5::BitVectorZeroExtend >" \ + "::cvc5::internal::UnsignedHashFunction< ::cvc5::internal::BitVectorZeroExtend >" \ "util/bitvector.h" \ - "operator for the bit-vector zero-extend; payload is an instance of the cvc5::BitVectorZeroExtend class" + "operator for the bit-vector zero-extend; payload is an instance of the cvc5::internal::BitVectorZeroExtend class" parameterized BITVECTOR_ZERO_EXTEND BITVECTOR_ZERO_EXTEND_OP 1 "bit-vector zero-extend; first parameter is a BITVECTOR_ZERO_EXTEND_OP, second is a bit-vector term" constant INT_TO_BITVECTOR_OP \ struct \ IntToBitVector \ - "::cvc5::UnsignedHashFunction< ::cvc5::IntToBitVector >" \ + "::cvc5::internal::UnsignedHashFunction< ::cvc5::internal::IntToBitVector >" \ "util/bitvector.h" \ - "operator for the integer conversion to bit-vector; payload is an instance of the cvc5::IntToBitVector class" + "operator for the integer conversion to bit-vector; payload is an instance of the cvc5::internal::IntToBitVector class" parameterized INT_TO_BITVECTOR INT_TO_BITVECTOR_OP 1 "integer conversion to bit-vector; first parameter is an INT_TO_BITVECTOR_OP, second is an integer term" ### type rules for non-parameterized operator kinds --------------------------- -typerule CONST_BITVECTOR ::cvc5::theory::bv::BitVectorConstantTypeRule +typerule CONST_BITVECTOR ::cvc5::internal::theory::bv::BitVectorConstantTypeRule ## conversion to bit-vector from vector of Booleans kind -typerule BITVECTOR_BB_TERM ::cvc5::theory::bv::BitVectorToBVTypeRule +typerule BITVECTOR_BB_TERM ::cvc5::internal::theory::bv::BitVectorToBVTypeRule ## concatentation kind -typerule BITVECTOR_CONCAT ::cvc5::theory::bv::BitVectorConcatTypeRule +typerule BITVECTOR_CONCAT ::cvc5::internal::theory::bv::BitVectorConcatTypeRule ## bit-wise kinds -typerule BITVECTOR_AND ::cvc5::theory::bv::BitVectorFixedWidthTypeRule -typerule BITVECTOR_COMP ::cvc5::theory::bv::BitVectorBVPredTypeRule -typerule BITVECTOR_NAND ::cvc5::theory::bv::BitVectorFixedWidthTypeRule -typerule BITVECTOR_NOR ::cvc5::theory::bv::BitVectorFixedWidthTypeRule -typerule BITVECTOR_NOT ::cvc5::theory::bv::BitVectorFixedWidthTypeRule -typerule BITVECTOR_OR ::cvc5::theory::bv::BitVectorFixedWidthTypeRule -typerule BITVECTOR_XNOR ::cvc5::theory::bv::BitVectorFixedWidthTypeRule -typerule BITVECTOR_XOR ::cvc5::theory::bv::BitVectorFixedWidthTypeRule +typerule BITVECTOR_AND ::cvc5::internal::theory::bv::BitVectorFixedWidthTypeRule +typerule BITVECTOR_COMP ::cvc5::internal::theory::bv::BitVectorBVPredTypeRule +typerule BITVECTOR_NAND ::cvc5::internal::theory::bv::BitVectorFixedWidthTypeRule +typerule BITVECTOR_NOR ::cvc5::internal::theory::bv::BitVectorFixedWidthTypeRule +typerule BITVECTOR_NOT ::cvc5::internal::theory::bv::BitVectorFixedWidthTypeRule +typerule BITVECTOR_OR ::cvc5::internal::theory::bv::BitVectorFixedWidthTypeRule +typerule BITVECTOR_XNOR ::cvc5::internal::theory::bv::BitVectorFixedWidthTypeRule +typerule BITVECTOR_XOR ::cvc5::internal::theory::bv::BitVectorFixedWidthTypeRule ## arithmetic kinds -typerule BITVECTOR_MULT ::cvc5::theory::bv::BitVectorFixedWidthTypeRule -typerule BITVECTOR_NEG ::cvc5::theory::bv::BitVectorFixedWidthTypeRule -typerule BITVECTOR_ADD ::cvc5::theory::bv::BitVectorFixedWidthTypeRule -typerule BITVECTOR_SUB ::cvc5::theory::bv::BitVectorFixedWidthTypeRule -typerule BITVECTOR_UDIV ::cvc5::theory::bv::BitVectorFixedWidthTypeRule -typerule BITVECTOR_UREM ::cvc5::theory::bv::BitVectorFixedWidthTypeRule -typerule BITVECTOR_SDIV ::cvc5::theory::bv::BitVectorFixedWidthTypeRule -typerule BITVECTOR_SMOD ::cvc5::theory::bv::BitVectorFixedWidthTypeRule -typerule BITVECTOR_SREM ::cvc5::theory::bv::BitVectorFixedWidthTypeRule +typerule BITVECTOR_MULT ::cvc5::internal::theory::bv::BitVectorFixedWidthTypeRule +typerule BITVECTOR_NEG ::cvc5::internal::theory::bv::BitVectorFixedWidthTypeRule +typerule BITVECTOR_ADD ::cvc5::internal::theory::bv::BitVectorFixedWidthTypeRule +typerule BITVECTOR_SUB ::cvc5::internal::theory::bv::BitVectorFixedWidthTypeRule +typerule BITVECTOR_UDIV ::cvc5::internal::theory::bv::BitVectorFixedWidthTypeRule +typerule BITVECTOR_UREM ::cvc5::internal::theory::bv::BitVectorFixedWidthTypeRule +typerule BITVECTOR_SDIV ::cvc5::internal::theory::bv::BitVectorFixedWidthTypeRule +typerule BITVECTOR_SMOD ::cvc5::internal::theory::bv::BitVectorFixedWidthTypeRule +typerule BITVECTOR_SREM ::cvc5::internal::theory::bv::BitVectorFixedWidthTypeRule ## shift kinds -typerule BITVECTOR_ASHR ::cvc5::theory::bv::BitVectorFixedWidthTypeRule -typerule BITVECTOR_LSHR ::cvc5::theory::bv::BitVectorFixedWidthTypeRule -typerule BITVECTOR_SHL ::cvc5::theory::bv::BitVectorFixedWidthTypeRule +typerule BITVECTOR_ASHR ::cvc5::internal::theory::bv::BitVectorFixedWidthTypeRule +typerule BITVECTOR_LSHR ::cvc5::internal::theory::bv::BitVectorFixedWidthTypeRule +typerule BITVECTOR_SHL ::cvc5::internal::theory::bv::BitVectorFixedWidthTypeRule ## inequality kinds -typerule BITVECTOR_ULE ::cvc5::theory::bv::BitVectorPredicateTypeRule -typerule BITVECTOR_ULT ::cvc5::theory::bv::BitVectorPredicateTypeRule -typerule BITVECTOR_UGE ::cvc5::theory::bv::BitVectorPredicateTypeRule -typerule BITVECTOR_UGT ::cvc5::theory::bv::BitVectorPredicateTypeRule -typerule BITVECTOR_SLE ::cvc5::theory::bv::BitVectorPredicateTypeRule -typerule BITVECTOR_SLT ::cvc5::theory::bv::BitVectorPredicateTypeRule -typerule BITVECTOR_SGE ::cvc5::theory::bv::BitVectorPredicateTypeRule -typerule BITVECTOR_SGT ::cvc5::theory::bv::BitVectorPredicateTypeRule +typerule BITVECTOR_ULE ::cvc5::internal::theory::bv::BitVectorPredicateTypeRule +typerule BITVECTOR_ULT ::cvc5::internal::theory::bv::BitVectorPredicateTypeRule +typerule BITVECTOR_UGE ::cvc5::internal::theory::bv::BitVectorPredicateTypeRule +typerule BITVECTOR_UGT ::cvc5::internal::theory::bv::BitVectorPredicateTypeRule +typerule BITVECTOR_SLE ::cvc5::internal::theory::bv::BitVectorPredicateTypeRule +typerule BITVECTOR_SLT ::cvc5::internal::theory::bv::BitVectorPredicateTypeRule +typerule BITVECTOR_SGE ::cvc5::internal::theory::bv::BitVectorPredicateTypeRule +typerule BITVECTOR_SGT ::cvc5::internal::theory::bv::BitVectorPredicateTypeRule # inequalities with return type bit-vector of size 1 -typerule BITVECTOR_ULTBV ::cvc5::theory::bv::BitVectorBVPredTypeRule -typerule BITVECTOR_SLTBV ::cvc5::theory::bv::BitVectorBVPredTypeRule +typerule BITVECTOR_ULTBV ::cvc5::internal::theory::bv::BitVectorBVPredTypeRule +typerule BITVECTOR_SLTBV ::cvc5::internal::theory::bv::BitVectorBVPredTypeRule ## if-then-else kind -typerule BITVECTOR_ITE ::cvc5::theory::bv::BitVectorITETypeRule +typerule BITVECTOR_ITE ::cvc5::internal::theory::bv::BitVectorITETypeRule ## reduction kinds -typerule BITVECTOR_REDAND ::cvc5::theory::bv::BitVectorUnaryPredicateTypeRule -typerule BITVECTOR_REDOR ::cvc5::theory::bv::BitVectorUnaryPredicateTypeRule +typerule BITVECTOR_REDAND ::cvc5::internal::theory::bv::BitVectorUnaryPredicateTypeRule +typerule BITVECTOR_REDOR ::cvc5::internal::theory::bv::BitVectorUnaryPredicateTypeRule ## conversion kinds -typerule BITVECTOR_TO_NAT ::cvc5::theory::bv::BitVectorConversionTypeRule +typerule BITVECTOR_TO_NAT ::cvc5::internal::theory::bv::BitVectorConversionTypeRule ## internal kinds -typerule BITVECTOR_ACKERMANNIZE_UDIV ::cvc5::theory::bv::BitVectorAckermanizationUdivTypeRule -typerule BITVECTOR_ACKERMANNIZE_UREM ::cvc5::theory::bv::BitVectorAckermanizationUremTypeRule -typerule BITVECTOR_EAGER_ATOM ::cvc5::theory::bv::BitVectorEagerAtomTypeRule +typerule BITVECTOR_ACKERMANNIZE_UDIV ::cvc5::internal::theory::bv::BitVectorAckermanizationUdivTypeRule +typerule BITVECTOR_ACKERMANNIZE_UREM ::cvc5::internal::theory::bv::BitVectorAckermanizationUremTypeRule +typerule BITVECTOR_EAGER_ATOM ::cvc5::internal::theory::bv::BitVectorEagerAtomTypeRule ### type rules for parameterized operator kinds ------------------------------- typerule BITVECTOR_BITOF_OP "SimpleTypeRule" -typerule BITVECTOR_BITOF ::cvc5::theory::bv::BitVectorBitOfTypeRule +typerule BITVECTOR_BITOF ::cvc5::internal::theory::bv::BitVectorBitOfTypeRule typerule BITVECTOR_EXTRACT_OP "SimpleTypeRule" -typerule BITVECTOR_EXTRACT ::cvc5::theory::bv::BitVectorExtractTypeRule +typerule BITVECTOR_EXTRACT ::cvc5::internal::theory::bv::BitVectorExtractTypeRule typerule BITVECTOR_REPEAT_OP "SimpleTypeRule" -typerule BITVECTOR_REPEAT ::cvc5::theory::bv::BitVectorRepeatTypeRule +typerule BITVECTOR_REPEAT ::cvc5::internal::theory::bv::BitVectorRepeatTypeRule typerule BITVECTOR_ROTATE_LEFT_OP "SimpleTypeRule" -typerule BITVECTOR_ROTATE_LEFT ::cvc5::theory::bv::BitVectorFixedWidthTypeRule +typerule BITVECTOR_ROTATE_LEFT ::cvc5::internal::theory::bv::BitVectorFixedWidthTypeRule typerule BITVECTOR_ROTATE_RIGHT_OP "SimpleTypeRule" -typerule BITVECTOR_ROTATE_RIGHT ::cvc5::theory::bv::BitVectorFixedWidthTypeRule +typerule BITVECTOR_ROTATE_RIGHT ::cvc5::internal::theory::bv::BitVectorFixedWidthTypeRule typerule BITVECTOR_SIGN_EXTEND_OP "SimpleTypeRule" -typerule BITVECTOR_SIGN_EXTEND ::cvc5::theory::bv::BitVectorExtendTypeRule +typerule BITVECTOR_SIGN_EXTEND ::cvc5::internal::theory::bv::BitVectorExtendTypeRule typerule BITVECTOR_ZERO_EXTEND_OP "SimpleTypeRule" -typerule BITVECTOR_ZERO_EXTEND ::cvc5::theory::bv::BitVectorExtendTypeRule -typerule INT_TO_BITVECTOR_OP ::cvc5::theory::bv::IntToBitVectorOpTypeRule -typerule INT_TO_BITVECTOR ::cvc5::theory::bv::BitVectorConversionTypeRule +typerule BITVECTOR_ZERO_EXTEND ::cvc5::internal::theory::bv::BitVectorExtendTypeRule +typerule INT_TO_BITVECTOR_OP ::cvc5::internal::theory::bv::IntToBitVectorOpTypeRule +typerule INT_TO_BITVECTOR ::cvc5::internal::theory::bv::BitVectorConversionTypeRule endtheory diff --git a/src/theory/bv/proof_checker.cpp b/src/theory/bv/proof_checker.cpp index cbaec7ca6..feb56fa46 100644 --- a/src/theory/bv/proof_checker.cpp +++ b/src/theory/bv/proof_checker.cpp @@ -15,7 +15,7 @@ #include "theory/bv/proof_checker.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bv { @@ -57,4 +57,4 @@ Node BVProofRuleChecker::checkInternal(PfRule id, } // namespace bv } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/bv/proof_checker.h b/src/theory/bv/proof_checker.h index 9d34e9a88..872448680 100644 --- a/src/theory/bv/proof_checker.h +++ b/src/theory/bv/proof_checker.h @@ -22,7 +22,7 @@ #include "proof/proof_checker.h" #include "proof/proof_node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bv { @@ -45,6 +45,6 @@ class BVProofRuleChecker : public ProofRuleChecker } // namespace bv } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__BV__PROOF_CHECKER_H */ diff --git a/src/theory/bv/theory_bv.cpp b/src/theory/bv/theory_bv.cpp index 0a87ceb39..9d030c3c6 100644 --- a/src/theory/bv/theory_bv.cpp +++ b/src/theory/bv/theory_bv.cpp @@ -28,7 +28,7 @@ #include "theory/trust_substitutions.h" #include "theory/uf/equality_engine.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bv { @@ -472,4 +472,4 @@ TheoryBV::Statistics::Statistics(StatisticsRegistry& reg, } // namespace bv } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/bv/theory_bv.h b/src/theory/bv/theory_bv.h index 42a08d65d..7f0336b40 100644 --- a/src/theory/bv/theory_bv.h +++ b/src/theory/bv/theory_bv.h @@ -23,7 +23,7 @@ #include "theory/theory_eq_notify.h" #include "theory/theory_state.h" -namespace cvc5 { +namespace cvc5::internal { class ProofRuleChecker; @@ -137,6 +137,6 @@ class TheoryBV : public Theory } // namespace bv } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__BV__THEORY_BV_H */ diff --git a/src/theory/bv/theory_bv_rewrite_rules.h b/src/theory/bv/theory_bv_rewrite_rules.h index ecf1bcc00..cb4f2dd27 100644 --- a/src/theory/bv/theory_bv_rewrite_rules.h +++ b/src/theory/bv/theory_bv_rewrite_rules.h @@ -30,7 +30,7 @@ #include "theory/theory.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bv { @@ -760,4 +760,4 @@ struct FixpointRewriteStrategy { } // End namespace bv } // End namespace theory -} // End namespace cvc5 +} // End namespace cvc5::internal diff --git a/src/theory/bv/theory_bv_rewrite_rules_constant_evaluation.h b/src/theory/bv/theory_bv_rewrite_rules_constant_evaluation.h index 28d314e77..528d2a8cd 100644 --- a/src/theory/bv/theory_bv_rewrite_rules_constant_evaluation.h +++ b/src/theory/bv/theory_bv_rewrite_rules_constant_evaluation.h @@ -24,7 +24,7 @@ #include "theory/bv/theory_bv_utils.h" #include "util/bitvector.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bv { @@ -507,4 +507,4 @@ inline Node RewriteRule::apply(TNode node) } } } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/bv/theory_bv_rewrite_rules_core.h b/src/theory/bv/theory_bv_rewrite_rules_core.h index ea4cc2ec0..78cbd971f 100644 --- a/src/theory/bv/theory_bv_rewrite_rules_core.h +++ b/src/theory/bv/theory_bv_rewrite_rules_core.h @@ -23,7 +23,7 @@ #include "theory/bv/theory_bv_rewrite_rules.h" #include "theory/bv/theory_bv_utils.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bv { @@ -308,4 +308,4 @@ Node RewriteRule::apply(TNode node) { } } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/bv/theory_bv_rewrite_rules_normalization.h b/src/theory/bv/theory_bv_rewrite_rules_normalization.h index bb54c2920..e4f1f1997 100644 --- a/src/theory/bv/theory_bv_rewrite_rules_normalization.h +++ b/src/theory/bv/theory_bv_rewrite_rules_normalization.h @@ -29,7 +29,7 @@ #include "theory/rewriter.h" #include "util/bitvector.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bv { @@ -1567,4 +1567,4 @@ inline Node RewriteRule::apply(TNode node) } } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/bv/theory_bv_rewrite_rules_operator_elimination.h b/src/theory/bv/theory_bv_rewrite_rules_operator_elimination.h index 6c57ebaa5..95a82e29e 100644 --- a/src/theory/bv/theory_bv_rewrite_rules_operator_elimination.h +++ b/src/theory/bv/theory_bv_rewrite_rules_operator_elimination.h @@ -25,7 +25,7 @@ #include "theory/bv/theory_bv_utils.h" #include "util/bitvector.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bv { @@ -711,4 +711,4 @@ inline Node RewriteRule::apply(TNode node) } } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/bv/theory_bv_rewrite_rules_simplification.h b/src/theory/bv/theory_bv_rewrite_rules_simplification.h index 37efab014..595b5e1ca 100644 --- a/src/theory/bv/theory_bv_rewrite_rules_simplification.h +++ b/src/theory/bv/theory_bv_rewrite_rules_simplification.h @@ -25,7 +25,7 @@ #include "theory/bv/theory_bv_utils.h" #include "util/bitvector.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bv { @@ -2215,4 +2215,4 @@ Node RewriteRule::apply(TNode node) } // namespace bv } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/bv/theory_bv_rewriter.cpp b/src/theory/bv/theory_bv_rewriter.cpp index e881c17fc..717c75a18 100644 --- a/src/theory/bv/theory_bv_rewriter.cpp +++ b/src/theory/bv/theory_bv_rewriter.cpp @@ -26,9 +26,9 @@ #include "theory/bv/theory_bv_rewriter.h" #include "theory/theory.h" -using namespace cvc5; -using namespace cvc5::theory; -using namespace cvc5::theory::bv; +using namespace cvc5::internal; +using namespace cvc5::internal::theory; +using namespace cvc5::internal::theory::bv; TheoryBVRewriter::TheoryBVRewriter() { initializeRewrites(); } diff --git a/src/theory/bv/theory_bv_rewriter.h b/src/theory/bv/theory_bv_rewriter.h index 9dc1ab351..2b273fc18 100644 --- a/src/theory/bv/theory_bv_rewriter.h +++ b/src/theory/bv/theory_bv_rewriter.h @@ -23,7 +23,7 @@ #include "theory/theory_rewriter.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bv { @@ -109,6 +109,6 @@ class TheoryBVRewriter : public TheoryRewriter } // namespace bv } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__BV__THEORY_BV_REWRITER_H */ diff --git a/src/theory/bv/theory_bv_type_rules.cpp b/src/theory/bv/theory_bv_type_rules.cpp index 707b5f8bb..5184e8d2a 100644 --- a/src/theory/bv/theory_bv_type_rules.cpp +++ b/src/theory/bv/theory_bv_type_rules.cpp @@ -22,7 +22,7 @@ #include "util/cardinality.h" #include "util/integer.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bv { @@ -347,4 +347,4 @@ TypeNode BitVectorAckermanizationUremTypeRule::computeType( } // namespace bv } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/bv/theory_bv_type_rules.h b/src/theory/bv/theory_bv_type_rules.h index 763617d25..253142f06 100644 --- a/src/theory/bv/theory_bv_type_rules.h +++ b/src/theory/bv/theory_bv_type_rules.h @@ -20,7 +20,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { class TypeNode; @@ -170,6 +170,6 @@ class BitVectorAckermanizationUremTypeRule } // namespace bv } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__BV__THEORY_BV_TYPE_RULES_H */ diff --git a/src/theory/bv/theory_bv_utils.cpp b/src/theory/bv/theory_bv_utils.cpp index df57aa556..5024a2636 100644 --- a/src/theory/bv/theory_bv_utils.cpp +++ b/src/theory/bv/theory_bv_utils.cpp @@ -23,9 +23,9 @@ #include "util/bitvector.h" #include "util/rational.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bv { namespace utils { @@ -516,4 +516,4 @@ Node eliminateInt2Bv(TNode node) } // namespace utils } // namespace bv } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/bv/theory_bv_utils.h b/src/theory/bv/theory_bv_utils.h index 712f5b822..699277036 100644 --- a/src/theory/bv/theory_bv_utils.h +++ b/src/theory/bv/theory_bv_utils.h @@ -25,7 +25,7 @@ #include "expr/node_manager.h" #include "util/integer.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bv { @@ -226,4 +226,4 @@ Node eliminateInt2Bv(TNode node); } } } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/bv/type_enumerator.h b/src/theory/bv/type_enumerator.h index f660fb903..4b66169b8 100644 --- a/src/theory/bv/type_enumerator.h +++ b/src/theory/bv/type_enumerator.h @@ -25,7 +25,7 @@ #include "util/bitvector.h" #include "util/integer.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace bv { @@ -60,6 +60,6 @@ public: } // namespace bv } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__BV__TYPE_ENUMERATOR_H */ diff --git a/src/theory/care_graph.h b/src/theory/care_graph.h index 626fbdfe9..1477f3041 100644 --- a/src/theory/care_graph.h +++ b/src/theory/care_graph.h @@ -23,7 +23,7 @@ #include "expr/node.h" #include "theory/theory_id.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { /** @@ -59,6 +59,6 @@ struct CarePair { typedef std::set CareGraph; } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__CARE_GRAPH_H */ diff --git a/src/theory/care_pair_argument_callback.cpp b/src/theory/care_pair_argument_callback.cpp index e0e459b42..76d09191f 100644 --- a/src/theory/care_pair_argument_callback.cpp +++ b/src/theory/care_pair_argument_callback.cpp @@ -15,7 +15,7 @@ #include "theory/care_pair_argument_callback.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { CarePairArgumentCallback::CarePairArgumentCallback(Theory& t) : d_theory(t) {} @@ -32,4 +32,4 @@ void CarePairArgumentCallback::processData(TNode fa, TNode fb) } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/care_pair_argument_callback.h b/src/theory/care_pair_argument_callback.h index beacf9e43..ed82976d8 100644 --- a/src/theory/care_pair_argument_callback.h +++ b/src/theory/care_pair_argument_callback.h @@ -21,7 +21,7 @@ #include "expr/node_trie_algorithm.h" #include "theory/theory.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { /** @@ -51,6 +51,6 @@ class CarePairArgumentCallback : public NodeTriePathPairProcessCallback }; } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__CARE_ARGUMENT_CALLBACK_H */ diff --git a/src/theory/combination_care_graph.cpp b/src/theory/combination_care_graph.cpp index 29d4a8017..5cddbe080 100644 --- a/src/theory/combination_care_graph.cpp +++ b/src/theory/combination_care_graph.cpp @@ -22,7 +22,7 @@ #include "theory/shared_solver.h" #include "theory/theory_engine.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { CombinationCareGraph::CombinationCareGraph( @@ -100,4 +100,4 @@ bool CombinationCareGraph::buildModel() } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/combination_care_graph.h b/src/theory/combination_care_graph.h index afcf8e3a2..0858f7cc8 100644 --- a/src/theory/combination_care_graph.h +++ b/src/theory/combination_care_graph.h @@ -22,7 +22,7 @@ #include "theory/combination_engine.h" -namespace cvc5 { +namespace cvc5::internal { class TheoryEngine; @@ -48,6 +48,6 @@ class CombinationCareGraph : public CombinationEngine }; } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__COMBINATION_DISTRIBUTED__H */ diff --git a/src/theory/combination_engine.cpp b/src/theory/combination_engine.cpp index 16f43966e..a8955c3f2 100644 --- a/src/theory/combination_engine.cpp +++ b/src/theory/combination_engine.cpp @@ -25,7 +25,7 @@ #include "theory/shared_solver_distributed.h" #include "theory/theory_engine.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { CombinationEngine::CombinationEngine(Env& env, @@ -127,4 +127,4 @@ void CombinationEngine::resetRound() } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/combination_engine.h b/src/theory/combination_engine.h index 15f379dc0..9181c9c9f 100644 --- a/src/theory/combination_engine.h +++ b/src/theory/combination_engine.h @@ -25,7 +25,7 @@ #include "theory/ee_manager.h" #include "theory/valuation.h" -namespace cvc5 { +namespace cvc5::internal { class TheoryEngine; class Env; @@ -138,6 +138,6 @@ class CombinationEngine : protected EnvObj }; } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__COMBINATION_DISTRIBUTED__H */ diff --git a/src/theory/datatypes/datatypes_rewriter.cpp b/src/theory/datatypes/datatypes_rewriter.cpp index 57e2b7fcc..5acf67a0a 100644 --- a/src/theory/datatypes/datatypes_rewriter.cpp +++ b/src/theory/datatypes/datatypes_rewriter.cpp @@ -29,10 +29,10 @@ #include "util/rational.h" #include "util/uninterpreted_sort_value.h" -using namespace cvc5; -using namespace cvc5::kind; +using namespace cvc5::internal; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace datatypes { @@ -1009,4 +1009,4 @@ Node DatatypesRewriter::sygusToBuiltinEval(Node n, } // namespace datatypes } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/datatypes/datatypes_rewriter.h b/src/theory/datatypes/datatypes_rewriter.h index 5139d81b8..8af3888d8 100644 --- a/src/theory/datatypes/datatypes_rewriter.h +++ b/src/theory/datatypes/datatypes_rewriter.h @@ -21,7 +21,7 @@ #include "theory/evaluator.h" #include "theory/theory_rewriter.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace datatypes { @@ -204,6 +204,6 @@ class DatatypesRewriter : public TheoryRewriter } // namespace datatypes } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__DATATYPES__DATATYPES_REWRITER_H */ diff --git a/src/theory/datatypes/infer_proof_cons.cpp b/src/theory/datatypes/infer_proof_cons.cpp index 86386ab78..a266aad31 100644 --- a/src/theory/datatypes/infer_proof_cons.cpp +++ b/src/theory/datatypes/infer_proof_cons.cpp @@ -23,9 +23,9 @@ #include "theory/rewriter.h" #include "util/rational.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace datatypes { @@ -295,4 +295,4 @@ std::string InferProofCons::identify() const } // namespace datatypes } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/datatypes/infer_proof_cons.h b/src/theory/datatypes/infer_proof_cons.h index 6c1663a09..f05c1b508 100644 --- a/src/theory/datatypes/infer_proof_cons.h +++ b/src/theory/datatypes/infer_proof_cons.h @@ -23,7 +23,7 @@ #include "proof/proof_generator.h" #include "theory/datatypes/inference.h" -namespace cvc5 { +namespace cvc5::internal { class ProofNodeManager; @@ -95,6 +95,6 @@ class InferProofCons : public ProofGenerator } // namespace datatypes } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__DATATYPES__INFER_PROOF_CONS_H */ diff --git a/src/theory/datatypes/inference.cpp b/src/theory/datatypes/inference.cpp index 21756538c..743de9280 100644 --- a/src/theory/datatypes/inference.cpp +++ b/src/theory/datatypes/inference.cpp @@ -20,9 +20,9 @@ #include "theory/datatypes/inference_manager.h" #include "theory/theory.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace datatypes { @@ -81,4 +81,4 @@ Node DatatypesInference::processFact(std::vector& exp, } // namespace datatypes } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/datatypes/inference.h b/src/theory/datatypes/inference.h index 2dac0d7aa..f7ca94edc 100644 --- a/src/theory/datatypes/inference.h +++ b/src/theory/datatypes/inference.h @@ -23,7 +23,7 @@ #include "theory/inference_id.h" #include "theory/theory_inference.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace datatypes { @@ -70,6 +70,6 @@ class DatatypesInference : public SimpleTheoryInternalFact } // namespace datatypes } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/datatypes/inference_manager.cpp b/src/theory/datatypes/inference_manager.cpp index fef85f4c6..4c8935221 100644 --- a/src/theory/datatypes/inference_manager.cpp +++ b/src/theory/datatypes/inference_manager.cpp @@ -24,9 +24,9 @@ #include "theory/theory_state.h" #include "theory/trust_substitutions.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace datatypes { @@ -177,4 +177,4 @@ Node InferenceManager::prepareDtInference(Node conc, } // namespace datatypes } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/datatypes/inference_manager.h b/src/theory/datatypes/inference_manager.h index 2616eb40a..8d3209d2c 100644 --- a/src/theory/datatypes/inference_manager.h +++ b/src/theory/datatypes/inference_manager.h @@ -22,7 +22,7 @@ #include "theory/datatypes/infer_proof_cons.h" #include "theory/inference_manager_buffered.h" -namespace cvc5 { +namespace cvc5::internal { class EagerProofGenerator; @@ -106,6 +106,6 @@ class InferenceManager : public InferenceManagerBuffered } // namespace datatypes } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/datatypes/kinds b/src/theory/datatypes/kinds index 45553a00f..6ae165883 100644 --- a/src/theory/datatypes/kinds +++ b/src/theory/datatypes/kinds @@ -4,38 +4,38 @@ # src/theory/builtin/kinds. # -theory THEORY_DATATYPES ::cvc5::theory::datatypes::TheoryDatatypes "theory/datatypes/theory_datatypes.h" +theory THEORY_DATATYPES ::cvc5::internal::theory::datatypes::TheoryDatatypes "theory/datatypes/theory_datatypes.h" typechecker "theory/datatypes/theory_datatypes_type_rules.h" properties check parametric -rewriter ::cvc5::theory::datatypes::DatatypesRewriter "theory/datatypes/datatypes_rewriter.h" +rewriter ::cvc5::internal::theory::datatypes::DatatypesRewriter "theory/datatypes/datatypes_rewriter.h" # constructor type has a list of selector types followed by a return type operator CONSTRUCTOR_TYPE 1: "constructor" cardinality CONSTRUCTOR_TYPE \ - "::cvc5::theory::datatypes::ConstructorProperties::computeCardinality(%TYPE%)" \ + "::cvc5::internal::theory::datatypes::ConstructorProperties::computeCardinality(%TYPE%)" \ "theory/datatypes/theory_datatypes_type_rules.h" # selector type has domain type and a range type operator SELECTOR_TYPE 2 "selector" # can re-use function cardinality cardinality SELECTOR_TYPE \ - "::cvc5::theory::uf::FunctionProperties::computeCardinality(%TYPE%)" \ + "::cvc5::internal::theory::uf::FunctionProperties::computeCardinality(%TYPE%)" \ "theory/uf/theory_uf_type_rules.h" # tester type has a constructor type operator TESTER_TYPE 1 "tester" # can re-use function cardinality cardinality TESTER_TYPE \ - "::cvc5::theory::uf::FunctionProperties::computeCardinality(%TYPE%)" \ + "::cvc5::internal::theory::uf::FunctionProperties::computeCardinality(%TYPE%)" \ "theory/uf/theory_uf_type_rules.h" # tester type has a constructor type operator UPDATER_TYPE 2 "datatype update" # can re-use function cardinality cardinality UPDATER_TYPE \ - "::cvc5::theory::uf::FunctionProperties::computeCardinality(%TYPE%)" \ + "::cvc5::internal::theory::uf::FunctionProperties::computeCardinality(%TYPE%)" \ "theory/uf/theory_uf_type_rules.h" parameterized APPLY_CONSTRUCTOR APPLY_TYPE_ASCRIPTION 0: "constructor application; first parameter is the constructor, remaining parameters (if any) are parameters to the constructor" @@ -49,7 +49,7 @@ parameterized APPLY_UPDATER UPDATER_TYPE 2 "datatype updater application; first constant DATATYPE_TYPE \ class \ DatatypeIndexConstant \ - "::cvc5::DatatypeIndexConstantHashFunction" \ + "::cvc5::internal::DatatypeIndexConstantHashFunction" \ "expr/datatype_index.h" \ "a datatype type index" cardinality DATATYPE_TYPE \ @@ -61,7 +61,7 @@ well-founded DATATYPE_TYPE \ "expr/dtype.h" enumerator DATATYPE_TYPE \ - "::cvc5::theory::datatypes::DatatypesEnumerator" \ + "::cvc5::internal::theory::datatypes::DatatypesEnumerator" \ "theory/datatypes/type_enumerator.h" operator PARAMETRIC_DATATYPE 1: "parametric datatype" @@ -74,7 +74,7 @@ well-founded PARAMETRIC_DATATYPE \ "expr/dtype.h" enumerator PARAMETRIC_DATATYPE \ - "::cvc5::theory::datatypes::DatatypesEnumerator" \ + "::cvc5::internal::theory::datatypes::DatatypesEnumerator" \ "theory/datatypes/type_enumerator.h" parameterized APPLY_TYPE_ASCRIPTION ASCRIPTION_TYPE 1 \ @@ -82,33 +82,33 @@ parameterized APPLY_TYPE_ASCRIPTION ASCRIPTION_TYPE 1 \ constant ASCRIPTION_TYPE \ class \ AscriptionType \ - ::cvc5::AscriptionTypeHashFunction \ + ::cvc5::internal::AscriptionTypeHashFunction \ "expr/ascription_type.h" \ - "a type parameter for type ascription; payload is an instance of the cvc5::AscriptionType class" + "a type parameter for type ascription; payload is an instance of the cvc5::internal::AscriptionType class" -typerule APPLY_CONSTRUCTOR ::cvc5::theory::datatypes::DatatypeConstructorTypeRule -typerule APPLY_SELECTOR ::cvc5::theory::datatypes::DatatypeSelectorTypeRule -typerule APPLY_TESTER ::cvc5::theory::datatypes::DatatypeTesterTypeRule -typerule APPLY_UPDATER ::cvc5::theory::datatypes::DatatypeUpdateTypeRule -typerule APPLY_TYPE_ASCRIPTION ::cvc5::theory::datatypes::DatatypeAscriptionTypeRule +typerule APPLY_CONSTRUCTOR ::cvc5::internal::theory::datatypes::DatatypeConstructorTypeRule +typerule APPLY_SELECTOR ::cvc5::internal::theory::datatypes::DatatypeSelectorTypeRule +typerule APPLY_TESTER ::cvc5::internal::theory::datatypes::DatatypeTesterTypeRule +typerule APPLY_UPDATER ::cvc5::internal::theory::datatypes::DatatypeUpdateTypeRule +typerule APPLY_TYPE_ASCRIPTION ::cvc5::internal::theory::datatypes::DatatypeAscriptionTypeRule # constructor applications are constant if they are applied only to constants -construle APPLY_CONSTRUCTOR ::cvc5::theory::datatypes::DatatypeConstructorTypeRule +construle APPLY_CONSTRUCTOR ::cvc5::internal::theory::datatypes::DatatypeConstructorTypeRule operator DT_SIZE 1 "datatypes size" -typerule DT_SIZE ::cvc5::theory::datatypes::DtSizeTypeRule +typerule DT_SIZE ::cvc5::internal::theory::datatypes::DtSizeTypeRule operator DT_HEIGHT_BOUND 2 "datatypes height bound" -typerule DT_HEIGHT_BOUND ::cvc5::theory::datatypes::DtBoundTypeRule +typerule DT_HEIGHT_BOUND ::cvc5::internal::theory::datatypes::DtBoundTypeRule operator DT_SIZE_BOUND 2 "datatypes height bound" -typerule DT_SIZE_BOUND ::cvc5::theory::datatypes::DtBoundTypeRule +typerule DT_SIZE_BOUND ::cvc5::internal::theory::datatypes::DtBoundTypeRule operator DT_SYGUS_BOUND 2 "datatypes sygus bound" -typerule DT_SYGUS_BOUND ::cvc5::theory::datatypes::DtBoundTypeRule +typerule DT_SYGUS_BOUND ::cvc5::internal::theory::datatypes::DtBoundTypeRule operator DT_SYGUS_EVAL 1: "datatypes sygus evaluation function" -typerule DT_SYGUS_EVAL ::cvc5::theory::datatypes::DtSygusEvalTypeRule +typerule DT_SYGUS_EVAL ::cvc5::internal::theory::datatypes::DtSygusEvalTypeRule # Kinds for match terms. For example, the match term @@ -125,31 +125,31 @@ operator MATCH 2: "match construct" operator MATCH_CASE 2 "a match case" operator MATCH_BIND_CASE 3 "a match case with bound variables" -typerule MATCH ::cvc5::theory::datatypes::MatchTypeRule -typerule MATCH_CASE ::cvc5::theory::datatypes::MatchCaseTypeRule -typerule MATCH_BIND_CASE ::cvc5::theory::datatypes::MatchBindCaseTypeRule +typerule MATCH ::cvc5::internal::theory::datatypes::MatchTypeRule +typerule MATCH_CASE ::cvc5::internal::theory::datatypes::MatchCaseTypeRule +typerule MATCH_BIND_CASE ::cvc5::internal::theory::datatypes::MatchBindCaseTypeRule constant TUPLE_PROJECT_OP \ class \ TupleProjectOp \ - ::cvc5::TupleProjectOpHashFunction \ + ::cvc5::internal::TupleProjectOpHashFunction \ "theory/datatypes/tuple_project_op.h" \ - "operator for TUPLE_PROJECT; payload is an instance of the cvc5::TupleProjectOp class" + "operator for TUPLE_PROJECT; payload is an instance of the cvc5::internal::TupleProjectOp class" parameterized TUPLE_PROJECT TUPLE_PROJECT_OP 1 \ "projects a tuple from an existing tuple using indices passed in TupleProjectOp" typerule TUPLE_PROJECT_OP "SimpleTypeRule" -typerule TUPLE_PROJECT ::cvc5::theory::datatypes::TupleProjectTypeRule +typerule TUPLE_PROJECT ::cvc5::internal::theory::datatypes::TupleProjectTypeRule # For representing codatatype values constant CODATATYPE_BOUND_VARIABLE \ class \ CodatatypeBoundVariable \ - ::cvc5::CodatatypeBoundVariableHashFunction \ + ::cvc5::internal::CodatatypeBoundVariableHashFunction \ "expr/codatatype_bound_variable.h" \ - "the kind of expressions representing bound variables in codatatype constants, which are de Bruijn indexed variables; payload is an instance of the cvc5::CodatatypeBoundVariable class (used in models)" -typerule CODATATYPE_BOUND_VARIABLE ::cvc5::theory::datatypes::CodatatypeBoundVariableTypeRule + "the kind of expressions representing bound variables in codatatype constants, which are de Bruijn indexed variables; payload is an instance of the cvc5::internal::CodatatypeBoundVariable class (used in models)" +typerule CODATATYPE_BOUND_VARIABLE ::cvc5::internal::theory::datatypes::CodatatypeBoundVariableTypeRule endtheory diff --git a/src/theory/datatypes/proof_checker.cpp b/src/theory/datatypes/proof_checker.cpp index 938441151..31732a582 100644 --- a/src/theory/datatypes/proof_checker.cpp +++ b/src/theory/datatypes/proof_checker.cpp @@ -19,7 +19,7 @@ #include "theory/datatypes/theory_datatypes_utils.h" #include "theory/rewriter.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace datatypes { @@ -126,4 +126,4 @@ Node DatatypesProofRuleChecker::checkInternal(PfRule id, } // namespace datatypes } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/datatypes/proof_checker.h b/src/theory/datatypes/proof_checker.h index 5949441d8..033d50dff 100644 --- a/src/theory/datatypes/proof_checker.h +++ b/src/theory/datatypes/proof_checker.h @@ -22,7 +22,7 @@ #include "proof/proof_checker.h" #include "proof/proof_node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace datatypes { @@ -45,6 +45,6 @@ class DatatypesProofRuleChecker : public ProofRuleChecker } // namespace datatypes } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__DATATYPES__PROOF_CHECKER_H */ diff --git a/src/theory/datatypes/sygus_datatype_utils.cpp b/src/theory/datatypes/sygus_datatype_utils.cpp index dee9d847c..4379a3837 100644 --- a/src/theory/datatypes/sygus_datatype_utils.cpp +++ b/src/theory/datatypes/sygus_datatype_utils.cpp @@ -25,10 +25,10 @@ #include "theory/evaluator.h" #include "theory/rewriter.h" -using namespace cvc5; -using namespace cvc5::kind; +using namespace cvc5::internal; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace datatypes { namespace utils { @@ -622,4 +622,4 @@ Node getExpandedDefinitionForm(Node op) } // namespace utils } // namespace datatypes } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/datatypes/sygus_datatype_utils.h b/src/theory/datatypes/sygus_datatype_utils.h index 3ea6b62e9..c95ff1954 100644 --- a/src/theory/datatypes/sygus_datatype_utils.h +++ b/src/theory/datatypes/sygus_datatype_utils.h @@ -25,7 +25,7 @@ #include "expr/node_manager_attributes.h" #include "theory/datatypes/theory_datatypes_utils.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { // ----------------------- sygus datatype attributes @@ -230,6 +230,6 @@ Node getExpandedDefinitionForm(Node op); } // namespace utils } // namespace datatypes } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/datatypes/sygus_extension.cpp b/src/theory/datatypes/sygus_extension.cpp index ca3ea33e0..798e8690b 100644 --- a/src/theory/datatypes/sygus_extension.cpp +++ b/src/theory/datatypes/sygus_extension.cpp @@ -37,11 +37,11 @@ #include "theory/theory_state.h" #include "util/rational.h" -using namespace cvc5; -using namespace cvc5::kind; -using namespace cvc5::context; -using namespace cvc5::theory; -using namespace cvc5::theory::datatypes; +using namespace cvc5::internal; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::context; +using namespace cvc5::internal::theory; +using namespace cvc5::internal::theory::datatypes; SygusExtension::SygusExtension(Env& env, TheoryState& s, diff --git a/src/theory/datatypes/sygus_extension.h b/src/theory/datatypes/sygus_extension.h index 2fd0110b4..44020b7ab 100644 --- a/src/theory/datatypes/sygus_extension.h +++ b/src/theory/datatypes/sygus_extension.h @@ -31,7 +31,7 @@ #include "theory/quantifiers/sygus_sampler.h" #include "theory/quantifiers/term_database.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { class SynthConjecture; @@ -714,7 +714,7 @@ private: } } -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/datatypes/sygus_simple_sym.cpp b/src/theory/datatypes/sygus_simple_sym.cpp index d17a21d4b..a01f90539 100644 --- a/src/theory/datatypes/sygus_simple_sym.cpp +++ b/src/theory/datatypes/sygus_simple_sym.cpp @@ -20,9 +20,9 @@ #include "util/rational.h" using namespace std; -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace datatypes { @@ -586,4 +586,4 @@ int SygusSimpleSymBreak::getFirstArgOccurrence(const DTypeConstructor& c, } // namespace datatypes } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/datatypes/sygus_simple_sym.h b/src/theory/datatypes/sygus_simple_sym.h index 872a2805f..98ac524f7 100644 --- a/src/theory/datatypes/sygus_simple_sym.h +++ b/src/theory/datatypes/sygus_simple_sym.h @@ -21,7 +21,7 @@ #include "expr/dtype.h" #include "theory/quantifiers/sygus/term_database_sygus.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace datatypes { @@ -99,6 +99,6 @@ class SygusSimpleSymBreak } // namespace datatypes } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__DATATYPES__SIMPLE_SYM_BREAK_H */ diff --git a/src/theory/datatypes/theory_datatypes.cpp b/src/theory/datatypes/theory_datatypes.cpp index d2df204a6..72573e569 100644 --- a/src/theory/datatypes/theory_datatypes.cpp +++ b/src/theory/datatypes/theory_datatypes.cpp @@ -42,10 +42,10 @@ #include "util/rational.h" using namespace std; -using namespace cvc5::kind; -using namespace cvc5::context; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::context; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace datatypes { @@ -1833,4 +1833,4 @@ std::pair TheoryDatatypes::entailmentCheck(TNode lit) } // namespace datatypes } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/datatypes/theory_datatypes.h b/src/theory/datatypes/theory_datatypes.h index 738c5c303..284c13c92 100644 --- a/src/theory/datatypes/theory_datatypes.h +++ b/src/theory/datatypes/theory_datatypes.h @@ -35,7 +35,7 @@ #include "theory/uf/equality_engine.h" #include "util/hash.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace datatypes { @@ -304,6 +304,6 @@ private: } // namespace datatypes } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__DATATYPES__THEORY_DATATYPES_H */ diff --git a/src/theory/datatypes/theory_datatypes_type_rules.cpp b/src/theory/datatypes/theory_datatypes_type_rules.cpp index 731e811ba..bc4861e40 100644 --- a/src/theory/datatypes/theory_datatypes_type_rules.cpp +++ b/src/theory/datatypes/theory_datatypes_type_rules.cpp @@ -26,7 +26,7 @@ #include "theory/datatypes/tuple_project_op.h" #include "util/rational.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace datatypes { @@ -579,4 +579,4 @@ TypeNode CodatatypeBoundVariableTypeRule::computeType(NodeManager* nodeManager, } // namespace datatypes } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/datatypes/theory_datatypes_type_rules.h b/src/theory/datatypes/theory_datatypes_type_rules.h index 5ad325c6a..e3dd1f78f 100644 --- a/src/theory/datatypes/theory_datatypes_type_rules.h +++ b/src/theory/datatypes/theory_datatypes_type_rules.h @@ -21,7 +21,7 @@ #include "expr/node.h" #include "expr/type_node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace datatypes { @@ -183,6 +183,6 @@ class CodatatypeBoundVariableTypeRule } // namespace datatypes } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__DATATYPES__THEORY_DATATYPES_TYPE_RULES_H */ diff --git a/src/theory/datatypes/theory_datatypes_utils.cpp b/src/theory/datatypes/theory_datatypes_utils.cpp index ea804e91d..b988a74d0 100644 --- a/src/theory/datatypes/theory_datatypes_utils.cpp +++ b/src/theory/datatypes/theory_datatypes_utils.cpp @@ -19,10 +19,10 @@ #include "expr/dtype.h" #include "expr/dtype_cons.h" -using namespace cvc5; -using namespace cvc5::kind; +using namespace cvc5::internal; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace datatypes { namespace utils { @@ -209,4 +209,4 @@ bool checkClash(Node n1, Node n2, std::vector& rew) } // namespace utils } // namespace datatypes } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/datatypes/theory_datatypes_utils.h b/src/theory/datatypes/theory_datatypes_utils.h index 1a6e6619b..85fb54edc 100644 --- a/src/theory/datatypes/theory_datatypes_utils.h +++ b/src/theory/datatypes/theory_datatypes_utils.h @@ -24,7 +24,7 @@ #include "expr/node.h" #include "expr/node_manager_attributes.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace datatypes { namespace utils { @@ -106,6 +106,6 @@ bool checkClash(Node n1, Node n2, std::vector& rew); } // namespace utils } // namespace datatypes } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/datatypes/tuple_project_op.cpp b/src/theory/datatypes/tuple_project_op.cpp index 8338f64da..5086e6540 100644 --- a/src/theory/datatypes/tuple_project_op.cpp +++ b/src/theory/datatypes/tuple_project_op.cpp @@ -19,7 +19,7 @@ #include "expr/type_node.h" -namespace cvc5 { +namespace cvc5::internal { std::ostream& operator<<(std::ostream& out, const TupleProjectOp& op) { @@ -54,4 +54,4 @@ bool TupleProjectOp::operator==(const TupleProjectOp& op) const return d_indices == op.d_indices; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/datatypes/tuple_project_op.h b/src/theory/datatypes/tuple_project_op.h index efa16b906..d32b6bd0b 100644 --- a/src/theory/datatypes/tuple_project_op.h +++ b/src/theory/datatypes/tuple_project_op.h @@ -21,7 +21,7 @@ #include #include -namespace cvc5 { +namespace cvc5::internal { class TypeNode; @@ -54,6 +54,6 @@ struct TupleProjectOpHashFunction size_t operator()(const TupleProjectOp& op) const; }; /* struct TupleProjectOpHashFunction */ -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__PROJECT_OP_H */ diff --git a/src/theory/datatypes/tuple_utils.cpp b/src/theory/datatypes/tuple_utils.cpp index 0a852c01e..7e4236e3d 100644 --- a/src/theory/datatypes/tuple_utils.cpp +++ b/src/theory/datatypes/tuple_utils.cpp @@ -18,9 +18,9 @@ #include "expr/dtype.h" #include "expr/dtype_cons.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace datatypes { @@ -120,4 +120,4 @@ Node TupleUtils::reverseTuple(Node tuple) } // namespace datatypes } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/datatypes/tuple_utils.h b/src/theory/datatypes/tuple_utils.h index 595052c72..21efe7e64 100644 --- a/src/theory/datatypes/tuple_utils.h +++ b/src/theory/datatypes/tuple_utils.h @@ -18,7 +18,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace datatypes { @@ -78,6 +78,6 @@ class TupleUtils }; } // namespace datatypes } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__TUPLE__UTILS_H */ diff --git a/src/theory/datatypes/type_enumerator.cpp b/src/theory/datatypes/type_enumerator.cpp index 5e8edd9b7..ec541d3a2 100644 --- a/src/theory/datatypes/type_enumerator.cpp +++ b/src/theory/datatypes/type_enumerator.cpp @@ -21,7 +21,7 @@ #include "theory/datatypes/datatypes_rewriter.h" #include "theory/datatypes/theory_datatypes_utils.h" -using namespace cvc5; +using namespace cvc5::internal; using namespace theory; using namespace datatypes; diff --git a/src/theory/datatypes/type_enumerator.h b/src/theory/datatypes/type_enumerator.h index 568fe8087..5cb69e163 100644 --- a/src/theory/datatypes/type_enumerator.h +++ b/src/theory/datatypes/type_enumerator.h @@ -24,7 +24,7 @@ #include "options/quantifiers_options.h" #include "theory/type_enumerator.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace datatypes { @@ -164,6 +164,6 @@ class DatatypesEnumerator : public TypeEnumeratorBase { } // namespace datatypes } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__DATATYPES__TYPE_ENUMERATOR_H */ diff --git a/src/theory/decision_manager.cpp b/src/theory/decision_manager.cpp index 842501c86..6df6df063 100644 --- a/src/theory/decision_manager.cpp +++ b/src/theory/decision_manager.cpp @@ -18,9 +18,9 @@ #include "theory/rewriter.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { DecisionManager::DecisionManager(context::Context* userContext) @@ -108,4 +108,4 @@ Node DecisionManager::getNextDecisionRequest() } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/decision_manager.h b/src/theory/decision_manager.h index d9ec39eea..0217aa734 100644 --- a/src/theory/decision_manager.h +++ b/src/theory/decision_manager.h @@ -23,7 +23,7 @@ #include "context/cdlist.h" #include "theory/decision_strategy.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { /** DecisionManager @@ -142,6 +142,6 @@ class DecisionManager }; } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__DECISION_MANAGER__H */ diff --git a/src/theory/decision_strategy.cpp b/src/theory/decision_strategy.cpp index 5162b667d..ecae0802f 100644 --- a/src/theory/decision_strategy.cpp +++ b/src/theory/decision_strategy.cpp @@ -18,9 +18,9 @@ #include "theory/rewriter.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { DecisionStrategyFmf::DecisionStrategyFmf(Env& env, Valuation valuation) @@ -147,4 +147,4 @@ Node DecisionStrategySingleton::mkLiteral(unsigned n) Node DecisionStrategySingleton::getSingleLiteral() { return d_literal; } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/decision_strategy.h b/src/theory/decision_strategy.h index fc2975137..a677577cc 100644 --- a/src/theory/decision_strategy.h +++ b/src/theory/decision_strategy.h @@ -24,7 +24,7 @@ #include "smt/env_obj.h" #include "theory/valuation.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { /** @@ -142,6 +142,6 @@ class DecisionStrategySingleton : public DecisionStrategyFmf }; } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__DECISION_STRATEGY__H */ diff --git a/src/theory/difficulty_manager.cpp b/src/theory/difficulty_manager.cpp index 2b6640391..ae519eef9 100644 --- a/src/theory/difficulty_manager.cpp +++ b/src/theory/difficulty_manager.cpp @@ -21,9 +21,9 @@ #include "theory/theory_model.h" #include "util/rational.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { DifficultyManager::DifficultyManager(RelevanceManager* rlv, @@ -132,4 +132,4 @@ void DifficultyManager::incrementDifficulty(TNode a, uint64_t amount) } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/difficulty_manager.h b/src/theory/difficulty_manager.h index 902e29dd6..f9e7bc3a3 100644 --- a/src/theory/difficulty_manager.h +++ b/src/theory/difficulty_manager.h @@ -23,7 +23,7 @@ #include "expr/node.h" #include "theory/valuation.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { class TheoryModel; @@ -89,6 +89,6 @@ class DifficultyManager }; } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__DIFFICULTY_MANAGER__H */ diff --git a/src/theory/ee_manager.cpp b/src/theory/ee_manager.cpp index 142853b95..f3196a47b 100644 --- a/src/theory/ee_manager.cpp +++ b/src/theory/ee_manager.cpp @@ -17,7 +17,7 @@ #include "theory/theory_model.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { EqEngineManager::EqEngineManager(Env& env, TheoryEngine& te, SharedSolver& shs) @@ -49,4 +49,4 @@ eq::EqualityEngine* EqEngineManager::allocateEqualityEngine(EeSetupInfo& esi, } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/ee_manager.h b/src/theory/ee_manager.h index 228c0418a..9ce4f8742 100644 --- a/src/theory/ee_manager.h +++ b/src/theory/ee_manager.h @@ -26,7 +26,7 @@ #include "theory/theory.h" #include "theory/uf/equality_engine.h" -namespace cvc5 { +namespace cvc5::internal { class TheoryEngine; @@ -97,6 +97,6 @@ class EqEngineManager : protected EnvObj }; } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__EE_MANAGER__H */ diff --git a/src/theory/ee_manager_central.cpp b/src/theory/ee_manager_central.cpp index 079cdd904..f3e1bbe89 100644 --- a/src/theory/ee_manager_central.cpp +++ b/src/theory/ee_manager_central.cpp @@ -21,7 +21,7 @@ #include "theory/theory_engine.h" #include "theory/theory_state.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { EqEngineManagerCentral::EqEngineManagerCentral(Env& env, @@ -303,4 +303,4 @@ void EqEngineManagerCentral::eqNotifyConstantTermMerge(TNode t1, TNode t2) } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/ee_manager_central.h b/src/theory/ee_manager_central.h index f5a34b11e..abb815b8e 100644 --- a/src/theory/ee_manager_central.h +++ b/src/theory/ee_manager_central.h @@ -25,7 +25,7 @@ #include "theory/quantifiers/master_eq_notify.h" #include "theory/uf/equality_engine.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { /** @@ -123,6 +123,6 @@ class EqEngineManagerCentral : public EqEngineManager }; } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__EE_MANAGER_CENTRAL__H */ diff --git a/src/theory/ee_manager_distributed.cpp b/src/theory/ee_manager_distributed.cpp index 1de625d48..0fead65dc 100644 --- a/src/theory/ee_manager_distributed.cpp +++ b/src/theory/ee_manager_distributed.cpp @@ -20,7 +20,7 @@ #include "theory/theory_engine.h" #include "theory/uf/equality_engine.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { EqEngineManagerDistributed::EqEngineManagerDistributed(Env& env, @@ -109,4 +109,4 @@ void EqEngineManagerDistributed::notifyModel(bool incomplete) } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/ee_manager_distributed.h b/src/theory/ee_manager_distributed.h index 3aaadbc2e..97c73429a 100644 --- a/src/theory/ee_manager_distributed.h +++ b/src/theory/ee_manager_distributed.h @@ -24,7 +24,7 @@ #include "theory/ee_manager.h" #include "theory/quantifiers/master_eq_notify.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace eq { @@ -69,6 +69,6 @@ class EqEngineManagerDistributed : public EqEngineManager }; } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__EE_MANAGER_DISTRIBUTED__H */ diff --git a/src/theory/ee_setup_info.h b/src/theory/ee_setup_info.h index 130241c4a..e18e4122b 100644 --- a/src/theory/ee_setup_info.h +++ b/src/theory/ee_setup_info.h @@ -20,7 +20,7 @@ #include -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace eq { @@ -75,6 +75,6 @@ struct EeSetupInfo }; } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__EE_SETUP_INFO__H */ diff --git a/src/theory/engine_output_channel.cpp b/src/theory/engine_output_channel.cpp index 218175ee9..02c7397b8 100644 --- a/src/theory/engine_output_channel.cpp +++ b/src/theory/engine_output_channel.cpp @@ -20,9 +20,9 @@ #include "smt/smt_statistics_registry.h" #include "theory/theory_engine.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { EngineOutputChannel::Statistics::Statistics(theory::TheoryId theory) @@ -153,4 +153,4 @@ void EngineOutputChannel::trustedLemma(TrustNode plem, LemmaProperty p) } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/engine_output_channel.h b/src/theory/engine_output_channel.h index 468825a7e..732cbb5ec 100644 --- a/src/theory/engine_output_channel.h +++ b/src/theory/engine_output_channel.h @@ -23,7 +23,7 @@ #include "theory/theory_id.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { class TheoryEngine; @@ -104,6 +104,6 @@ class EngineOutputChannel : public theory::OutputChannel }; } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__ENGINE_OUTPUT_CHANNEL_H */ diff --git a/src/theory/evaluator.cpp b/src/theory/evaluator.cpp index 046bb9de8..90a4338c5 100644 --- a/src/theory/evaluator.cpp +++ b/src/theory/evaluator.cpp @@ -21,9 +21,9 @@ #include "theory/theory.h" #include "util/integer.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { EvalResult::EvalResult(const EvalResult& other) @@ -984,4 +984,4 @@ void Evaluator::processUnhandled(TNode n, } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/evaluator.h b/src/theory/evaluator.h index a85071277..945dc6d07 100644 --- a/src/theory/evaluator.h +++ b/src/theory/evaluator.h @@ -31,7 +31,7 @@ #include "util/string.h" #include "util/uninterpreted_sort_value.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { /** @@ -177,6 +177,6 @@ class Evaluator }; } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__EVALUATOR_H */ diff --git a/src/theory/ext_theory.cpp b/src/theory/ext_theory.cpp index 9eb6e3cdc..eec0a344c 100644 --- a/src/theory/ext_theory.cpp +++ b/src/theory/ext_theory.cpp @@ -28,7 +28,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace theory { const char* toString(ExtReducedId id) @@ -547,4 +547,4 @@ std::vector ExtTheory::getActive(Kind k) const } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/ext_theory.h b/src/theory/ext_theory.h index ecd061e7c..66d11374e 100644 --- a/src/theory/ext_theory.h +++ b/src/theory/ext_theory.h @@ -44,7 +44,7 @@ #include "smt/env_obj.h" #include "theory/theory_inference_manager.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { class OutputChannel; @@ -331,6 +331,6 @@ class ExtTheory : protected EnvObj }; } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__EXT_THEORY_H */ diff --git a/src/theory/fp/fp_expand_defs.cpp b/src/theory/fp/fp_expand_defs.cpp index de86626af..2d6ba0981 100644 --- a/src/theory/fp/fp_expand_defs.cpp +++ b/src/theory/fp/fp_expand_defs.cpp @@ -18,7 +18,7 @@ #include "expr/skolem_manager.h" #include "util/floatingpoint.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace fp { @@ -244,4 +244,4 @@ TrustNode FpExpandDefs::expandDefinition(Node node) } // namespace fp } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/fp/fp_expand_defs.h b/src/theory/fp/fp_expand_defs.h index 8240f1f8e..5a99c6114 100644 --- a/src/theory/fp/fp_expand_defs.h +++ b/src/theory/fp/fp_expand_defs.h @@ -22,7 +22,7 @@ #include "expr/node.h" #include "proof/trust_node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace fp { @@ -64,6 +64,6 @@ class FpExpandDefs } // namespace fp } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__FP__THEORY_FP_H */ diff --git a/src/theory/fp/fp_word_blaster.cpp b/src/theory/fp/fp_word_blaster.cpp index 41d78b44d..aead0414e 100644 --- a/src/theory/fp/fp_word_blaster.cpp +++ b/src/theory/fp/fp_word_blaster.cpp @@ -38,7 +38,7 @@ #include "util/floatingpoint_literal_symfpu.h" namespace symfpu { -using namespace ::cvc5::theory::fp::symfpuSymbolic; +using namespace ::cvc5::internal::theory::fp::symfpuSymbolic; #define CVC5_SYM_ITE_DFN(T) \ template <> \ @@ -48,65 +48,65 @@ using namespace ::cvc5::theory::fp::symfpuSymbolic; const T& _l, \ const T& _r) \ { \ - ::cvc5::NodeManager* nm = ::cvc5::NodeManager::currentNM(); \ + ::cvc5::internal::NodeManager* nm = ::cvc5::internal::NodeManager::currentNM(); \ \ - ::cvc5::Node cond = _cond; \ - ::cvc5::Node l = _l; \ - ::cvc5::Node r = _r; \ + ::cvc5::internal::Node cond = _cond; \ + ::cvc5::internal::Node l = _l; \ + ::cvc5::internal::Node r = _r; \ \ /* Handle some common symfpu idioms */ \ if (cond.isConst()) \ { \ - return (cond == nm->mkConst(::cvc5::BitVector(1U, 1U))) ? l : r; \ + return (cond == nm->mkConst(::cvc5::internal::BitVector(1U, 1U))) ? l : r; \ } \ else \ { \ - if (l.getKind() == ::cvc5::kind::BITVECTOR_ITE) \ + if (l.getKind() == ::cvc5::internal::kind::BITVECTOR_ITE) \ { \ if (l[1] == r) \ { \ return nm->mkNode( \ - ::cvc5::kind::BITVECTOR_ITE, \ - nm->mkNode(::cvc5::kind::BITVECTOR_AND, \ + ::cvc5::internal::kind::BITVECTOR_ITE, \ + nm->mkNode(::cvc5::internal::kind::BITVECTOR_AND, \ cond, \ - nm->mkNode(::cvc5::kind::BITVECTOR_NOT, l[0])), \ + nm->mkNode(::cvc5::internal::kind::BITVECTOR_NOT, l[0])), \ l[2], \ r); \ } \ else if (l[2] == r) \ { \ return nm->mkNode( \ - ::cvc5::kind::BITVECTOR_ITE, \ - nm->mkNode(::cvc5::kind::BITVECTOR_AND, cond, l[0]), \ + ::cvc5::internal::kind::BITVECTOR_ITE, \ + nm->mkNode(::cvc5::internal::kind::BITVECTOR_AND, cond, l[0]), \ l[1], \ r); \ } \ } \ - else if (r.getKind() == ::cvc5::kind::BITVECTOR_ITE) \ + else if (r.getKind() == ::cvc5::internal::kind::BITVECTOR_ITE) \ { \ if (r[1] == l) \ { \ return nm->mkNode( \ - ::cvc5::kind::BITVECTOR_ITE, \ - nm->mkNode(::cvc5::kind::BITVECTOR_AND, \ - nm->mkNode(::cvc5::kind::BITVECTOR_NOT, cond), \ - nm->mkNode(::cvc5::kind::BITVECTOR_NOT, r[0])), \ + ::cvc5::internal::kind::BITVECTOR_ITE, \ + nm->mkNode(::cvc5::internal::kind::BITVECTOR_AND, \ + nm->mkNode(::cvc5::internal::kind::BITVECTOR_NOT, cond), \ + nm->mkNode(::cvc5::internal::kind::BITVECTOR_NOT, r[0])), \ r[2], \ l); \ } \ else if (r[2] == l) \ { \ return nm->mkNode( \ - ::cvc5::kind::BITVECTOR_ITE, \ - nm->mkNode(::cvc5::kind::BITVECTOR_AND, \ - nm->mkNode(::cvc5::kind::BITVECTOR_NOT, cond), \ + ::cvc5::internal::kind::BITVECTOR_ITE, \ + nm->mkNode(::cvc5::internal::kind::BITVECTOR_AND, \ + nm->mkNode(::cvc5::internal::kind::BITVECTOR_NOT, cond), \ r[0]), \ r[1], \ l); \ } \ } \ } \ - return T(nm->mkNode(::cvc5::kind::BITVECTOR_ITE, cond, l, r)); \ + return T(nm->mkNode(::cvc5::internal::kind::BITVECTOR_ITE, cond, l, r)); \ } \ } @@ -140,7 +140,7 @@ void probabilityAnnotation(const traits::prop& p, } }; // namespace symfpu -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace fp { namespace symfpuSymbolic { @@ -391,8 +391,8 @@ symbolicBitVector symbolicBitVector::maxValue(const bwt& w) symbolicBitVector leadingZero(symbolicBitVector::zero(1)); symbolicBitVector base(symbolicBitVector::allOnes(w - 1)); - return symbolicBitVector(::cvc5::NodeManager::currentNM()->mkNode( - ::cvc5::kind::BITVECTOR_CONCAT, leadingZero, base)); + return symbolicBitVector(::cvc5::internal::NodeManager::currentNM()->mkNode( + ::cvc5::internal::kind::BITVECTOR_CONCAT, leadingZero, base)); } template <> @@ -407,8 +407,8 @@ symbolicBitVector symbolicBitVector::minValue(const bwt& w) symbolicBitVector leadingOne(symbolicBitVector::one(1)); symbolicBitVector base(symbolicBitVector::zero(w - 1)); - return symbolicBitVector(::cvc5::NodeManager::currentNM()->mkNode( - ::cvc5::kind::BITVECTOR_CONCAT, leadingOne, base)); + return symbolicBitVector(::cvc5::internal::NodeManager::currentNM()->mkNode( + ::cvc5::internal::kind::BITVECTOR_CONCAT, leadingOne, base)); } template <> @@ -794,7 +794,7 @@ Node FpWordBlaster::propToNode(const prop& p) const { NodeManager* nm = NodeManager::currentNM(); Node value = - nm->mkNode(kind::EQUAL, p, nm->mkConst(::cvc5::BitVector(1U, 1U))); + nm->mkNode(kind::EQUAL, p, nm->mkConst(::cvc5::internal::BitVector(1U, 1U))); return value; } Node FpWordBlaster::ubvToNode(const ubv& u) const { return u; } @@ -1305,4 +1305,4 @@ Node FpWordBlaster::getValue(Valuation& val, TNode var) } // namespace fp } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/fp/fp_word_blaster.h b/src/theory/fp/fp_word_blaster.h index f7c7f26be..b700dd933 100644 --- a/src/theory/fp/fp_word_blaster.h +++ b/src/theory/fp/fp_word_blaster.h @@ -34,7 +34,7 @@ #include "util/floatingpoint_size.h" #include "util/hash.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace fp { @@ -86,7 +86,7 @@ class traits typedef traits::bwt bwt; /** - * Wrap the cvc5::Node types so that we can debug issues with this back-end + * Wrap the cvc5::internal::Node types so that we can debug issues with this back-end */ class nodeWrapper : public Node { @@ -327,6 +327,6 @@ class FpWordBlaster } // namespace fp } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__FP__THEORY_FP_H */ diff --git a/src/theory/fp/kinds b/src/theory/fp/kinds index e059b30d6..546daf79f 100644 --- a/src/theory/fp/kinds +++ b/src/theory/fp/kinds @@ -4,9 +4,9 @@ # src/theory/builtin/kinds. # -theory THEORY_FP ::cvc5::theory::fp::TheoryFp "theory/fp/theory_fp.h" +theory THEORY_FP ::cvc5::internal::theory::fp::TheoryFp "theory/fp/theory_fp.h" typechecker "theory/fp/theory_fp_type_rules.h" -rewriter ::cvc5::theory::fp::TheoryFpRewriter "theory/fp/theory_fp_rewriter.h" +rewriter ::cvc5::internal::theory::fp::TheoryFpRewriter "theory/fp/theory_fp_rewriter.h" properties check @@ -16,19 +16,19 @@ properties check constant CONST_FLOATINGPOINT \ class \ FloatingPoint \ - ::cvc5::FloatingPointHashFunction \ + ::cvc5::internal::FloatingPointHashFunction \ "util/floatingpoint.h" \ "a floating-point literal" -typerule CONST_FLOATINGPOINT ::cvc5::theory::fp::FloatingPointConstantTypeRule +typerule CONST_FLOATINGPOINT ::cvc5::internal::theory::fp::FloatingPointConstantTypeRule constant CONST_ROUNDINGMODE \ "enum class" \ RoundingMode \ - ::cvc5::RoundingModeHashFunction \ + ::cvc5::internal::RoundingModeHashFunction \ "util/roundingmode.h" \ "a floating-point rounding mode" -typerule CONST_ROUNDINGMODE ::cvc5::theory::fp::RoundingModeConstantTypeRule +typerule CONST_ROUNDINGMODE ::cvc5::internal::theory::fp::RoundingModeConstantTypeRule @@ -41,7 +41,7 @@ sort ROUNDINGMODE_TYPE \ "floating-point rounding mode" enumerator ROUNDINGMODE_TYPE \ - "::cvc5::theory::fp::RoundingModeEnumerator" \ + "::cvc5::internal::theory::fp::RoundingModeEnumerator" \ "theory/fp/type_enumerator.h" @@ -49,137 +49,137 @@ enumerator ROUNDINGMODE_TYPE \ constant FLOATINGPOINT_TYPE \ class \ FloatingPointSize \ - ::cvc5::FloatingPointSizeHashFunction \ + ::cvc5::internal::FloatingPointSizeHashFunction \ "util/floatingpoint.h" \ "floating-point type" cardinality FLOATINGPOINT_TYPE \ - "::cvc5::theory::fp::CardinalityComputer::computeCardinality(%TYPE%)" \ + "::cvc5::internal::theory::fp::CardinalityComputer::computeCardinality(%TYPE%)" \ "theory/fp/theory_fp_type_rules.h" enumerator FLOATINGPOINT_TYPE \ - "::cvc5::theory::fp::FloatingPointEnumerator" \ + "::cvc5::internal::theory::fp::FloatingPointEnumerator" \ "theory/fp/type_enumerator.h" well-founded FLOATINGPOINT_TYPE \ true \ - "(*cvc5::theory::TypeEnumerator(%TYPE%))" \ + "(*cvc5::internal::theory::TypeEnumerator(%TYPE%))" \ "theory/type_enumerator.h" # operators... operator FLOATINGPOINT_FP 3 "construct a floating-point literal from bit vectors" -typerule FLOATINGPOINT_FP ::cvc5::theory::fp::FloatingPointFPTypeRule +typerule FLOATINGPOINT_FP ::cvc5::internal::theory::fp::FloatingPointFPTypeRule operator FLOATINGPOINT_EQ 2: "floating-point equality" -typerule FLOATINGPOINT_EQ ::cvc5::theory::fp::FloatingPointTestTypeRule +typerule FLOATINGPOINT_EQ ::cvc5::internal::theory::fp::FloatingPointTestTypeRule operator FLOATINGPOINT_ABS 1 "floating-point absolute value" -typerule FLOATINGPOINT_ABS ::cvc5::theory::fp::FloatingPointOperationTypeRule +typerule FLOATINGPOINT_ABS ::cvc5::internal::theory::fp::FloatingPointOperationTypeRule operator FLOATINGPOINT_NEG 1 "floating-point negation" -typerule FLOATINGPOINT_NEG ::cvc5::theory::fp::FloatingPointOperationTypeRule +typerule FLOATINGPOINT_NEG ::cvc5::internal::theory::fp::FloatingPointOperationTypeRule operator FLOATINGPOINT_ADD 3 "floating-point addition" -typerule FLOATINGPOINT_ADD ::cvc5::theory::fp::FloatingPointRoundingOperationTypeRule +typerule FLOATINGPOINT_ADD ::cvc5::internal::theory::fp::FloatingPointRoundingOperationTypeRule operator FLOATINGPOINT_SUB 3 "floating-point sutraction" -typerule FLOATINGPOINT_SUB ::cvc5::theory::fp::FloatingPointRoundingOperationTypeRule +typerule FLOATINGPOINT_SUB ::cvc5::internal::theory::fp::FloatingPointRoundingOperationTypeRule operator FLOATINGPOINT_MULT 3 "floating-point multiply" -typerule FLOATINGPOINT_MULT ::cvc5::theory::fp::FloatingPointRoundingOperationTypeRule +typerule FLOATINGPOINT_MULT ::cvc5::internal::theory::fp::FloatingPointRoundingOperationTypeRule operator FLOATINGPOINT_DIV 3 "floating-point division" -typerule FLOATINGPOINT_DIV ::cvc5::theory::fp::FloatingPointRoundingOperationTypeRule +typerule FLOATINGPOINT_DIV ::cvc5::internal::theory::fp::FloatingPointRoundingOperationTypeRule operator FLOATINGPOINT_FMA 4 "floating-point fused multiply and add" -typerule FLOATINGPOINT_FMA ::cvc5::theory::fp::FloatingPointRoundingOperationTypeRule +typerule FLOATINGPOINT_FMA ::cvc5::internal::theory::fp::FloatingPointRoundingOperationTypeRule operator FLOATINGPOINT_SQRT 2 "floating-point square root" -typerule FLOATINGPOINT_SQRT ::cvc5::theory::fp::FloatingPointRoundingOperationTypeRule +typerule FLOATINGPOINT_SQRT ::cvc5::internal::theory::fp::FloatingPointRoundingOperationTypeRule operator FLOATINGPOINT_REM 2 "floating-point remainder" -typerule FLOATINGPOINT_REM ::cvc5::theory::fp::FloatingPointOperationTypeRule +typerule FLOATINGPOINT_REM ::cvc5::internal::theory::fp::FloatingPointOperationTypeRule operator FLOATINGPOINT_RTI 2 "floating-point round to integral" -typerule FLOATINGPOINT_RTI ::cvc5::theory::fp::FloatingPointRoundingOperationTypeRule +typerule FLOATINGPOINT_RTI ::cvc5::internal::theory::fp::FloatingPointRoundingOperationTypeRule operator FLOATINGPOINT_MIN 2 "floating-point minimum" -typerule FLOATINGPOINT_MIN ::cvc5::theory::fp::FloatingPointOperationTypeRule +typerule FLOATINGPOINT_MIN ::cvc5::internal::theory::fp::FloatingPointOperationTypeRule operator FLOATINGPOINT_MAX 2 "floating-point maximum" -typerule FLOATINGPOINT_MAX ::cvc5::theory::fp::FloatingPointOperationTypeRule +typerule FLOATINGPOINT_MAX ::cvc5::internal::theory::fp::FloatingPointOperationTypeRule operator FLOATINGPOINT_MIN_TOTAL 3 "floating-point minimum (defined for all inputs)" -typerule FLOATINGPOINT_MIN_TOTAL ::cvc5::theory::fp::FloatingPointPartialOperationTypeRule +typerule FLOATINGPOINT_MIN_TOTAL ::cvc5::internal::theory::fp::FloatingPointPartialOperationTypeRule operator FLOATINGPOINT_MAX_TOTAL 3 "floating-point maximum (defined for all inputs)" -typerule FLOATINGPOINT_MAX_TOTAL ::cvc5::theory::fp::FloatingPointPartialOperationTypeRule +typerule FLOATINGPOINT_MAX_TOTAL ::cvc5::internal::theory::fp::FloatingPointPartialOperationTypeRule operator FLOATINGPOINT_LEQ 2: "floating-point less than or equal" -typerule FLOATINGPOINT_LEQ ::cvc5::theory::fp::FloatingPointTestTypeRule +typerule FLOATINGPOINT_LEQ ::cvc5::internal::theory::fp::FloatingPointTestTypeRule operator FLOATINGPOINT_LT 2: "floating-point less than" -typerule FLOATINGPOINT_LT ::cvc5::theory::fp::FloatingPointTestTypeRule +typerule FLOATINGPOINT_LT ::cvc5::internal::theory::fp::FloatingPointTestTypeRule operator FLOATINGPOINT_GEQ 2: "floating-point greater than or equal" -typerule FLOATINGPOINT_GEQ ::cvc5::theory::fp::FloatingPointTestTypeRule +typerule FLOATINGPOINT_GEQ ::cvc5::internal::theory::fp::FloatingPointTestTypeRule operator FLOATINGPOINT_GT 2: "floating-point greater than" -typerule FLOATINGPOINT_GT ::cvc5::theory::fp::FloatingPointTestTypeRule +typerule FLOATINGPOINT_GT ::cvc5::internal::theory::fp::FloatingPointTestTypeRule operator FLOATINGPOINT_IS_NORMAL 1 "floating-point is normal" -typerule FLOATINGPOINT_IS_NORMAL ::cvc5::theory::fp::FloatingPointTestTypeRule +typerule FLOATINGPOINT_IS_NORMAL ::cvc5::internal::theory::fp::FloatingPointTestTypeRule operator FLOATINGPOINT_IS_SUBNORMAL 1 "floating-point is sub-normal" -typerule FLOATINGPOINT_IS_SUBNORMAL ::cvc5::theory::fp::FloatingPointTestTypeRule +typerule FLOATINGPOINT_IS_SUBNORMAL ::cvc5::internal::theory::fp::FloatingPointTestTypeRule operator FLOATINGPOINT_IS_ZERO 1 "floating-point is zero" -typerule FLOATINGPOINT_IS_ZERO ::cvc5::theory::fp::FloatingPointTestTypeRule +typerule FLOATINGPOINT_IS_ZERO ::cvc5::internal::theory::fp::FloatingPointTestTypeRule operator FLOATINGPOINT_IS_INF 1 "floating-point is infinite" -typerule FLOATINGPOINT_IS_INF ::cvc5::theory::fp::FloatingPointTestTypeRule +typerule FLOATINGPOINT_IS_INF ::cvc5::internal::theory::fp::FloatingPointTestTypeRule operator FLOATINGPOINT_IS_NAN 1 "floating-point is NaN" -typerule FLOATINGPOINT_IS_NAN ::cvc5::theory::fp::FloatingPointTestTypeRule +typerule FLOATINGPOINT_IS_NAN ::cvc5::internal::theory::fp::FloatingPointTestTypeRule operator FLOATINGPOINT_IS_NEG 1 "floating-point is negative" -typerule FLOATINGPOINT_IS_NEG ::cvc5::theory::fp::FloatingPointTestTypeRule +typerule FLOATINGPOINT_IS_NEG ::cvc5::internal::theory::fp::FloatingPointTestTypeRule operator FLOATINGPOINT_IS_POS 1 "floating-point is positive" -typerule FLOATINGPOINT_IS_POS ::cvc5::theory::fp::FloatingPointTestTypeRule +typerule FLOATINGPOINT_IS_POS ::cvc5::internal::theory::fp::FloatingPointTestTypeRule constant FLOATINGPOINT_TO_FP_FROM_IEEE_BV_OP \ class \ FloatingPointToFPIEEEBitVector \ - "::cvc5::FloatingPointConvertSortHashFunction<0x1>" \ + "::cvc5::internal::FloatingPointConvertSortHashFunction<0x1>" \ "util/floatingpoint.h" \ "operator for to_fp from bit vector" -typerule FLOATINGPOINT_TO_FP_FROM_IEEE_BV_OP ::cvc5::theory::fp::FloatingPointParametricOpTypeRule +typerule FLOATINGPOINT_TO_FP_FROM_IEEE_BV_OP ::cvc5::internal::theory::fp::FloatingPointParametricOpTypeRule parameterized FLOATINGPOINT_TO_FP_FROM_IEEE_BV FLOATINGPOINT_TO_FP_FROM_IEEE_BV_OP 1 "convert an IEEE-754 bit vector to floating-point" -typerule FLOATINGPOINT_TO_FP_FROM_IEEE_BV ::cvc5::theory::fp::FloatingPointToFPIEEEBitVectorTypeRule +typerule FLOATINGPOINT_TO_FP_FROM_IEEE_BV ::cvc5::internal::theory::fp::FloatingPointToFPIEEEBitVectorTypeRule constant FLOATINGPOINT_TO_FP_FROM_FP_OP \ class \ FloatingPointToFPFloatingPoint \ - "::cvc5::FloatingPointConvertSortHashFunction<0x2>" \ + "::cvc5::internal::FloatingPointConvertSortHashFunction<0x2>" \ "util/floatingpoint.h" \ "operator for to_fp from floating point" -typerule FLOATINGPOINT_TO_FP_FROM_FP_OP ::cvc5::theory::fp::FloatingPointParametricOpTypeRule +typerule FLOATINGPOINT_TO_FP_FROM_FP_OP ::cvc5::internal::theory::fp::FloatingPointParametricOpTypeRule parameterized FLOATINGPOINT_TO_FP_FROM_FP FLOATINGPOINT_TO_FP_FROM_FP_OP 2 "convert between floating-point sorts" -typerule FLOATINGPOINT_TO_FP_FROM_FP ::cvc5::theory::fp::FloatingPointToFPFloatingPointTypeRule +typerule FLOATINGPOINT_TO_FP_FROM_FP ::cvc5::internal::theory::fp::FloatingPointToFPFloatingPointTypeRule @@ -187,121 +187,121 @@ typerule FLOATINGPOINT_TO_FP_FROM_FP ::cvc5::theory::fp::FloatingPointToFPFloa constant FLOATINGPOINT_TO_FP_FROM_REAL_OP \ class \ FloatingPointToFPReal \ - "::cvc5::FloatingPointConvertSortHashFunction<0x4>" \ + "::cvc5::internal::FloatingPointConvertSortHashFunction<0x4>" \ "util/floatingpoint.h" \ "operator for to_fp from real" -typerule FLOATINGPOINT_TO_FP_FROM_REAL_OP ::cvc5::theory::fp::FloatingPointParametricOpTypeRule +typerule FLOATINGPOINT_TO_FP_FROM_REAL_OP ::cvc5::internal::theory::fp::FloatingPointParametricOpTypeRule parameterized FLOATINGPOINT_TO_FP_FROM_REAL FLOATINGPOINT_TO_FP_FROM_REAL_OP 2 "convert a real to floating-point" -typerule FLOATINGPOINT_TO_FP_FROM_REAL ::cvc5::theory::fp::FloatingPointToFPRealTypeRule +typerule FLOATINGPOINT_TO_FP_FROM_REAL ::cvc5::internal::theory::fp::FloatingPointToFPRealTypeRule constant FLOATINGPOINT_TO_FP_FROM_SBV_OP \ class \ FloatingPointToFPSignedBitVector \ - "::cvc5::FloatingPointConvertSortHashFunction<0x8>" \ + "::cvc5::internal::FloatingPointConvertSortHashFunction<0x8>" \ "util/floatingpoint.h" \ "operator for to_fp from signed bit vector" -typerule FLOATINGPOINT_TO_FP_FROM_SBV_OP ::cvc5::theory::fp::FloatingPointParametricOpTypeRule +typerule FLOATINGPOINT_TO_FP_FROM_SBV_OP ::cvc5::internal::theory::fp::FloatingPointParametricOpTypeRule parameterized FLOATINGPOINT_TO_FP_FROM_SBV FLOATINGPOINT_TO_FP_FROM_SBV_OP 2 "convert a signed bit vector to floating-point" -typerule FLOATINGPOINT_TO_FP_FROM_SBV ::cvc5::theory::fp::FloatingPointToFPSignedBitVectorTypeRule +typerule FLOATINGPOINT_TO_FP_FROM_SBV ::cvc5::internal::theory::fp::FloatingPointToFPSignedBitVectorTypeRule constant FLOATINGPOINT_TO_FP_FROM_UBV_OP \ class \ FloatingPointToFPUnsignedBitVector \ - "::cvc5::FloatingPointConvertSortHashFunction<0x10>" \ + "::cvc5::internal::FloatingPointConvertSortHashFunction<0x10>" \ "util/floatingpoint.h" \ "operator for to_fp from unsigned bit vector" -typerule FLOATINGPOINT_TO_FP_FROM_UBV_OP ::cvc5::theory::fp::FloatingPointParametricOpTypeRule +typerule FLOATINGPOINT_TO_FP_FROM_UBV_OP ::cvc5::internal::theory::fp::FloatingPointParametricOpTypeRule parameterized FLOATINGPOINT_TO_FP_FROM_UBV FLOATINGPOINT_TO_FP_FROM_UBV_OP 2 "convert an unsigned bit vector to floating-point" -typerule FLOATINGPOINT_TO_FP_FROM_UBV ::cvc5::theory::fp::FloatingPointToFPUnsignedBitVectorTypeRule +typerule FLOATINGPOINT_TO_FP_FROM_UBV ::cvc5::internal::theory::fp::FloatingPointToFPUnsignedBitVectorTypeRule constant FLOATINGPOINT_TO_UBV_OP \ class \ FloatingPointToUBV \ - "::cvc5::FloatingPointToBVHashFunction<0x1>" \ + "::cvc5::internal::FloatingPointToBVHashFunction<0x1>" \ "util/floatingpoint.h" \ "operator for to_ubv" -typerule FLOATINGPOINT_TO_UBV_OP ::cvc5::theory::fp::FloatingPointParametricOpTypeRule +typerule FLOATINGPOINT_TO_UBV_OP ::cvc5::internal::theory::fp::FloatingPointParametricOpTypeRule parameterized FLOATINGPOINT_TO_UBV FLOATINGPOINT_TO_UBV_OP 2 "convert a floating-point value to an unsigned bit vector" -typerule FLOATINGPOINT_TO_UBV ::cvc5::theory::fp::FloatingPointToUBVTypeRule +typerule FLOATINGPOINT_TO_UBV ::cvc5::internal::theory::fp::FloatingPointToUBVTypeRule constant FLOATINGPOINT_TO_UBV_TOTAL_OP \ class \ FloatingPointToUBVTotal \ - "::cvc5::FloatingPointToBVHashFunction<0x4>" \ + "::cvc5::internal::FloatingPointToBVHashFunction<0x4>" \ "util/floatingpoint.h" \ "operator for to_ubv_total" -typerule FLOATINGPOINT_TO_UBV_TOTAL_OP ::cvc5::theory::fp::FloatingPointParametricOpTypeRule +typerule FLOATINGPOINT_TO_UBV_TOTAL_OP ::cvc5::internal::theory::fp::FloatingPointParametricOpTypeRule parameterized FLOATINGPOINT_TO_UBV_TOTAL FLOATINGPOINT_TO_UBV_TOTAL_OP 3 "convert a floating-point value to an unsigned bit vector (defined for all inputs)" -typerule FLOATINGPOINT_TO_UBV_TOTAL ::cvc5::theory::fp::FloatingPointToUBVTotalTypeRule +typerule FLOATINGPOINT_TO_UBV_TOTAL ::cvc5::internal::theory::fp::FloatingPointToUBVTotalTypeRule constant FLOATINGPOINT_TO_SBV_OP \ class \ FloatingPointToSBV \ - "::cvc5::FloatingPointToBVHashFunction<0x2>" \ + "::cvc5::internal::FloatingPointToBVHashFunction<0x2>" \ "util/floatingpoint.h" \ "operator for to_sbv" -typerule FLOATINGPOINT_TO_SBV_OP ::cvc5::theory::fp::FloatingPointParametricOpTypeRule +typerule FLOATINGPOINT_TO_SBV_OP ::cvc5::internal::theory::fp::FloatingPointParametricOpTypeRule parameterized FLOATINGPOINT_TO_SBV FLOATINGPOINT_TO_SBV_OP 2 "convert a floating-point value to a signed bit vector" -typerule FLOATINGPOINT_TO_SBV ::cvc5::theory::fp::FloatingPointToSBVTypeRule +typerule FLOATINGPOINT_TO_SBV ::cvc5::internal::theory::fp::FloatingPointToSBVTypeRule constant FLOATINGPOINT_TO_SBV_TOTAL_OP \ class \ FloatingPointToSBVTotal \ - "::cvc5::FloatingPointToBVHashFunction<0x8>" \ + "::cvc5::internal::FloatingPointToBVHashFunction<0x8>" \ "util/floatingpoint.h" \ "operator for to_sbv_total" -typerule FLOATINGPOINT_TO_SBV_TOTAL_OP ::cvc5::theory::fp::FloatingPointParametricOpTypeRule +typerule FLOATINGPOINT_TO_SBV_TOTAL_OP ::cvc5::internal::theory::fp::FloatingPointParametricOpTypeRule parameterized FLOATINGPOINT_TO_SBV_TOTAL FLOATINGPOINT_TO_SBV_TOTAL_OP 3 "convert a floating-point value to a signed bit vector (defined for all inputs)" -typerule FLOATINGPOINT_TO_SBV_TOTAL ::cvc5::theory::fp::FloatingPointToSBVTotalTypeRule +typerule FLOATINGPOINT_TO_SBV_TOTAL ::cvc5::internal::theory::fp::FloatingPointToSBVTotalTypeRule operator FLOATINGPOINT_TO_REAL 1 "floating-point to real" -typerule FLOATINGPOINT_TO_REAL ::cvc5::theory::fp::FloatingPointToRealTypeRule +typerule FLOATINGPOINT_TO_REAL ::cvc5::internal::theory::fp::FloatingPointToRealTypeRule operator FLOATINGPOINT_TO_REAL_TOTAL 2 "floating-point to real (defined for all inputs)" -typerule FLOATINGPOINT_TO_REAL_TOTAL ::cvc5::theory::fp::FloatingPointToRealTotalTypeRule +typerule FLOATINGPOINT_TO_REAL_TOTAL ::cvc5::internal::theory::fp::FloatingPointToRealTotalTypeRule operator FLOATINGPOINT_COMPONENT_NAN 1 "NaN component of a word-blasted floating-point number" -typerule FLOATINGPOINT_COMPONENT_NAN ::cvc5::theory::fp::FloatingPointComponentBit +typerule FLOATINGPOINT_COMPONENT_NAN ::cvc5::internal::theory::fp::FloatingPointComponentBit operator FLOATINGPOINT_COMPONENT_INF 1 "Inf component of a word-blasted floating-point number" -typerule FLOATINGPOINT_COMPONENT_INF ::cvc5::theory::fp::FloatingPointComponentBit +typerule FLOATINGPOINT_COMPONENT_INF ::cvc5::internal::theory::fp::FloatingPointComponentBit operator FLOATINGPOINT_COMPONENT_ZERO 1 "Zero component of a word-blasted floating-point number" -typerule FLOATINGPOINT_COMPONENT_ZERO ::cvc5::theory::fp::FloatingPointComponentBit +typerule FLOATINGPOINT_COMPONENT_ZERO ::cvc5::internal::theory::fp::FloatingPointComponentBit operator FLOATINGPOINT_COMPONENT_SIGN 1 "Sign component of a word-blasted floating-point number" -typerule FLOATINGPOINT_COMPONENT_SIGN ::cvc5::theory::fp::FloatingPointComponentBit +typerule FLOATINGPOINT_COMPONENT_SIGN ::cvc5::internal::theory::fp::FloatingPointComponentBit operator FLOATINGPOINT_COMPONENT_EXPONENT 1 "Exponent component of a word-blasted floating-point number" -typerule FLOATINGPOINT_COMPONENT_EXPONENT ::cvc5::theory::fp::FloatingPointComponentExponent +typerule FLOATINGPOINT_COMPONENT_EXPONENT ::cvc5::internal::theory::fp::FloatingPointComponentExponent operator FLOATINGPOINT_COMPONENT_SIGNIFICAND 1 "Significand component of a word-blasted floating-point number" -typerule FLOATINGPOINT_COMPONENT_SIGNIFICAND ::cvc5::theory::fp::FloatingPointComponentSignificand +typerule FLOATINGPOINT_COMPONENT_SIGNIFICAND ::cvc5::internal::theory::fp::FloatingPointComponentSignificand operator ROUNDINGMODE_BITBLAST 1 "The bit-vector for a non-deterministic rounding mode" -typerule ROUNDINGMODE_BITBLAST ::cvc5::theory::fp::RoundingModeBitBlast +typerule ROUNDINGMODE_BITBLAST ::cvc5::internal::theory::fp::RoundingModeBitBlast endtheory diff --git a/src/theory/fp/theory_fp.cpp b/src/theory/fp/theory_fp.cpp index e112b32f7..ac6f1072c 100644 --- a/src/theory/fp/theory_fp.cpp +++ b/src/theory/fp/theory_fp.cpp @@ -31,9 +31,9 @@ #include "util/floatingpoint.h" using namespace std; -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace fp { @@ -430,7 +430,7 @@ void TheoryFp::wordBlastAndEquateTerm(TNode node) NodeManager* nm = NodeManager::currentNM(); handleLemma( - nm->mkNode(kind::EQUAL, addA, nm->mkConst(::cvc5::BitVector(1U, 1U))), + nm->mkNode(kind::EQUAL, addA, nm->mkConst(::cvc5::internal::BitVector(1U, 1U))), InferenceId::FP_EQUATE_TERM); ++oldSize; @@ -451,7 +451,7 @@ void TheoryFp::wordBlastAndEquateTerm(TNode node) node, nm->mkNode(kind::EQUAL, wordBlasted, - nm->mkConst(::cvc5::BitVector(1U, 1U)))), + nm->mkConst(::cvc5::internal::BitVector(1U, 1U)))), InferenceId::FP_EQUATE_TERM); } else @@ -908,4 +908,4 @@ void TheoryFp::NotifyClass::eqNotifyConstantTermMerge(TNode t1, TNode t2) { } // namespace fp } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/fp/theory_fp.h b/src/theory/fp/theory_fp.h index 807756c5b..41970fb73 100644 --- a/src/theory/fp/theory_fp.h +++ b/src/theory/fp/theory_fp.h @@ -29,7 +29,7 @@ #include "theory/theory_state.h" #include "theory/uf/equality_engine.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace fp { @@ -159,6 +159,6 @@ class TheoryFp : public Theory } // namespace fp } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__FP__THEORY_FP_H */ diff --git a/src/theory/fp/theory_fp_rewriter.cpp b/src/theory/fp/theory_fp_rewriter.cpp index 6949a53fb..007bbebb1 100644 --- a/src/theory/fp/theory_fp_rewriter.cpp +++ b/src/theory/fp/theory_fp_rewriter.cpp @@ -41,9 +41,9 @@ #include "theory/fp/fp_word_blaster.h" #include "util/floatingpoint.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace fp { @@ -1516,4 +1516,4 @@ TheoryFpRewriter::TheoryFpRewriter(context::UserContext* u) : d_fpExpDef(u) } // namespace fp } // namespace theory - } // namespace cvc5 + } // namespace cvc5::internal diff --git a/src/theory/fp/theory_fp_rewriter.h b/src/theory/fp/theory_fp_rewriter.h index 027dd9819..b65ddf839 100644 --- a/src/theory/fp/theory_fp_rewriter.h +++ b/src/theory/fp/theory_fp_rewriter.h @@ -24,7 +24,7 @@ #include "theory/fp/fp_expand_defs.h" #include "theory/theory_rewriter.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace fp { @@ -60,6 +60,6 @@ class TheoryFpRewriter : public TheoryRewriter } // namespace fp } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__FP__THEORY_FP_REWRITER_H */ diff --git a/src/theory/fp/theory_fp_type_rules.cpp b/src/theory/fp/theory_fp_type_rules.cpp index 861829a4c..b29c6f9b9 100644 --- a/src/theory/fp/theory_fp_type_rules.cpp +++ b/src/theory/fp/theory_fp_type_rules.cpp @@ -21,7 +21,7 @@ #include "util/floatingpoint.h" #include "util/roundingmode.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace fp { @@ -781,4 +781,4 @@ Cardinality CardinalityComputer::computeCardinality(TypeNode type) } // namespace fp } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/fp/theory_fp_type_rules.h b/src/theory/fp/theory_fp_type_rules.h index a1723d89a..9096e6e57 100644 --- a/src/theory/fp/theory_fp_type_rules.h +++ b/src/theory/fp/theory_fp_type_rules.h @@ -21,7 +21,7 @@ #include "expr/node.h" #include "expr/type_node.h" -namespace cvc5 { +namespace cvc5::internal { class NodeManager; @@ -223,6 +223,6 @@ class CardinalityComputer } // namespace fp } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/fp/type_enumerator.h b/src/theory/fp/type_enumerator.h index edf297498..c6b18b5d6 100644 --- a/src/theory/fp/type_enumerator.h +++ b/src/theory/fp/type_enumerator.h @@ -24,7 +24,7 @@ #include "util/bitvector.h" #include "util/floatingpoint.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace fp { @@ -128,6 +128,6 @@ class RoundingModeEnumerator } // namespace fp } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__FP__TYPE_ENUMERATOR_H */ diff --git a/src/theory/incomplete_id.cpp b/src/theory/incomplete_id.cpp index b1071b5ae..ec9b8e801 100644 --- a/src/theory/incomplete_id.cpp +++ b/src/theory/incomplete_id.cpp @@ -17,7 +17,7 @@ #include -namespace cvc5 { +namespace cvc5::internal { namespace theory { const char* toString(IncompleteId i) @@ -59,4 +59,4 @@ std::ostream& operator<<(std::ostream& out, IncompleteId i) } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/incomplete_id.h b/src/theory/incomplete_id.h index 1e8bf155a..6aab3e143 100644 --- a/src/theory/incomplete_id.h +++ b/src/theory/incomplete_id.h @@ -20,7 +20,7 @@ #include -namespace cvc5 { +namespace cvc5::internal { namespace theory { /** @@ -89,6 +89,6 @@ const char* toString(IncompleteId i); std::ostream& operator<<(std::ostream& out, IncompleteId i); } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__INCOMPLETE_ID_H */ diff --git a/src/theory/inference_id.cpp b/src/theory/inference_id.cpp index b3b5d6c97..eac933d76 100644 --- a/src/theory/inference_id.cpp +++ b/src/theory/inference_id.cpp @@ -19,9 +19,9 @@ #include "proof/proof_checker.h" #include "util/rational.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { const char* toString(InferenceId i) @@ -516,4 +516,4 @@ bool getInferenceId(TNode n, InferenceId& i) } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/inference_id.h b/src/theory/inference_id.h index 1beeaf04d..70b118de3 100644 --- a/src/theory/inference_id.h +++ b/src/theory/inference_id.h @@ -22,7 +22,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { /** Types of inferences used in the procedure @@ -919,6 +919,6 @@ Node mkInferenceIdNode(InferenceId i); bool getInferenceId(TNode n, InferenceId& i); } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__INFERENCE_H */ diff --git a/src/theory/inference_id_proof_annotator.cpp b/src/theory/inference_id_proof_annotator.cpp index 5af98c4bf..14f2f5550 100644 --- a/src/theory/inference_id_proof_annotator.cpp +++ b/src/theory/inference_id_proof_annotator.cpp @@ -18,7 +18,7 @@ #include "proof/proof_node.h" #include "proof/proof_node_manager.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { InferenceIdProofAnnotator::InferenceIdProofAnnotator(ProofNodeManager* pnm, @@ -52,4 +52,4 @@ std::shared_ptr InferenceIdProofAnnotator::annotate( } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/inference_id_proof_annotator.h b/src/theory/inference_id_proof_annotator.h index 8346370f1..3ddc77961 100644 --- a/src/theory/inference_id_proof_annotator.h +++ b/src/theory/inference_id_proof_annotator.h @@ -24,7 +24,7 @@ #include "proof/annotation_proof_generator.h" #include "theory/inference_id.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { /** A class that tracks formulas to inference id annotations */ @@ -59,6 +59,6 @@ class InferenceIdProofAnnotator : public Annotator }; } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__INFERENCE_ID_PROOF_ANNOTATOR_H */ diff --git a/src/theory/inference_manager_buffered.cpp b/src/theory/inference_manager_buffered.cpp index 963e0b95c..a02882872 100644 --- a/src/theory/inference_manager_buffered.cpp +++ b/src/theory/inference_manager_buffered.cpp @@ -19,9 +19,9 @@ #include "theory/theory.h" #include "theory/theory_state.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { InferenceManagerBuffered::InferenceManagerBuffered(Env& env, @@ -195,4 +195,4 @@ void InferenceManagerBuffered::notifyInConflict() } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/inference_manager_buffered.h b/src/theory/inference_manager_buffered.h index 579b1ae87..26d684897 100644 --- a/src/theory/inference_manager_buffered.h +++ b/src/theory/inference_manager_buffered.h @@ -22,7 +22,7 @@ #include "theory/theory_inference.h" #include "theory/theory_inference_manager.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { /** @@ -184,6 +184,6 @@ class InferenceManagerBuffered : public TheoryInferenceManager }; } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/interrupted.h b/src/theory/interrupted.h index bb099114d..9c92d1bdc 100644 --- a/src/theory/interrupted.h +++ b/src/theory/interrupted.h @@ -16,7 +16,7 @@ * An exception signaling that a Theory should immediately stop * performing processing and relinquish control to its caller (e.g., * in a parallel environment). A Theory might be interrupted if it - * calls into its cvc5::theory::OutputChannel, and it should only + * calls into its cvc5::internal::theory::OutputChannel, and it should only * catch this exception to perform emergency repair of any invariants * it must re-establish. Further, if this exception is caught by a * Theory, the Theory should rethrow the same exception (via "throw;" @@ -32,14 +32,14 @@ #include "base/exception.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { -class Interrupted : public cvc5::Exception +class Interrupted : public cvc5::internal::Exception { }; /* class Interrupted */ } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__INTERRUPTED_H */ diff --git a/src/theory/logic_info.cpp b/src/theory/logic_info.cpp index d53b06151..521b8ee33 100644 --- a/src/theory/logic_info.cpp +++ b/src/theory/logic_info.cpp @@ -25,9 +25,9 @@ #include "expr/kind.h" using namespace std; -using namespace cvc5::theory; +using namespace cvc5::internal::theory; -namespace cvc5 { +namespace cvc5::internal { LogicInfo::LogicInfo() : d_logicString(""), @@ -721,4 +721,4 @@ std::ostream& operator<<(std::ostream& out, const LogicInfo& logic) { return out << logic.getLogicString(); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/logic_info.h b/src/theory/logic_info.h index c63a768dd..a2abbe885 100644 --- a/src/theory/logic_info.h +++ b/src/theory/logic_info.h @@ -25,7 +25,7 @@ #include "cvc5_export.h" #include "theory/theory_id.h" -namespace cvc5 { +namespace cvc5::internal { /** * A LogicInfo instance describes a collection of theory modules and some @@ -296,6 +296,6 @@ public: std::ostream& operator<<(std::ostream& out, const LogicInfo& logic); -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__LOGIC_INFO_H */ diff --git a/src/theory/mkrewriter b/src/theory/mkrewriter index baef55679..bc0e2360d 100755 --- a/src/theory/mkrewriter +++ b/src/theory/mkrewriter @@ -76,9 +76,9 @@ function theory { echo "$kf:$lineno: error: \"theory\" directive missing class or header argument" >&2 exit 1 elif ! expr "$2" : '\(::*\)' >/dev/null; then - echo "$kf:$lineno: warning: theory class \`$2' isn't fully-qualified (e.g., ::cvc5::theory::foo)" >&2 - elif ! expr "$2" : '\(::cvc5::theory::*\)' >/dev/null; then - echo "$kf:$lineno: warning: theory class not under ::cvc5::theory namespace" >&2 + echo "$kf:$lineno: warning: theory class \`$2' isn't fully-qualified (e.g., ::cvc5::internal::theory::foo)" >&2 + elif ! expr "$2" : '\(::cvc5::internal::theory::*\)' >/dev/null; then + echo "$kf:$lineno: warning: theory class not under ::cvc5::internal::theory namespace" >&2 fi theory_id="$1" diff --git a/src/theory/mktheorytraits b/src/theory/mktheorytraits index 4312da406..52cac0bb2 100755 --- a/src/theory/mktheorytraits +++ b/src/theory/mktheorytraits @@ -95,9 +95,9 @@ function theory { echo "$kf:$lineno: error: \"theory\" directive missing class or header argument" >&2 exit 1 elif ! expr "$2" : '\(::*\)' >/dev/null; then - echo "$kf:$lineno: warning: theory class \`$2' isn't fully-qualified (e.g., ::cvc5::theory::foo)" >&2 - elif ! expr "$2" : '\(::cvc5::theory::*\)' >/dev/null; then - echo "$kf:$lineno: warning: theory class not under ::cvc5::theory namespace" >&2 + echo "$kf:$lineno: warning: theory class \`$2' isn't fully-qualified (e.g., ::cvc5::internal::theory::foo)" >&2 + elif ! expr "$2" : '\(::cvc5::internal::theory::*\)' >/dev/null; then + echo "$kf:$lineno: warning: theory class not under ::cvc5::internal::theory namespace" >&2 fi theory_id="$1" diff --git a/src/theory/model_manager.cpp b/src/theory/model_manager.cpp index 21d6db9f0..78f44407f 100644 --- a/src/theory/model_manager.cpp +++ b/src/theory/model_manager.cpp @@ -24,7 +24,7 @@ #include "theory/quantifiers_engine.h" #include "theory/theory_engine.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { ModelManager::ModelManager(Env& env, TheoryEngine& te, EqEngineManager& eem) @@ -175,4 +175,4 @@ bool ModelManager::collectModelBooleanVariables() } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/model_manager.h b/src/theory/model_manager.h index 4e86b1134..baf196a62 100644 --- a/src/theory/model_manager.h +++ b/src/theory/model_manager.h @@ -24,7 +24,7 @@ #include "theory/ee_manager.h" #include "theory/logic_info.h" -namespace cvc5 { +namespace cvc5::internal { class TheoryEngine; class Env; @@ -136,6 +136,6 @@ class ModelManager : protected EnvObj }; } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__MODEL_MANAGER__H */ diff --git a/src/theory/model_manager_distributed.cpp b/src/theory/model_manager_distributed.cpp index f81c39f89..d2bf70756 100644 --- a/src/theory/model_manager_distributed.cpp +++ b/src/theory/model_manager_distributed.cpp @@ -20,7 +20,7 @@ #include "theory/theory_model.h" #include "theory/theory_model_builder.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { ModelManagerDistributed::ModelManagerDistributed(Env& env, @@ -126,4 +126,4 @@ bool ModelManagerDistributed::finishBuildModel() const } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/model_manager_distributed.h b/src/theory/model_manager_distributed.h index 04aa6788b..03bbb706c 100644 --- a/src/theory/model_manager_distributed.h +++ b/src/theory/model_manager_distributed.h @@ -21,7 +21,7 @@ #include "theory/ee_manager.h" #include "theory/model_manager.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { /** @@ -54,6 +54,6 @@ class ModelManagerDistributed : public ModelManager }; } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__MODEL_MANAGER_DISTRIBUTED__H */ diff --git a/src/theory/output_channel.cpp b/src/theory/output_channel.cpp index 5ab91b6e0..39203d3b6 100644 --- a/src/theory/output_channel.cpp +++ b/src/theory/output_channel.cpp @@ -15,7 +15,7 @@ #include "theory/output_channel.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { LemmaProperty operator|(LemmaProperty lhs, LemmaProperty rhs) @@ -90,4 +90,4 @@ void OutputChannel::trustedLemma(TrustNode lem, LemmaProperty p) } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/output_channel.h b/src/theory/output_channel.h index 80115d438..d862d193c 100644 --- a/src/theory/output_channel.h +++ b/src/theory/output_channel.h @@ -22,7 +22,7 @@ #include "theory/incomplete_id.h" #include "util/resource_manager.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { /** Properties of lemmas */ @@ -66,7 +66,7 @@ class Theory; /** * Generic "theory output channel" interface. * - * All methods can throw unrecoverable cvc5::Exception's unless otherwise + * All methods can throw unrecoverable cvc5::internal::Exception's unless otherwise * documented. */ class OutputChannel { @@ -189,6 +189,6 @@ class OutputChannel { }; /* class OutputChannel */ } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__OUTPUT_CHANNEL_H */ diff --git a/src/theory/quantifiers/alpha_equivalence.cpp b/src/theory/quantifiers/alpha_equivalence.cpp index d36343c6b..7e5f6a196 100644 --- a/src/theory/quantifiers/alpha_equivalence.cpp +++ b/src/theory/quantifiers/alpha_equivalence.cpp @@ -19,9 +19,9 @@ #include "proof/proof.h" #include "proof/proof_node.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -270,4 +270,4 @@ bool AlphaEquivalence::isProofEnabled() const { return d_pfAlpha != nullptr; } } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/alpha_equivalence.h b/src/theory/quantifiers/alpha_equivalence.h index ce39eb434..bf2d3bd7a 100644 --- a/src/theory/quantifiers/alpha_equivalence.h +++ b/src/theory/quantifiers/alpha_equivalence.h @@ -23,7 +23,7 @@ #include "smt/env_obj.h" #include "theory/quantifiers/quant_util.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -141,6 +141,6 @@ class AlphaEquivalence : protected EnvObj } } -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/quantifiers/bv_inverter.cpp b/src/theory/quantifiers/bv_inverter.cpp index 277de7ae4..3b8159d56 100644 --- a/src/theory/quantifiers/bv_inverter.cpp +++ b/src/theory/quantifiers/bv_inverter.cpp @@ -25,9 +25,9 @@ #include "theory/rewriter.h" #include "util/bitvector.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -448,4 +448,4 @@ Node BvInverter::solveBvLit(Node sv, } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/bv_inverter.h b/src/theory/quantifiers/bv_inverter.h index 835637a30..47c34273d 100644 --- a/src/theory/quantifiers/bv_inverter.h +++ b/src/theory/quantifiers/bv_inverter.h @@ -25,7 +25,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { class Rewriter; @@ -133,6 +133,6 @@ class BvInverter } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__BV_INVERTER_H */ diff --git a/src/theory/quantifiers/bv_inverter_utils.cpp b/src/theory/quantifiers/bv_inverter_utils.cpp index e7427178a..181be7f7c 100644 --- a/src/theory/quantifiers/bv_inverter_utils.cpp +++ b/src/theory/quantifiers/bv_inverter_utils.cpp @@ -16,9 +16,9 @@ #include "theory/quantifiers/bv_inverter_utils.h" #include "theory/bv/theory_bv_utils.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { namespace utils { @@ -2590,4 +2590,4 @@ Node getICBvSext(bool pol, Kind litk, unsigned idx, Node x, Node sv_t, Node t) } // namespace utils } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/bv_inverter_utils.h b/src/theory/quantifiers/bv_inverter_utils.h index 734dbd56c..0c39e1acd 100644 --- a/src/theory/quantifiers/bv_inverter_utils.h +++ b/src/theory/quantifiers/bv_inverter_utils.h @@ -20,7 +20,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { namespace utils { @@ -69,5 +69,5 @@ Node getICBvSext(bool pol, Kind litk, unsigned idx, Node x, Node sv_t, Node t); } // namespace utils } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/quantifiers/candidate_rewrite_database.cpp b/src/theory/quantifiers/candidate_rewrite_database.cpp index 452fb35cb..88012ff49 100644 --- a/src/theory/quantifiers/candidate_rewrite_database.cpp +++ b/src/theory/quantifiers/candidate_rewrite_database.cpp @@ -26,10 +26,10 @@ #include "theory/rewriter.h" using namespace std; -using namespace cvc5::kind; -using namespace cvc5::context; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::context; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -309,4 +309,4 @@ void CandidateRewriteDatabase::enableExtendedRewriter() } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/candidate_rewrite_database.h b/src/theory/quantifiers/candidate_rewrite_database.h index a7a06b5bc..3b62bbca3 100644 --- a/src/theory/quantifiers/candidate_rewrite_database.h +++ b/src/theory/quantifiers/candidate_rewrite_database.h @@ -24,7 +24,7 @@ #include "theory/quantifiers/expr_miner.h" #include "theory/quantifiers/sygus_sampler.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -132,6 +132,6 @@ class CandidateRewriteDatabase : public ExprMiner } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__CANDIDATE_REWRITE_DATABASE_H */ diff --git a/src/theory/quantifiers/candidate_rewrite_filter.cpp b/src/theory/quantifiers/candidate_rewrite_filter.cpp index 973355534..eb7527d47 100644 --- a/src/theory/quantifiers/candidate_rewrite_filter.cpp +++ b/src/theory/quantifiers/candidate_rewrite_filter.cpp @@ -21,9 +21,9 @@ #include "options/quantifiers_options.h" #include "printer/printer.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -280,4 +280,4 @@ bool CandidateRewriteFilter::notify(Node s, } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/candidate_rewrite_filter.h b/src/theory/quantifiers/candidate_rewrite_filter.h index d92a9b40c..38d3071c5 100644 --- a/src/theory/quantifiers/candidate_rewrite_filter.h +++ b/src/theory/quantifiers/candidate_rewrite_filter.h @@ -28,7 +28,7 @@ #include "theory/quantifiers/sygus/term_database_sygus.h" #include "theory/quantifiers/sygus_sampler.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -174,6 +174,6 @@ class CandidateRewriteFilter : protected EnvObj } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__CANDIDATE_REWRITE_FILTER_H */ diff --git a/src/theory/quantifiers/cegqi/ceg_arith_instantiator.cpp b/src/theory/quantifiers/cegqi/ceg_arith_instantiator.cpp index 33a5b4bb6..8c10d49aa 100644 --- a/src/theory/quantifiers/cegqi/ceg_arith_instantiator.cpp +++ b/src/theory/quantifiers/cegqi/ceg_arith_instantiator.cpp @@ -26,10 +26,10 @@ #include "util/random.h" using namespace std; -using namespace cvc5::kind; -using namespace cvc5::context; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::context; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -1010,4 +1010,4 @@ Node ArithInstantiator::negate(const Node& t) const } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/cegqi/ceg_arith_instantiator.h b/src/theory/quantifiers/cegqi/ceg_arith_instantiator.h index d44ab4993..fecb85722 100644 --- a/src/theory/quantifiers/cegqi/ceg_arith_instantiator.h +++ b/src/theory/quantifiers/cegqi/ceg_arith_instantiator.h @@ -23,7 +23,7 @@ #include "theory/quantifiers/cegqi/ceg_instantiator.h" #include "theory/quantifiers/cegqi/vts_term_cache.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -212,6 +212,6 @@ class ArithInstantiator : public Instantiator } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__CEG_ARITH_INSTANTIATOR_H */ diff --git a/src/theory/quantifiers/cegqi/ceg_bv_instantiator.cpp b/src/theory/quantifiers/cegqi/ceg_bv_instantiator.cpp index 6dbb1126f..24c4851ea 100644 --- a/src/theory/quantifiers/cegqi/ceg_bv_instantiator.cpp +++ b/src/theory/quantifiers/cegqi/ceg_bv_instantiator.cpp @@ -25,9 +25,9 @@ #include "util/random.h" using namespace std; -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -765,4 +765,4 @@ void BvInstantiatorPreprocess::collectExtracts( } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/cegqi/ceg_bv_instantiator.h b/src/theory/quantifiers/cegqi/ceg_bv_instantiator.h index 0c2cb05df..57815b89c 100644 --- a/src/theory/quantifiers/cegqi/ceg_bv_instantiator.h +++ b/src/theory/quantifiers/cegqi/ceg_bv_instantiator.h @@ -22,7 +22,7 @@ #include "theory/quantifiers/bv_inverter.h" #include "theory/quantifiers/cegqi/ceg_instantiator.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -208,6 +208,6 @@ class BvInstantiatorPreprocess : public InstantiatorPreprocess } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__CEG_BV_INSTANTIATOR_H */ diff --git a/src/theory/quantifiers/cegqi/ceg_bv_instantiator_utils.cpp b/src/theory/quantifiers/cegqi/ceg_bv_instantiator_utils.cpp index 9825130e5..9c8b83a31 100644 --- a/src/theory/quantifiers/cegqi/ceg_bv_instantiator_utils.cpp +++ b/src/theory/quantifiers/cegqi/ceg_bv_instantiator_utils.cpp @@ -18,9 +18,9 @@ #include "theory/bv/theory_bv_utils.h" #include "theory/rewriter.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { namespace utils { @@ -339,4 +339,4 @@ Node normalizePvEqual(Node pv, } // namespace utils } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/cegqi/ceg_bv_instantiator_utils.h b/src/theory/quantifiers/cegqi/ceg_bv_instantiator_utils.h index 4c7c096b4..a318f88b3 100644 --- a/src/theory/quantifiers/cegqi/ceg_bv_instantiator_utils.h +++ b/src/theory/quantifiers/cegqi/ceg_bv_instantiator_utils.h @@ -21,7 +21,7 @@ #include "expr/attribute.h" #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -102,5 +102,5 @@ Node normalizePvEqual(Node pv, } // namespace utils } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/quantifiers/cegqi/ceg_dt_instantiator.cpp b/src/theory/quantifiers/cegqi/ceg_dt_instantiator.cpp index 0d8da809e..2185f2f60 100644 --- a/src/theory/quantifiers/cegqi/ceg_dt_instantiator.cpp +++ b/src/theory/quantifiers/cegqi/ceg_dt_instantiator.cpp @@ -21,9 +21,9 @@ #include "theory/datatypes/theory_datatypes_utils.h" using namespace std; -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -180,4 +180,4 @@ Node DtInstantiator::solve_dt(Node v, Node a, Node b, Node sa, Node sb) } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/cegqi/ceg_dt_instantiator.h b/src/theory/quantifiers/cegqi/ceg_dt_instantiator.h index 9a99c4743..80a96a458 100644 --- a/src/theory/quantifiers/cegqi/ceg_dt_instantiator.h +++ b/src/theory/quantifiers/cegqi/ceg_dt_instantiator.h @@ -21,7 +21,7 @@ #include "expr/node.h" #include "theory/quantifiers/cegqi/ceg_instantiator.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -92,6 +92,6 @@ class DtInstantiator : public Instantiator } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__CEG_DT_INSTANTIATOR_H */ diff --git a/src/theory/quantifiers/cegqi/ceg_instantiator.cpp b/src/theory/quantifiers/cegqi/ceg_instantiator.cpp index 6a86c315d..0be469ac7 100644 --- a/src/theory/quantifiers/cegqi/ceg_instantiator.cpp +++ b/src/theory/quantifiers/cegqi/ceg_instantiator.cpp @@ -35,9 +35,9 @@ #include "util/rational.h" using namespace std; -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -1675,4 +1675,4 @@ bool Instantiator::processEqualTerm(CegInstantiator* ci, } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/cegqi/ceg_instantiator.h b/src/theory/quantifiers/cegqi/ceg_instantiator.h index 600f50f42..b787fc4f9 100644 --- a/src/theory/quantifiers/cegqi/ceg_instantiator.h +++ b/src/theory/quantifiers/cegqi/ceg_instantiator.h @@ -25,7 +25,7 @@ #include "theory/inference_id.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -823,6 +823,6 @@ class InstantiatorPreprocess } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/quantifiers/cegqi/inst_strategy_cegqi.cpp b/src/theory/quantifiers/cegqi/inst_strategy_cegqi.cpp index d54c8c866..32d1111b0 100644 --- a/src/theory/quantifiers/cegqi/inst_strategy_cegqi.cpp +++ b/src/theory/quantifiers/cegqi/inst_strategy_cegqi.cpp @@ -28,10 +28,10 @@ #include "util/rational.h" using namespace std; -using namespace cvc5::kind; -using namespace cvc5::context; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::context; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -555,4 +555,4 @@ bool InstStrategyCegqi::processNestedQe(Node q, bool isPreregister) } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/cegqi/inst_strategy_cegqi.h b/src/theory/quantifiers/cegqi/inst_strategy_cegqi.h index 5a886e28d..b5b0b9e00 100644 --- a/src/theory/quantifiers/cegqi/inst_strategy_cegqi.h +++ b/src/theory/quantifiers/cegqi/inst_strategy_cegqi.h @@ -28,7 +28,7 @@ #include "theory/quantifiers/quant_module.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -220,6 +220,6 @@ class InstStrategyCegqi : public QuantifiersModule } } -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/quantifiers/cegqi/nested_qe.cpp b/src/theory/quantifiers/cegqi/nested_qe.cpp index 1b6ba44f2..d4ae90b4c 100644 --- a/src/theory/quantifiers/cegqi/nested_qe.cpp +++ b/src/theory/quantifiers/cegqi/nested_qe.cpp @@ -22,7 +22,7 @@ #include "theory/rewriter.h" #include "theory/smt_engine_subsolver.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -155,4 +155,4 @@ Node NestedQe::doQe(Env& env, Node q) } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/cegqi/nested_qe.h b/src/theory/quantifiers/cegqi/nested_qe.h index f577a504c..7a7785f5f 100644 --- a/src/theory/quantifiers/cegqi/nested_qe.h +++ b/src/theory/quantifiers/cegqi/nested_qe.h @@ -24,7 +24,7 @@ #include "context/cdhashmap.h" #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { class Env; @@ -86,6 +86,6 @@ class NestedQe } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/quantifiers/cegqi/vts_term_cache.cpp b/src/theory/quantifiers/cegqi/vts_term_cache.cpp index 726eb74f3..2f35be7c9 100644 --- a/src/theory/quantifiers/cegqi/vts_term_cache.cpp +++ b/src/theory/quantifiers/cegqi/vts_term_cache.cpp @@ -22,9 +22,9 @@ #include "theory/rewriter.h" #include "util/rational.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -306,4 +306,4 @@ bool VtsTermCache::containsVtsInfinity(Node n, bool isFree) } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/cegqi/vts_term_cache.h b/src/theory/quantifiers/cegqi/vts_term_cache.h index 7ae16aec8..b75ef3820 100644 --- a/src/theory/quantifiers/cegqi/vts_term_cache.h +++ b/src/theory/quantifiers/cegqi/vts_term_cache.h @@ -24,7 +24,7 @@ #include "expr/node.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { /** Attribute to mark Skolems as virtual terms */ @@ -141,6 +141,6 @@ class VtsTermCache : protected EnvObj } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__CEGQI__VTS_TERM_CACHE_H */ diff --git a/src/theory/quantifiers/conjecture_generator.cpp b/src/theory/quantifiers/conjecture_generator.cpp index 1e5555e9b..9751518db 100644 --- a/src/theory/quantifiers/conjecture_generator.cpp +++ b/src/theory/quantifiers/conjecture_generator.cpp @@ -27,13 +27,13 @@ #include "theory/rewriter.h" #include "util/random.h" -using namespace cvc5; -using namespace cvc5::kind; -using namespace cvc5::theory; -using namespace cvc5::theory::quantifiers; +using namespace cvc5::internal; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::theory; +using namespace cvc5::internal::theory::quantifiers; using namespace std; -namespace cvc5 { +namespace cvc5::internal { struct sortConjectureScore { std::vector< int > d_scores; @@ -2290,4 +2290,4 @@ unsigned ConjectureGenerator::optFullCheckFrequency() { return 1; } bool ConjectureGenerator::optStatsOnly() { return false; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/conjecture_generator.h b/src/theory/quantifiers/conjecture_generator.h index bc5f3fb13..bf7eface5 100644 --- a/src/theory/quantifiers/conjecture_generator.h +++ b/src/theory/quantifiers/conjecture_generator.h @@ -25,7 +25,7 @@ #include "theory/quantifiers/quant_module.h" #include "theory/type_enumerator.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -469,6 +469,6 @@ private: //information about ground equivalence classes } } -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/quantifiers/dynamic_rewrite.cpp b/src/theory/quantifiers/dynamic_rewrite.cpp index 79b509533..4a67cb47f 100644 --- a/src/theory/quantifiers/dynamic_rewrite.cpp +++ b/src/theory/quantifiers/dynamic_rewrite.cpp @@ -20,9 +20,9 @@ #include "theory/rewriter.h" using namespace std; -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -188,4 +188,4 @@ Node DynamicRewriter::OpInternalSymTrie::getSymbol(Node n) } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/dynamic_rewrite.h b/src/theory/quantifiers/dynamic_rewrite.h index e20f5eea6..c2b54a5c0 100644 --- a/src/theory/quantifiers/dynamic_rewrite.h +++ b/src/theory/quantifiers/dynamic_rewrite.h @@ -23,7 +23,7 @@ #include "context/cdlist.h" #include "theory/uf/equality_engine.h" -namespace cvc5 { +namespace cvc5::internal { class Env; @@ -123,6 +123,6 @@ class DynamicRewriter } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__DYNAMIC_REWRITER_H */ diff --git a/src/theory/quantifiers/ematching/candidate_generator.cpp b/src/theory/quantifiers/ematching/candidate_generator.cpp index 7575b11b9..199b8aefd 100644 --- a/src/theory/quantifiers/ematching/candidate_generator.cpp +++ b/src/theory/quantifiers/ematching/candidate_generator.cpp @@ -27,9 +27,9 @@ #include "theory/quantifiers/term_registry.h" #include "theory/quantifiers/term_util.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { namespace inst { @@ -372,4 +372,4 @@ Node CandidateGeneratorSelector::getNextCandidate() } // namespace inst } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/ematching/candidate_generator.h b/src/theory/quantifiers/ematching/candidate_generator.h index 3b4017e99..1e817759a 100644 --- a/src/theory/quantifiers/ematching/candidate_generator.h +++ b/src/theory/quantifiers/ematching/candidate_generator.h @@ -21,7 +21,7 @@ #include "theory/theory.h" #include "theory/uf/equality_engine.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -262,6 +262,6 @@ class CandidateGeneratorSelector : public CandidateGeneratorQE } // namespace inst } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__CANDIDATE_GENERATOR_H */ diff --git a/src/theory/quantifiers/ematching/ho_trigger.cpp b/src/theory/quantifiers/ematching/ho_trigger.cpp index 96944fde1..4baf4b70f 100644 --- a/src/theory/quantifiers/ematching/ho_trigger.cpp +++ b/src/theory/quantifiers/ematching/ho_trigger.cpp @@ -27,9 +27,9 @@ #include "theory/uf/theory_uf_rewriter.h" #include "util/hash.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { namespace inst { @@ -525,4 +525,4 @@ uint64_t HigherOrderTrigger::addHoTypeMatchPredicateLemmas() } // namespace inst } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/ematching/ho_trigger.h b/src/theory/quantifiers/ematching/ho_trigger.h index 32633d233..35770b60b 100644 --- a/src/theory/quantifiers/ematching/ho_trigger.h +++ b/src/theory/quantifiers/ematching/ho_trigger.h @@ -26,7 +26,7 @@ #include "theory/quantifiers/inst_match.h" #include "theory/quantifiers/ematching/trigger.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { namespace inst { @@ -277,6 +277,6 @@ class HigherOrderTrigger : public Trigger } // namespace inst } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__HO_TRIGGER_H */ diff --git a/src/theory/quantifiers/ematching/im_generator.cpp b/src/theory/quantifiers/ematching/im_generator.cpp index c933f592f..77831e2f6 100644 --- a/src/theory/quantifiers/ematching/im_generator.cpp +++ b/src/theory/quantifiers/ematching/im_generator.cpp @@ -17,9 +17,9 @@ #include "theory/quantifiers/ematching/trigger.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { namespace inst { @@ -40,4 +40,4 @@ bool IMGenerator::sendInstantiation(InstMatch& m, InferenceId id) } // namespace inst } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/ematching/im_generator.h b/src/theory/quantifiers/ematching/im_generator.h index 8f26e552a..838c76b02 100644 --- a/src/theory/quantifiers/ematching/im_generator.h +++ b/src/theory/quantifiers/ematching/im_generator.h @@ -25,7 +25,7 @@ #include "theory/inference_id.h" #include "theory/quantifiers/inst_match.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -121,6 +121,6 @@ class IMGenerator : protected EnvObj } // namespace inst } } -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/quantifiers/ematching/inst_match_generator.cpp b/src/theory/quantifiers/ematching/inst_match_generator.cpp index 516c9803c..d93cdd267 100644 --- a/src/theory/quantifiers/ematching/inst_match_generator.cpp +++ b/src/theory/quantifiers/ematching/inst_match_generator.cpp @@ -33,9 +33,9 @@ #include "theory/rewriter.h" #include "util/rational.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { namespace inst { @@ -699,4 +699,4 @@ InstMatchGenerator* InstMatchGenerator::getInstMatchGenerator(Env& env, } // namespace inst } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/ematching/inst_match_generator.h b/src/theory/quantifiers/ematching/inst_match_generator.h index 75c8435ee..b0831a97d 100644 --- a/src/theory/quantifiers/ematching/inst_match_generator.h +++ b/src/theory/quantifiers/ematching/inst_match_generator.h @@ -23,7 +23,7 @@ #include "theory/quantifiers/inst_match.h" #include "theory/quantifiers/ematching/im_generator.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { namespace inst { @@ -331,6 +331,6 @@ class InstMatchGenerator : public IMGenerator { } // namespace inst } } -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/quantifiers/ematching/inst_match_generator_multi.cpp b/src/theory/quantifiers/ematching/inst_match_generator_multi.cpp index 6281f0974..60d3498e5 100644 --- a/src/theory/quantifiers/ematching/inst_match_generator_multi.cpp +++ b/src/theory/quantifiers/ematching/inst_match_generator_multi.cpp @@ -19,9 +19,9 @@ #include "theory/quantifiers/term_util.h" #include "theory/uf/equality_engine_iterator.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { namespace inst { @@ -317,4 +317,4 @@ void InstMatchGeneratorMulti::processNewInstantiations(InstMatch& m, } // namespace inst } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/ematching/inst_match_generator_multi.h b/src/theory/quantifiers/ematching/inst_match_generator_multi.h index d8ebdee3f..358aab0b5 100644 --- a/src/theory/quantifiers/ematching/inst_match_generator_multi.h +++ b/src/theory/quantifiers/ematching/inst_match_generator_multi.h @@ -24,7 +24,7 @@ #include "theory/quantifiers/ematching/inst_match_generator.h" #include "theory/quantifiers/inst_match_trie.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { namespace inst { @@ -107,6 +107,6 @@ class InstMatchGeneratorMulti : public IMGenerator } // namespace inst } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/quantifiers/ematching/inst_match_generator_multi_linear.cpp b/src/theory/quantifiers/ematching/inst_match_generator_multi_linear.cpp index a230fa314..8a17116c6 100644 --- a/src/theory/quantifiers/ematching/inst_match_generator_multi_linear.cpp +++ b/src/theory/quantifiers/ematching/inst_match_generator_multi_linear.cpp @@ -18,9 +18,9 @@ #include "theory/quantifiers/ematching/trigger_trie.h" #include "theory/quantifiers/term_util.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { namespace inst { @@ -176,4 +176,4 @@ int InstMatchGeneratorMultiLinear::getNextMatch(Node q, InstMatch& m) } // namespace inst } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/ematching/inst_match_generator_multi_linear.h b/src/theory/quantifiers/ematching/inst_match_generator_multi_linear.h index cb3476ab7..4491bbc4e 100644 --- a/src/theory/quantifiers/ematching/inst_match_generator_multi_linear.h +++ b/src/theory/quantifiers/ematching/inst_match_generator_multi_linear.h @@ -23,7 +23,7 @@ #include "expr/node.h" #include "theory/quantifiers/ematching/inst_match_generator.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { namespace inst { @@ -87,6 +87,6 @@ class InstMatchGeneratorMultiLinear : public InstMatchGenerator } // namespace inst } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/quantifiers/ematching/inst_match_generator_simple.cpp b/src/theory/quantifiers/ematching/inst_match_generator_simple.cpp index c1b7f58c1..f64a10412 100644 --- a/src/theory/quantifiers/ematching/inst_match_generator_simple.cpp +++ b/src/theory/quantifiers/ematching/inst_match_generator_simple.cpp @@ -22,9 +22,9 @@ #include "theory/quantifiers/term_registry.h" #include "theory/quantifiers/term_util.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { namespace inst { @@ -200,4 +200,4 @@ int InstMatchGeneratorSimple::getActiveScore() } // namespace inst } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/ematching/inst_match_generator_simple.h b/src/theory/quantifiers/ematching/inst_match_generator_simple.h index 2d26919ac..9a4d123c0 100644 --- a/src/theory/quantifiers/ematching/inst_match_generator_simple.h +++ b/src/theory/quantifiers/ematching/inst_match_generator_simple.h @@ -24,7 +24,7 @@ #include "expr/node_trie.h" #include "theory/quantifiers/ematching/inst_match_generator.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { namespace inst { @@ -101,6 +101,6 @@ class InstMatchGeneratorSimple : public IMGenerator } // namespace inst } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/quantifiers/ematching/inst_strategy.cpp b/src/theory/quantifiers/ematching/inst_strategy.cpp index b96c378da..d059f4d61 100644 --- a/src/theory/quantifiers/ematching/inst_strategy.cpp +++ b/src/theory/quantifiers/ematching/inst_strategy.cpp @@ -18,7 +18,7 @@ #include "smt/env.h" #include "theory/quantifiers/quantifiers_state.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -48,4 +48,4 @@ options::UserPatMode InstStrategy::getInstUserPatMode() const } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/ematching/inst_strategy.h b/src/theory/quantifiers/ematching/inst_strategy.h index da91e1f1c..6a9a21240 100644 --- a/src/theory/quantifiers/ematching/inst_strategy.h +++ b/src/theory/quantifiers/ematching/inst_strategy.h @@ -25,7 +25,7 @@ #include "smt/env_obj.h" #include "theory/theory.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -89,6 +89,6 @@ class InstStrategy : protected EnvObj } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__INSTANTIATION_ENGINE_H */ diff --git a/src/theory/quantifiers/ematching/inst_strategy_e_matching.cpp b/src/theory/quantifiers/ematching/inst_strategy_e_matching.cpp index 8d88389b1..98fcf494e 100644 --- a/src/theory/quantifiers/ematching/inst_strategy_e_matching.cpp +++ b/src/theory/quantifiers/ematching/inst_strategy_e_matching.cpp @@ -24,10 +24,10 @@ #include "theory/quantifiers/quantifiers_state.h" #include "util/random.h" -using namespace cvc5::kind; -using namespace cvc5::theory::quantifiers::inst; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::theory::quantifiers::inst; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -710,4 +710,4 @@ void InstStrategyAutoGenTriggers::addUserNoPattern( Node q, Node pat ) { } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/ematching/inst_strategy_e_matching.h b/src/theory/quantifiers/ematching/inst_strategy_e_matching.h index 7b074057e..691fa0df4 100644 --- a/src/theory/quantifiers/ematching/inst_strategy_e_matching.h +++ b/src/theory/quantifiers/ematching/inst_strategy_e_matching.h @@ -22,7 +22,7 @@ #include "theory/quantifiers/ematching/trigger.h" #include "theory/quantifiers/quant_relevance.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -114,6 +114,6 @@ class InstStrategyAutoGenTriggers : public InstStrategy }; /* class InstStrategyAutoGenTriggers */ } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/quantifiers/ematching/inst_strategy_e_matching_user.cpp b/src/theory/quantifiers/ematching/inst_strategy_e_matching_user.cpp index 7d347152d..4813950a9 100644 --- a/src/theory/quantifiers/ematching/inst_strategy_e_matching_user.cpp +++ b/src/theory/quantifiers/ematching/inst_strategy_e_matching_user.cpp @@ -19,10 +19,10 @@ #include "theory/quantifiers/ematching/trigger_database.h" #include "theory/quantifiers/quantifiers_state.h" -using namespace cvc5::kind; -using namespace cvc5::theory::quantifiers::inst; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::theory::quantifiers::inst; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -182,4 +182,4 @@ void InstStrategyUserPatterns::addUserPattern(Node q, Node pat) } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/ematching/inst_strategy_e_matching_user.h b/src/theory/quantifiers/ematching/inst_strategy_e_matching_user.h index 8b52c4333..d7d89af06 100644 --- a/src/theory/quantifiers/ematching/inst_strategy_e_matching_user.h +++ b/src/theory/quantifiers/ematching/inst_strategy_e_matching_user.h @@ -24,7 +24,7 @@ #include "theory/quantifiers/ematching/inst_strategy.h" #include "theory/quantifiers/ematching/trigger.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -66,6 +66,6 @@ class InstStrategyUserPatterns : public InstStrategy } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/quantifiers/ematching/instantiation_engine.cpp b/src/theory/quantifiers/ematching/instantiation_engine.cpp index 0fd49a95a..1993e81c7 100644 --- a/src/theory/quantifiers/ematching/instantiation_engine.cpp +++ b/src/theory/quantifiers/ematching/instantiation_engine.cpp @@ -24,11 +24,11 @@ #include "theory/quantifiers/term_database.h" #include "theory/quantifiers/term_util.h" -using namespace cvc5::kind; -using namespace cvc5::context; -using namespace cvc5::theory::quantifiers::inst; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::context; +using namespace cvc5::internal::theory::quantifiers::inst; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -272,4 +272,4 @@ bool InstantiationEngine::shouldProcess(Node q) } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/ematching/instantiation_engine.h b/src/theory/quantifiers/ematching/instantiation_engine.h index 50685642d..0d67b4cfc 100644 --- a/src/theory/quantifiers/ematching/instantiation_engine.h +++ b/src/theory/quantifiers/ematching/instantiation_engine.h @@ -25,7 +25,7 @@ #include "theory/quantifiers/quant_module.h" #include "theory/quantifiers/quant_relevance.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -77,6 +77,6 @@ class InstantiationEngine : public QuantifiersModule { } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__INSTANTIATION_ENGINE_H */ diff --git a/src/theory/quantifiers/ematching/pattern_term_selector.cpp b/src/theory/quantifiers/ematching/pattern_term_selector.cpp index 8a5956a58..fc0c57c9c 100644 --- a/src/theory/quantifiers/ematching/pattern_term_selector.cpp +++ b/src/theory/quantifiers/ematching/pattern_term_selector.cpp @@ -22,9 +22,9 @@ #include "theory/rewriter.h" #include "util/rational.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { namespace inst { @@ -729,4 +729,4 @@ void PatternTermSelector::getTriggerVariables(Node n, } // namespace inst } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/ematching/pattern_term_selector.h b/src/theory/quantifiers/ematching/pattern_term_selector.h index 3be8c49ea..29726fe9b 100644 --- a/src/theory/quantifiers/ematching/pattern_term_selector.h +++ b/src/theory/quantifiers/ematching/pattern_term_selector.h @@ -24,7 +24,7 @@ #include "options/quantifiers_options.h" #include "theory/quantifiers/ematching/trigger_term_info.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { namespace inst { @@ -193,6 +193,6 @@ class PatternTermSelector } // namespace inst } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/quantifiers/ematching/relational_match_generator.cpp b/src/theory/quantifiers/ematching/relational_match_generator.cpp index d415157ae..4d0a8e5c0 100644 --- a/src/theory/quantifiers/ematching/relational_match_generator.cpp +++ b/src/theory/quantifiers/ematching/relational_match_generator.cpp @@ -18,9 +18,9 @@ #include "theory/quantifiers/term_util.h" #include "util/rational.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { namespace inst { @@ -124,4 +124,4 @@ int RelationalMatchGenerator::getNextMatch(Node q, InstMatch& m) } // namespace inst } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/ematching/relational_match_generator.h b/src/theory/quantifiers/ematching/relational_match_generator.h index 4aec7ae87..8ba6d9a85 100644 --- a/src/theory/quantifiers/ematching/relational_match_generator.h +++ b/src/theory/quantifiers/ematching/relational_match_generator.h @@ -21,7 +21,7 @@ #include "expr/node.h" #include "theory/quantifiers/ematching/inst_match_generator.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { namespace inst { @@ -85,6 +85,6 @@ class RelationalMatchGenerator : public InstMatchGenerator } // namespace inst } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/quantifiers/ematching/trigger.cpp b/src/theory/quantifiers/ematching/trigger.cpp index 0b736ff34..5f87a5ac7 100644 --- a/src/theory/quantifiers/ematching/trigger.cpp +++ b/src/theory/quantifiers/ematching/trigger.cpp @@ -35,9 +35,9 @@ #include "theory/quantifiers/term_util.h" #include "theory/valuation.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { namespace inst { @@ -251,4 +251,4 @@ void Trigger::debugPrint(const char* c) const } // namespace inst } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/ematching/trigger.h b/src/theory/quantifiers/ematching/trigger.h index dd69f682f..9843e85ce 100644 --- a/src/theory/quantifiers/ematching/trigger.h +++ b/src/theory/quantifiers/ematching/trigger.h @@ -22,7 +22,7 @@ #include "smt/env_obj.h" #include "theory/inference_id.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { class QuantifiersEngine; @@ -221,6 +221,6 @@ class Trigger : protected EnvObj } // namespace inst } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__TRIGGER_H */ diff --git a/src/theory/quantifiers/ematching/trigger_database.cpp b/src/theory/quantifiers/ematching/trigger_database.cpp index 58f8d5f00..68661b912 100644 --- a/src/theory/quantifiers/ematching/trigger_database.cpp +++ b/src/theory/quantifiers/ematching/trigger_database.cpp @@ -19,7 +19,7 @@ #include "theory/quantifiers/ematching/trigger.h" #include "theory/quantifiers/term_util.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { namespace inst { @@ -188,4 +188,4 @@ bool TriggerDatabase::mkTriggerTerms(Node q, } // namespace inst } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/ematching/trigger_database.h b/src/theory/quantifiers/ematching/trigger_database.h index 6535e1ae7..d28a7bc5d 100644 --- a/src/theory/quantifiers/ematching/trigger_database.h +++ b/src/theory/quantifiers/ematching/trigger_database.h @@ -24,7 +24,7 @@ #include "smt/env_obj.h" #include "theory/quantifiers/ematching/trigger_trie.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -108,6 +108,6 @@ class TriggerDatabase : protected EnvObj } // namespace inst } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__TRIGGER_DATABASE_H */ diff --git a/src/theory/quantifiers/ematching/trigger_term_info.cpp b/src/theory/quantifiers/ematching/trigger_term_info.cpp index 0ba980d59..5ef1c208e 100644 --- a/src/theory/quantifiers/ematching/trigger_term_info.cpp +++ b/src/theory/quantifiers/ematching/trigger_term_info.cpp @@ -17,9 +17,9 @@ #include "theory/quantifiers/term_util.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { namespace inst { @@ -152,4 +152,4 @@ int32_t TriggerTermInfo::getTriggerWeight(Node n) } // namespace inst } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/ematching/trigger_term_info.h b/src/theory/quantifiers/ematching/trigger_term_info.h index 3816d0988..9446ce330 100644 --- a/src/theory/quantifiers/ematching/trigger_term_info.h +++ b/src/theory/quantifiers/ematching/trigger_term_info.h @@ -22,7 +22,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { namespace inst { @@ -139,6 +139,6 @@ class TriggerTermInfo } // namespace inst } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/quantifiers/ematching/trigger_trie.cpp b/src/theory/quantifiers/ematching/trigger_trie.cpp index eafbfa766..e3af64173 100644 --- a/src/theory/quantifiers/ematching/trigger_trie.cpp +++ b/src/theory/quantifiers/ematching/trigger_trie.cpp @@ -15,7 +15,7 @@ #include "theory/quantifiers/ematching/trigger_trie.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { namespace inst { @@ -75,4 +75,4 @@ void TriggerTrie::addTrigger(const std::vector& nodes, inst::Trigger* t) } // namespace inst } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/ematching/trigger_trie.h b/src/theory/quantifiers/ematching/trigger_trie.h index 3b0775829..ee0b1abfe 100644 --- a/src/theory/quantifiers/ematching/trigger_trie.h +++ b/src/theory/quantifiers/ematching/trigger_trie.h @@ -23,7 +23,7 @@ #include "expr/node.h" #include "theory/quantifiers/ematching/trigger.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { namespace inst { @@ -59,6 +59,6 @@ class TriggerTrie } // namespace inst } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__TRIGGER_TRIE_H */ diff --git a/src/theory/quantifiers/ematching/var_match_generator.cpp b/src/theory/quantifiers/ematching/var_match_generator.cpp index 9ad52a1da..3985d6260 100644 --- a/src/theory/quantifiers/ematching/var_match_generator.cpp +++ b/src/theory/quantifiers/ematching/var_match_generator.cpp @@ -17,9 +17,9 @@ #include "theory/quantifiers/term_util.h" #include "theory/rewriter.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { namespace inst { @@ -83,4 +83,4 @@ int VarMatchGeneratorTermSubs::getNextMatch(Node q, InstMatch& m) } // namespace inst } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/ematching/var_match_generator.h b/src/theory/quantifiers/ematching/var_match_generator.h index 4cdb4e620..fd42de90e 100644 --- a/src/theory/quantifiers/ematching/var_match_generator.h +++ b/src/theory/quantifiers/ematching/var_match_generator.h @@ -20,7 +20,7 @@ #include "expr/node.h" #include "theory/quantifiers/ematching/inst_match_generator.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { namespace inst { @@ -53,6 +53,6 @@ class VarMatchGeneratorTermSubs : public InstMatchGenerator } // namespace inst } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/quantifiers/entailment_check.cpp b/src/theory/quantifiers/entailment_check.cpp index bdbad9405..d79f4a641 100644 --- a/src/theory/quantifiers/entailment_check.cpp +++ b/src/theory/quantifiers/entailment_check.cpp @@ -18,10 +18,10 @@ #include "theory/quantifiers/quantifiers_state.h" #include "theory/quantifiers/term_database.h" -using namespace cvc5::kind; -using namespace cvc5::context; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::context; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -407,4 +407,4 @@ bool EntailmentCheck::isEntailed(TNode n, } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/entailment_check.h b/src/theory/quantifiers/entailment_check.h index ecf74fe85..118082cd5 100644 --- a/src/theory/quantifiers/entailment_check.h +++ b/src/theory/quantifiers/entailment_check.h @@ -24,7 +24,7 @@ #include "expr/node.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -151,6 +151,6 @@ class EntailmentCheck : protected EnvObj } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__ENTAILMENT_CHECK_H */ diff --git a/src/theory/quantifiers/equality_query.cpp b/src/theory/quantifiers/equality_query.cpp index e1e41c997..2bc208fa3 100644 --- a/src/theory/quantifiers/equality_query.cpp +++ b/src/theory/quantifiers/equality_query.cpp @@ -22,10 +22,10 @@ #include "theory/quantifiers/term_util.h" using namespace std; -using namespace cvc5::kind; -using namespace cvc5::context; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::context; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -194,4 +194,4 @@ int32_t EqualityQuery::getRepScore(Node n, Node q, size_t index, TypeNode v_tn) } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/equality_query.h b/src/theory/quantifiers/equality_query.h index 200863cd6..ab54e7c52 100644 --- a/src/theory/quantifiers/equality_query.h +++ b/src/theory/quantifiers/equality_query.h @@ -23,7 +23,7 @@ #include "expr/node.h" #include "theory/quantifiers/quant_util.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -93,6 +93,6 @@ class EqualityQuery : public QuantifiersUtil } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS_EQUALITY_QUERY_H */ diff --git a/src/theory/quantifiers/expr_miner.cpp b/src/theory/quantifiers/expr_miner.cpp index eefe447bd..f7b13c4b4 100644 --- a/src/theory/quantifiers/expr_miner.cpp +++ b/src/theory/quantifiers/expr_miner.cpp @@ -23,9 +23,9 @@ #include "theory/rewriter.h" using namespace std; -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -108,4 +108,4 @@ Result ExprMiner::doCheck(Node query) } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/expr_miner.h b/src/theory/quantifiers/expr_miner.h index 702dbf5aa..268fa62e8 100644 --- a/src/theory/quantifiers/expr_miner.h +++ b/src/theory/quantifiers/expr_miner.h @@ -27,7 +27,7 @@ #include "theory/quantifiers/sygus_sampler.h" #include "theory/smt_engine_subsolver.h" -namespace cvc5 { +namespace cvc5::internal { class Env; class SolverEngine; @@ -103,6 +103,6 @@ class ExprMiner : protected EnvObj } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__EXPRESSION_MINER_H */ diff --git a/src/theory/quantifiers/expr_miner_manager.cpp b/src/theory/quantifiers/expr_miner_manager.cpp index fe3b4cc8e..eae2e1595 100644 --- a/src/theory/quantifiers/expr_miner_manager.cpp +++ b/src/theory/quantifiers/expr_miner_manager.cpp @@ -21,7 +21,7 @@ #include "theory/quantifiers/query_generator_sample_sat.h" #include "theory/quantifiers/query_generator_unsat.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -217,4 +217,4 @@ bool ExpressionMinerManager::addTerm(Node sol, std::ostream& out) } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/expr_miner_manager.h b/src/theory/quantifiers/expr_miner_manager.h index 463309e4d..2bf2cd1d6 100644 --- a/src/theory/quantifiers/expr_miner_manager.h +++ b/src/theory/quantifiers/expr_miner_manager.h @@ -25,7 +25,7 @@ #include "theory/quantifiers/solution_filter.h" #include "theory/quantifiers/sygus_sampler.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -114,6 +114,6 @@ class ExpressionMinerManager : protected EnvObj } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__EXPR_MINER_MANAGER_H */ diff --git a/src/theory/quantifiers/extended_rewrite.cpp b/src/theory/quantifiers/extended_rewrite.cpp index 7f78eb7c7..9f7aceb15 100644 --- a/src/theory/quantifiers/extended_rewrite.cpp +++ b/src/theory/quantifiers/extended_rewrite.cpp @@ -27,10 +27,10 @@ #include "theory/strings/word.h" #include "theory/theory.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -1768,4 +1768,4 @@ void ExtendedRewriter::debugExtendedRewrite(Node n, } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/extended_rewrite.h b/src/theory/quantifiers/extended_rewrite.h index bf5829e03..b3e0379a9 100644 --- a/src/theory/quantifiers/extended_rewrite.h +++ b/src/theory/quantifiers/extended_rewrite.h @@ -22,7 +22,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { class Rewriter; @@ -267,6 +267,6 @@ class ExtendedRewriter } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__EXTENDED_REWRITE_H */ diff --git a/src/theory/quantifiers/first_order_model.cpp b/src/theory/quantifiers/first_order_model.cpp index 07241e150..f707c952c 100644 --- a/src/theory/quantifiers/first_order_model.cpp +++ b/src/theory/quantifiers/first_order_model.cpp @@ -24,10 +24,10 @@ #include "theory/quantifiers/term_registry.h" #include "theory/quantifiers/term_util.h" -using namespace cvc5::kind; -using namespace cvc5::context; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::context; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -383,4 +383,4 @@ unsigned FirstOrderModel::getModelBasisArg(Node n) } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/first_order_model.h b/src/theory/quantifiers/first_order_model.h index 526bbe10b..a33062f15 100644 --- a/src/theory/quantifiers/first_order_model.h +++ b/src/theory/quantifiers/first_order_model.h @@ -24,7 +24,7 @@ #include "theory/theory_model.h" #include "theory/uf/theory_uf_model.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { class TheoryModel; @@ -219,6 +219,6 @@ class FirstOrderModel : protected EnvObj } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__FIRST_ORDER_MODEL_H */ diff --git a/src/theory/quantifiers/fmf/bounded_integers.cpp b/src/theory/quantifiers/fmf/bounded_integers.cpp index 9baecf24f..96f33ed5d 100644 --- a/src/theory/quantifiers/fmf/bounded_integers.cpp +++ b/src/theory/quantifiers/fmf/bounded_integers.cpp @@ -31,9 +31,9 @@ #include "theory/rewriter.h" #include "util/rational.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -964,4 +964,4 @@ bool BoundedIntegers::isBoundedForallAttribute(Node var) } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/fmf/bounded_integers.h b/src/theory/quantifiers/fmf/bounded_integers.h index 6602961e9..43254103b 100644 --- a/src/theory/quantifiers/fmf/bounded_integers.h +++ b/src/theory/quantifiers/fmf/bounded_integers.h @@ -26,7 +26,7 @@ #include "theory/quantifiers/quant_bound_inference.h" #include "theory/quantifiers/quant_module.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { class RepSetIterator; @@ -254,6 +254,6 @@ private: } } -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/quantifiers/fmf/first_order_model_fmc.cpp b/src/theory/quantifiers/fmf/first_order_model_fmc.cpp index e825b60a9..73c06fdbc 100644 --- a/src/theory/quantifiers/fmf/first_order_model_fmc.cpp +++ b/src/theory/quantifiers/fmf/first_order_model_fmc.cpp @@ -20,9 +20,9 @@ #include "theory/quantifiers/fmf/full_model_check.h" #include "theory/rewriter.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { namespace fmcheck { @@ -158,4 +158,4 @@ Node FirstOrderModelFmc::getFunctionValue(Node op, const char* argPrefix) } // namespace fmcheck } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/fmf/first_order_model_fmc.h b/src/theory/quantifiers/fmf/first_order_model_fmc.h index 5a528ede1..d2f46ffa6 100644 --- a/src/theory/quantifiers/fmf/first_order_model_fmc.h +++ b/src/theory/quantifiers/fmf/first_order_model_fmc.h @@ -20,7 +20,7 @@ #include "theory/quantifiers/first_order_model.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { namespace fmcheck { @@ -55,6 +55,6 @@ class FirstOrderModelFmc : public FirstOrderModel } // namespace fmcheck } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__FIRST_ORDER_MODEL_H */ diff --git a/src/theory/quantifiers/fmf/full_model_check.cpp b/src/theory/quantifiers/fmf/full_model_check.cpp index 351a5e43e..68548dc42 100644 --- a/src/theory/quantifiers/fmf/full_model_check.cpp +++ b/src/theory/quantifiers/fmf/full_model_check.cpp @@ -31,10 +31,10 @@ #include "theory/quantifiers/term_util.h" #include "theory/rewriter.h" -using namespace cvc5::kind; -using namespace cvc5::context; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::context; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { namespace fmcheck { @@ -1414,4 +1414,4 @@ bool FullModelChecker::isHandled(Node q) const } // namespace fmcheck } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/fmf/full_model_check.h b/src/theory/quantifiers/fmf/full_model_check.h index f3f8699af..14f9b43ac 100644 --- a/src/theory/quantifiers/fmf/full_model_check.h +++ b/src/theory/quantifiers/fmf/full_model_check.h @@ -21,7 +21,7 @@ #include "theory/quantifiers/fmf/first_order_model_fmc.h" #include "theory/quantifiers/fmf/model_builder.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { namespace fmcheck { @@ -195,6 +195,6 @@ protected: } // namespace fmcheck } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__FULL_MODEL_CHECK_H */ diff --git a/src/theory/quantifiers/fmf/model_builder.cpp b/src/theory/quantifiers/fmf/model_builder.cpp index 0c9bd213b..0bf6b4a78 100644 --- a/src/theory/quantifiers/fmf/model_builder.cpp +++ b/src/theory/quantifiers/fmf/model_builder.cpp @@ -24,11 +24,11 @@ #include "theory/quantifiers/quantifiers_state.h" using namespace std; -using namespace cvc5; -using namespace cvc5::kind; -using namespace cvc5::context; -using namespace cvc5::theory; -using namespace cvc5::theory::quantifiers; +using namespace cvc5::internal; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::context; +using namespace cvc5::internal::theory; +using namespace cvc5::internal::theory::quantifiers; QModelBuilder::QModelBuilder(Env& env, QuantifiersState& qs, diff --git a/src/theory/quantifiers/fmf/model_builder.h b/src/theory/quantifiers/fmf/model_builder.h index f5dc7155b..5de6aa765 100644 --- a/src/theory/quantifiers/fmf/model_builder.h +++ b/src/theory/quantifiers/fmf/model_builder.h @@ -22,7 +22,7 @@ #include "theory/quantifiers/inst_match.h" #include "theory/theory_model_builder.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -82,6 +82,6 @@ class QModelBuilder : public TheoryEngineModelBuilder } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__MODEL_BUILDER_H */ diff --git a/src/theory/quantifiers/fmf/model_engine.cpp b/src/theory/quantifiers/fmf/model_engine.cpp index 89677bb5e..86e4a8778 100644 --- a/src/theory/quantifiers/fmf/model_engine.cpp +++ b/src/theory/quantifiers/fmf/model_engine.cpp @@ -23,10 +23,10 @@ #include "theory/quantifiers/quantifiers_attributes.h" #include "theory/quantifiers/term_database.h" -using namespace cvc5::kind; -using namespace cvc5::context; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::context; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -387,4 +387,4 @@ bool ModelEngine::shouldProcess(Node q) } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/fmf/model_engine.h b/src/theory/quantifiers/fmf/model_engine.h index b5ab86f20..9ab336d70 100644 --- a/src/theory/quantifiers/fmf/model_engine.h +++ b/src/theory/quantifiers/fmf/model_engine.h @@ -23,7 +23,7 @@ #include "theory/quantifiers/quant_module.h" #include "theory/theory_model.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -75,6 +75,6 @@ private: } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__MODEL_ENGINE_H */ diff --git a/src/theory/quantifiers/fun_def_evaluator.cpp b/src/theory/quantifiers/fun_def_evaluator.cpp index 8194aa6d1..b7d335a35 100644 --- a/src/theory/quantifiers/fun_def_evaluator.cpp +++ b/src/theory/quantifiers/fun_def_evaluator.cpp @@ -20,9 +20,9 @@ #include "theory/quantifiers/quantifiers_attributes.h" #include "theory/rewriter.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -269,4 +269,4 @@ Node FunDefEvaluator::getDefinitionFor(Node f) const } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/fun_def_evaluator.h b/src/theory/quantifiers/fun_def_evaluator.h index c8e811968..ae8fad037 100644 --- a/src/theory/quantifiers/fun_def_evaluator.h +++ b/src/theory/quantifiers/fun_def_evaluator.h @@ -24,7 +24,7 @@ #include "expr/node.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -79,6 +79,6 @@ class FunDefEvaluator : protected EnvObj } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/quantifiers/ho_term_database.cpp b/src/theory/quantifiers/ho_term_database.cpp index 32822a23f..117dc5d26 100644 --- a/src/theory/quantifiers/ho_term_database.cpp +++ b/src/theory/quantifiers/ho_term_database.cpp @@ -22,9 +22,9 @@ #include "theory/rewriter.h" #include "theory/uf/equality_engine.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -249,4 +249,4 @@ Node HoTermDb::getHoTypeMatchPredicate(TypeNode tn) } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/ho_term_database.h b/src/theory/quantifiers/ho_term_database.h index 885fec8f4..d179e1bb6 100644 --- a/src/theory/quantifiers/ho_term_database.h +++ b/src/theory/quantifiers/ho_term_database.h @@ -23,7 +23,7 @@ #include "expr/node.h" #include "theory/quantifiers/term_database.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -115,6 +115,6 @@ class HoTermDb : public TermDb } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__HO_TERM_DATABASE_H */ diff --git a/src/theory/quantifiers/index_trie.cpp b/src/theory/quantifiers/index_trie.cpp index ba3b4497d..1b788b47e 100644 --- a/src/theory/quantifiers/index_trie.cpp +++ b/src/theory/quantifiers/index_trie.cpp @@ -16,7 +16,7 @@ */ #include "theory/quantifiers/index_trie.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -115,4 +115,4 @@ IndexTrieNode* IndexTrie::addRec(IndexTrieNode* n, } } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/index_trie.h b/src/theory/quantifiers/index_trie.h index 30033743b..9eff75ade 100644 --- a/src/theory/quantifiers/index_trie.h +++ b/src/theory/quantifiers/index_trie.h @@ -23,7 +23,7 @@ #include "base/check.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -108,5 +108,5 @@ class IndexTrie } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* THEORY__QUANTIFIERS__INDEX_TRIE_H */ diff --git a/src/theory/quantifiers/inst_match.cpp b/src/theory/quantifiers/inst_match.cpp index cdaab231c..0d7b4cabb 100644 --- a/src/theory/quantifiers/inst_match.cpp +++ b/src/theory/quantifiers/inst_match.cpp @@ -17,7 +17,7 @@ #include "theory/quantifiers/quantifiers_state.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -103,4 +103,4 @@ bool InstMatch::set(QuantifiersState& qs, size_t i, TNode n) } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/inst_match.h b/src/theory/quantifiers/inst_match.h index 27b679623..4f1b5c6dc 100644 --- a/src/theory/quantifiers/inst_match.h +++ b/src/theory/quantifiers/inst_match.h @@ -22,7 +22,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -90,6 +90,6 @@ inline std::ostream& operator<<(std::ostream& out, const InstMatch& m) { } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__INST_MATCH_H */ diff --git a/src/theory/quantifiers/inst_match_trie.cpp b/src/theory/quantifiers/inst_match_trie.cpp index a4107564e..b56637f14 100644 --- a/src/theory/quantifiers/inst_match_trie.cpp +++ b/src/theory/quantifiers/inst_match_trie.cpp @@ -21,9 +21,9 @@ #include "theory/quantifiers/term_database.h" #include "theory/uf/equality_engine_iterator.h" -using namespace cvc5::context; +using namespace cvc5::internal::context; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -374,4 +374,4 @@ bool InstMatchTrieOrdered::existsInstMatch(quantifiers::QuantifiersState& qs, } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/inst_match_trie.h b/src/theory/quantifiers/inst_match_trie.h index 5ddc299af..52404d454 100644 --- a/src/theory/quantifiers/inst_match_trie.h +++ b/src/theory/quantifiers/inst_match_trie.h @@ -25,7 +25,7 @@ #include "expr/node.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -228,6 +228,6 @@ class InstMatchTrieOrdered } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__INST_MATCH_TRIE_H */ diff --git a/src/theory/quantifiers/inst_strategy_enumerative.cpp b/src/theory/quantifiers/inst_strategy_enumerative.cpp index 7356bbdf8..edcc0efca 100644 --- a/src/theory/quantifiers/inst_strategy_enumerative.cpp +++ b/src/theory/quantifiers/inst_strategy_enumerative.cpp @@ -22,10 +22,10 @@ #include "theory/quantifiers/term_tuple_enumerator.h" #include "theory/quantifiers/term_util.h" -using namespace cvc5::kind; -using namespace cvc5::context; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::context; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -222,4 +222,4 @@ bool InstStrategyEnum::process(Node quantifier, bool fullEffort, bool isRd) } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/inst_strategy_enumerative.h b/src/theory/quantifiers/inst_strategy_enumerative.h index 544c72800..ec942858d 100644 --- a/src/theory/quantifiers/inst_strategy_enumerative.h +++ b/src/theory/quantifiers/inst_strategy_enumerative.h @@ -21,7 +21,7 @@ #include "smt/env_obj.h" #include "theory/quantifiers/quant_module.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -119,6 +119,6 @@ class InstStrategyEnum : public QuantifiersModule } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/quantifiers/inst_strategy_pool.cpp b/src/theory/quantifiers/inst_strategy_pool.cpp index 65d63c6d1..a0c592765 100644 --- a/src/theory/quantifiers/inst_strategy_pool.cpp +++ b/src/theory/quantifiers/inst_strategy_pool.cpp @@ -23,10 +23,10 @@ #include "theory/quantifiers/term_registry.h" #include "theory/quantifiers/term_tuple_enumerator.h" -using namespace cvc5::kind; -using namespace cvc5::context; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::context; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -166,4 +166,4 @@ bool InstStrategyPool::process(Node q, Node p, uint64_t& addedLemmas) } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/inst_strategy_pool.h b/src/theory/quantifiers/inst_strategy_pool.h index 1f79717af..cecb87efa 100644 --- a/src/theory/quantifiers/inst_strategy_pool.h +++ b/src/theory/quantifiers/inst_strategy_pool.h @@ -21,7 +21,7 @@ #include "smt/env_obj.h" #include "theory/quantifiers/quant_module.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -70,6 +70,6 @@ class InstStrategyPool : public QuantifiersModule } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/quantifiers/instantiate.cpp b/src/theory/quantifiers/instantiate.cpp index 21b647c36..a9cb1140a 100644 --- a/src/theory/quantifiers/instantiate.cpp +++ b/src/theory/quantifiers/instantiate.cpp @@ -35,10 +35,10 @@ #include "theory/quantifiers/term_util.h" #include "theory/rewriter.h" -using namespace cvc5::kind; -using namespace cvc5::context; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::context; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -778,4 +778,4 @@ Instantiate::Statistics::Statistics() } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/instantiate.h b/src/theory/quantifiers/instantiate.h index 2e5bd1e2f..71fe00edc 100644 --- a/src/theory/quantifiers/instantiate.h +++ b/src/theory/quantifiers/instantiate.h @@ -28,7 +28,7 @@ #include "theory/quantifiers/quant_util.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { class LazyCDProof; @@ -356,6 +356,6 @@ class Instantiate : public QuantifiersUtil } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__INSTANTIATE_H */ diff --git a/src/theory/quantifiers/instantiation_list.cpp b/src/theory/quantifiers/instantiation_list.cpp index 81ef84ae0..7763d96a5 100644 --- a/src/theory/quantifiers/instantiation_list.cpp +++ b/src/theory/quantifiers/instantiation_list.cpp @@ -19,7 +19,7 @@ #include "options/io_utils.h" #include "printer/printer.h" -namespace cvc5 { +namespace cvc5::internal { InstantiationVec::InstantiationVec(const std::vector& vec, theory::InferenceId id, @@ -43,4 +43,4 @@ std::ostream& operator<<(std::ostream& out, const SkolemList& skl) return out; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/instantiation_list.h b/src/theory/quantifiers/instantiation_list.h index 5e292375a..5b573e17b 100644 --- a/src/theory/quantifiers/instantiation_list.h +++ b/src/theory/quantifiers/instantiation_list.h @@ -24,7 +24,7 @@ #include "expr/node.h" #include "theory/inference_id.h" -namespace cvc5 { +namespace cvc5::internal { struct InstantiationVec { @@ -67,6 +67,6 @@ struct SkolemList /** Print the skolem list to stream out */ std::ostream& operator<<(std::ostream& out, const SkolemList& skl); -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__INSTANTIATION_LIST_H */ diff --git a/src/theory/quantifiers/kinds b/src/theory/quantifiers/kinds index 250082952..193646c62 100644 --- a/src/theory/quantifiers/kinds +++ b/src/theory/quantifiers/kinds @@ -4,12 +4,12 @@ # src/theory/builtin/kinds. # -theory THEORY_QUANTIFIERS ::cvc5::theory::quantifiers::TheoryQuantifiers "theory/quantifiers/theory_quantifiers.h" +theory THEORY_QUANTIFIERS ::cvc5::internal::theory::quantifiers::TheoryQuantifiers "theory/quantifiers/theory_quantifiers.h" typechecker "theory/quantifiers/theory_quantifiers_type_rules.h" properties check presolve -rewriter ::cvc5::theory::quantifiers::QuantifiersRewriter "theory/quantifiers/quantifiers_rewriter.h" +rewriter ::cvc5::internal::theory::quantifiers::QuantifiersRewriter "theory/quantifiers/quantifiers_rewriter.h" operator FORALL 2:3 "universally quantified formula; first parameter is an BOUND_VAR_LIST, second is quantifier body, and an optional third parameter is an INST_PATTERN_LIST" @@ -47,16 +47,16 @@ sort INST_PATTERN_LIST_TYPE \ # a list of instantiation patterns operator INST_PATTERN_LIST 1: "a list of instantiation patterns" -typerule FORALL ::cvc5::theory::quantifiers::QuantifierTypeRule -typerule EXISTS ::cvc5::theory::quantifiers::QuantifierTypeRule -typerule BOUND_VAR_LIST ::cvc5::theory::quantifiers::QuantifierBoundVarListTypeRule -typerule INST_PATTERN_LIST ::cvc5::theory::quantifiers::QuantifierInstPatternListTypeRule - -typerule INST_PATTERN ::cvc5::theory::quantifiers::QuantifierInstPatternTypeRule -typerule INST_NO_PATTERN ::cvc5::theory::quantifiers::QuantifierAnnotationTypeRule -typerule INST_ATTRIBUTE ::cvc5::theory::quantifiers::QuantifierAnnotationTypeRule -typerule INST_POOL ::cvc5::theory::quantifiers::QuantifierAnnotationTypeRule -typerule INST_ADD_TO_POOL ::cvc5::theory::quantifiers::QuantifierAnnotationTypeRule -typerule SKOLEM_ADD_TO_POOL ::cvc5::theory::quantifiers::QuantifierAnnotationTypeRule +typerule FORALL ::cvc5::internal::theory::quantifiers::QuantifierTypeRule +typerule EXISTS ::cvc5::internal::theory::quantifiers::QuantifierTypeRule +typerule BOUND_VAR_LIST ::cvc5::internal::theory::quantifiers::QuantifierBoundVarListTypeRule +typerule INST_PATTERN_LIST ::cvc5::internal::theory::quantifiers::QuantifierInstPatternListTypeRule + +typerule INST_PATTERN ::cvc5::internal::theory::quantifiers::QuantifierInstPatternTypeRule +typerule INST_NO_PATTERN ::cvc5::internal::theory::quantifiers::QuantifierAnnotationTypeRule +typerule INST_ATTRIBUTE ::cvc5::internal::theory::quantifiers::QuantifierAnnotationTypeRule +typerule INST_POOL ::cvc5::internal::theory::quantifiers::QuantifierAnnotationTypeRule +typerule INST_ADD_TO_POOL ::cvc5::internal::theory::quantifiers::QuantifierAnnotationTypeRule +typerule SKOLEM_ADD_TO_POOL ::cvc5::internal::theory::quantifiers::QuantifierAnnotationTypeRule endtheory diff --git a/src/theory/quantifiers/lazy_trie.cpp b/src/theory/quantifiers/lazy_trie.cpp index 7ae055bc1..4f0cb8107 100644 --- a/src/theory/quantifiers/lazy_trie.cpp +++ b/src/theory/quantifiers/lazy_trie.cpp @@ -15,7 +15,7 @@ #include "theory/quantifiers/lazy_trie.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -157,4 +157,4 @@ void LazyTrieMulti::clear() } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/lazy_trie.h b/src/theory/quantifiers/lazy_trie.h index eccbe20ea..899f442d9 100644 --- a/src/theory/quantifiers/lazy_trie.h +++ b/src/theory/quantifiers/lazy_trie.h @@ -18,7 +18,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -169,6 +169,6 @@ class LazyTrieMulti } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__LAZY_TRIE_H */ diff --git a/src/theory/quantifiers/master_eq_notify.cpp b/src/theory/quantifiers/master_eq_notify.cpp index 7aaec56c3..d447601d3 100644 --- a/src/theory/quantifiers/master_eq_notify.cpp +++ b/src/theory/quantifiers/master_eq_notify.cpp @@ -17,7 +17,7 @@ #include "theory/quantifiers_engine.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -31,4 +31,4 @@ void MasterNotifyClass::eqNotifyNewClass(TNode t) } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/master_eq_notify.h b/src/theory/quantifiers/master_eq_notify.h index 262ec483b..513ec64c6 100644 --- a/src/theory/quantifiers/master_eq_notify.h +++ b/src/theory/quantifiers/master_eq_notify.h @@ -22,7 +22,7 @@ #include "theory/uf/equality_engine_notify.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { class QuantifiersEngine; @@ -63,6 +63,6 @@ class MasterNotifyClass : public theory::eq::EqualityEngineNotify } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__MASTER_EQ_NOTIFY__H */ diff --git a/src/theory/quantifiers/proof_checker.cpp b/src/theory/quantifiers/proof_checker.cpp index c8ff49e11..5553e4cef 100644 --- a/src/theory/quantifiers/proof_checker.cpp +++ b/src/theory/quantifiers/proof_checker.cpp @@ -19,9 +19,9 @@ #include "expr/skolem_manager.h" #include "theory/builtin/proof_checker.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -169,4 +169,4 @@ Node QuantifiersProofRuleChecker::checkInternal( } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/proof_checker.h b/src/theory/quantifiers/proof_checker.h index 23441772e..a7aea4b45 100644 --- a/src/theory/quantifiers/proof_checker.h +++ b/src/theory/quantifiers/proof_checker.h @@ -22,7 +22,7 @@ #include "proof/proof_checker.h" #include "proof/proof_node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -45,6 +45,6 @@ class QuantifiersProofRuleChecker : public ProofRuleChecker } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__PROOF_CHECKER_H */ diff --git a/src/theory/quantifiers/quant_bound_inference.cpp b/src/theory/quantifiers/quant_bound_inference.cpp index 4094a6638..effe91475 100644 --- a/src/theory/quantifiers/quant_bound_inference.cpp +++ b/src/theory/quantifiers/quant_bound_inference.cpp @@ -18,9 +18,9 @@ #include "theory/quantifiers/fmf/bounded_integers.h" #include "util/rational.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -128,4 +128,4 @@ bool QuantifiersBoundInference::getBoundElements( } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/quant_bound_inference.h b/src/theory/quantifiers/quant_bound_inference.h index 55e7b0766..d3c0c0844 100644 --- a/src/theory/quantifiers/quant_bound_inference.h +++ b/src/theory/quantifiers/quant_bound_inference.h @@ -21,7 +21,7 @@ #include #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { class RepSetIterator; @@ -123,6 +123,6 @@ class QuantifiersBoundInference } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__QUANT_BOUND_INFERENCE_H */ diff --git a/src/theory/quantifiers/quant_conflict_find.cpp b/src/theory/quantifiers/quant_conflict_find.cpp index 604d8e4eb..e6a386b24 100644 --- a/src/theory/quantifiers/quant_conflict_find.cpp +++ b/src/theory/quantifiers/quant_conflict_find.cpp @@ -30,10 +30,10 @@ #include "theory/rewriter.h" #include "util/rational.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -2623,4 +2623,4 @@ bool QuantConflictFind::isPropagatingInstance(Node n) const } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/quant_conflict_find.h b/src/theory/quantifiers/quant_conflict_find.h index 592320f99..2906327ea 100644 --- a/src/theory/quantifiers/quant_conflict_find.h +++ b/src/theory/quantifiers/quant_conflict_find.h @@ -26,7 +26,7 @@ #include "expr/node_trie.h" #include "theory/quantifiers/quant_module.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -312,6 +312,6 @@ std::ostream& operator<<(std::ostream& os, const QuantConflictFind::Effort& e); } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/quantifiers/quant_module.cpp b/src/theory/quantifiers/quant_module.cpp index db4eb9d34..a176fe8fe 100644 --- a/src/theory/quantifiers/quant_module.cpp +++ b/src/theory/quantifiers/quant_module.cpp @@ -15,9 +15,9 @@ #include "theory/quantifiers/quant_module.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { QuantifiersModule::QuantifiersModule( @@ -82,4 +82,4 @@ quantifiers::TermRegistry& QuantifiersModule::getTermRegistry() } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/quant_module.h b/src/theory/quantifiers/quant_module.h index ce6c1b04c..d3510eb2f 100644 --- a/src/theory/quantifiers/quant_module.h +++ b/src/theory/quantifiers/quant_module.h @@ -30,7 +30,7 @@ #include "theory/theory.h" #include "theory/uf/equality_engine.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { class TermDb; @@ -182,6 +182,6 @@ class QuantifiersModule : protected EnvObj }; /* class QuantifiersModule */ } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANT_UTIL_H */ diff --git a/src/theory/quantifiers/quant_relevance.cpp b/src/theory/quantifiers/quant_relevance.cpp index abb8c9219..0e146ce20 100644 --- a/src/theory/quantifiers/quant_relevance.cpp +++ b/src/theory/quantifiers/quant_relevance.cpp @@ -16,10 +16,10 @@ #include "theory/quantifiers/quant_relevance.h" using namespace std; -using namespace cvc5::kind; -using namespace cvc5::context; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::context; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -65,4 +65,4 @@ size_t QuantRelevance::getNumQuantifiersForSymbol(Node s) const } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/quant_relevance.h b/src/theory/quantifiers/quant_relevance.h index 418b859b9..dac89aae4 100644 --- a/src/theory/quantifiers/quant_relevance.h +++ b/src/theory/quantifiers/quant_relevance.h @@ -22,7 +22,7 @@ #include "theory/quantifiers/quant_util.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -64,6 +64,6 @@ class QuantRelevance : public QuantifiersUtil } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANT_RELEVANCE_H */ diff --git a/src/theory/quantifiers/quant_rep_bound_ext.cpp b/src/theory/quantifiers/quant_rep_bound_ext.cpp index 36baa0749..a19d7db92 100644 --- a/src/theory/quantifiers/quant_rep_bound_ext.cpp +++ b/src/theory/quantifiers/quant_rep_bound_ext.cpp @@ -18,9 +18,9 @@ #include "theory/quantifiers/first_order_model.h" #include "theory/quantifiers/quant_bound_inference.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -87,4 +87,4 @@ bool QRepBoundExt::getVariableOrder(Node owner, std::vector& varOrder) } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/quant_rep_bound_ext.h b/src/theory/quantifiers/quant_rep_bound_ext.h index 999d50546..d749b2084 100644 --- a/src/theory/quantifiers/quant_rep_bound_ext.h +++ b/src/theory/quantifiers/quant_rep_bound_ext.h @@ -24,7 +24,7 @@ #include "theory/rep_set.h" #include "theory/theory_model.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -68,6 +68,6 @@ class QRepBoundExt : public RepBoundExt } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__FIRST_ORDER_MODEL_H */ diff --git a/src/theory/quantifiers/quant_split.cpp b/src/theory/quantifiers/quant_split.cpp index e6cee778b..670c08702 100644 --- a/src/theory/quantifiers/quant_split.cpp +++ b/src/theory/quantifiers/quant_split.cpp @@ -22,9 +22,9 @@ #include "theory/quantifiers/first_order_model.h" #include "theory/quantifiers/term_database.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -213,4 +213,4 @@ void QuantDSplit::check(Theory::Effort e, QEffort quant_e) } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/quant_split.h b/src/theory/quantifiers/quant_split.h index 84cc6fea7..2b007bcaf 100644 --- a/src/theory/quantifiers/quant_split.h +++ b/src/theory/quantifiers/quant_split.h @@ -22,7 +22,7 @@ #include "smt/env_obj.h" #include "theory/quantifiers/quant_module.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { class QuantifiersEngine; @@ -76,6 +76,6 @@ class QuantDSplit : public QuantifiersModule { } } -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/quantifiers/quant_util.cpp b/src/theory/quantifiers/quant_util.cpp index e8fe29a1e..4f0deea40 100644 --- a/src/theory/quantifiers/quant_util.cpp +++ b/src/theory/quantifiers/quant_util.cpp @@ -17,9 +17,9 @@ #include "theory/quantifiers/term_util.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { QuantifiersUtil::QuantifiersUtil(Env& env) : EnvObj(env) {} @@ -138,4 +138,4 @@ void QuantPhaseReq::getEntailPolarity( } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/quant_util.h b/src/theory/quantifiers/quant_util.h index a422101f0..40c8e78ae 100644 --- a/src/theory/quantifiers/quant_util.h +++ b/src/theory/quantifiers/quant_util.h @@ -27,7 +27,7 @@ #include "theory/incomplete_id.h" #include "theory/theory.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { /** Quantifiers utility @@ -112,6 +112,6 @@ public: }; } -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANT_UTIL_H */ diff --git a/src/theory/quantifiers/quantifiers_attributes.cpp b/src/theory/quantifiers/quantifiers_attributes.cpp index e6b4d49b1..3988da8c9 100644 --- a/src/theory/quantifiers/quantifiers_attributes.cpp +++ b/src/theory/quantifiers/quantifiers_attributes.cpp @@ -26,10 +26,10 @@ #include "util/string.h" using namespace std; -using namespace cvc5::kind; -using namespace cvc5::context; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::context; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -459,4 +459,4 @@ Node mkNamedQuant(Kind k, Node bvl, Node body, const std::string& name) } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/quantifiers_attributes.h b/src/theory/quantifiers/quantifiers_attributes.h index 24d02e960..ece22d86f 100644 --- a/src/theory/quantifiers/quantifiers_attributes.h +++ b/src/theory/quantifiers/quantifiers_attributes.h @@ -21,7 +21,7 @@ #include "expr/attribute.h" #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { /** Attribute true for function definition quantifiers */ @@ -235,6 +235,6 @@ class QuantAttributes Node mkNamedQuant(Kind k, Node bvl, Node body, const std::string& name); } } -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/quantifiers/quantifiers_inference_manager.cpp b/src/theory/quantifiers/quantifiers_inference_manager.cpp index f282b8d11..a1e59dcf1 100644 --- a/src/theory/quantifiers/quantifiers_inference_manager.cpp +++ b/src/theory/quantifiers/quantifiers_inference_manager.cpp @@ -18,7 +18,7 @@ #include "theory/quantifiers/instantiate.h" #include "theory/quantifiers/skolemize.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -54,4 +54,4 @@ void QuantifiersInferenceManager::doPending() } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/quantifiers_inference_manager.h b/src/theory/quantifiers/quantifiers_inference_manager.h index abd8d0761..ed1bf1f3f 100644 --- a/src/theory/quantifiers/quantifiers_inference_manager.h +++ b/src/theory/quantifiers/quantifiers_inference_manager.h @@ -21,7 +21,7 @@ #include "theory/inference_manager_buffered.h" #include "theory/quantifiers/quantifiers_state.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -60,6 +60,6 @@ class QuantifiersInferenceManager : public InferenceManagerBuffered } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__QUANTIFIERS_INFERENCE_MANAGER_H */ diff --git a/src/theory/quantifiers/quantifiers_macros.cpp b/src/theory/quantifiers/quantifiers_macros.cpp index 51b1a6d3c..1254cf5a6 100644 --- a/src/theory/quantifiers/quantifiers_macros.cpp +++ b/src/theory/quantifiers/quantifiers_macros.cpp @@ -25,9 +25,9 @@ #include "theory/quantifiers/term_util.h" #include "theory/rewriter.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -287,4 +287,4 @@ Node QuantifiersMacros::returnMacro(Node fdef, Node lit) const } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/quantifiers_macros.h b/src/theory/quantifiers/quantifiers_macros.h index 91b44b520..1e80bf758 100644 --- a/src/theory/quantifiers/quantifiers_macros.h +++ b/src/theory/quantifiers/quantifiers_macros.h @@ -22,7 +22,7 @@ #include #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -98,6 +98,6 @@ class QuantifiersMacros } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /*CVC5__THEORY__QUANTIFIERS__QUANTIFIER_MACROS_H */ diff --git a/src/theory/quantifiers/quantifiers_modules.cpp b/src/theory/quantifiers/quantifiers_modules.cpp index f971e4311..2573cc907 100644 --- a/src/theory/quantifiers/quantifiers_modules.cpp +++ b/src/theory/quantifiers/quantifiers_modules.cpp @@ -20,7 +20,7 @@ #include "theory/quantifiers/relevant_domain.h" #include "theory/quantifiers/term_registry.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -121,4 +121,4 @@ void QuantifiersModules::initialize(Env& env, } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/quantifiers_modules.h b/src/theory/quantifiers/quantifiers_modules.h index a7c8fc576..d4285f4e3 100644 --- a/src/theory/quantifiers/quantifiers_modules.h +++ b/src/theory/quantifiers/quantifiers_modules.h @@ -32,7 +32,7 @@ #include "theory/quantifiers/sygus/synth_engine.h" #include "theory/quantifiers/sygus_inst.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { class QuantifiersEngine; @@ -47,7 +47,7 @@ namespace quantifiers { */ class QuantifiersModules { - friend class ::cvc5::theory::QuantifiersEngine; + friend class ::cvc5::internal::theory::QuantifiersEngine; public: QuantifiersModules(); @@ -98,6 +98,6 @@ class QuantifiersModules } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__QUANTIFIERS_MODULES_H */ diff --git a/src/theory/quantifiers/quantifiers_preprocess.cpp b/src/theory/quantifiers/quantifiers_preprocess.cpp index d9d01c297..97460c2be 100644 --- a/src/theory/quantifiers/quantifiers_preprocess.cpp +++ b/src/theory/quantifiers/quantifiers_preprocess.cpp @@ -21,9 +21,9 @@ #include "theory/quantifiers/quantifiers_rewriter.h" #include "theory/quantifiers/skolemize.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -266,4 +266,4 @@ TrustNode QuantifiersPreprocess::preprocess(Node n, bool isInst) const } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/quantifiers_preprocess.h b/src/theory/quantifiers/quantifiers_preprocess.h index 45b7ad07a..7d861d54e 100644 --- a/src/theory/quantifiers/quantifiers_preprocess.h +++ b/src/theory/quantifiers/quantifiers_preprocess.h @@ -21,7 +21,7 @@ #include "proof/trust_node.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -73,6 +73,6 @@ class QuantifiersPreprocess : protected EnvObj } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__QUANTIFIERS_REWRITER_H */ diff --git a/src/theory/quantifiers/quantifiers_registry.cpp b/src/theory/quantifiers/quantifiers_registry.cpp index 17998c1d1..4160f68c7 100644 --- a/src/theory/quantifiers/quantifiers_registry.cpp +++ b/src/theory/quantifiers/quantifiers_registry.cpp @@ -19,7 +19,7 @@ #include "theory/quantifiers/quant_module.h" #include "theory/quantifiers/term_util.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -216,4 +216,4 @@ bool QuantifiersRegistry::getNameForQuant(Node q, Node& name, bool req) const } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/quantifiers_registry.h b/src/theory/quantifiers/quantifiers_registry.h index 858a85cae..f7030126d 100644 --- a/src/theory/quantifiers/quantifiers_registry.h +++ b/src/theory/quantifiers/quantifiers_registry.h @@ -24,7 +24,7 @@ #include "theory/quantifiers/quantifiers_attributes.h" #include "theory/quantifiers/quantifiers_preprocess.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { class QuantifiersModule; @@ -135,6 +135,6 @@ class QuantifiersRegistry : public QuantifiersUtil } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__QUANTIFIERS_REGISTRY_H */ diff --git a/src/theory/quantifiers/quantifiers_rewriter.cpp b/src/theory/quantifiers/quantifiers_rewriter.cpp index 03caa0187..4bf8e528e 100644 --- a/src/theory/quantifiers/quantifiers_rewriter.cpp +++ b/src/theory/quantifiers/quantifiers_rewriter.cpp @@ -36,10 +36,10 @@ #include "util/rational.h" using namespace std; -using namespace cvc5::kind; -using namespace cvc5::context; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::context; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -2066,4 +2066,4 @@ bool QuantifiersRewriter::isPrenexNormalForm( Node n ) { } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/quantifiers_rewriter.h b/src/theory/quantifiers/quantifiers_rewriter.h index 7e7dda4b7..578d5cdeb 100644 --- a/src/theory/quantifiers/quantifiers_rewriter.h +++ b/src/theory/quantifiers/quantifiers_rewriter.h @@ -22,7 +22,7 @@ #include "proof/trust_node.h" #include "theory/theory_rewriter.h" -namespace cvc5 { +namespace cvc5::internal { class Options; @@ -340,6 +340,6 @@ class QuantifiersRewriter : public TheoryRewriter } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__QUANTIFIERS_REWRITER_H */ diff --git a/src/theory/quantifiers/quantifiers_state.cpp b/src/theory/quantifiers/quantifiers_state.cpp index df3173e00..5400cc0e8 100644 --- a/src/theory/quantifiers/quantifiers_state.cpp +++ b/src/theory/quantifiers/quantifiers_state.cpp @@ -18,7 +18,7 @@ #include "options/quantifiers_options.h" #include "theory/uf/equality_engine_iterator.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -165,4 +165,4 @@ QuantifiersStatistics& QuantifiersState::getStats() { return d_statistics; } } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/quantifiers_state.h b/src/theory/quantifiers/quantifiers_state.h index 92b744cd0..4056ffaa5 100644 --- a/src/theory/quantifiers/quantifiers_state.h +++ b/src/theory/quantifiers/quantifiers_state.h @@ -22,7 +22,7 @@ #include "theory/theory.h" #include "theory/theory_state.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -86,6 +86,6 @@ class QuantifiersState : public TheoryState } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__QUANTIFIERS_STATE_H */ diff --git a/src/theory/quantifiers/quantifiers_statistics.cpp b/src/theory/quantifiers/quantifiers_statistics.cpp index 6437683f7..9245c369d 100644 --- a/src/theory/quantifiers/quantifiers_statistics.cpp +++ b/src/theory/quantifiers/quantifiers_statistics.cpp @@ -17,7 +17,7 @@ #include "smt/smt_statistics_registry.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -47,4 +47,4 @@ QuantifiersStatistics::QuantifiersStatistics() } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/quantifiers_statistics.h b/src/theory/quantifiers/quantifiers_statistics.h index 0ece9aedf..a158bfe3a 100644 --- a/src/theory/quantifiers/quantifiers_statistics.h +++ b/src/theory/quantifiers/quantifiers_statistics.h @@ -20,7 +20,7 @@ #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -46,6 +46,6 @@ class QuantifiersStatistics } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__QUANTIFIERS_STATISTICS_H */ diff --git a/src/theory/quantifiers/query_generator.cpp b/src/theory/quantifiers/query_generator.cpp index 8805fcf96..d3d567c18 100644 --- a/src/theory/quantifiers/query_generator.cpp +++ b/src/theory/quantifiers/query_generator.cpp @@ -25,9 +25,9 @@ #include "smt/print_benchmark.h" using namespace std; -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -93,4 +93,4 @@ bool QueryGeneratorBasic::addTerm(Node n, std::ostream& out) } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/query_generator.h b/src/theory/quantifiers/query_generator.h index 984a5b18f..6cd1d865e 100644 --- a/src/theory/quantifiers/query_generator.h +++ b/src/theory/quantifiers/query_generator.h @@ -22,7 +22,7 @@ #include "expr/node.h" #include "theory/quantifiers/expr_miner.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -70,6 +70,6 @@ class QueryGeneratorBasic : public QueryGenerator } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS___H */ diff --git a/src/theory/quantifiers/query_generator_sample_sat.cpp b/src/theory/quantifiers/query_generator_sample_sat.cpp index 61873f45b..9e8824209 100644 --- a/src/theory/quantifiers/query_generator_sample_sat.cpp +++ b/src/theory/quantifiers/query_generator_sample_sat.cpp @@ -25,9 +25,9 @@ #include "util/random.h" using namespace std; -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -389,4 +389,4 @@ void QueryGeneratorSampleSat::findQueries( } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/query_generator_sample_sat.h b/src/theory/quantifiers/query_generator_sample_sat.h index 7238a4c23..8d5b687b1 100644 --- a/src/theory/quantifiers/query_generator_sample_sat.h +++ b/src/theory/quantifiers/query_generator_sample_sat.h @@ -27,7 +27,7 @@ #include "theory/quantifiers/query_generator.h" #include "theory/quantifiers/sygus_sampler.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -110,6 +110,6 @@ class QueryGeneratorSampleSat : public QueryGenerator } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__QUERY_GENERATOR_SAMPLE_SAT_H */ diff --git a/src/theory/quantifiers/query_generator_unsat.cpp b/src/theory/quantifiers/query_generator_unsat.cpp index d24bf916c..798d8eca8 100644 --- a/src/theory/quantifiers/query_generator_unsat.cpp +++ b/src/theory/quantifiers/query_generator_unsat.cpp @@ -21,7 +21,7 @@ #include "smt/env.h" #include "util/random.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -170,4 +170,4 @@ size_t QueryGeneratorUnsat::getNextRandomIndex( } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/query_generator_unsat.h b/src/theory/quantifiers/query_generator_unsat.h index 128b6253e..c3c9b7b76 100644 --- a/src/theory/quantifiers/query_generator_unsat.h +++ b/src/theory/quantifiers/query_generator_unsat.h @@ -29,7 +29,7 @@ #include "theory/quantifiers/query_generator.h" #include "theory/quantifiers/sygus_sampler.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -79,6 +79,6 @@ class QueryGeneratorUnsat : public QueryGenerator } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS___H */ diff --git a/src/theory/quantifiers/relevant_domain.cpp b/src/theory/quantifiers/relevant_domain.cpp index 5530b8076..2bf9f5fa6 100644 --- a/src/theory/quantifiers/relevant_domain.cpp +++ b/src/theory/quantifiers/relevant_domain.cpp @@ -26,9 +26,9 @@ #include "theory/quantifiers/term_util.h" #include "util/rational.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -428,4 +428,4 @@ void RelevantDomain::computeRelevantDomainLit( Node q, bool hasPol, bool pol, No } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/relevant_domain.h b/src/theory/quantifiers/relevant_domain.h index ab1a0e064..44c87e49a 100644 --- a/src/theory/quantifiers/relevant_domain.h +++ b/src/theory/quantifiers/relevant_domain.h @@ -21,7 +21,7 @@ #include "theory/quantifiers/first_order_model.h" #include "theory/quantifiers/quant_util.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -166,6 +166,6 @@ class RelevantDomain : public QuantifiersUtil } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__RELEVANT_DOMAIN_H */ diff --git a/src/theory/quantifiers/single_inv_partition.cpp b/src/theory/quantifiers/single_inv_partition.cpp index 8463321dc..b3ced31cd 100644 --- a/src/theory/quantifiers/single_inv_partition.cpp +++ b/src/theory/quantifiers/single_inv_partition.cpp @@ -20,11 +20,11 @@ #include "expr/skolem_manager.h" #include "theory/quantifiers/term_util.h" -using namespace cvc5; -using namespace cvc5::kind; +using namespace cvc5::internal; +using namespace cvc5::internal::kind; using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -636,4 +636,4 @@ Node SingleInvocationPartition::getQuantSimplify(TNode n) const } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/single_inv_partition.h b/src/theory/quantifiers/single_inv_partition.h index 144db9346..ac9250898 100644 --- a/src/theory/quantifiers/single_inv_partition.h +++ b/src/theory/quantifiers/single_inv_partition.h @@ -26,7 +26,7 @@ #include "expr/type_node.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -297,6 +297,6 @@ class SingleInvocationPartition : protected EnvObj } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__SINGLE_INV_PARTITION_H */ diff --git a/src/theory/quantifiers/skolemize.cpp b/src/theory/quantifiers/skolemize.cpp index 6d37fd75a..5b05fdc29 100644 --- a/src/theory/quantifiers/skolemize.cpp +++ b/src/theory/quantifiers/skolemize.cpp @@ -30,9 +30,9 @@ #include "theory/sort_inference.h" #include "util/rational.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -403,4 +403,4 @@ bool Skolemize::isProofEnabled() const } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/skolemize.h b/src/theory/quantifiers/skolemize.h index f1fb78e8d..e41b949b7 100644 --- a/src/theory/quantifiers/skolemize.h +++ b/src/theory/quantifiers/skolemize.h @@ -28,7 +28,7 @@ #include "proof/trust_node.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { class DTypeConstructor; @@ -155,6 +155,6 @@ class Skolemize : protected EnvObj } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__SKOLEMIZE_H */ diff --git a/src/theory/quantifiers/solution_filter.cpp b/src/theory/quantifiers/solution_filter.cpp index f2489f143..8f78ab6dd 100644 --- a/src/theory/quantifiers/solution_filter.cpp +++ b/src/theory/quantifiers/solution_filter.cpp @@ -23,9 +23,9 @@ #include "smt/logic_exception.h" #include "util/random.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -112,4 +112,4 @@ bool SolutionFilterStrength::addTerm(Node n, std::ostream& out) } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/solution_filter.h b/src/theory/quantifiers/solution_filter.h index 7257ec4ee..50fc953bc 100644 --- a/src/theory/quantifiers/solution_filter.h +++ b/src/theory/quantifiers/solution_filter.h @@ -25,7 +25,7 @@ #include "theory/quantifiers/lazy_trie.h" #include "theory/quantifiers/sygus_sampler.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -71,6 +71,6 @@ class SolutionFilterStrength : public ExprMiner } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__SOLUTION_FILTER_H */ diff --git a/src/theory/quantifiers/sygus/ce_guided_single_inv.cpp b/src/theory/quantifiers/sygus/ce_guided_single_inv.cpp index 6ecdb5c6f..23b1939ce 100644 --- a/src/theory/quantifiers/sygus/ce_guided_single_inv.cpp +++ b/src/theory/quantifiers/sygus/ce_guided_single_inv.cpp @@ -30,9 +30,9 @@ #include "theory/quantifiers/term_util.h" #include "theory/smt_engine_subsolver.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -565,4 +565,4 @@ bool CegSingleInv::solveTrivial(Node q) } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/sygus/ce_guided_single_inv.h b/src/theory/quantifiers/sygus/ce_guided_single_inv.h index a0fac61d3..37344f62e 100644 --- a/src/theory/quantifiers/sygus/ce_guided_single_inv.h +++ b/src/theory/quantifiers/sygus/ce_guided_single_inv.h @@ -26,7 +26,7 @@ #include "theory/quantifiers/single_inv_partition.h" #include "theory/quantifiers/sygus/sygus_stats.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -177,6 +177,6 @@ class CegSingleInv : protected EnvObj } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/quantifiers/sygus/cegis.cpp b/src/theory/quantifiers/sygus/cegis.cpp index 36330f6f7..ac41dbbff 100644 --- a/src/theory/quantifiers/sygus/cegis.cpp +++ b/src/theory/quantifiers/sygus/cegis.cpp @@ -25,10 +25,10 @@ #include "theory/rewriter.h" using namespace std; -using namespace cvc5::kind; -using namespace cvc5::context; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::context; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -712,4 +712,4 @@ bool Cegis::sampleAddRefinementLemma(const std::vector& candidates, } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/sygus/cegis.h b/src/theory/quantifiers/sygus/cegis.h index 8d1f0a1b2..2f27e6713 100644 --- a/src/theory/quantifiers/sygus/cegis.h +++ b/src/theory/quantifiers/sygus/cegis.h @@ -24,7 +24,7 @@ #include "theory/quantifiers/sygus/sygus_module.h" #include "theory/quantifiers/sygus_sampler.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -238,6 +238,6 @@ class Cegis : public SygusModule } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__CEGIS_H */ diff --git a/src/theory/quantifiers/sygus/cegis_core_connective.cpp b/src/theory/quantifiers/sygus/cegis_core_connective.cpp index 7e58a1e14..1ecec7b38 100644 --- a/src/theory/quantifiers/sygus/cegis_core_connective.cpp +++ b/src/theory/quantifiers/sygus/cegis_core_connective.cpp @@ -27,9 +27,9 @@ #include "theory/smt_engine_subsolver.h" #include "util/random.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -797,4 +797,4 @@ Node CegisCoreConnective::constructSolutionFromPool(Component& ccheck, } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/sygus/cegis_core_connective.h b/src/theory/quantifiers/sygus/cegis_core_connective.h index 26784f939..59cc62b11 100644 --- a/src/theory/quantifiers/sygus/cegis_core_connective.h +++ b/src/theory/quantifiers/sygus/cegis_core_connective.h @@ -27,7 +27,7 @@ #include "theory/quantifiers/sygus/cegis.h" #include "util/result.h" -namespace cvc5 { +namespace cvc5::internal { class SolverEngine; @@ -354,6 +354,6 @@ class CegisCoreConnective : public Cegis } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__SYGUS_REPAIR_CONST_H */ diff --git a/src/theory/quantifiers/sygus/cegis_unif.cpp b/src/theory/quantifiers/sygus/cegis_unif.cpp index c97e28e5b..d8a8e3e53 100644 --- a/src/theory/quantifiers/sygus/cegis_unif.cpp +++ b/src/theory/quantifiers/sygus/cegis_unif.cpp @@ -25,9 +25,9 @@ #include "theory/quantifiers/sygus/term_database_sygus.h" #include "util/rational.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -696,4 +696,4 @@ void CegisUnifEnumDecisionStrategy::registerEvalPtAtSize(Node e, } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/sygus/cegis_unif.h b/src/theory/quantifiers/sygus/cegis_unif.h index da47aabbe..2712eef3d 100644 --- a/src/theory/quantifiers/sygus/cegis_unif.h +++ b/src/theory/quantifiers/sygus/cegis_unif.h @@ -25,7 +25,7 @@ #include "theory/quantifiers/sygus/cegis.h" #include "theory/quantifiers/sygus/sygus_unif_rl.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -332,6 +332,6 @@ class CegisUnif : public Cegis } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/quantifiers/sygus/enum_stream_substitution.cpp b/src/theory/quantifiers/sygus/enum_stream_substitution.cpp index 6899bc580..2364db4a4 100644 --- a/src/theory/quantifiers/sygus/enum_stream_substitution.cpp +++ b/src/theory/quantifiers/sygus/enum_stream_substitution.cpp @@ -27,9 +27,9 @@ #include "theory/quantifiers/sygus/term_database_sygus.h" #include "theory/rewriter.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -625,4 +625,4 @@ bool EnumStreamConcrete::increment() Node EnumStreamConcrete::getCurrent() { return d_currTerm; } } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/sygus/enum_stream_substitution.h b/src/theory/quantifiers/sygus/enum_stream_substitution.h index d9161b56f..f954d92f6 100644 --- a/src/theory/quantifiers/sygus/enum_stream_substitution.h +++ b/src/theory/quantifiers/sygus/enum_stream_substitution.h @@ -22,7 +22,7 @@ #include "smt/env_obj.h" #include "theory/quantifiers/sygus/enum_val_generator.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -303,6 +303,6 @@ class EnumStreamConcrete : public EnumValGenerator } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/quantifiers/sygus/enum_val_generator.h b/src/theory/quantifiers/sygus/enum_val_generator.h index ace7cc552..0d7c50e82 100644 --- a/src/theory/quantifiers/sygus/enum_val_generator.h +++ b/src/theory/quantifiers/sygus/enum_val_generator.h @@ -21,7 +21,7 @@ #include "expr/node.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -59,6 +59,6 @@ class EnumValGenerator : protected EnvObj } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/quantifiers/sygus/enum_value_manager.cpp b/src/theory/quantifiers/sygus/enum_value_manager.cpp index 2b2fa0685..0a81ef259 100644 --- a/src/theory/quantifiers/sygus/enum_value_manager.cpp +++ b/src/theory/quantifiers/sygus/enum_value_manager.cpp @@ -26,10 +26,10 @@ #include "theory/quantifiers/sygus/term_database_sygus.h" #include "theory/quantifiers/term_registry.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -265,4 +265,4 @@ Node EnumValueManager::getModelValue(Node n) } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/sygus/enum_value_manager.h b/src/theory/quantifiers/sygus/enum_value_manager.h index 23fdc7391..1c1871a49 100644 --- a/src/theory/quantifiers/sygus/enum_value_manager.h +++ b/src/theory/quantifiers/sygus/enum_value_manager.h @@ -25,7 +25,7 @@ #include "theory/quantifiers/sygus/sygus_enumerator_callback.h" #include "theory/quantifiers/sygus_sampler.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -122,6 +122,6 @@ class EnumValueManager : protected EnvObj } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/quantifiers/sygus/example_eval_cache.cpp b/src/theory/quantifiers/sygus/example_eval_cache.cpp index 67fbf65bf..4582132b1 100644 --- a/src/theory/quantifiers/sygus/example_eval_cache.cpp +++ b/src/theory/quantifiers/sygus/example_eval_cache.cpp @@ -16,10 +16,10 @@ #include "theory/quantifiers/sygus/example_min_eval.h" -using namespace cvc5; -using namespace cvc5::kind; +using namespace cvc5::internal; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -113,4 +113,4 @@ void ExampleEvalCache::clearEvaluationAll() { d_exOutCache.clear(); } } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/sygus/example_eval_cache.h b/src/theory/quantifiers/sygus/example_eval_cache.h index fe544d11d..2a27ec019 100644 --- a/src/theory/quantifiers/sygus/example_eval_cache.h +++ b/src/theory/quantifiers/sygus/example_eval_cache.h @@ -21,7 +21,7 @@ #include "expr/node_trie.h" #include "theory/quantifiers/sygus/example_infer.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -165,6 +165,6 @@ class ExampleEvalCache } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/quantifiers/sygus/example_infer.cpp b/src/theory/quantifiers/sygus/example_infer.cpp index e8eae6c78..c4375a2f0 100644 --- a/src/theory/quantifiers/sygus/example_infer.cpp +++ b/src/theory/quantifiers/sygus/example_infer.cpp @@ -17,10 +17,10 @@ #include "theory/quantifiers/quant_util.h" -using namespace cvc5; -using namespace cvc5::kind; +using namespace cvc5::internal; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -273,4 +273,4 @@ bool ExampleInfer::hasExamplesOut(Node f) const } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/sygus/example_infer.h b/src/theory/quantifiers/sygus/example_infer.h index d34e32b0e..1e4761d9e 100644 --- a/src/theory/quantifiers/sygus/example_infer.h +++ b/src/theory/quantifiers/sygus/example_infer.h @@ -22,7 +22,7 @@ #include "theory/quantifiers/sygus/sygus_unif_io.h" #include "theory/quantifiers/sygus/term_database_sygus.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -157,6 +157,6 @@ class ExampleInfer } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/quantifiers/sygus/example_min_eval.cpp b/src/theory/quantifiers/sygus/example_min_eval.cpp index 8d303b90c..70b7f558f 100644 --- a/src/theory/quantifiers/sygus/example_min_eval.cpp +++ b/src/theory/quantifiers/sygus/example_min_eval.cpp @@ -19,7 +19,7 @@ #include "expr/node_algorithm.h" #include "theory/quantifiers/sygus/term_database_sygus.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -85,4 +85,4 @@ Node EmeEvalTds::eval(TNode n, } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/sygus/example_min_eval.h b/src/theory/quantifiers/sygus/example_min_eval.h index 6ed6f151f..6c86dafcf 100644 --- a/src/theory/quantifiers/sygus/example_min_eval.h +++ b/src/theory/quantifiers/sygus/example_min_eval.h @@ -24,7 +24,7 @@ #include "expr/node.h" #include "expr/node_trie.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -119,6 +119,6 @@ class EmeEvalTds : public EmeEval } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/quantifiers/sygus/rcons_obligation.cpp b/src/theory/quantifiers/sygus/rcons_obligation.cpp index 7a324ef9e..7e315e0a6 100644 --- a/src/theory/quantifiers/sygus/rcons_obligation.cpp +++ b/src/theory/quantifiers/sygus/rcons_obligation.cpp @@ -21,7 +21,7 @@ #include "expr/skolem_manager.h" #include "theory/datatypes/sygus_datatype_utils.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -123,4 +123,4 @@ std::ostream& operator<<(std::ostream& out, const RConsObligation& ob) } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/sygus/rcons_obligation.h b/src/theory/quantifiers/sygus/rcons_obligation.h index fe747ff8d..0a6d6ea4d 100644 --- a/src/theory/quantifiers/sygus/rcons_obligation.h +++ b/src/theory/quantifiers/sygus/rcons_obligation.h @@ -20,7 +20,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -163,6 +163,6 @@ std::ostream& operator<<(std::ostream& out, const RConsObligation& ob); } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif // CVC5__THEORY__QUANTIFIERS__RCONS_OBLIGATION_H diff --git a/src/theory/quantifiers/sygus/rcons_type_info.cpp b/src/theory/quantifiers/sygus/rcons_type_info.cpp index 20232552a..2dee5dcb2 100644 --- a/src/theory/quantifiers/sygus/rcons_type_info.cpp +++ b/src/theory/quantifiers/sygus/rcons_type_info.cpp @@ -21,7 +21,7 @@ #include "theory/quantifiers/sygus/rcons_obligation.h" #include "theory/quantifiers/sygus_sampler.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -85,4 +85,4 @@ RConsObligation* RConsTypeInfo::builtinToOb(Node t) } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/sygus/rcons_type_info.h b/src/theory/quantifiers/sygus/rcons_type_info.h index 5f68993ad..45519e292 100644 --- a/src/theory/quantifiers/sygus/rcons_type_info.h +++ b/src/theory/quantifiers/sygus/rcons_type_info.h @@ -21,7 +21,7 @@ #include "theory/quantifiers/candidate_rewrite_database.h" #include "theory/quantifiers/sygus/sygus_enumerator.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -105,6 +105,6 @@ class RConsTypeInfo } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif // CVC5__THEORY__QUANTIFIERS__RCONS_TYPE_INFO_H diff --git a/src/theory/quantifiers/sygus/sygus_abduct.cpp b/src/theory/quantifiers/sygus/sygus_abduct.cpp index 3da55ff50..07b849cd4 100644 --- a/src/theory/quantifiers/sygus/sygus_abduct.cpp +++ b/src/theory/quantifiers/sygus/sygus_abduct.cpp @@ -30,9 +30,9 @@ #include "theory/quantifiers/term_util.h" using namespace std; -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -190,4 +190,4 @@ Node SygusAbduct::mkAbductionConjecture(const std::string& name, } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/sygus/sygus_abduct.h b/src/theory/quantifiers/sygus/sygus_abduct.h index a1f681c10..f0b60cebc 100644 --- a/src/theory/quantifiers/sygus/sygus_abduct.h +++ b/src/theory/quantifiers/sygus/sygus_abduct.h @@ -22,7 +22,7 @@ #include "expr/node.h" #include "expr/type_node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -86,6 +86,6 @@ class SygusAbduct } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__SYGUS_ABDUCT_H */ diff --git a/src/theory/quantifiers/sygus/sygus_enumerator.cpp b/src/theory/quantifiers/sygus/sygus_enumerator.cpp index 7a55d936c..b3611df18 100644 --- a/src/theory/quantifiers/sygus/sygus_enumerator.cpp +++ b/src/theory/quantifiers/sygus/sygus_enumerator.cpp @@ -27,9 +27,9 @@ #include "theory/rewriter.h" #include "util/rational.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -1222,4 +1222,4 @@ bool SygusEnumerator::TermEnumMasterFv::increment() } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/sygus/sygus_enumerator.h b/src/theory/quantifiers/sygus/sygus_enumerator.h index f00179307..40033aa46 100644 --- a/src/theory/quantifiers/sygus/sygus_enumerator.h +++ b/src/theory/quantifiers/sygus/sygus_enumerator.h @@ -27,7 +27,7 @@ #include "theory/quantifiers/sygus/sygus_enumerator_callback.h" #include "theory/quantifiers/sygus/term_database_sygus.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -521,6 +521,6 @@ class SygusEnumerator : public EnumValGenerator } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__SYGUS_ENUMERATOR_H */ diff --git a/src/theory/quantifiers/sygus/sygus_enumerator_callback.cpp b/src/theory/quantifiers/sygus/sygus_enumerator_callback.cpp index d16b6d33e..4c1c73161 100644 --- a/src/theory/quantifiers/sygus/sygus_enumerator_callback.cpp +++ b/src/theory/quantifiers/sygus/sygus_enumerator_callback.cpp @@ -22,7 +22,7 @@ #include "theory/quantifiers/sygus_sampler.h" #include "theory/rewriter.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -117,4 +117,4 @@ bool SygusEnumeratorCallbackDefault::addTermInternal(Node n, Node bn, Node bnr) } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/sygus/sygus_enumerator_callback.h b/src/theory/quantifiers/sygus/sygus_enumerator_callback.h index a83e1b071..bc84ce580 100644 --- a/src/theory/quantifiers/sygus/sygus_enumerator_callback.h +++ b/src/theory/quantifiers/sygus/sygus_enumerator_callback.h @@ -24,7 +24,7 @@ #include "smt/env_obj.h" #include "theory/quantifiers/extended_rewrite.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -115,6 +115,6 @@ class SygusEnumeratorCallbackDefault : public SygusEnumeratorCallback } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__SYGUS__SYGUS_ENUMERATOR_CALLBACK_H */ diff --git a/src/theory/quantifiers/sygus/sygus_eval_unfold.cpp b/src/theory/quantifiers/sygus/sygus_eval_unfold.cpp index d6e7dd573..6a82c60e2 100644 --- a/src/theory/quantifiers/sygus/sygus_eval_unfold.cpp +++ b/src/theory/quantifiers/sygus/sygus_eval_unfold.cpp @@ -23,10 +23,10 @@ #include "theory/rewriter.h" using namespace std; -using namespace cvc5::kind; -using namespace cvc5::context; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::context; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -342,4 +342,4 @@ Node SygusEvalUnfold::unfold(Node en, } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/sygus/sygus_eval_unfold.h b/src/theory/quantifiers/sygus/sygus_eval_unfold.h index 869c8d1b7..d0edd6c4d 100644 --- a/src/theory/quantifiers/sygus/sygus_eval_unfold.h +++ b/src/theory/quantifiers/sygus/sygus_eval_unfold.h @@ -24,7 +24,7 @@ #include "smt/env_obj.h" #include "theory/quantifiers/sygus/sygus_invariance.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -153,6 +153,6 @@ class SygusEvalUnfold : protected EnvObj } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__SYGUS_EVAL_UNFOLD_H */ diff --git a/src/theory/quantifiers/sygus/sygus_explain.cpp b/src/theory/quantifiers/sygus/sygus_explain.cpp index dfbbc64b2..657ed6051 100644 --- a/src/theory/quantifiers/sygus/sygus_explain.cpp +++ b/src/theory/quantifiers/sygus/sygus_explain.cpp @@ -23,10 +23,10 @@ #include "theory/quantifiers/sygus/sygus_invariance.h" #include "theory/quantifiers/sygus/term_database_sygus.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -359,4 +359,4 @@ void SygusExplain::getExplanationFor(Node n, } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/sygus/sygus_explain.h b/src/theory/quantifiers/sygus/sygus_explain.h index 4e2473af4..45e7ee191 100644 --- a/src/theory/quantifiers/sygus/sygus_explain.h +++ b/src/theory/quantifiers/sygus/sygus_explain.h @@ -22,7 +22,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -242,6 +242,6 @@ class SygusExplain } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__SYGUS_EXPLAIN_H */ diff --git a/src/theory/quantifiers/sygus/sygus_grammar_cons.cpp b/src/theory/quantifiers/sygus/sygus_grammar_cons.cpp index dd1816d13..510f2b38f 100644 --- a/src/theory/quantifiers/sygus/sygus_grammar_cons.cpp +++ b/src/theory/quantifiers/sygus/sygus_grammar_cons.cpp @@ -37,9 +37,9 @@ #include "util/string.h" #include "printer/smt2/smt2_printer.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -1650,4 +1650,4 @@ bool CegGrammarConstructor::SygusDatatypeGenerator::shouldInclude(Node op) const } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/sygus/sygus_grammar_cons.h b/src/theory/quantifiers/sygus/sygus_grammar_cons.h index b8c782431..e6485eccc 100644 --- a/src/theory/quantifiers/sygus/sygus_grammar_cons.h +++ b/src/theory/quantifiers/sygus/sygus_grammar_cons.h @@ -27,7 +27,7 @@ #include "expr/sygus_datatype.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { /** @@ -262,6 +262,6 @@ public: } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/quantifiers/sygus/sygus_grammar_norm.cpp b/src/theory/quantifiers/sygus/sygus_grammar_norm.cpp index 082789bdf..02a01d73f 100644 --- a/src/theory/quantifiers/sygus/sygus_grammar_norm.cpp +++ b/src/theory/quantifiers/sygus/sygus_grammar_norm.cpp @@ -30,9 +30,9 @@ #include // for std::iota -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -539,4 +539,4 @@ TypeNode SygusGrammarNorm::normalizeSygusType(TypeNode tn, Node sygus_vars) } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/sygus/sygus_grammar_norm.h b/src/theory/quantifiers/sygus/sygus_grammar_norm.h index fd39323af..94c8b7de5 100644 --- a/src/theory/quantifiers/sygus/sygus_grammar_norm.h +++ b/src/theory/quantifiers/sygus/sygus_grammar_norm.h @@ -26,7 +26,7 @@ #include "expr/type_node.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -427,6 +427,6 @@ class SygusGrammarNorm : protected EnvObj } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/quantifiers/sygus/sygus_grammar_red.cpp b/src/theory/quantifiers/sygus/sygus_grammar_red.cpp index a8ff038de..479139a46 100644 --- a/src/theory/quantifiers/sygus/sygus_grammar_red.cpp +++ b/src/theory/quantifiers/sygus/sygus_grammar_red.cpp @@ -24,9 +24,9 @@ #include "theory/rewriter.h" using namespace std; -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -178,4 +178,4 @@ void SygusRedundantCons::getGenericList(TermDbSygus* tds, } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/sygus/sygus_grammar_red.h b/src/theory/quantifiers/sygus/sygus_grammar_red.h index 018bc8fe6..d49eb4fd6 100644 --- a/src/theory/quantifiers/sygus/sygus_grammar_red.h +++ b/src/theory/quantifiers/sygus/sygus_grammar_red.h @@ -24,7 +24,7 @@ #include "expr/node.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -120,6 +120,6 @@ class SygusRedundantCons : protected EnvObj } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__SYGUS_GRAMMAR_RED_H */ diff --git a/src/theory/quantifiers/sygus/sygus_interpol.cpp b/src/theory/quantifiers/sygus/sygus_interpol.cpp index 0d9aecf57..e1c21c6b7 100644 --- a/src/theory/quantifiers/sygus/sygus_interpol.cpp +++ b/src/theory/quantifiers/sygus/sygus_interpol.cpp @@ -28,7 +28,7 @@ #include "theory/quantifiers/sygus/sygus_grammar_cons.h" #include "theory/smt_engine_subsolver.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -373,4 +373,4 @@ bool SygusInterpol::solveInterpolationNext(Node& interpol) } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/sygus/sygus_interpol.h b/src/theory/quantifiers/sygus/sygus_interpol.h index 78c7da61d..3c627d332 100644 --- a/src/theory/quantifiers/sygus/sygus_interpol.h +++ b/src/theory/quantifiers/sygus/sygus_interpol.h @@ -24,7 +24,7 @@ #include "expr/type_node.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { class Env; class SolverEngine; @@ -238,6 +238,6 @@ class SygusInterpol : protected EnvObj } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__SYGUS_INTERPOL_H */ diff --git a/src/theory/quantifiers/sygus/sygus_invariance.cpp b/src/theory/quantifiers/sygus/sygus_invariance.cpp index 8ecec8933..030c5a244 100644 --- a/src/theory/quantifiers/sygus/sygus_invariance.cpp +++ b/src/theory/quantifiers/sygus/sygus_invariance.cpp @@ -20,10 +20,10 @@ #include "theory/quantifiers/sygus/term_database_sygus.h" #include "theory/rewriter.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -257,4 +257,4 @@ bool NegContainsSygusInvarianceTest::invariant(TermDbSygus* tds, } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/sygus/sygus_invariance.h b/src/theory/quantifiers/sygus/sygus_invariance.h index 16abc541d..3e9809478 100644 --- a/src/theory/quantifiers/sygus/sygus_invariance.h +++ b/src/theory/quantifiers/sygus/sygus_invariance.h @@ -23,7 +23,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { class Rewriter; @@ -308,6 +308,6 @@ class NegContainsSygusInvarianceTest : public SygusInvarianceTest } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__SYGUS_INVARIANCE_H */ diff --git a/src/theory/quantifiers/sygus/sygus_module.cpp b/src/theory/quantifiers/sygus/sygus_module.cpp index 1840f0eb1..5d40af9ad 100644 --- a/src/theory/quantifiers/sygus/sygus_module.cpp +++ b/src/theory/quantifiers/sygus/sygus_module.cpp @@ -17,7 +17,7 @@ #include "theory/quantifiers/quantifiers_state.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -32,4 +32,4 @@ SygusModule::SygusModule(Env& env, } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/sygus/sygus_module.h b/src/theory/quantifiers/sygus/sygus_module.h index 8ee1fc9b4..566a66010 100644 --- a/src/theory/quantifiers/sygus/sygus_module.h +++ b/src/theory/quantifiers/sygus/sygus_module.h @@ -23,7 +23,7 @@ #include "expr/node.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -163,6 +163,6 @@ class SygusModule : protected EnvObj } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__SYGUS_MODULE_H */ diff --git a/src/theory/quantifiers/sygus/sygus_pbe.cpp b/src/theory/quantifiers/sygus/sygus_pbe.cpp index a012bc960..914a1dcb2 100644 --- a/src/theory/quantifiers/sygus/sygus_pbe.cpp +++ b/src/theory/quantifiers/sygus/sygus_pbe.cpp @@ -23,10 +23,10 @@ #include "theory/quantifiers/term_util.h" #include "util/random.h" -using namespace cvc5; -using namespace cvc5::kind; +using namespace cvc5::internal; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -270,4 +270,4 @@ bool SygusPbe::constructCandidates(const std::vector& enums, } } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/sygus/sygus_pbe.h b/src/theory/quantifiers/sygus/sygus_pbe.h index e55479e18..e90d749ed 100644 --- a/src/theory/quantifiers/sygus/sygus_pbe.h +++ b/src/theory/quantifiers/sygus/sygus_pbe.h @@ -21,7 +21,7 @@ #include "smt/env_obj.h" #include "theory/quantifiers/sygus/sygus_module.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -170,6 +170,6 @@ class SygusPbe : public SygusModule } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/quantifiers/sygus/sygus_process_conj.cpp b/src/theory/quantifiers/sygus/sygus_process_conj.cpp index 86ae04199..ece844896 100644 --- a/src/theory/quantifiers/sygus/sygus_process_conj.cpp +++ b/src/theory/quantifiers/sygus/sygus_process_conj.cpp @@ -23,10 +23,10 @@ #include "theory/quantifiers/term_util.h" #include "theory/rewriter.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -794,4 +794,4 @@ void SynthConjectureProcess::getComponentVector(Kind k, } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/sygus/sygus_process_conj.h b/src/theory/quantifiers/sygus/sygus_process_conj.h index b0b87c65b..21984bd7c 100644 --- a/src/theory/quantifiers/sygus/sygus_process_conj.h +++ b/src/theory/quantifiers/sygus/sygus_process_conj.h @@ -27,7 +27,7 @@ #include "expr/type_node.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -351,6 +351,6 @@ class SynthConjectureProcess : protected EnvObj } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/quantifiers/sygus/sygus_qe_preproc.cpp b/src/theory/quantifiers/sygus/sygus_qe_preproc.cpp index 590703879..d0e645a32 100644 --- a/src/theory/quantifiers/sygus/sygus_qe_preproc.cpp +++ b/src/theory/quantifiers/sygus/sygus_qe_preproc.cpp @@ -20,9 +20,9 @@ #include "theory/quantifiers/single_inv_partition.h" #include "theory/smt_engine_subsolver.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -146,4 +146,4 @@ Node SygusQePreproc::preprocess(Node q) } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/sygus/sygus_qe_preproc.h b/src/theory/quantifiers/sygus/sygus_qe_preproc.h index 52a4ad70b..b5537a8cb 100644 --- a/src/theory/quantifiers/sygus/sygus_qe_preproc.h +++ b/src/theory/quantifiers/sygus/sygus_qe_preproc.h @@ -19,7 +19,7 @@ #include "expr/node.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { class Env; @@ -50,6 +50,6 @@ class SygusQePreproc : protected EnvObj } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__SYGUS__SYGUS_QE_PREPROC_H */ diff --git a/src/theory/quantifiers/sygus/sygus_random_enumerator.cpp b/src/theory/quantifiers/sygus/sygus_random_enumerator.cpp index 5bfde84c0..4ae36db69 100644 --- a/src/theory/quantifiers/sygus/sygus_random_enumerator.cpp +++ b/src/theory/quantifiers/sygus/sygus_random_enumerator.cpp @@ -23,7 +23,7 @@ #include "theory/rewriter.h" #include "util/random.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -196,4 +196,4 @@ Node SygusRandomEnumerator::getMin(Node n) } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/sygus/sygus_random_enumerator.h b/src/theory/quantifiers/sygus/sygus_random_enumerator.h index 79fc0a090..693168b2a 100644 --- a/src/theory/quantifiers/sygus/sygus_random_enumerator.h +++ b/src/theory/quantifiers/sygus/sygus_random_enumerator.h @@ -24,7 +24,7 @@ #include "expr/type_node.h" #include "theory/quantifiers/sygus/enum_val_generator.h" -namespace cvc5 { +namespace cvc5::internal { class DTypeConstructor; @@ -127,6 +127,6 @@ class SygusRandomEnumerator : public EnumValGenerator } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif // CVC5__THEORY__QUANTIFIERS__SYGUS_RANDOM_ENUMERATOR_H diff --git a/src/theory/quantifiers/sygus/sygus_reconstruct.cpp b/src/theory/quantifiers/sygus/sygus_reconstruct.cpp index e5f3f398e..3afa86954 100644 --- a/src/theory/quantifiers/sygus/sygus_reconstruct.cpp +++ b/src/theory/quantifiers/sygus/sygus_reconstruct.cpp @@ -22,9 +22,9 @@ #include "theory/datatypes/sygus_datatype_utils.h" #include "theory/rewriter.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -59,7 +59,7 @@ Node SygusReconstruct::reconstructSolution(Node sol, Node k0 = ob0->getSkolem(); if (options().quantifiers.cegqiSingleInvReconstruct - == cvc5::options::CegqiSingleInvRconsMode::TRY) + == cvc5::internal::options::CegqiSingleInvRconsMode::TRY) { fast(sol, stn, reconstructed); } @@ -98,7 +98,7 @@ void SygusReconstruct::main(Node sol, uint64_t enumLimit) { bool noLimit = options().quantifiers.cegqiSingleInvReconstruct - == cvc5::options::CegqiSingleInvRconsMode::ALL; + == cvc5::internal::options::CegqiSingleInvRconsMode::ALL; // Skolem of the main obligation Node k0 = d_obs[0]->getSkolem(); @@ -225,7 +225,7 @@ void SygusReconstruct::fast(Node sol, TypeNode stn, int8_t& reconstructed) sti.initialize(d_tds, stn); std::vector stns; sti.getSubfieldTypes(stns); - std::map varCount; + std::map varCount; // add the constructors for each sygus datatype to the pool for (const TypeNode& cstn : stns) @@ -259,7 +259,7 @@ void SygusReconstruct::fast(Node sol, TypeNode stn, int8_t& reconstructed) args.push_back(cons->getConstructor()); // populate each constructor argument with a free variable of the // corresponding type - for (const std::shared_ptr& arg : cons->getArgs()) + for (const std::shared_ptr& arg : cons->getArgs()) { args.push_back(d_tds->getFreeVarInc(arg->getRangeType(), varCount)); } @@ -610,4 +610,4 @@ void SygusReconstruct::printPool() const } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/sygus/sygus_reconstruct.h b/src/theory/quantifiers/sygus/sygus_reconstruct.h index cda856259..ad2f0af02 100644 --- a/src/theory/quantifiers/sygus/sygus_reconstruct.h +++ b/src/theory/quantifiers/sygus/sygus_reconstruct.h @@ -26,7 +26,7 @@ #include "theory/quantifiers/sygus/rcons_obligation.h" #include "theory/quantifiers/sygus/rcons_type_info.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -349,6 +349,6 @@ class SygusReconstruct : public expr::NotifyMatch, protected EnvObj } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif // CVC5__THEORY__QUANTIFIERS__SYGUS_RECONSTRUCT_H diff --git a/src/theory/quantifiers/sygus/sygus_repair_const.cpp b/src/theory/quantifiers/sygus/sygus_repair_const.cpp index 284d3aaf8..2f2ec9043 100644 --- a/src/theory/quantifiers/sygus/sygus_repair_const.cpp +++ b/src/theory/quantifiers/sygus/sygus_repair_const.cpp @@ -28,9 +28,9 @@ #include "theory/quantifiers/sygus/term_database_sygus.h" #include "theory/smt_engine_subsolver.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -620,4 +620,4 @@ bool SygusRepairConst::getFitToLogicExcludeVar(const LogicInfo& logic, } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/sygus/sygus_repair_const.h b/src/theory/quantifiers/sygus/sygus_repair_const.h index 7797f7fa9..90a67f5b5 100644 --- a/src/theory/quantifiers/sygus/sygus_repair_const.h +++ b/src/theory/quantifiers/sygus/sygus_repair_const.h @@ -23,7 +23,7 @@ #include "expr/node.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { class Env; class LogicInfo; @@ -213,6 +213,6 @@ class SygusRepairConst : protected EnvObj } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__SYGUS_REPAIR_CONST_H */ diff --git a/src/theory/quantifiers/sygus/sygus_stats.cpp b/src/theory/quantifiers/sygus/sygus_stats.cpp index a1ae3d811..7fdd468c0 100644 --- a/src/theory/quantifiers/sygus/sygus_stats.cpp +++ b/src/theory/quantifiers/sygus/sygus_stats.cpp @@ -17,7 +17,7 @@ #include "smt/smt_statistics_registry.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -40,4 +40,4 @@ SygusStatistics::SygusStatistics() } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/sygus/sygus_stats.h b/src/theory/quantifiers/sygus/sygus_stats.h index d5166d4da..ad8c3fb31 100644 --- a/src/theory/quantifiers/sygus/sygus_stats.h +++ b/src/theory/quantifiers/sygus/sygus_stats.h @@ -20,7 +20,7 @@ #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -47,6 +47,6 @@ class SygusStatistics } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/quantifiers/sygus/sygus_unif.cpp b/src/theory/quantifiers/sygus/sygus_unif.cpp index 2db9695fe..ba383c1b3 100644 --- a/src/theory/quantifiers/sygus/sygus_unif.cpp +++ b/src/theory/quantifiers/sygus/sygus_unif.cpp @@ -21,9 +21,9 @@ #include "util/random.h" using namespace std; -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -143,4 +143,4 @@ void SygusUnif::print_val(const char* c, std::vector& vals, bool pol) } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/sygus/sygus_unif.h b/src/theory/quantifiers/sygus/sygus_unif.h index 80368ea13..cd3868a1c 100644 --- a/src/theory/quantifiers/sygus/sygus_unif.h +++ b/src/theory/quantifiers/sygus/sygus_unif.h @@ -22,7 +22,7 @@ #include "expr/node.h" #include "theory/quantifiers/sygus/sygus_unif_strat.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -194,6 +194,6 @@ class SygusUnif : protected EnvObj } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__SYGUS_UNIF_H */ diff --git a/src/theory/quantifiers/sygus/sygus_unif_io.cpp b/src/theory/quantifiers/sygus/sygus_unif_io.cpp index 6e7cb627f..ee74230bc 100644 --- a/src/theory/quantifiers/sygus/sygus_unif_io.cpp +++ b/src/theory/quantifiers/sygus/sygus_unif_io.cpp @@ -27,9 +27,9 @@ #include -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -1679,4 +1679,4 @@ Node SygusUnifIo::constructBestConditional(Node ce, } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/sygus/sygus_unif_io.h b/src/theory/quantifiers/sygus/sygus_unif_io.h index 79db22ab3..f698146b6 100644 --- a/src/theory/quantifiers/sygus/sygus_unif_io.h +++ b/src/theory/quantifiers/sygus/sygus_unif_io.h @@ -21,7 +21,7 @@ #include #include "theory/quantifiers/sygus/sygus_unif.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -467,6 +467,6 @@ class SygusUnifIo : public SygusUnif } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__SYGUS_UNIF_IO_H */ diff --git a/src/theory/quantifiers/sygus/sygus_unif_rl.cpp b/src/theory/quantifiers/sygus/sygus_unif_rl.cpp index e56c5cecc..5539f41e6 100644 --- a/src/theory/quantifiers/sygus/sygus_unif_rl.cpp +++ b/src/theory/quantifiers/sygus/sygus_unif_rl.cpp @@ -26,9 +26,9 @@ #include -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -1212,4 +1212,4 @@ Node SygusUnifRl::DecisionTreeInfo::PointSeparator::computeCond(Node cond, } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/sygus/sygus_unif_rl.h b/src/theory/quantifiers/sygus/sygus_unif_rl.h index 11a562d79..3459c04ed 100644 --- a/src/theory/quantifiers/sygus/sygus_unif_rl.h +++ b/src/theory/quantifiers/sygus/sygus_unif_rl.h @@ -25,7 +25,7 @@ #include "theory/quantifiers/sygus/sygus_unif.h" #include "util/bool.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -445,6 +445,6 @@ class SygusUnifRl : public SygusUnif } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__SYGUS_UNIF_RL_H */ diff --git a/src/theory/quantifiers/sygus/sygus_unif_strat.cpp b/src/theory/quantifiers/sygus/sygus_unif_strat.cpp index 5c10fa26d..dbeb9db26 100644 --- a/src/theory/quantifiers/sygus/sygus_unif_strat.cpp +++ b/src/theory/quantifiers/sygus/sygus_unif_strat.cpp @@ -25,9 +25,9 @@ #include "theory/quantifiers/term_util.h" using namespace std; -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -1053,4 +1053,4 @@ void SygusUnifStrategy::indent(const char* c, int ind) } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/sygus/sygus_unif_strat.h b/src/theory/quantifiers/sygus/sygus_unif_strat.h index fadf68e3f..af74728c3 100644 --- a/src/theory/quantifiers/sygus/sygus_unif_strat.h +++ b/src/theory/quantifiers/sygus/sygus_unif_strat.h @@ -23,7 +23,7 @@ #include "expr/node.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -431,6 +431,6 @@ class SygusUnifStrategy : protected EnvObj } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__SYGUS_UNIF_H */ diff --git a/src/theory/quantifiers/sygus/sygus_utils.cpp b/src/theory/quantifiers/sygus/sygus_utils.cpp index bb0a1652f..b573844f7 100644 --- a/src/theory/quantifiers/sygus/sygus_utils.cpp +++ b/src/theory/quantifiers/sygus/sygus_utils.cpp @@ -22,9 +22,9 @@ #include "theory/quantifiers/quantifiers_attributes.h" #include "theory/quantifiers/sygus/sygus_grammar_cons.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -183,4 +183,4 @@ TypeNode SygusUtils::getSygusTypeForSynthFun(Node f) } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/sygus/sygus_utils.h b/src/theory/quantifiers/sygus/sygus_utils.h index acdd8550e..ee00c7016 100644 --- a/src/theory/quantifiers/sygus/sygus_utils.h +++ b/src/theory/quantifiers/sygus/sygus_utils.h @@ -23,7 +23,7 @@ #include "expr/node.h" #include "expr/subs.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -111,6 +111,6 @@ class SygusUtils } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__SYGUS__SYGUS_UTILS_H */ diff --git a/src/theory/quantifiers/sygus/synth_conjecture.cpp b/src/theory/quantifiers/sygus/synth_conjecture.cpp index 1979aba0b..42c4c176f 100644 --- a/src/theory/quantifiers/sygus/synth_conjecture.cpp +++ b/src/theory/quantifiers/sygus/synth_conjecture.cpp @@ -37,10 +37,10 @@ #include "theory/rewriter.h" #include "theory/smt_engine_subsolver.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -1101,4 +1101,4 @@ ExampleEvalCache* SynthConjecture::getExampleEvalCache(Node e) } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/sygus/synth_conjecture.h b/src/theory/quantifiers/sygus/synth_conjecture.h index 568fa6ea8..1178ef356 100644 --- a/src/theory/quantifiers/sygus/synth_conjecture.h +++ b/src/theory/quantifiers/sygus/synth_conjecture.h @@ -36,7 +36,7 @@ #include "theory/quantifiers/sygus/synth_verify.h" #include "theory/quantifiers/sygus/template_infer.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -359,6 +359,6 @@ class SynthConjecture : protected EnvObj } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/quantifiers/sygus/synth_engine.cpp b/src/theory/quantifiers/sygus/synth_engine.cpp index 33defbbce..5e5a66f27 100644 --- a/src/theory/quantifiers/sygus/synth_engine.cpp +++ b/src/theory/quantifiers/sygus/synth_engine.cpp @@ -20,9 +20,9 @@ #include "theory/quantifiers/sygus/term_database_sygus.h" #include "theory/quantifiers/term_registry.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -251,4 +251,4 @@ void SynthEngine::preregisterAssertion(Node n) } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/sygus/synth_engine.h b/src/theory/quantifiers/sygus/synth_engine.h index c623d9c0f..162e048b1 100644 --- a/src/theory/quantifiers/sygus/synth_engine.h +++ b/src/theory/quantifiers/sygus/synth_engine.h @@ -25,7 +25,7 @@ #include "theory/quantifiers/sygus/sygus_stats.h" #include "theory/quantifiers/sygus/synth_conjecture.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -115,6 +115,6 @@ class SynthEngine : public QuantifiersModule } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/quantifiers/sygus/synth_verify.cpp b/src/theory/quantifiers/sygus/synth_verify.cpp index 1308c7d64..e3aecb56b 100644 --- a/src/theory/quantifiers/sygus/synth_verify.cpp +++ b/src/theory/quantifiers/sygus/synth_verify.cpp @@ -26,10 +26,10 @@ #include "theory/rewriter.h" #include "theory/smt_engine_subsolver.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -146,4 +146,4 @@ Result SynthVerify::verify(Node query, } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/sygus/synth_verify.h b/src/theory/quantifiers/sygus/synth_verify.h index 87a653c05..58020397f 100644 --- a/src/theory/quantifiers/sygus/synth_verify.h +++ b/src/theory/quantifiers/sygus/synth_verify.h @@ -25,7 +25,7 @@ #include "theory/quantifiers/sygus/term_database_sygus.h" #include "util/result.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -62,6 +62,6 @@ class SynthVerify : protected EnvObj } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/quantifiers/sygus/template_infer.cpp b/src/theory/quantifiers/sygus/template_infer.cpp index 043e8f5ed..3a2b024ba 100644 --- a/src/theory/quantifiers/sygus/template_infer.cpp +++ b/src/theory/quantifiers/sygus/template_infer.cpp @@ -20,9 +20,9 @@ #include "theory/quantifiers/sygus/sygus_utils.h" #include "theory/quantifiers/term_util.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -207,4 +207,4 @@ Node SygusTemplateInfer::getTemplateArg(Node prog) const } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/sygus/template_infer.h b/src/theory/quantifiers/sygus/template_infer.h index 64bd3662f..855df33c4 100644 --- a/src/theory/quantifiers/sygus/template_infer.h +++ b/src/theory/quantifiers/sygus/template_infer.h @@ -24,7 +24,7 @@ #include "smt/env_obj.h" #include "theory/quantifiers/sygus/transition_inference.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -73,6 +73,6 @@ class SygusTemplateInfer : protected EnvObj } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/quantifiers/sygus/term_database_sygus.cpp b/src/theory/quantifiers/sygus/term_database_sygus.cpp index 712cf6bc0..3bdc5d64c 100644 --- a/src/theory/quantifiers/sygus/term_database_sygus.cpp +++ b/src/theory/quantifiers/sygus/term_database_sygus.cpp @@ -32,9 +32,9 @@ #include "theory/quantifiers/term_util.h" #include "theory/rewriter.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -1037,4 +1037,4 @@ bool TermDbSygus::isEvaluationPoint(Node n) const } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/sygus/term_database_sygus.h b/src/theory/quantifiers/sygus/term_database_sygus.h index 59e0f4776..a04af7e0d 100644 --- a/src/theory/quantifiers/sygus/term_database_sygus.h +++ b/src/theory/quantifiers/sygus/term_database_sygus.h @@ -29,7 +29,7 @@ #include "theory/quantifiers/sygus/type_info.h" #include "theory/quantifiers/term_database.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -443,6 +443,6 @@ class TermDbSygus : protected EnvObj } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__TERM_DATABASE_H */ diff --git a/src/theory/quantifiers/sygus/transition_inference.cpp b/src/theory/quantifiers/sygus/transition_inference.cpp index 7d93955c7..7185d42fd 100644 --- a/src/theory/quantifiers/sygus/transition_inference.cpp +++ b/src/theory/quantifiers/sygus/transition_inference.cpp @@ -21,9 +21,9 @@ #include "theory/quantifiers/term_util.h" #include "theory/rewriter.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -589,4 +589,4 @@ Node TransitionInference::constructFormulaTrace(DetTrace& dt) const } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/sygus/transition_inference.h b/src/theory/quantifiers/sygus/transition_inference.h index 32d9e22e7..cd6355748 100644 --- a/src/theory/quantifiers/sygus/transition_inference.h +++ b/src/theory/quantifiers/sygus/transition_inference.h @@ -28,7 +28,7 @@ #include "theory/quantifiers/inst_match_trie.h" #include "theory/quantifiers/single_inv_partition.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -333,6 +333,6 @@ class TransitionInference : protected EnvObj } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/quantifiers/sygus/type_info.cpp b/src/theory/quantifiers/sygus/type_info.cpp index b4a852c26..2d2144143 100644 --- a/src/theory/quantifiers/sygus/type_info.cpp +++ b/src/theory/quantifiers/sygus/type_info.cpp @@ -23,9 +23,9 @@ #include "theory/quantifiers/sygus/term_database_sygus.h" #include "theory/quantifiers/sygus/type_node_id_trie.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -516,4 +516,4 @@ bool SygusTypeInfo::isSubclassVarTrivial() const } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/sygus/type_info.h b/src/theory/quantifiers/sygus/type_info.h index 3c0fbf30e..89fbe8500 100644 --- a/src/theory/quantifiers/sygus/type_info.h +++ b/src/theory/quantifiers/sygus/type_info.h @@ -22,7 +22,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -264,6 +264,6 @@ class SygusTypeInfo } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__SYGUS__TYPE_INFO_H */ diff --git a/src/theory/quantifiers/sygus/type_node_id_trie.cpp b/src/theory/quantifiers/sygus/type_node_id_trie.cpp index c48f142f8..318057753 100644 --- a/src/theory/quantifiers/sygus/type_node_id_trie.cpp +++ b/src/theory/quantifiers/sygus/type_node_id_trie.cpp @@ -15,9 +15,9 @@ #include "theory/quantifiers/sygus/type_node_id_trie.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -50,4 +50,4 @@ void TypeNodeIdTrie::assignIds(std::map& assign, } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/sygus/type_node_id_trie.h b/src/theory/quantifiers/sygus/type_node_id_trie.h index 01e7984c6..8145a3298 100644 --- a/src/theory/quantifiers/sygus/type_node_id_trie.h +++ b/src/theory/quantifiers/sygus/type_node_id_trie.h @@ -23,7 +23,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -49,6 +49,6 @@ class TypeNodeIdTrie } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__SYGUS__TYPE_NODE_ID_TRIE_H */ diff --git a/src/theory/quantifiers/sygus_inst.cpp b/src/theory/quantifiers/sygus_inst.cpp index 06467a24a..84a4ddb7b 100644 --- a/src/theory/quantifiers/sygus_inst.cpp +++ b/src/theory/quantifiers/sygus_inst.cpp @@ -30,7 +30,7 @@ #include "theory/quantifiers/term_util.h" #include "theory/rewriter.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -569,4 +569,4 @@ void SygusInst::addCeLemma(Node q) } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/sygus_inst.h b/src/theory/quantifiers/sygus_inst.h index 060ab7226..20b118f28 100644 --- a/src/theory/quantifiers/sygus_inst.h +++ b/src/theory/quantifiers/sygus_inst.h @@ -26,7 +26,7 @@ #include "theory/decision_strategy.h" #include "theory/quantifiers/quant_module.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { class QuantifiersEngine; @@ -145,6 +145,6 @@ class SygusInst : public QuantifiersModule } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/quantifiers/sygus_sampler.cpp b/src/theory/quantifiers/sygus_sampler.cpp index 208e750f1..0157e758f 100644 --- a/src/theory/quantifiers/sygus_sampler.cpp +++ b/src/theory/quantifiers/sygus_sampler.cpp @@ -32,9 +32,9 @@ #include "util/sampler.h" #include "util/string.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -838,4 +838,4 @@ void SygusSampler::checkEquivalent(Node bv, Node bvr, std::ostream& out) } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/sygus_sampler.h b/src/theory/quantifiers/sygus_sampler.h index 1fc2b8b66..f28c55006 100644 --- a/src/theory/quantifiers/sygus_sampler.h +++ b/src/theory/quantifiers/sygus_sampler.h @@ -24,7 +24,7 @@ #include "theory/quantifiers/lazy_trie.h" #include "theory/quantifiers/term_enumeration.h" -namespace cvc5 { +namespace cvc5::internal { class Env; @@ -328,6 +328,6 @@ class SygusSampler : protected EnvObj, public LazyTrieEvaluator } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__SYGUS_SAMPLER_H */ diff --git a/src/theory/quantifiers/term_database.cpp b/src/theory/quantifiers/term_database.cpp index 39729bc15..87d147e94 100644 --- a/src/theory/quantifiers/term_database.cpp +++ b/src/theory/quantifiers/term_database.cpp @@ -30,10 +30,10 @@ #include "theory/rewriter.h" #include "theory/uf/equality_engine.h" -using namespace cvc5::kind; -using namespace cvc5::context; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::context; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -705,4 +705,4 @@ TNode TermDb::getCongruentTerm( Node f, std::vector< TNode >& args ) { } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/term_database.h b/src/theory/quantifiers/term_database.h index 3830c6237..ad565de43 100644 --- a/src/theory/quantifiers/term_database.h +++ b/src/theory/quantifiers/term_database.h @@ -29,7 +29,7 @@ #include "theory/theory.h" #include "theory/type_enumerator.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -301,6 +301,6 @@ class TermDb : public QuantifiersUtil { } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__TERM_DATABASE_H */ diff --git a/src/theory/quantifiers/term_enumeration.cpp b/src/theory/quantifiers/term_enumeration.cpp index d6b0d8154..3885645c3 100644 --- a/src/theory/quantifiers/term_enumeration.cpp +++ b/src/theory/quantifiers/term_enumeration.cpp @@ -17,9 +17,9 @@ #include "theory/quantifiers/quant_bound_inference.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -75,4 +75,4 @@ bool TermEnumeration::getDomain(TypeNode tn, std::vector& dom) } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/term_enumeration.h b/src/theory/quantifiers/term_enumeration.h index f23640e07..a02dc09de 100644 --- a/src/theory/quantifiers/term_enumeration.h +++ b/src/theory/quantifiers/term_enumeration.h @@ -25,7 +25,7 @@ #include "expr/type_node.h" #include "theory/type_enumerator.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -71,6 +71,6 @@ class TermEnumeration } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__TERM_ENUMERATION_H */ diff --git a/src/theory/quantifiers/term_pools.cpp b/src/theory/quantifiers/term_pools.cpp index 7bac0252d..c5e99272d 100644 --- a/src/theory/quantifiers/term_pools.cpp +++ b/src/theory/quantifiers/term_pools.cpp @@ -17,7 +17,7 @@ #include "theory/quantifiers/quantifiers_state.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -160,4 +160,4 @@ void TermPools::processInternal(Node q, } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/term_pools.h b/src/theory/quantifiers/term_pools.h index 37b16a785..980238153 100644 --- a/src/theory/quantifiers/term_pools.h +++ b/src/theory/quantifiers/term_pools.h @@ -24,7 +24,7 @@ #include "expr/node.h" #include "theory/quantifiers/quant_util.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -103,6 +103,6 @@ class TermPools : public QuantifiersUtil } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__TERM_POOLS_H */ diff --git a/src/theory/quantifiers/term_registry.cpp b/src/theory/quantifiers/term_registry.cpp index 36fdc3970..88ff8577d 100644 --- a/src/theory/quantifiers/term_registry.cpp +++ b/src/theory/quantifiers/term_registry.cpp @@ -26,7 +26,7 @@ #include "theory/quantifiers/quantifiers_state.h" #include "theory/quantifiers/term_util.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -154,4 +154,4 @@ FirstOrderModel* TermRegistry::getModel() const { return d_qmodel; } } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/term_registry.h b/src/theory/quantifiers/term_registry.h index 60a87a91f..5520dee96 100644 --- a/src/theory/quantifiers/term_registry.h +++ b/src/theory/quantifiers/term_registry.h @@ -29,7 +29,7 @@ #include "theory/quantifiers/term_enumeration.h" #include "theory/quantifiers/term_pools.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -116,6 +116,6 @@ class TermRegistry : protected EnvObj } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__TERM_REGISTRY_H */ diff --git a/src/theory/quantifiers/term_tuple_enumerator.cpp b/src/theory/quantifiers/term_tuple_enumerator.cpp index 313ee2015..c255bb0de 100644 --- a/src/theory/quantifiers/term_tuple_enumerator.cpp +++ b/src/theory/quantifiers/term_tuple_enumerator.cpp @@ -33,7 +33,7 @@ #include "theory/quantifiers/term_util.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { template static Cvc5ostream& operator<<(Cvc5ostream& out, const std::vector& v) @@ -557,4 +557,4 @@ TermTupleEnumeratorInterface* mkTermTupleEnumeratorPool( } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/term_tuple_enumerator.h b/src/theory/quantifiers/term_tuple_enumerator.h index 3306ee430..4ab712359 100644 --- a/src/theory/quantifiers/term_tuple_enumerator.h +++ b/src/theory/quantifiers/term_tuple_enumerator.h @@ -20,7 +20,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -101,5 +101,5 @@ TermTupleEnumeratorInterface* mkTermTupleEnumeratorPool( } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* TERM_TUPLE_ENUMERATOR_H_7640 */ diff --git a/src/theory/quantifiers/term_util.cpp b/src/theory/quantifiers/term_util.cpp index 670b75c99..a4f897860 100644 --- a/src/theory/quantifiers/term_util.cpp +++ b/src/theory/quantifiers/term_util.cpp @@ -25,9 +25,9 @@ #include "util/bitvector.h" #include "util/rational.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -588,4 +588,4 @@ bool TermUtil::hasOffsetArg(Kind ik, int arg, int& offset, Kind& ok) } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/term_util.h b/src/theory/quantifiers/term_util.h index 277ce03fc..88f617e02 100644 --- a/src/theory/quantifiers/term_util.h +++ b/src/theory/quantifiers/term_util.h @@ -23,7 +23,7 @@ #include "expr/attribute.h" #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { // attribute for "contains instantiation constants from" @@ -205,6 +205,6 @@ public: } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__TERM_UTIL_H */ diff --git a/src/theory/quantifiers/theory_quantifiers.cpp b/src/theory/quantifiers/theory_quantifiers.cpp index f134e5c42..900adb6b1 100644 --- a/src/theory/quantifiers/theory_quantifiers.cpp +++ b/src/theory/quantifiers/theory_quantifiers.cpp @@ -23,10 +23,10 @@ #include "theory/trust_substitutions.h" #include "theory/valuation.h" -using namespace cvc5::kind; -using namespace cvc5::context; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::context; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -185,4 +185,4 @@ bool TheoryQuantifiers::preNotifyFact( } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/theory_quantifiers.h b/src/theory/quantifiers/theory_quantifiers.h index eab31d6d5..1fbc9a44e 100644 --- a/src/theory/quantifiers/theory_quantifiers.h +++ b/src/theory/quantifiers/theory_quantifiers.h @@ -29,7 +29,7 @@ #include "theory/theory.h" #include "theory/valuation.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -98,6 +98,6 @@ class TheoryQuantifiers : public Theory { } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__THEORY_QUANTIFIERS_H */ diff --git a/src/theory/quantifiers/theory_quantifiers_type_rules.cpp b/src/theory/quantifiers/theory_quantifiers_type_rules.cpp index be8677465..3c0280db8 100644 --- a/src/theory/quantifiers/theory_quantifiers_type_rules.cpp +++ b/src/theory/quantifiers/theory_quantifiers_type_rules.cpp @@ -15,7 +15,7 @@ #include "theory/quantifiers/theory_quantifiers_type_rules.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -146,4 +146,4 @@ TypeNode QuantifierInstPatternListTypeRule::computeType( } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers/theory_quantifiers_type_rules.h b/src/theory/quantifiers/theory_quantifiers_type_rules.h index a957159e4..05e09d3c2 100644 --- a/src/theory/quantifiers/theory_quantifiers_type_rules.h +++ b/src/theory/quantifiers/theory_quantifiers_type_rules.h @@ -21,7 +21,7 @@ #include "expr/node.h" #include "expr/type_node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace quantifiers { @@ -84,6 +84,6 @@ struct QuantifierInstPatternListTypeRule } // namespace quantifiers } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS__THEORY_QUANTIFIERS_TYPE_RULES_H */ diff --git a/src/theory/quantifiers_engine.cpp b/src/theory/quantifiers_engine.cpp index 33935511c..4b7254e6a 100644 --- a/src/theory/quantifiers_engine.cpp +++ b/src/theory/quantifiers_engine.cpp @@ -39,9 +39,9 @@ #include "theory/theory_engine.h" using namespace std; -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { QuantifiersEngine::QuantifiersEngine( @@ -703,4 +703,4 @@ void QuantifiersEngine::declarePool(Node p, const std::vector& initValue) } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/quantifiers_engine.h b/src/theory/quantifiers_engine.h index 9ecc3c7ee..bac943b15 100644 --- a/src/theory/quantifiers_engine.h +++ b/src/theory/quantifiers_engine.h @@ -27,7 +27,7 @@ #include "smt/env_obj.h" #include "theory/quantifiers/quant_util.h" -namespace cvc5 { +namespace cvc5::internal { class TheoryEngine; @@ -57,7 +57,7 @@ class TermRegistry; */ class QuantifiersEngine : protected EnvObj { - friend class ::cvc5::TheoryEngine; + friend class ::cvc5::internal::TheoryEngine; typedef context::CDHashMap BoolMap; typedef context::CDHashSet NodeSet; @@ -207,6 +207,6 @@ class QuantifiersEngine : protected EnvObj }; /* class QuantifiersEngine */ } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__QUANTIFIERS_ENGINE_H */ diff --git a/src/theory/relevance_manager.cpp b/src/theory/relevance_manager.cpp index f7ff74098..be2178950 100644 --- a/src/theory/relevance_manager.cpp +++ b/src/theory/relevance_manager.cpp @@ -23,9 +23,9 @@ #include "smt/env.h" #include "theory/relevance_manager.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { RelevanceManager::RelevanceManager(Env& env, Valuation val) @@ -554,4 +554,4 @@ void RelevanceManager::getDifficultyMap(std::map& dmap) } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/relevance_manager.h b/src/theory/relevance_manager.h index be4afe47f..55de15570 100644 --- a/src/theory/relevance_manager.h +++ b/src/theory/relevance_manager.h @@ -30,7 +30,7 @@ #include "theory/difficulty_manager.h" #include "theory/valuation.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { class TheoryModel; @@ -251,6 +251,6 @@ class RelevanceManager : protected EnvObj }; } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__RELEVANCE_MANAGER__H */ diff --git a/src/theory/rep_set.cpp b/src/theory/rep_set.cpp index 87d4bac3c..b0ef500bd 100644 --- a/src/theory/rep_set.cpp +++ b/src/theory/rep_set.cpp @@ -19,9 +19,9 @@ #include "theory/type_enumerator.h" using namespace std; -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { void RepSet::clear(){ @@ -466,4 +466,4 @@ void RepSetIterator::debugPrintSmall( const char* c ){ } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/rep_set.h b/src/theory/rep_set.h index 28cd6617c..5fa9bd70f 100644 --- a/src/theory/rep_set.h +++ b/src/theory/rep_set.h @@ -24,7 +24,7 @@ #include "expr/node.h" #include "expr/type_node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { class QuantifiersEngine; @@ -326,6 +326,6 @@ class RepBoundExt }; } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__REP_SET_H */ diff --git a/src/theory/rewriter.cpp b/src/theory/rewriter.cpp index b8d095321..fb25787a6 100644 --- a/src/theory/rewriter.cpp +++ b/src/theory/rewriter.cpp @@ -29,7 +29,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace theory { // Note that this function is a simplified version of Theory::theoryOf for @@ -489,4 +489,4 @@ bool Rewriter::hasRewrittenWithProofs(TNode n) const } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/rewriter.h b/src/theory/rewriter.h index 5e5597f56..fe78265b7 100644 --- a/src/theory/rewriter.h +++ b/src/theory/rewriter.h @@ -20,7 +20,7 @@ #include "expr/node.h" #include "theory/theory_rewriter.h" -namespace cvc5 { +namespace cvc5::internal { class Env; class TConvProofGenerator; @@ -35,7 +35,7 @@ class Evaluator; * The main rewriter class. */ class Rewriter { - friend class cvc5::Env; // to set the resource manager + friend class cvc5::internal::Env; // to set the resource manager public: Rewriter(); @@ -180,4 +180,4 @@ class Rewriter { };/* class Rewriter */ } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/rewriter_attributes.h b/src/theory/rewriter_attributes.h index eef6eac21..25e8b50c7 100644 --- a/src/theory/rewriter_attributes.h +++ b/src/theory/rewriter_attributes.h @@ -19,7 +19,7 @@ #include "expr/attribute.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { template @@ -98,4 +98,4 @@ struct RewriteAttibute { };/* struct RewriteAttribute */ } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/rewriter_tables_template.h b/src/theory/rewriter_tables_template.h index fd99b9625..5141e97d4 100644 --- a/src/theory/rewriter_tables_template.h +++ b/src/theory/rewriter_tables_template.h @@ -29,7 +29,7 @@ ${rewriter_includes} // clang-format on -namespace cvc5 { +namespace cvc5::internal { namespace theory { Node Rewriter::getPreRewriteCache(theory::TheoryId theoryId, TNode node) @@ -84,7 +84,7 @@ Rewriter::Rewriter() : d_resourceManager(nullptr), d_tpg(nullptr) {} void Rewriter::clearCachesInternal() { - typedef cvc5::expr::attr::AttributeUniqueId AttributeUniqueId; + typedef cvc5::internal::expr::attr::AttributeUniqueId AttributeUniqueId; std::vector preids; // clang-format off ${pre_rewrite_attribute_ids} // clang-format on @@ -108,4 +108,4 @@ void Rewriter::clearCachesInternal() } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/sep/kinds b/src/theory/sep/kinds index 598bec636..b48ee0710 100644 --- a/src/theory/sep/kinds +++ b/src/theory/sep/kinds @@ -4,13 +4,13 @@ # src/theory/builtin/kinds. # -theory THEORY_SEP ::cvc5::theory::sep::TheorySep "theory/sep/theory_sep.h" +theory THEORY_SEP ::cvc5::internal::theory::sep::TheorySep "theory/sep/theory_sep.h" typechecker "theory/sep/theory_sep_type_rules.h" properties polite stable-infinite parametric properties check presolve -rewriter ::cvc5::theory::sep::TheorySepRewriter "theory/sep/theory_sep_rewriter.h" +rewriter ::cvc5::internal::theory::sep::TheorySepRewriter "theory/sep/theory_sep_rewriter.h" nullaryoperator SEP_NIL "separation nil" @@ -20,11 +20,11 @@ operator SEP_STAR 2: "separation star" operator SEP_WAND 2 "separation magic wand" operator SEP_LABEL 2 "separation label (internal use only)" -typerule SEP_EMP ::cvc5::theory::sep::SepEmpTypeRule -typerule SEP_PTO ::cvc5::theory::sep::SepPtoTypeRule -typerule SEP_STAR ::cvc5::theory::sep::SepStarTypeRule -typerule SEP_WAND ::cvc5::theory::sep::SepWandTypeRule -typerule SEP_LABEL ::cvc5::theory::sep::SepLabelTypeRule -typerule SEP_NIL ::cvc5::theory::sep::SepNilTypeRule +typerule SEP_EMP ::cvc5::internal::theory::sep::SepEmpTypeRule +typerule SEP_PTO ::cvc5::internal::theory::sep::SepPtoTypeRule +typerule SEP_STAR ::cvc5::internal::theory::sep::SepStarTypeRule +typerule SEP_WAND ::cvc5::internal::theory::sep::SepWandTypeRule +typerule SEP_LABEL ::cvc5::internal::theory::sep::SepLabelTypeRule +typerule SEP_NIL ::cvc5::internal::theory::sep::SepNilTypeRule endtheory diff --git a/src/theory/sep/theory_sep.cpp b/src/theory/sep/theory_sep.cpp index 5764fdfa1..b26354467 100644 --- a/src/theory/sep/theory_sep.cpp +++ b/src/theory/sep/theory_sep.cpp @@ -36,9 +36,9 @@ #include "util/cardinality.h" using namespace std; -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace sep { @@ -1819,4 +1819,4 @@ Node TheorySep::HeapInfo::getValue( TypeNode tn ) { } // namespace sep } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/sep/theory_sep.h b/src/theory/sep/theory_sep.h index 7f1e8fef9..f3371dd6a 100644 --- a/src/theory/sep/theory_sep.h +++ b/src/theory/sep/theory_sep.h @@ -30,7 +30,7 @@ #include "theory/uf/equality_engine.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { class TheoryModel; @@ -358,6 +358,6 @@ class TheorySep : public Theory { } // namespace sep } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__SEP__THEORY_SEP_H */ diff --git a/src/theory/sep/theory_sep_rewriter.cpp b/src/theory/sep/theory_sep_rewriter.cpp index afd860288..d7d3287a4 100644 --- a/src/theory/sep/theory_sep_rewriter.cpp +++ b/src/theory/sep/theory_sep_rewriter.cpp @@ -22,7 +22,7 @@ #include "options/sep_options.h" #include "theory/quantifiers/quant_util.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace sep { @@ -168,4 +168,4 @@ RewriteResponse TheorySepRewriter::postRewrite(TNode node) { } // namespace sep } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/sep/theory_sep_rewriter.h b/src/theory/sep/theory_sep_rewriter.h index 6a8472555..2a19f6621 100644 --- a/src/theory/sep/theory_sep_rewriter.h +++ b/src/theory/sep/theory_sep_rewriter.h @@ -24,7 +24,7 @@ #include "theory/theory_rewriter.h" #include "theory/type_enumerator.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace sep { @@ -50,6 +50,6 @@ class TheorySepRewriter : public TheoryRewriter } // namespace sep } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__SEP__THEORY_SEP_REWRITER_H */ diff --git a/src/theory/sep/theory_sep_type_rules.cpp b/src/theory/sep/theory_sep_type_rules.cpp index 28dfa5c40..a00f7a99c 100644 --- a/src/theory/sep/theory_sep_type_rules.cpp +++ b/src/theory/sep/theory_sep_type_rules.cpp @@ -15,7 +15,7 @@ #include "theory/sep/theory_sep_type_rules.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace sep { @@ -117,4 +117,4 @@ TypeNode SepNilTypeRule::computeType(NodeManager* nodeManager, } // namespace sep } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/sep/theory_sep_type_rules.h b/src/theory/sep/theory_sep_type_rules.h index 961c2e582..6dabfc4c5 100644 --- a/src/theory/sep/theory_sep_type_rules.h +++ b/src/theory/sep/theory_sep_type_rules.h @@ -21,7 +21,7 @@ #include "expr/node.h" #include "expr/type_node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace sep { @@ -84,6 +84,6 @@ struct SepNilTypeRule } // namespace sep } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__SEP__THEORY_SEP_TYPE_RULES_H */ diff --git a/src/theory/sets/cardinality_extension.cpp b/src/theory/sets/cardinality_extension.cpp index b01895a74..d14338335 100644 --- a/src/theory/sets/cardinality_extension.cpp +++ b/src/theory/sets/cardinality_extension.cpp @@ -29,9 +29,9 @@ #include "util/rational.h" using namespace std; -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace sets { @@ -1160,4 +1160,4 @@ const std::vector& CardinalityExtension::getFiniteTypeMembers( } // namespace sets } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/sets/cardinality_extension.h b/src/theory/sets/cardinality_extension.h index ac8ebfb66..cbe2a2c05 100644 --- a/src/theory/sets/cardinality_extension.h +++ b/src/theory/sets/cardinality_extension.h @@ -27,7 +27,7 @@ #include "theory/type_set.h" #include "theory/uf/equality_engine.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace sets { @@ -418,6 +418,6 @@ class CardinalityExtension : protected EnvObj } // namespace sets } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/sets/inference_manager.cpp b/src/theory/sets/inference_manager.cpp index de2acfa67..b470fcc68 100644 --- a/src/theory/sets/inference_manager.cpp +++ b/src/theory/sets/inference_manager.cpp @@ -19,9 +19,9 @@ #include "theory/rewriter.h" using namespace std; -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace sets { @@ -187,4 +187,4 @@ void InferenceManager::split(Node n, InferenceId id, int reqPol) } // namespace sets } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/sets/inference_manager.h b/src/theory/sets/inference_manager.h index 36eec2cd3..e394baf18 100644 --- a/src/theory/sets/inference_manager.h +++ b/src/theory/sets/inference_manager.h @@ -21,7 +21,7 @@ #include "theory/inference_manager_buffered.h" #include "theory/sets/solver_state.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace sets { @@ -105,6 +105,6 @@ class InferenceManager : public InferenceManagerBuffered } // namespace sets } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__SETS__INFERENCE_MANAGER_H */ diff --git a/src/theory/sets/kinds b/src/theory/sets/kinds index 0c1cc0452..30e0006d6 100644 --- a/src/theory/sets/kinds +++ b/src/theory/sets/kinds @@ -5,10 +5,10 @@ # theory THEORY_SETS \ - ::cvc5::theory::sets::TheorySets \ + ::cvc5::internal::theory::sets::TheorySets \ "theory/sets/theory_sets.h" typechecker "theory/sets/theory_sets_type_rules.h" -rewriter ::cvc5::theory::sets::TheorySetsRewriter \ +rewriter ::cvc5::internal::theory::sets::TheorySetsRewriter \ "theory/sets/theory_sets_rewriter.h" properties parametric @@ -18,21 +18,21 @@ properties check presolve constant SET_EMPTY\ class \ EmptySet \ - ::cvc5::EmptySetHashFunction \ + ::cvc5::internal::EmptySetHashFunction \ "expr/emptyset.h" \ - "the empty set constant; payload is an instance of the cvc5::EmptySet class" + "the empty set constant; payload is an instance of the cvc5::internal::EmptySet class" # the type operator SET_TYPE 1 "set type, takes as parameter the type of the elements" cardinality SET_TYPE \ - "::cvc5::theory::sets::SetsProperties::computeCardinality(%TYPE%)" \ + "::cvc5::internal::theory::sets::SetsProperties::computeCardinality(%TYPE%)" \ "theory/sets/theory_sets_type_rules.h" well-founded SET_TYPE \ - "::cvc5::theory::sets::SetsProperties::isWellFounded(%TYPE%)" \ - "::cvc5::theory::sets::SetsProperties::mkGroundTerm(%TYPE%)" \ + "::cvc5::internal::theory::sets::SetsProperties::isWellFounded(%TYPE%)" \ + "::cvc5::internal::theory::sets::SetsProperties::mkGroundTerm(%TYPE%)" \ "theory/sets/theory_sets_type_rules.h" enumerator SET_TYPE \ - "::cvc5::theory::sets::SetEnumerator" \ + "::cvc5::internal::theory::sets::SetEnumerator" \ "theory/sets/theory_sets_type_enumerator.h" # operators @@ -45,9 +45,9 @@ operator SET_MEMBER 2 "set membership predicate; first parameter a memb constant SET_SINGLETON_OP \ class \ SetSingletonOp \ - ::cvc5::SetSingletonOpHashFunction \ + ::cvc5::internal::SetSingletonOpHashFunction \ "theory/sets/singleton_op.h" \ - "operator for singletons; payload is an instance of the cvc5::SingletonOp class" + "operator for singletons; payload is an instance of the cvc5::internal::SingletonOp class" parameterized SET_SINGLETON SET_SINGLETON_OP 1 \ "constructs a set of a single element. First parameter is a SingletonOp. Second is a term" @@ -91,31 +91,31 @@ operator RELATION_TCLOSURE 1 "relation transitive closure" operator RELATION_JOIN_IMAGE 2 "relation join image" operator RELATION_IDEN 1 "relation identity" -typerule SET_UNION ::cvc5::theory::sets::SetsBinaryOperatorTypeRule -typerule SET_INTER ::cvc5::theory::sets::SetsBinaryOperatorTypeRule -typerule SET_MINUS ::cvc5::theory::sets::SetsBinaryOperatorTypeRule -typerule SET_SUBSET ::cvc5::theory::sets::SubsetTypeRule -typerule SET_MEMBER ::cvc5::theory::sets::MemberTypeRule +typerule SET_UNION ::cvc5::internal::theory::sets::SetsBinaryOperatorTypeRule +typerule SET_INTER ::cvc5::internal::theory::sets::SetsBinaryOperatorTypeRule +typerule SET_MINUS ::cvc5::internal::theory::sets::SetsBinaryOperatorTypeRule +typerule SET_SUBSET ::cvc5::internal::theory::sets::SubsetTypeRule +typerule SET_MEMBER ::cvc5::internal::theory::sets::MemberTypeRule typerule SET_SINGLETON_OP "SimpleTypeRule" -typerule SET_SINGLETON ::cvc5::theory::sets::SingletonTypeRule -typerule SET_EMPTY ::cvc5::theory::sets::EmptySetTypeRule -typerule SET_INSERT ::cvc5::theory::sets::InsertTypeRule -typerule SET_CARD ::cvc5::theory::sets::CardTypeRule -typerule SET_COMPLEMENT ::cvc5::theory::sets::ComplementTypeRule -typerule SET_UNIVERSE ::cvc5::theory::sets::UniverseSetTypeRule -typerule SET_COMPREHENSION ::cvc5::theory::sets::ComprehensionTypeRule -typerule SET_CHOOSE ::cvc5::theory::sets::ChooseTypeRule -typerule SET_IS_SINGLETON ::cvc5::theory::sets::IsSingletonTypeRule -typerule SET_MAP ::cvc5::theory::sets::SetMapTypeRule - -typerule RELATION_JOIN ::cvc5::theory::sets::RelBinaryOperatorTypeRule -typerule RELATION_PRODUCT ::cvc5::theory::sets::RelBinaryOperatorTypeRule -typerule RELATION_TRANSPOSE ::cvc5::theory::sets::RelTransposeTypeRule -typerule RELATION_TCLOSURE ::cvc5::theory::sets::RelTransClosureTypeRule -typerule RELATION_JOIN_IMAGE ::cvc5::theory::sets::JoinImageTypeRule -typerule RELATION_IDEN ::cvc5::theory::sets::RelIdenTypeRule - -construle SET_UNION ::cvc5::theory::sets::SetsBinaryOperatorTypeRule -construle SET_SINGLETON ::cvc5::theory::sets::SingletonTypeRule +typerule SET_SINGLETON ::cvc5::internal::theory::sets::SingletonTypeRule +typerule SET_EMPTY ::cvc5::internal::theory::sets::EmptySetTypeRule +typerule SET_INSERT ::cvc5::internal::theory::sets::InsertTypeRule +typerule SET_CARD ::cvc5::internal::theory::sets::CardTypeRule +typerule SET_COMPLEMENT ::cvc5::internal::theory::sets::ComplementTypeRule +typerule SET_UNIVERSE ::cvc5::internal::theory::sets::UniverseSetTypeRule +typerule SET_COMPREHENSION ::cvc5::internal::theory::sets::ComprehensionTypeRule +typerule SET_CHOOSE ::cvc5::internal::theory::sets::ChooseTypeRule +typerule SET_IS_SINGLETON ::cvc5::internal::theory::sets::IsSingletonTypeRule +typerule SET_MAP ::cvc5::internal::theory::sets::SetMapTypeRule + +typerule RELATION_JOIN ::cvc5::internal::theory::sets::RelBinaryOperatorTypeRule +typerule RELATION_PRODUCT ::cvc5::internal::theory::sets::RelBinaryOperatorTypeRule +typerule RELATION_TRANSPOSE ::cvc5::internal::theory::sets::RelTransposeTypeRule +typerule RELATION_TCLOSURE ::cvc5::internal::theory::sets::RelTransClosureTypeRule +typerule RELATION_JOIN_IMAGE ::cvc5::internal::theory::sets::JoinImageTypeRule +typerule RELATION_IDEN ::cvc5::internal::theory::sets::RelIdenTypeRule + +construle SET_UNION ::cvc5::internal::theory::sets::SetsBinaryOperatorTypeRule +construle SET_SINGLETON ::cvc5::internal::theory::sets::SingletonTypeRule endtheory diff --git a/src/theory/sets/normal_form.h b/src/theory/sets/normal_form.h index 65741ee58..20035d003 100644 --- a/src/theory/sets/normal_form.h +++ b/src/theory/sets/normal_form.h @@ -20,7 +20,7 @@ #include "expr/emptyset.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace sets { @@ -166,6 +166,6 @@ class NormalForm { }; } } -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/sets/rels_utils.cpp b/src/theory/sets/rels_utils.cpp index fdd9e6356..631564b3e 100644 --- a/src/theory/sets/rels_utils.cpp +++ b/src/theory/sets/rels_utils.cpp @@ -19,9 +19,9 @@ #include "expr/dtype_cons.h" #include "theory/datatypes/tuple_utils.h" -using namespace cvc5::theory::datatypes; +using namespace cvc5::internal::theory::datatypes; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace sets { @@ -78,4 +78,4 @@ Node RelsUtils::constructPair(Node rel, Node a, Node b) } // namespace sets } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/sets/rels_utils.h b/src/theory/sets/rels_utils.h index c070ad1da..63e05f4ce 100644 --- a/src/theory/sets/rels_utils.h +++ b/src/theory/sets/rels_utils.h @@ -18,7 +18,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace sets { @@ -67,6 +67,6 @@ class RelsUtils }; } // namespace sets } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/sets/singleton_op.cpp b/src/theory/sets/singleton_op.cpp index 3ad56f2db..0760c1668 100644 --- a/src/theory/sets/singleton_op.cpp +++ b/src/theory/sets/singleton_op.cpp @@ -19,7 +19,7 @@ #include "expr/type_node.h" -namespace cvc5 { +namespace cvc5::internal { std::ostream& operator<<(std::ostream& out, const SetSingletonOp& op) { @@ -48,4 +48,4 @@ bool SetSingletonOp::operator==(const SetSingletonOp& op) const return getType() == op.getType(); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/sets/singleton_op.h b/src/theory/sets/singleton_op.h index 05b26d909..d888fb229 100644 --- a/src/theory/sets/singleton_op.h +++ b/src/theory/sets/singleton_op.h @@ -20,7 +20,7 @@ #include -namespace cvc5 { +namespace cvc5::internal { class TypeNode; @@ -58,6 +58,6 @@ struct SetSingletonOpHashFunction size_t operator()(const SetSingletonOp& op) const; }; /* struct SetSingletonOpHashFunction */ -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__SETS__SINGLETON_OP_H */ diff --git a/src/theory/sets/skolem_cache.cpp b/src/theory/sets/skolem_cache.cpp index 646ae1662..8b43975a7 100644 --- a/src/theory/sets/skolem_cache.cpp +++ b/src/theory/sets/skolem_cache.cpp @@ -18,9 +18,9 @@ #include "expr/skolem_manager.h" #include "theory/rewriter.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace sets { @@ -77,4 +77,4 @@ bool SkolemCache::isSkolem(Node n) const } // namespace sets } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/sets/skolem_cache.h b/src/theory/sets/skolem_cache.h index a13c48f1e..d69f4881b 100644 --- a/src/theory/sets/skolem_cache.h +++ b/src/theory/sets/skolem_cache.h @@ -23,7 +23,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { class Rewriter; @@ -84,6 +84,6 @@ class SkolemCache } // namespace sets } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__STRINGS__SKOLEM_CACHE_H */ diff --git a/src/theory/sets/solver_state.cpp b/src/theory/sets/solver_state.cpp index 62ae32a14..c7651e330 100644 --- a/src/theory/sets/solver_state.cpp +++ b/src/theory/sets/solver_state.cpp @@ -20,9 +20,9 @@ #include "theory/sets/theory_sets_private.h" using namespace std; -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace sets { @@ -595,4 +595,4 @@ bool SolverState::merge(TNode t1, } // namespace sets } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/sets/solver_state.h b/src/theory/sets/solver_state.h index 725e21a14..908eb0301 100644 --- a/src/theory/sets/solver_state.h +++ b/src/theory/sets/solver_state.h @@ -25,7 +25,7 @@ #include "theory/theory_state.h" #include "theory/uf/equality_engine.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace sets { @@ -268,6 +268,6 @@ class SolverState : public TheoryState } // namespace sets } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__SETS__THEORY_SOLVER_STATE_H */ diff --git a/src/theory/sets/term_registry.cpp b/src/theory/sets/term_registry.cpp index 93a700a5f..7b3eeca74 100644 --- a/src/theory/sets/term_registry.cpp +++ b/src/theory/sets/term_registry.cpp @@ -19,9 +19,9 @@ #include "expr/skolem_manager.h" using namespace std; -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace sets { @@ -151,4 +151,4 @@ void TermRegistry::sendSimpleLemmaInternal(Node n, InferenceId id) } // namespace sets } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/sets/term_registry.h b/src/theory/sets/term_registry.h index e0a03cef4..afbbfbcf2 100644 --- a/src/theory/sets/term_registry.h +++ b/src/theory/sets/term_registry.h @@ -28,7 +28,7 @@ #include "theory/sets/skolem_cache.h" #include "theory/sets/solver_state.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace sets { @@ -100,6 +100,6 @@ class TermRegistry : protected EnvObj } // namespace sets } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__SETS__TERM_REGISTRY_H */ diff --git a/src/theory/sets/theory_sets.cpp b/src/theory/sets/theory_sets.cpp index 6d5de2172..3202af81f 100644 --- a/src/theory/sets/theory_sets.cpp +++ b/src/theory/sets/theory_sets.cpp @@ -21,9 +21,9 @@ #include "theory/theory_model.h" #include "theory/trust_substitutions.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace sets { @@ -257,4 +257,4 @@ void TheorySets::NotifyClass::eqNotifyDisequal(TNode t1, TNode t2, TNode reason) } // namespace sets } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/sets/theory_sets.h b/src/theory/sets/theory_sets.h index 920a7a4ab..6684aa1b7 100644 --- a/src/theory/sets/theory_sets.h +++ b/src/theory/sets/theory_sets.h @@ -29,7 +29,7 @@ #include "theory/theory_eq_notify.h" #include "theory/uf/equality_engine.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace sets { @@ -121,6 +121,6 @@ class TheorySets : public Theory } // namespace sets } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__SETS__THEORY_SETS_H */ diff --git a/src/theory/sets/theory_sets_private.cpp b/src/theory/sets/theory_sets_private.cpp index 57835919e..9ecd39a0e 100644 --- a/src/theory/sets/theory_sets_private.cpp +++ b/src/theory/sets/theory_sets_private.cpp @@ -30,9 +30,9 @@ #include "util/result.h" using namespace std; -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace sets { @@ -1143,7 +1143,7 @@ void TheorySetsPrivate::preRegisterTerm(TNode node) throw LogicException( "JoinImage cardinality constraint must be a constant"); } - cvc5::Rational r(INT_MAX); + cvc5::internal::Rational r(INT_MAX); if (node[1].getConst() > r) { throw LogicException( @@ -1298,4 +1298,4 @@ void TheorySetsPrivate::presolve() { d_state.reset(); } } // namespace sets } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/sets/theory_sets_private.h b/src/theory/sets/theory_sets_private.h index 191bf1a99..28b84a161 100644 --- a/src/theory/sets/theory_sets_private.h +++ b/src/theory/sets/theory_sets_private.h @@ -32,7 +32,7 @@ #include "theory/theory.h" #include "theory/uf/equality_engine.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace sets { @@ -235,6 +235,6 @@ class TheorySetsPrivate : protected EnvObj } // namespace sets } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__SETS__THEORY_SETS_PRIVATE_H */ diff --git a/src/theory/sets/theory_sets_rels.cpp b/src/theory/sets/theory_sets_rels.cpp index c113f0b83..7bbb00283 100644 --- a/src/theory/sets/theory_sets_rels.cpp +++ b/src/theory/sets/theory_sets_rels.cpp @@ -24,10 +24,10 @@ #include "util/rational.h" using namespace std; -using namespace cvc5::kind; -using namespace cvc5::theory::datatypes; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::theory::datatypes; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace sets { @@ -1412,4 +1412,4 @@ void TheorySetsRels::check(Theory::Effort level) } } } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/sets/theory_sets_rels.h b/src/theory/sets/theory_sets_rels.h index bf1464c7b..092afa7e7 100644 --- a/src/theory/sets/theory_sets_rels.h +++ b/src/theory/sets/theory_sets_rels.h @@ -28,7 +28,7 @@ #include "theory/theory.h" #include "theory/uf/equality_engine.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace sets { @@ -194,6 +194,6 @@ class TheorySetsRels : protected EnvObj } // namespace sets } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* SRC_THEORY_SETS_THEORY_SETS_RELS_H_ */ diff --git a/src/theory/sets/theory_sets_rewriter.cpp b/src/theory/sets/theory_sets_rewriter.cpp index 6f6b9c38e..48ede1279 100644 --- a/src/theory/sets/theory_sets_rewriter.cpp +++ b/src/theory/sets/theory_sets_rewriter.cpp @@ -24,10 +24,10 @@ #include "theory/sets/rels_utils.h" #include "util/rational.h" -using namespace cvc5::kind; -using namespace cvc5::theory::datatypes; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::theory::datatypes; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace sets { @@ -672,4 +672,4 @@ RewriteResponse TheorySetsRewriter::postRewriteMap(TNode n) } // namespace sets } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/sets/theory_sets_rewriter.h b/src/theory/sets/theory_sets_rewriter.h index 1d2f36255..c54776814 100644 --- a/src/theory/sets/theory_sets_rewriter.h +++ b/src/theory/sets/theory_sets_rewriter.h @@ -20,7 +20,7 @@ #include "theory/rewriter.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace sets { @@ -87,6 +87,6 @@ private: } // namespace sets } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__SETS__THEORY_SETS_REWRITER_H */ diff --git a/src/theory/sets/theory_sets_type_enumerator.cpp b/src/theory/sets/theory_sets_type_enumerator.cpp index 9cae1f843..be61f6a81 100644 --- a/src/theory/sets/theory_sets_type_enumerator.cpp +++ b/src/theory/sets/theory_sets_type_enumerator.cpp @@ -17,7 +17,7 @@ #include "util/bitvector.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace sets { @@ -130,4 +130,4 @@ bool SetEnumerator::isFinished() } // namespace sets } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/sets/theory_sets_type_enumerator.h b/src/theory/sets/theory_sets_type_enumerator.h index 1de5fa0be..5bc4cc455 100644 --- a/src/theory/sets/theory_sets_type_enumerator.h +++ b/src/theory/sets/theory_sets_type_enumerator.h @@ -27,7 +27,7 @@ #include "theory/sets/normal_form.h" #include "theory/type_enumerator.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace sets { @@ -69,6 +69,6 @@ class SetEnumerator : public TypeEnumeratorBase } // namespace sets } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__SETS__TYPE_ENUMERATOR_H */ diff --git a/src/theory/sets/theory_sets_type_rules.cpp b/src/theory/sets/theory_sets_type_rules.cpp index 4fd580b24..56bc0e090 100644 --- a/src/theory/sets/theory_sets_type_rules.cpp +++ b/src/theory/sets/theory_sets_type_rules.cpp @@ -22,7 +22,7 @@ #include "theory/sets/singleton_op.h" #include "util/cardinality.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace sets { @@ -526,4 +526,4 @@ Node SetsProperties::mkGroundTerm(TypeNode type) } // namespace sets } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/sets/theory_sets_type_rules.h b/src/theory/sets/theory_sets_type_rules.h index dc473d145..9431f7ff4 100644 --- a/src/theory/sets/theory_sets_type_rules.h +++ b/src/theory/sets/theory_sets_type_rules.h @@ -21,7 +21,7 @@ #include "expr/node.h" #include "expr/type_node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace sets { @@ -205,6 +205,6 @@ struct SetsProperties } // namespace sets } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__SETS__THEORY_SETS_TYPE_RULES_H */ diff --git a/src/theory/shared_solver.cpp b/src/theory/shared_solver.cpp index 7d457051b..b3dbb6fbd 100644 --- a/src/theory/shared_solver.cpp +++ b/src/theory/shared_solver.cpp @@ -21,7 +21,7 @@ #include "theory/theory_engine.h" #include "theory/theory_inference_manager.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { // Always creates shared terms database. In all cases, shared terms @@ -157,4 +157,4 @@ void SharedSolver::sendConflict(TrustNode trn, InferenceId id) } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/shared_solver.h b/src/theory/shared_solver.h index d423b5983..44efae6ce 100644 --- a/src/theory/shared_solver.h +++ b/src/theory/shared_solver.h @@ -25,7 +25,7 @@ #include "theory/term_registration_visitor.h" #include "theory/valuation.h" -namespace cvc5 { +namespace cvc5::internal { class LogicInfo; class ProofNodeManager; @@ -145,6 +145,6 @@ class SharedSolver : protected EnvObj }; } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__SHARED_SOLVER__H */ diff --git a/src/theory/shared_solver_distributed.cpp b/src/theory/shared_solver_distributed.cpp index ee0fa5d5a..b47e59d94 100644 --- a/src/theory/shared_solver_distributed.cpp +++ b/src/theory/shared_solver_distributed.cpp @@ -17,7 +17,7 @@ #include "theory/theory_engine.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { SharedSolverDistributed::SharedSolverDistributed(Env& env, TheoryEngine& te) @@ -93,4 +93,4 @@ void SharedSolverDistributed::assertShared(TNode n, bool polarity, TNode reason) } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/shared_solver_distributed.h b/src/theory/shared_solver_distributed.h index 3e7d81e30..21e2c668e 100644 --- a/src/theory/shared_solver_distributed.h +++ b/src/theory/shared_solver_distributed.h @@ -21,7 +21,7 @@ #include "expr/node.h" #include "theory/shared_solver.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { /** @@ -58,6 +58,6 @@ class SharedSolverDistributed : public SharedSolver }; } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__SHARED_SOLVER_DISTRIBUTED__H */ diff --git a/src/theory/shared_terms_database.cpp b/src/theory/shared_terms_database.cpp index 8f6317ef8..51e58fe3f 100644 --- a/src/theory/shared_terms_database.cpp +++ b/src/theory/shared_terms_database.cpp @@ -20,9 +20,9 @@ #include "theory/theory_engine.h" using namespace std; -using namespace cvc5::theory; +using namespace cvc5::internal::theory; -namespace cvc5 { +namespace cvc5::internal { SharedTermsDatabase::SharedTermsDatabase(Env& env, TheoryEngine* theoryEngine) : ContextNotifyObj(env.getContext()), @@ -322,4 +322,4 @@ TrustNode SharedTermsDatabase::explain(TNode literal) const return TrustNode::mkTrustPropExp(literal, exp, nullptr); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/shared_terms_database.h b/src/theory/shared_terms_database.h index 2bdb9d574..6de70acc9 100644 --- a/src/theory/shared_terms_database.h +++ b/src/theory/shared_terms_database.h @@ -30,7 +30,7 @@ #include "theory/uf/proof_equality_engine.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { class Env; class TheoryEngine; @@ -276,4 +276,4 @@ class SharedTermsDatabase : public context::ContextNotifyObj { ProofNodeManager* d_pnm; }; -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/skolem_lemma.cpp b/src/theory/skolem_lemma.cpp index b0b59b7e4..42304811d 100644 --- a/src/theory/skolem_lemma.cpp +++ b/src/theory/skolem_lemma.cpp @@ -17,7 +17,7 @@ #include "expr/skolem_manager.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { SkolemLemma::SkolemLemma(TrustNode lem, Node k) : d_lemma(lem), d_skolem(k) @@ -28,4 +28,4 @@ SkolemLemma::SkolemLemma(TrustNode lem, Node k) : d_lemma(lem), d_skolem(k) Node SkolemLemma::getProven() const { return d_lemma.getProven(); } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/skolem_lemma.h b/src/theory/skolem_lemma.h index 0e78427f8..de97f38b5 100644 --- a/src/theory/skolem_lemma.h +++ b/src/theory/skolem_lemma.h @@ -21,7 +21,7 @@ #include "expr/node.h" #include "proof/trust_node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { /** @@ -52,6 +52,6 @@ class SkolemLemma }; } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__SKOLEM_LEMMA_H */ diff --git a/src/theory/smt_engine_subsolver.cpp b/src/theory/smt_engine_subsolver.cpp index 425808911..0b3a98dd2 100644 --- a/src/theory/smt_engine_subsolver.cpp +++ b/src/theory/smt_engine_subsolver.cpp @@ -21,7 +21,7 @@ #include "smt/solver_engine.h" #include "smt/solver_engine_scope.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { // optimization: try to rewrite to constant @@ -174,4 +174,4 @@ void getUnsatCoreFromSubsolver(SolverEngine& smt, std::vector& uasserts) } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/smt_engine_subsolver.h b/src/theory/smt_engine_subsolver.h index 5de65a5d2..17e8d48ad 100644 --- a/src/theory/smt_engine_subsolver.h +++ b/src/theory/smt_engine_subsolver.h @@ -25,7 +25,7 @@ #include "expr/node.h" #include "smt/solver_engine.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { /** @@ -139,6 +139,6 @@ bool getUnsatCoreFromSubsolver(SolverEngine& smt, void getUnsatCoreFromSubsolver(SolverEngine& smt, std::vector& uasserts); } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__SMT_ENGINE_SUBSOLVER_H */ diff --git a/src/theory/sort_inference.cpp b/src/theory/sort_inference.cpp index bf2542fe5..3c4cf6487 100644 --- a/src/theory/sort_inference.cpp +++ b/src/theory/sort_inference.cpp @@ -33,11 +33,11 @@ #include "theory/quantifiers/quant_util.h" #include "theory/rewriter.h" -using namespace cvc5; -using namespace cvc5::kind; +using namespace cvc5::internal; +using namespace cvc5::internal::kind; using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace theory { void SortInference::UnionFind::print(const char * c){ @@ -885,4 +885,4 @@ bool SortInference::isHandledApplyUf(Kind k) const } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/sort_inference.h b/src/theory/sort_inference.h index 126c94749..c914b4a70 100644 --- a/src/theory/sort_inference.h +++ b/src/theory/sort_inference.h @@ -25,7 +25,7 @@ #include "expr/type_node.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { class Env; @@ -172,6 +172,6 @@ private: }; } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/strings/arith_entail.cpp b/src/theory/strings/arith_entail.cpp index 7db30b921..2e7b85502 100644 --- a/src/theory/strings/arith_entail.cpp +++ b/src/theory/strings/arith_entail.cpp @@ -24,9 +24,9 @@ #include "theory/theory.h" #include "util/rational.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -982,4 +982,4 @@ bool ArithEntail::inferZerosInSumGeq(Node x, } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/strings/arith_entail.h b/src/theory/strings/arith_entail.h index e35dd3560..ec08ac91c 100644 --- a/src/theory/strings/arith_entail.h +++ b/src/theory/strings/arith_entail.h @@ -22,7 +22,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { class Rewriter; @@ -207,6 +207,6 @@ class ArithEntail } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/strings/array_core_solver.cpp b/src/theory/strings/array_core_solver.cpp index ce92b5323..bbaca6b06 100644 --- a/src/theory/strings/array_core_solver.cpp +++ b/src/theory/strings/array_core_solver.cpp @@ -20,10 +20,10 @@ #include "theory/strings/word.h" #include "util/rational.h" -using namespace cvc5::context; -using namespace cvc5::kind; +using namespace cvc5::internal::context; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -338,4 +338,4 @@ const std::map& ArrayCoreSolver::getConnectedSequences() } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/strings/array_core_solver.h b/src/theory/strings/array_core_solver.h index b21919259..3cb225ad3 100644 --- a/src/theory/strings/array_core_solver.h +++ b/src/theory/strings/array_core_solver.h @@ -24,7 +24,7 @@ #include "theory/strings/solver_state.h" #include "theory/strings/term_registry.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -143,6 +143,6 @@ class ArrayCoreSolver : protected EnvObj } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/strings/array_solver.cpp b/src/theory/strings/array_solver.cpp index 867a91cae..b48300e81 100644 --- a/src/theory/strings/array_solver.cpp +++ b/src/theory/strings/array_solver.cpp @@ -21,10 +21,10 @@ #include "theory/strings/word.h" #include "util/rational.h" -using namespace cvc5::context; -using namespace cvc5::kind; +using namespace cvc5::internal::context; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -424,4 +424,4 @@ const std::map& ArraySolver::getConnectedSequences() } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/strings/array_solver.h b/src/theory/strings/array_solver.h index 39293720b..6d22e4993 100644 --- a/src/theory/strings/array_solver.h +++ b/src/theory/strings/array_solver.h @@ -26,7 +26,7 @@ #include "theory/strings/solver_state.h" #include "theory/strings/term_registry.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -113,6 +113,6 @@ class ArraySolver : protected EnvObj } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/strings/base_solver.cpp b/src/theory/strings/base_solver.cpp index 7008c7107..1955b2b63 100644 --- a/src/theory/strings/base_solver.cpp +++ b/src/theory/strings/base_solver.cpp @@ -25,10 +25,10 @@ #include "util/rational.h" using namespace std; -using namespace cvc5::context; -using namespace cvc5::kind; +using namespace cvc5::internal::context; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -793,4 +793,4 @@ Node BaseSolver::TermIndex::add(TNode n, } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/strings/base_solver.h b/src/theory/strings/base_solver.h index d4b0ebe0d..dc9c09c98 100644 --- a/src/theory/strings/base_solver.h +++ b/src/theory/strings/base_solver.h @@ -29,7 +29,7 @@ #include "theory/strings/solver_state.h" #include "theory/strings/term_registry.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -248,6 +248,6 @@ class BaseSolver : protected EnvObj } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__STRINGS__BASE_SOLVER_H */ diff --git a/src/theory/strings/core_solver.cpp b/src/theory/strings/core_solver.cpp index 3a00752d5..382105eb9 100644 --- a/src/theory/strings/core_solver.cpp +++ b/src/theory/strings/core_solver.cpp @@ -28,10 +28,10 @@ #include "util/string.h" using namespace std; -using namespace cvc5::context; -using namespace cvc5::kind; +using namespace cvc5::internal::context; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -2693,4 +2693,4 @@ bool CoreSolver::processInferInfo(CoreInferInfo& cii) } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/strings/core_solver.h b/src/theory/strings/core_solver.h index adf17de4d..f79e265b6 100644 --- a/src/theory/strings/core_solver.h +++ b/src/theory/strings/core_solver.h @@ -30,7 +30,7 @@ #include "theory/strings/solver_state.h" #include "theory/strings/term_registry.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -540,6 +540,6 @@ class CoreSolver : protected EnvObj } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__STRINGS__CORE_SOLVER_H */ diff --git a/src/theory/strings/eager_solver.cpp b/src/theory/strings/eager_solver.cpp index 1d821e62b..6de587a81 100644 --- a/src/theory/strings/eager_solver.cpp +++ b/src/theory/strings/eager_solver.cpp @@ -19,9 +19,9 @@ #include "theory/strings/theory_strings_utils.h" #include "util/rational.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -303,4 +303,4 @@ Node EagerSolver::getBoundForLength(Node t, bool isLower) const } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/strings/eager_solver.h b/src/theory/strings/eager_solver.h index a4898f52a..ace368866 100644 --- a/src/theory/strings/eager_solver.h +++ b/src/theory/strings/eager_solver.h @@ -28,7 +28,7 @@ #include "theory/strings/solver_state.h" #include "theory/strings/term_registry.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -86,6 +86,6 @@ class EagerSolver : protected EnvObj } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__STRINGS__EAGER_SOLVER_H */ diff --git a/src/theory/strings/eqc_info.cpp b/src/theory/strings/eqc_info.cpp index 71f1f8b55..06b19272d 100644 --- a/src/theory/strings/eqc_info.cpp +++ b/src/theory/strings/eqc_info.cpp @@ -19,10 +19,10 @@ #include "theory/strings/word.h" using namespace std; -using namespace cvc5::context; -using namespace cvc5::kind; +using namespace cvc5::internal::context; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -147,4 +147,4 @@ Node EqcInfo::mkMergeConflict(Node t, Node prev, bool isArith) } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/strings/eqc_info.h b/src/theory/strings/eqc_info.h index ff3213a8e..fdc092e6a 100644 --- a/src/theory/strings/eqc_info.h +++ b/src/theory/strings/eqc_info.h @@ -24,7 +24,7 @@ #include "context/context.h" #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -100,6 +100,6 @@ class EqcInfo } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__STRINGS__EQC_INFO_H */ diff --git a/src/theory/strings/extf_solver.cpp b/src/theory/strings/extf_solver.cpp index 96ec58890..40649e927 100644 --- a/src/theory/strings/extf_solver.cpp +++ b/src/theory/strings/extf_solver.cpp @@ -23,10 +23,10 @@ #include "util/statistics_registry.h" using namespace std; -using namespace cvc5::context; -using namespace cvc5::kind; +using namespace cvc5::internal::context; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -795,4 +795,4 @@ std::string ExtfSolver::debugPrintModel() } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/strings/extf_solver.h b/src/theory/strings/extf_solver.h index d8837f2ed..2344297ea 100644 --- a/src/theory/strings/extf_solver.h +++ b/src/theory/strings/extf_solver.h @@ -34,7 +34,7 @@ #include "theory/strings/strings_rewriter.h" #include "theory/strings/theory_strings_preprocess.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -242,6 +242,6 @@ class StringsExtfCallback : public ExtTheoryCallback } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__STRINGS__EXTF_SOLVER_H */ diff --git a/src/theory/strings/infer_info.cpp b/src/theory/strings/infer_info.cpp index aabefe74e..762294809 100644 --- a/src/theory/strings/infer_info.cpp +++ b/src/theory/strings/infer_info.cpp @@ -19,7 +19,7 @@ #include "theory/strings/theory_strings_utils.h" #include "theory/theory.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -92,4 +92,4 @@ std::ostream& operator<<(std::ostream& out, const InferInfo& ii) } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/strings/infer_info.h b/src/theory/strings/infer_info.h index 22460d22d..0714a6c87 100644 --- a/src/theory/strings/infer_info.h +++ b/src/theory/strings/infer_info.h @@ -26,7 +26,7 @@ #include "theory/theory_inference.h" #include "util/safe_print.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -132,6 +132,6 @@ std::ostream& operator<<(std::ostream& out, const InferInfo& ii); } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__STRINGS__INFER_INFO_H */ diff --git a/src/theory/strings/infer_proof_cons.cpp b/src/theory/strings/infer_proof_cons.cpp index 73aa484fd..df2b96a68 100644 --- a/src/theory/strings/infer_proof_cons.cpp +++ b/src/theory/strings/infer_proof_cons.cpp @@ -25,9 +25,9 @@ #include "theory/strings/theory_strings_utils.h" #include "util/statistics_registry.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -1358,4 +1358,4 @@ Node InferProofCons::maybePurifyTerm(Node n, } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/strings/infer_proof_cons.h b/src/theory/strings/infer_proof_cons.h index cde81c365..5cfb774a8 100644 --- a/src/theory/strings/infer_proof_cons.h +++ b/src/theory/strings/infer_proof_cons.h @@ -29,7 +29,7 @@ #include "theory/strings/sequences_stats.h" #include "theory/uf/proof_equality_engine.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -279,6 +279,6 @@ class InferProofCons : public ProofGenerator } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__STRINGS__INFER_PROOF_CONS_H */ diff --git a/src/theory/strings/inference_manager.cpp b/src/theory/strings/inference_manager.cpp index 1580df5e7..651431afa 100644 --- a/src/theory/strings/inference_manager.cpp +++ b/src/theory/strings/inference_manager.cpp @@ -23,10 +23,10 @@ #include "util/rational.h" using namespace std; -using namespace cvc5::context; -using namespace cvc5::kind; +using namespace cvc5::internal::context; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -373,4 +373,4 @@ TrustNode InferenceManager::processLemma(InferInfo& ii, LemmaProperty& p) } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/strings/inference_manager.h b/src/theory/strings/inference_manager.h index 3ef83189b..f86521d88 100644 --- a/src/theory/strings/inference_manager.h +++ b/src/theory/strings/inference_manager.h @@ -36,7 +36,7 @@ #include "theory/theory_inference_manager.h" #include "theory/uf/equality_engine.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -266,6 +266,6 @@ class InferenceManager : public InferenceManagerBuffered } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/strings/kinds b/src/theory/strings/kinds index 6ac95bb46..bec5fd363 100644 --- a/src/theory/strings/kinds +++ b/src/theory/strings/kinds @@ -4,11 +4,11 @@ # src/theory/builtin/kinds. # -theory THEORY_STRINGS ::cvc5::theory::strings::TheoryStrings "theory/strings/theory_strings.h" +theory THEORY_STRINGS ::cvc5::internal::theory::strings::TheoryStrings "theory/strings/theory_strings.h" properties check parametric presolve -rewriter ::cvc5::theory::strings::SequencesRewriter "theory/strings/sequences_rewriter.h" +rewriter ::cvc5::internal::theory::strings::SequencesRewriter "theory/strings/sequences_rewriter.h" typechecker "theory/strings/theory_strings_type_rules.h" @@ -41,7 +41,7 @@ operator STRING_REV 1 "string reverse" sort STRING_TYPE \ Cardinality::INTEGERS \ well-founded \ - "NodeManager::currentNM()->mkConst(::cvc5::String())" \ + "NodeManager::currentNM()->mkConst(::cvc5::internal::String())" \ "util/string.h" \ "String type" @@ -53,46 +53,46 @@ sort REGEXP_TYPE \ "RegExp type" enumerator STRING_TYPE \ - "::cvc5::theory::strings::StringEnumerator" \ + "::cvc5::internal::theory::strings::StringEnumerator" \ "theory/strings/type_enumerator.h" enumerator REGEXP_TYPE \ - "::cvc5::theory::strings::RegExpEnumerator" \ + "::cvc5::internal::theory::strings::RegExpEnumerator" \ "theory/strings/regexp_enumerator.h" constant CONST_STRING \ class \ String \ - ::cvc5::strings::StringHashFunction \ + ::cvc5::internal::strings::StringHashFunction \ "util/string.h" \ "a string of characters" # the type operator SEQUENCE_TYPE 1 "seuence type, takes as parameter the type of the elements" cardinality SEQUENCE_TYPE \ - "::cvc5::theory::strings::SequenceProperties::computeCardinality(%TYPE%)" \ + "::cvc5::internal::theory::strings::SequenceProperties::computeCardinality(%TYPE%)" \ "theory/strings/theory_strings_type_rules.h" well-founded SEQUENCE_TYPE \ - "::cvc5::theory::strings::SequenceProperties::isWellFounded(%TYPE%)" \ - "::cvc5::theory::strings::SequenceProperties::mkGroundTerm(%TYPE%)" \ + "::cvc5::internal::theory::strings::SequenceProperties::isWellFounded(%TYPE%)" \ + "::cvc5::internal::theory::strings::SequenceProperties::mkGroundTerm(%TYPE%)" \ "theory/strings/theory_strings_type_rules.h" enumerator SEQUENCE_TYPE \ - "::cvc5::theory::strings::SequenceEnumerator" \ + "::cvc5::internal::theory::strings::SequenceEnumerator" \ "theory/strings/type_enumerator.h" constant CONST_SEQUENCE \ class \ Sequence \ - ::cvc5::SequenceHashFunction \ + ::cvc5::internal::SequenceHashFunction \ "expr/sequence.h" \ "a sequence of characters" constant SEQ_UNIT_OP \ class \ SeqUnitOp \ - ::cvc5::SeqUnitOpHashFunction \ + ::cvc5::internal::SeqUnitOpHashFunction \ "theory/strings/seq_unit_op.h" \ - "operator for sequence units; payload is an instance of the cvc5::SeqUnitOp class" + "operator for sequence units; payload is an instance of the cvc5::internal::SeqUnitOp class" parameterized SEQ_UNIT SEQ_UNIT_OP 1 \ "a sequence of length one. First parameter is a SeqUnitOp. Second is a term" @@ -118,17 +118,17 @@ operator REGEXP_ALLCHAR 0 "regexp all characters" constant REGEXP_REPEAT_OP \ struct \ RegExpRepeat \ - ::cvc5::RegExpRepeatHashFunction \ + ::cvc5::internal::RegExpRepeatHashFunction \ "util/regexp.h" \ - "operator for regular expression repeat; payload is an instance of the cvc5::RegExpRepeat class" + "operator for regular expression repeat; payload is an instance of the cvc5::internal::RegExpRepeat class" parameterized REGEXP_REPEAT REGEXP_REPEAT_OP 1 "regular expression repeat; first parameter is a REGEXP_REPEAT_OP, second is a regular expression term" constant REGEXP_LOOP_OP \ struct \ RegExpLoop \ - ::cvc5::RegExpLoopHashFunction \ + ::cvc5::internal::RegExpLoopHashFunction \ "util/regexp.h" \ - "operator for regular expression loop; payload is an instance of the cvc5::RegExpLoop class" + "operator for regular expression loop; payload is an instance of the cvc5::internal::RegExpLoop class" parameterized REGEXP_LOOP REGEXP_LOOP_OP 1 "regular expression loop; first parameter is a REGEXP_LOOP_OP, second is a regular expression term" #internal @@ -144,38 +144,38 @@ typerule REGEXP_DIFF "SimpleTypeRuleVar" typerule REGEXP_STAR "SimpleTypeRule" typerule REGEXP_PLUS "SimpleTypeRule" typerule REGEXP_OPT "SimpleTypeRule" -typerule REGEXP_RANGE ::cvc5::theory::strings::RegExpRangeTypeRule +typerule REGEXP_RANGE ::cvc5::internal::theory::strings::RegExpRangeTypeRule typerule REGEXP_REPEAT_OP "SimpleTypeRule" typerule REGEXP_REPEAT "SimpleTypeRule" typerule REGEXP_LOOP_OP "SimpleTypeRule" typerule REGEXP_LOOP "SimpleTypeRule" typerule REGEXP_COMPLEMENT "SimpleTypeRule" -typerule STRING_TO_REGEXP ::cvc5::theory::strings::StringToRegExpTypeRule +typerule STRING_TO_REGEXP ::cvc5::internal::theory::strings::StringToRegExpTypeRule typerule STRING_IN_REGEXP "SimpleTypeRule" typerule REGEXP_NONE "SimpleTypeRule" typerule REGEXP_ALL "SimpleTypeRule" typerule REGEXP_ALLCHAR "SimpleTypeRule" # we return isConst for some regular expressions, including all that we enumerate -construle STRING_TO_REGEXP ::cvc5::theory::strings::StringToRegExpTypeRule +construle STRING_TO_REGEXP ::cvc5::internal::theory::strings::StringToRegExpTypeRule ### operators that apply to both strings and sequences -typerule STRING_CONCAT ::cvc5::theory::strings::StringConcatTypeRule -typerule STRING_LENGTH ::cvc5::theory::strings::StringStrToIntTypeRule -typerule STRING_SUBSTR ::cvc5::theory::strings::StringSubstrTypeRule -typerule STRING_UPDATE ::cvc5::theory::strings::StringUpdateTypeRule -typerule STRING_CHARAT ::cvc5::theory::strings::StringAtTypeRule -typerule STRING_CONTAINS ::cvc5::theory::strings::StringRelationTypeRule -typerule STRING_INDEXOF ::cvc5::theory::strings::StringIndexOfTypeRule +typerule STRING_CONCAT ::cvc5::internal::theory::strings::StringConcatTypeRule +typerule STRING_LENGTH ::cvc5::internal::theory::strings::StringStrToIntTypeRule +typerule STRING_SUBSTR ::cvc5::internal::theory::strings::StringSubstrTypeRule +typerule STRING_UPDATE ::cvc5::internal::theory::strings::StringUpdateTypeRule +typerule STRING_CHARAT ::cvc5::internal::theory::strings::StringAtTypeRule +typerule STRING_CONTAINS ::cvc5::internal::theory::strings::StringRelationTypeRule +typerule STRING_INDEXOF ::cvc5::internal::theory::strings::StringIndexOfTypeRule typerule STRING_INDEXOF_RE "SimpleTypeRule" -typerule STRING_REPLACE ::cvc5::theory::strings::StringReplaceTypeRule -typerule STRING_REPLACE_ALL ::cvc5::theory::strings::StringReplaceTypeRule +typerule STRING_REPLACE ::cvc5::internal::theory::strings::StringReplaceTypeRule +typerule STRING_REPLACE_ALL ::cvc5::internal::theory::strings::StringReplaceTypeRule typerule STRING_REPLACE_RE "SimpleTypeRule" typerule STRING_REPLACE_RE_ALL "SimpleTypeRule" -typerule STRING_PREFIX ::cvc5::theory::strings::StringStrToBoolTypeRule -typerule STRING_SUFFIX ::cvc5::theory::strings::StringStrToBoolTypeRule -typerule STRING_REV ::cvc5::theory::strings::StringStrToStrTypeRule +typerule STRING_PREFIX ::cvc5::internal::theory::strings::StringStrToBoolTypeRule +typerule STRING_SUFFIX ::cvc5::internal::theory::strings::StringStrToBoolTypeRule +typerule STRING_REV ::cvc5::internal::theory::strings::StringStrToStrTypeRule ### string specific operators @@ -192,10 +192,10 @@ typerule STRING_TO_LOWER "SimpleTypeRule" ### sequence specific operators -typerule CONST_SEQUENCE ::cvc5::theory::strings::ConstSequenceTypeRule +typerule CONST_SEQUENCE ::cvc5::internal::theory::strings::ConstSequenceTypeRule typerule SEQ_UNIT_OP "SimpleTypeRule" -typerule SEQ_UNIT ::cvc5::theory::strings::SeqUnitTypeRule -typerule SEQ_NTH ::cvc5::theory::strings::SeqNthTypeRule -typerule SEQ_NTH_TOTAL ::cvc5::theory::strings::SeqNthTypeRule +typerule SEQ_UNIT ::cvc5::internal::theory::strings::SeqUnitTypeRule +typerule SEQ_NTH ::cvc5::internal::theory::strings::SeqNthTypeRule +typerule SEQ_NTH_TOTAL ::cvc5::internal::theory::strings::SeqNthTypeRule endtheory diff --git a/src/theory/strings/normal_form.cpp b/src/theory/strings/normal_form.cpp index b2bc8ac5c..e3b499558 100644 --- a/src/theory/strings/normal_form.cpp +++ b/src/theory/strings/normal_form.cpp @@ -21,9 +21,9 @@ #include "theory/strings/word.h" using namespace std; -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -179,4 +179,4 @@ void NormalForm::getExplanationForPrefixEq(NormalForm& nfi, } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/strings/normal_form.h b/src/theory/strings/normal_form.h index e3291e9bb..91179abe2 100644 --- a/src/theory/strings/normal_form.h +++ b/src/theory/strings/normal_form.h @@ -22,7 +22,7 @@ #include #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -169,6 +169,6 @@ class NormalForm } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__STRINGS__NORMAL_FORM_H */ diff --git a/src/theory/strings/proof_checker.cpp b/src/theory/strings/proof_checker.cpp index dc01bb6d7..51c438941 100644 --- a/src/theory/strings/proof_checker.cpp +++ b/src/theory/strings/proof_checker.cpp @@ -26,9 +26,9 @@ #include "theory/strings/theory_strings_utils.h" #include "theory/strings/word.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -516,4 +516,4 @@ Node StringProofRuleChecker::checkInternal(PfRule id, } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/strings/proof_checker.h b/src/theory/strings/proof_checker.h index 8d0a70f8b..5aeb1d4fb 100644 --- a/src/theory/strings/proof_checker.h +++ b/src/theory/strings/proof_checker.h @@ -22,7 +22,7 @@ #include "proof/proof_checker.h" #include "proof/proof_node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -47,6 +47,6 @@ class StringProofRuleChecker : public ProofRuleChecker } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__STRINGS__PROOF_CHECKER_H */ diff --git a/src/theory/strings/regexp_elim.cpp b/src/theory/strings/regexp_elim.cpp index d1de218c9..3b0f4f067 100644 --- a/src/theory/strings/regexp_elim.cpp +++ b/src/theory/strings/regexp_elim.cpp @@ -25,9 +25,9 @@ #include "util/rational.h" #include "util/string.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -651,4 +651,4 @@ bool RegExpElimination::isProofEnabled() const { return d_pnm != nullptr; } } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/strings/regexp_elim.h b/src/theory/strings/regexp_elim.h index 6187a7137..0c422c312 100644 --- a/src/theory/strings/regexp_elim.h +++ b/src/theory/strings/regexp_elim.h @@ -21,7 +21,7 @@ #include "proof/eager_proof_generator.h" #include "proof/trust_node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -85,6 +85,6 @@ class RegExpElimination } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__STRINGS__REGEXP_ELIM_H */ diff --git a/src/theory/strings/regexp_entail.cpp b/src/theory/strings/regexp_entail.cpp index c2ee079db..e8b2c28f2 100644 --- a/src/theory/strings/regexp_entail.cpp +++ b/src/theory/strings/regexp_entail.cpp @@ -22,9 +22,9 @@ #include "util/string.h" using namespace std; -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -114,7 +114,7 @@ Node RegExpEntail::simpleRegexpConsume(std::vector& mchildren, else if (xc.isConst()) { // check for constants - cvc5::String s = xc.getConst(); + cvc5::internal::String s = xc.getConst(); if (Word::isEmpty(xc)) { Trace("regexp-ext-rewrite-debug") << "- ignore empty" << std::endl; @@ -132,7 +132,7 @@ Node RegExpEntail::simpleRegexpConsume(std::vector& mchildren, } std::vector ssVec; ssVec.push_back(t == 0 ? s.back() : s.front()); - cvc5::String ss(ssVec); + cvc5::internal::String ss(ssVec); if (testConstStringInRegExp(ss, 0, rc)) { // strip off one character @@ -395,7 +395,7 @@ bool RegExpEntail::isConstRegExp(TNode t) return true; } -bool RegExpEntail::testConstStringInRegExp(cvc5::String& s, +bool RegExpEntail::testConstStringInRegExp(cvc5::internal::String& s, unsigned index_start, TNode r) { @@ -408,7 +408,7 @@ bool RegExpEntail::testConstStringInRegExp(cvc5::String& s, { case STRING_TO_REGEXP: { - cvc5::String s2 = s.substr(index_start, s.size() - index_start); + cvc5::internal::String s2 = s.substr(index_start, s.size() - index_start); if (r[0].isConst()) { return (s2 == r[0].getConst()); @@ -442,7 +442,7 @@ bool RegExpEntail::testConstStringInRegExp(cvc5::String& s, { for (vec_k[i] = vec_k[i] + 1; vec_k[i] <= left; ++vec_k[i]) { - cvc5::String t = s.substr(index_start + start, vec_k[i]); + cvc5::internal::String t = s.substr(index_start + start, vec_k[i]); if (testConstStringInRegExp(t, 0, r[i])) { start += vec_k[i]; @@ -507,7 +507,7 @@ bool RegExpEntail::testConstStringInRegExp(cvc5::String& s, { for (unsigned i = s.size() - index_start; i > 0; --i) { - cvc5::String t = s.substr(index_start, i); + cvc5::internal::String t = s.substr(index_start, i); if (testConstStringInRegExp(t, 0, r[0])) { if (index_start + i == s.size() @@ -575,7 +575,7 @@ bool RegExpEntail::testConstStringInRegExp(cvc5::String& s, uint32_t u = r[2].getConst().getNumerator().toUnsignedInt(); for (unsigned len = s.size() - index_start; len >= 1; len--) { - cvc5::String t = s.substr(index_start, len); + cvc5::internal::String t = s.substr(index_start, len); if (testConstStringInRegExp(t, 0, r[0])) { if (len + index_start == s.size()) @@ -584,7 +584,7 @@ bool RegExpEntail::testConstStringInRegExp(cvc5::String& s, } else { - Node num2 = nm->mkConstInt(cvc5::Rational(u - 1)); + Node num2 = nm->mkConstInt(cvc5::internal::Rational(u - 1)); Node r2 = nm->mkNode(REGEXP_LOOP, r[0], r[1], num2); if (testConstStringInRegExp(s, index_start + len, r2)) { @@ -613,10 +613,10 @@ bool RegExpEntail::testConstStringInRegExp(cvc5::String& s, } for (unsigned len = 1; len <= s.size() - index_start; len++) { - cvc5::String t = s.substr(index_start, len); + cvc5::internal::String t = s.substr(index_start, len); if (testConstStringInRegExp(t, 0, r[0])) { - Node num2 = nm->mkConstInt(cvc5::Rational(l - 1)); + Node num2 = nm->mkConstInt(cvc5::internal::Rational(l - 1)); Node r2 = nm->mkNode(REGEXP_LOOP, r[0], num2, num2); if (testConstStringInRegExp(s, index_start + len, r2)) { @@ -932,4 +932,4 @@ bool RegExpEntail::getConstantBoundCache(TNode n, bool isLower, Node& c) } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/strings/regexp_entail.h b/src/theory/strings/regexp_entail.h index 62cb5a725..3e5946b7d 100644 --- a/src/theory/strings/regexp_entail.h +++ b/src/theory/strings/regexp_entail.h @@ -28,7 +28,7 @@ #include "theory/theory_rewriter.h" #include "theory/type_enumerator.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -105,7 +105,7 @@ class RegExpEntail * Does the substring of s starting at index_start occur in constant regular * expression r? */ - static bool testConstStringInRegExp(cvc5::String& s, + static bool testConstStringInRegExp(cvc5::internal::String& s, unsigned index_start, TNode r); /** Does regular expression node have (str.to.re "") as a child? */ @@ -155,6 +155,6 @@ class RegExpEntail } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__STRINGS__REGEXP_ENTAIL_H */ diff --git a/src/theory/strings/regexp_enumerator.cpp b/src/theory/strings/regexp_enumerator.cpp index 63b7ee7c1..81dc1698b 100644 --- a/src/theory/strings/regexp_enumerator.cpp +++ b/src/theory/strings/regexp_enumerator.cpp @@ -15,7 +15,7 @@ #include "theory/strings/regexp_enumerator.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -47,4 +47,4 @@ bool RegExpEnumerator::isFinished() { return d_senum.isFinished(); } } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/strings/regexp_enumerator.h b/src/theory/strings/regexp_enumerator.h index 289c8b046..8a79f5518 100644 --- a/src/theory/strings/regexp_enumerator.h +++ b/src/theory/strings/regexp_enumerator.h @@ -24,7 +24,7 @@ #include "expr/type_node.h" #include "theory/strings/type_enumerator.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -54,6 +54,6 @@ class RegExpEnumerator : public TypeEnumeratorBase } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__STRINGS__TYPE_ENUMERATOR_H */ diff --git a/src/theory/strings/regexp_operation.cpp b/src/theory/strings/regexp_operation.cpp index f8c175595..93954d6d8 100644 --- a/src/theory/strings/regexp_operation.cpp +++ b/src/theory/strings/regexp_operation.cpp @@ -25,9 +25,9 @@ #include "theory/strings/word.h" #include "util/regexp.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -267,7 +267,7 @@ int RegExpOpr::delta( Node r, Node &exp ) { } // 0-unknown, 1-yes, 2-no -int RegExpOpr::derivativeS(Node r, cvc5::String c, Node& retNode) +int RegExpOpr::derivativeS(Node r, cvc5::internal::String c, Node& retNode) { Assert(c.size() < 2); Trace("regexp-derive") << "RegExp-derive starts with /" << mkString( r ) << "/, c=" << c << std::endl; @@ -306,8 +306,8 @@ int RegExpOpr::derivativeS(Node r, cvc5::String c, Node& retNode) break; } case kind::REGEXP_RANGE: { - cvc5::String a = r[0].getConst(); - cvc5::String b = r[1].getConst(); + cvc5::internal::String a = r[0].getConst(); + cvc5::internal::String b = r[1].getConst(); retNode = (a <= c && c <= b) ? d_emptySingleton : d_emptyRegexp; break; } @@ -527,7 +527,7 @@ int RegExpOpr::derivativeS(Node r, cvc5::String c, Node& retNode) return ret; } -Node RegExpOpr::derivativeSingle(Node r, cvc5::String c) +Node RegExpOpr::derivativeSingle(Node r, cvc5::internal::String c) { Assert(c.size() < 2); Trace("regexp-derive") << "RegExp-derive starts with /" << mkString( r ) << "/, c=" << c << std::endl; @@ -563,8 +563,8 @@ Node RegExpOpr::derivativeSingle(Node r, cvc5::String c) break; } case kind::REGEXP_RANGE: { - cvc5::String a = r[0].getConst(); - cvc5::String b = r[1].getConst(); + cvc5::internal::String a = r[0].getConst(); + cvc5::internal::String b = r[1].getConst(); retNode = (a <= c && c <= b) ? d_emptySingleton : d_emptyRegexp; break; } @@ -1588,4 +1588,4 @@ bool RegExpOpr::regExpIncludes(Node r1, Node r2) } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/strings/regexp_operation.h b/src/theory/strings/regexp_operation.h index 75262a862..11a486e1d 100644 --- a/src/theory/strings/regexp_operation.h +++ b/src/theory/strings/regexp_operation.h @@ -28,7 +28,7 @@ #include "theory/strings/skolem_cache.h" #include "util/string.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -56,7 +56,7 @@ enum RegExpConstType class RegExpOpr : protected EnvObj { - typedef std::pair PairNodeStr; + typedef std::pair PairNodeStr; typedef std::set< Node > SetNodes; typedef std::pair< Node, Node > PairNodes; @@ -172,8 +172,8 @@ class RegExpOpr : protected EnvObj * - delta( (re.union (re.* "A") R) ) returns 1. */ int delta( Node r, Node &exp ); - int derivativeS(Node r, cvc5::String c, Node& retNode); - Node derivativeSingle(Node r, cvc5::String c); + int derivativeS(Node r, cvc5::internal::String c, Node& retNode); + Node derivativeSingle(Node r, cvc5::internal::String c); /** * Returns the regular expression intersection of r1 and r2. If r1 or r2 is * not constant, then this method returns null. @@ -198,6 +198,6 @@ class RegExpOpr : protected EnvObj } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__STRINGS__REGEXP__OPERATION_H */ diff --git a/src/theory/strings/regexp_solver.cpp b/src/theory/strings/regexp_solver.cpp index 9a13aeab3..faacc0402 100644 --- a/src/theory/strings/regexp_solver.cpp +++ b/src/theory/strings/regexp_solver.cpp @@ -26,10 +26,10 @@ #include "util/statistics_value.h" using namespace std; -using namespace cvc5::context; -using namespace cvc5::kind; +using namespace cvc5::internal::context; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -51,7 +51,7 @@ RegExpSolver::RegExpSolver(Env& env, d_processed_memberships(context()), d_regexp_opr(env, tr.getSkolemCache()) { - d_emptyString = NodeManager::currentNM()->mkConst(::cvc5::String("")); + d_emptyString = NodeManager::currentNM()->mkConst(::cvc5::internal::String("")); d_emptyRegexp = NodeManager::currentNM()->mkNode(REGEXP_NONE); d_true = NodeManager::currentNM()->mkConst(true); d_false = NodeManager::currentNM()->mkConst(false); @@ -621,7 +621,7 @@ bool RegExpSolver::checkPDerivative( return true; } -cvc5::String RegExpSolver::getHeadConst(Node x) +cvc5::internal::String RegExpSolver::getHeadConst(Node x) { if (x.isConst()) { @@ -645,7 +645,7 @@ bool RegExpSolver::deriveRegExp(Node x, Assert(x != d_emptyString); Trace("regexp-derive") << "RegExpSolver::deriveRegExp: x=" << x << ", r= " << r << std::endl; - cvc5::String s = getHeadConst(x); + cvc5::internal::String s = getHeadConst(x); // only allow RE_DERIVE for concrete constant regular expressions if (!s.empty() && d_regexp_opr.getRegExpConstType(r) == RE_C_CONRETE_CONSTANT) { @@ -654,7 +654,7 @@ bool RegExpSolver::deriveRegExp(Node x, bool flag = true; for (unsigned i = 0; i < s.size(); ++i) { - cvc5::String c = s.substr(i, 1); + cvc5::internal::String c = s.substr(i, 1); Node dc2; int rt = d_regexp_opr.derivativeS(dc, c, dc2); dc = dc2; @@ -744,4 +744,4 @@ Node RegExpSolver::getNormalSymRegExp(Node r, std::vector& nf_exp) } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/strings/regexp_solver.h b/src/theory/strings/regexp_solver.h index f60d104f1..e1e53e750 100644 --- a/src/theory/strings/regexp_solver.h +++ b/src/theory/strings/regexp_solver.h @@ -34,7 +34,7 @@ #include "theory/strings/term_registry.h" #include "util/string.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -148,7 +148,7 @@ class RegExpSolver : protected EnvObj Node x, Node r, Node atom, bool& addedLemma, std::vector& nf_exp); Node getMembership(Node n, bool isPos, unsigned i); unsigned getNumMemberships(Node n, bool isPos); - cvc5::String getHeadConst(Node x); + cvc5::internal::String getHeadConst(Node x); bool deriveRegExp(Node x, Node r, Node atom, std::vector& ant); Node getNormalSymRegExp(Node r, std::vector& nf_exp); // regular expression memberships @@ -165,6 +165,6 @@ class RegExpSolver : protected EnvObj } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__STRINGS__THEORY_STRINGS_H */ diff --git a/src/theory/strings/rewrites.cpp b/src/theory/strings/rewrites.cpp index e57a1e815..5dcf9a943 100644 --- a/src/theory/strings/rewrites.cpp +++ b/src/theory/strings/rewrites.cpp @@ -17,7 +17,7 @@ #include -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -242,4 +242,4 @@ std::ostream& operator<<(std::ostream& out, Rewrite r) } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/strings/rewrites.h b/src/theory/strings/rewrites.h index cd90ecaea..fe0f4ae08 100644 --- a/src/theory/strings/rewrites.h +++ b/src/theory/strings/rewrites.h @@ -20,7 +20,7 @@ #include -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -255,6 +255,6 @@ std::ostream& operator<<(std::ostream& out, Rewrite r); } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__STRINGS__REWRITES_H */ diff --git a/src/theory/strings/seq_unit_op.cpp b/src/theory/strings/seq_unit_op.cpp index 5c29ffe04..ac3f35d69 100644 --- a/src/theory/strings/seq_unit_op.cpp +++ b/src/theory/strings/seq_unit_op.cpp @@ -19,7 +19,7 @@ #include "expr/type_node.h" -namespace cvc5 { +namespace cvc5::internal { std::ostream& operator<<(std::ostream& out, const SeqUnitOp& op) { @@ -47,4 +47,4 @@ bool SeqUnitOp::operator==(const SeqUnitOp& op) const return getType() == op.getType(); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/strings/seq_unit_op.h b/src/theory/strings/seq_unit_op.h index c8823c99b..e54de8d35 100644 --- a/src/theory/strings/seq_unit_op.h +++ b/src/theory/strings/seq_unit_op.h @@ -20,7 +20,7 @@ #include -namespace cvc5 { +namespace cvc5::internal { class TypeNode; @@ -58,6 +58,6 @@ struct SeqUnitOpHashFunction size_t operator()(const SeqUnitOp& op) const; }; /* struct SeqUnitOpHashFunction */ -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__STRINGS__SEQ_UNIT_OP_H */ diff --git a/src/theory/strings/sequences_rewriter.cpp b/src/theory/strings/sequences_rewriter.cpp index 3a2cbb900..431564b82 100644 --- a/src/theory/strings/sequences_rewriter.cpp +++ b/src/theory/strings/sequences_rewriter.cpp @@ -31,9 +31,9 @@ #include "util/string.h" using namespace std; -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -1082,7 +1082,7 @@ Node SequencesRewriter::rewriteAndOrRegExp(TNode node) for (const Node& c : constStrRe) { Assert(c.getKind() == STRING_TO_REGEXP && c[0].getKind() == CONST_STRING); - cvc5::String s = c[0].getConst(); + cvc5::internal::String s = c[0].getConst(); for (const Node& r : otherRe) { Trace("strings-rewrite-debug") @@ -1332,7 +1332,7 @@ Node SequencesRewriter::rewriteMembership(TNode node) else if (x.isConst() && RegExpEntail::isConstRegExp(r)) { // test whether x in node[1] - cvc5::String s = x.getConst(); + cvc5::internal::String s = x.getConst(); bool test = RegExpEntail::testConstStringInRegExp(s, 0, r); Node retNode = NodeManager::currentNM()->mkConst(test); return returnRewrite(node, retNode, Rewrite::RE_IN_EVAL); @@ -1837,7 +1837,7 @@ Node SequencesRewriter::rewriteSubstr(Node node) if (node[1].isConst() && node[2].isConst()) { Node s = node[0]; - cvc5::Rational rMaxInt(String::maxSize()); + cvc5::internal::Rational rMaxInt(String::maxSize()); uint32_t start; if (node[1].getConst() > rMaxInt) { @@ -1894,7 +1894,7 @@ Node SequencesRewriter::rewriteSubstr(Node node) } } } - Node zero = nm->mkConstInt(cvc5::Rational(0)); + Node zero = nm->mkConstInt(cvc5::internal::Rational(0)); // if entailed non-positive length or negative start point if (d_arithEntail.check(zero, node[1], true)) @@ -2097,7 +2097,7 @@ Node SequencesRewriter::rewriteUpdate(Node node) // rewriting for constant arguments if (node[1].isConst()) { - cvc5::Rational rMaxInt(String::maxSize()); + cvc5::internal::Rational rMaxInt(String::maxSize()); if (node[1].getConst() > rMaxInt) { // start beyond the maximum size of strings @@ -2546,7 +2546,7 @@ Node SequencesRewriter::rewriteIndexof(Node node) utils::getConcat(node[0], children0); if (children0[0].isConst() && node[1].isConst() && node[2].isConst()) { - cvc5::Rational rMaxInt(cvc5::String::maxSize()); + cvc5::internal::Rational rMaxInt(cvc5::internal::String::maxSize()); if (node[2].getConst() > rMaxInt) { if (node[0].isConst()) @@ -2775,7 +2775,7 @@ Node SequencesRewriter::rewriteIndexofRe(Node node) if (s.isConst() && n.isConst()) { Rational nrat = n.getConst(); - cvc5::Rational rMaxInt(cvc5::String::maxSize()); + cvc5::internal::Rational rMaxInt(cvc5::internal::String::maxSize()); if (nrat > rMaxInt) { // We know that, due to limitations on the size of string constants @@ -3574,7 +3574,7 @@ Node SequencesRewriter::rewritePrefixSuffix(Node n) Node val; if (isPrefix) { - val = NodeManager::currentNM()->mkConstInt(::cvc5::Rational(0)); + val = NodeManager::currentNM()->mkConstInt(::cvc5::internal::Rational(0)); } else { @@ -3744,4 +3744,4 @@ Node SequencesRewriter::postProcessRewrite(Node node, Node ret) } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/strings/sequences_rewriter.h b/src/theory/strings/sequences_rewriter.h index f988a9460..529a0f227 100644 --- a/src/theory/strings/sequences_rewriter.h +++ b/src/theory/strings/sequences_rewriter.h @@ -27,7 +27,7 @@ #include "theory/strings/strings_entail.h" #include "theory/theory_rewriter.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -324,6 +324,6 @@ class SequencesRewriter : public TheoryRewriter } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__STRINGS__SEQUENCES_REWRITER_H */ diff --git a/src/theory/strings/sequences_stats.cpp b/src/theory/strings/sequences_stats.cpp index 85939d75f..62c239246 100644 --- a/src/theory/strings/sequences_stats.cpp +++ b/src/theory/strings/sequences_stats.cpp @@ -17,7 +17,7 @@ #include "smt/smt_statistics_registry.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -47,4 +47,4 @@ SequencesStatistics::SequencesStatistics() } } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/strings/sequences_stats.h b/src/theory/strings/sequences_stats.h index 9ec9d3434..9ea999b32 100644 --- a/src/theory/strings/sequences_stats.h +++ b/src/theory/strings/sequences_stats.h @@ -23,7 +23,7 @@ #include "theory/strings/rewrites.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -91,6 +91,6 @@ class SequencesStatistics } } -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__STRINGS__SEQUENCES_STATS_H */ diff --git a/src/theory/strings/skolem_cache.cpp b/src/theory/strings/skolem_cache.cpp index c81059712..b2753f152 100644 --- a/src/theory/strings/skolem_cache.cpp +++ b/src/theory/strings/skolem_cache.cpp @@ -24,9 +24,9 @@ #include "theory/strings/word.h" #include "util/rational.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -338,4 +338,4 @@ Node SkolemCache::mkSkolemFun(SkolemFunId id, TypeNode tn, Node a, Node b) } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/strings/skolem_cache.h b/src/theory/strings/skolem_cache.h index ff74e5c0d..a27b240bb 100644 --- a/src/theory/strings/skolem_cache.h +++ b/src/theory/strings/skolem_cache.h @@ -25,7 +25,7 @@ #include "expr/node.h" #include "expr/skolem_manager.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { class Rewriter; @@ -210,6 +210,6 @@ class SkolemCache } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__STRINGS__SKOLEM_CACHE_H */ diff --git a/src/theory/strings/solver_state.cpp b/src/theory/strings/solver_state.cpp index 6a64a57d5..38672e63c 100644 --- a/src/theory/strings/solver_state.cpp +++ b/src/theory/strings/solver_state.cpp @@ -21,10 +21,10 @@ #include "util/rational.h" using namespace std; -using namespace cvc5::context; -using namespace cvc5::kind; +using namespace cvc5::internal::context; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -230,4 +230,4 @@ void SolverState::separateByLength( } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/strings/solver_state.h b/src/theory/strings/solver_state.h index 061c5cf10..f2cba396c 100644 --- a/src/theory/strings/solver_state.h +++ b/src/theory/strings/solver_state.h @@ -30,7 +30,7 @@ #include "theory/uf/equality_engine.h" #include "theory/valuation.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -161,6 +161,6 @@ class SolverState : public TheoryState } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__STRINGS__SOLVER_STATE_H */ diff --git a/src/theory/strings/strategy.cpp b/src/theory/strings/strategy.cpp index f54722104..75c8f5fe9 100644 --- a/src/theory/strings/strategy.cpp +++ b/src/theory/strings/strategy.cpp @@ -17,7 +17,7 @@ #include "options/strings_options.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -178,4 +178,4 @@ void Strategy::initializeStrategy() } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/strings/strategy.h b/src/theory/strings/strategy.h index e87372c0f..349bb3224 100644 --- a/src/theory/strings/strategy.h +++ b/src/theory/strings/strategy.h @@ -23,7 +23,7 @@ #include "theory/theory.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -118,6 +118,6 @@ class Strategy : protected EnvObj } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__STRINGS__STRATEGY_H */ diff --git a/src/theory/strings/strings_entail.cpp b/src/theory/strings/strings_entail.cpp index 90a5446a1..e9a73478c 100644 --- a/src/theory/strings/strings_entail.cpp +++ b/src/theory/strings/strings_entail.cpp @@ -24,9 +24,9 @@ #include "util/rational.h" #include "util/string.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -123,7 +123,7 @@ bool StringsEntail::stripSymbolicLength(std::vector& n1, Assert(dir == 1 || dir == -1); Assert(nr.empty()); NodeManager* nm = NodeManager::currentNM(); - Node zero = nm->mkConstInt(cvc5::Rational(0)); + Node zero = nm->mkConstInt(cvc5::internal::Rational(0)); bool ret = false; bool success = true; unsigned sindex = 0; @@ -145,7 +145,7 @@ bool StringsEntail::stripSymbolicLength(std::vector& n1, Assert(d_arithEntail.check(curr, true)); Node s = n1[sindex_use]; size_t slen = Word::getLength(s); - Node ncl = nm->mkConstInt(cvc5::Rational(slen)); + Node ncl = nm->mkConstInt(cvc5::internal::Rational(slen)); Node next_s = nm->mkNode(SUB, lowerBound, ncl); next_s = d_rr->rewrite(next_s); Assert(next_s.isConst()); @@ -609,7 +609,7 @@ bool StringsEntail::stripConstantEndpoints(std::vector& n1, if (n2[index1].isConst()) { Assert(n2[index1].getType().isString()); // string-only - cvc5::String t = n2[index1].getConst(); + cvc5::internal::String t = n2[index1].getConst(); if (n1.size() == 1) { // if n1.size()==1, then if n2[index1] is not a number, we can drop @@ -1004,4 +1004,4 @@ Node StringsEntail::inferEqsFromContains(Node x, Node y) } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/strings/strings_entail.h b/src/theory/strings/strings_entail.h index 1ff65a5b4..92c040353 100644 --- a/src/theory/strings/strings_entail.h +++ b/src/theory/strings/strings_entail.h @@ -23,7 +23,7 @@ #include "expr/node.h" #include "theory/strings/arith_entail.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { class Rewriter; @@ -388,6 +388,6 @@ class StringsEntail } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__STRINGS__STRING_ENTAIL_H */ diff --git a/src/theory/strings/strings_fmf.cpp b/src/theory/strings/strings_fmf.cpp index dfc179614..d0f5a70dd 100644 --- a/src/theory/strings/strings_fmf.cpp +++ b/src/theory/strings/strings_fmf.cpp @@ -18,10 +18,10 @@ #include "util/rational.h" using namespace std; -using namespace cvc5::context; -using namespace cvc5::kind; +using namespace cvc5::internal::context; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -96,4 +96,4 @@ std::string StringsFmf::StringSumLengthDecisionStrategy::identify() const } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/strings/strings_fmf.h b/src/theory/strings/strings_fmf.h index 6b09ba198..a8e6b28e6 100644 --- a/src/theory/strings/strings_fmf.h +++ b/src/theory/strings/strings_fmf.h @@ -27,7 +27,7 @@ #include "theory/strings/term_registry.h" #include "theory/valuation.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -99,6 +99,6 @@ class StringsFmf : protected EnvObj } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__STRINGS__STRINGS_FMF_H */ diff --git a/src/theory/strings/strings_rewriter.cpp b/src/theory/strings/strings_rewriter.cpp index 000e2e70c..ae1e0f584 100644 --- a/src/theory/strings/strings_rewriter.cpp +++ b/src/theory/strings/strings_rewriter.cpp @@ -21,9 +21,9 @@ #include "util/rational.h" #include "util/string.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -328,4 +328,4 @@ Node StringsRewriter::rewriteStringIsDigit(Node n) } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/strings/strings_rewriter.h b/src/theory/strings/strings_rewriter.h index 0ceaa5a41..5f8880e0c 100644 --- a/src/theory/strings/strings_rewriter.h +++ b/src/theory/strings/strings_rewriter.h @@ -21,7 +21,7 @@ #include "expr/node.h" #include "theory/strings/sequences_rewriter.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -109,6 +109,6 @@ class StringsRewriter : public SequencesRewriter } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__STRINGS__STRINGS_REWRITER_H */ diff --git a/src/theory/strings/term_registry.cpp b/src/theory/strings/term_registry.cpp index 01e821aba..5372b50cf 100644 --- a/src/theory/strings/term_registry.cpp +++ b/src/theory/strings/term_registry.cpp @@ -29,10 +29,10 @@ #include "util/string.h" using namespace std; -using namespace cvc5::context; -using namespace cvc5::kind; +using namespace cvc5::internal::context; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -699,4 +699,4 @@ Node TermRegistry::mkNConcat(const std::vector& c, TypeNode tn) const } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/strings/term_registry.h b/src/theory/strings/term_registry.h index 5dd038ad3..3e0a6f0ba 100644 --- a/src/theory/strings/term_registry.h +++ b/src/theory/strings/term_registry.h @@ -31,7 +31,7 @@ #include "theory/strings/solver_state.h" #include "theory/uf/equality_engine.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { class Theory; @@ -323,6 +323,6 @@ class TermRegistry : protected EnvObj } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__STRINGS__TERM_REGISTRY_H */ diff --git a/src/theory/strings/theory_strings.cpp b/src/theory/strings/theory_strings.cpp index af3d2db22..30abd1df3 100644 --- a/src/theory/strings/theory_strings.cpp +++ b/src/theory/strings/theory_strings.cpp @@ -33,10 +33,10 @@ #include "theory/valuation.h" using namespace std; -using namespace cvc5::context; -using namespace cvc5::kind; +using namespace cvc5::internal::context; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -1308,4 +1308,4 @@ std::string TheoryStrings::debugPrintStringsEqc() } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/strings/theory_strings.h b/src/theory/strings/theory_strings.h index 89c2a8bdc..123db81c8 100644 --- a/src/theory/strings/theory_strings.h +++ b/src/theory/strings/theory_strings.h @@ -47,7 +47,7 @@ #include "theory/theory.h" #include "theory/uf/equality_engine.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -319,6 +319,6 @@ class TheoryStrings : public Theory { } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__STRINGS__THEORY_STRINGS_H */ diff --git a/src/theory/strings/theory_strings_preprocess.cpp b/src/theory/strings/theory_strings_preprocess.cpp index 8a4bc3dd5..214c9fc9f 100644 --- a/src/theory/strings/theory_strings_preprocess.cpp +++ b/src/theory/strings/theory_strings_preprocess.cpp @@ -28,10 +28,10 @@ #include "util/statistics_registry.h" #include "util/string.h" -using namespace cvc5; -using namespace cvc5::kind; +using namespace cvc5::internal; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -1092,4 +1092,4 @@ Node StringsPreprocess::processAssertion(Node n, std::vector& asserts) } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/strings/theory_strings_preprocess.h b/src/theory/strings/theory_strings_preprocess.h index 01e6fa856..aa3358ecd 100644 --- a/src/theory/strings/theory_strings_preprocess.h +++ b/src/theory/strings/theory_strings_preprocess.h @@ -26,7 +26,7 @@ #include "theory/theory.h" #include "util/hash.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -95,6 +95,6 @@ class StringsPreprocess { } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__STRINGS__PREPROCESS_H */ diff --git a/src/theory/strings/theory_strings_type_rules.cpp b/src/theory/strings/theory_strings_type_rules.cpp index d3ab190cc..6307d236f 100644 --- a/src/theory/strings/theory_strings_type_rules.cpp +++ b/src/theory/strings/theory_strings_type_rules.cpp @@ -22,7 +22,7 @@ #include "theory/strings/seq_unit_op.h" #include "util/cardinality.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -391,4 +391,4 @@ Node SequenceProperties::mkGroundTerm(TypeNode type) } } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/strings/theory_strings_type_rules.h b/src/theory/strings/theory_strings_type_rules.h index 5bc3ebd8b..ad3840cc5 100644 --- a/src/theory/strings/theory_strings_type_rules.h +++ b/src/theory/strings/theory_strings_type_rules.h @@ -20,7 +20,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { class NodeManager; class TypeNode; @@ -142,6 +142,6 @@ struct SequenceProperties } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__STRINGS__THEORY_STRINGS_TYPE_RULES_H */ diff --git a/src/theory/strings/theory_strings_utils.cpp b/src/theory/strings/theory_strings_utils.cpp index 75d8dd628..df8083f87 100644 --- a/src/theory/strings/theory_strings_utils.cpp +++ b/src/theory/strings/theory_strings_utils.cpp @@ -31,9 +31,9 @@ #include "util/regexp.h" #include "util/string.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { namespace utils { @@ -438,4 +438,4 @@ Node mkAbstractStringValueForLength(Node n, Node len, size_t id) } // namespace utils } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/strings/theory_strings_utils.h b/src/theory/strings/theory_strings_utils.h index 59b58709a..152d5c3ed 100644 --- a/src/theory/strings/theory_strings_utils.h +++ b/src/theory/strings/theory_strings_utils.h @@ -22,7 +22,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { namespace utils { @@ -214,6 +214,6 @@ Node mkAbstractStringValueForLength(Node n, Node len, size_t id); } // namespace utils } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/strings/type_enumerator.cpp b/src/theory/strings/type_enumerator.cpp index 833af8c18..49bd14042 100644 --- a/src/theory/strings/type_enumerator.cpp +++ b/src/theory/strings/type_enumerator.cpp @@ -19,7 +19,7 @@ #include "theory/strings/theory_strings_utils.h" #include "util/string.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -301,4 +301,4 @@ bool SequenceEnumerator::isFinished() { return d_wenum.isFinished(); } } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/strings/type_enumerator.h b/src/theory/strings/type_enumerator.h index e6a7eaccd..a99a7c51b 100644 --- a/src/theory/strings/type_enumerator.h +++ b/src/theory/strings/type_enumerator.h @@ -24,7 +24,7 @@ #include "expr/type_node.h" #include "theory/type_enumerator.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -218,6 +218,6 @@ class SequenceEnumerator : public TypeEnumeratorBase } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__STRINGS__TYPE_ENUMERATOR_H */ diff --git a/src/theory/strings/word.cpp b/src/theory/strings/word.cpp index d7392cb85..4fd7cadef 100644 --- a/src/theory/strings/word.cpp +++ b/src/theory/strings/word.cpp @@ -18,9 +18,9 @@ #include "expr/sequence.h" #include "util/string.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -487,4 +487,4 @@ Node Word::reverse(TNode x) } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/strings/word.h b/src/theory/strings/word.h index 18bdad8b7..df7c2b2bc 100644 --- a/src/theory/strings/word.h +++ b/src/theory/strings/word.h @@ -23,7 +23,7 @@ #include "expr/node.h" #include "expr/type_node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace strings { @@ -166,6 +166,6 @@ class Word } // namespace strings } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/subs_minimize.cpp b/src/theory/subs_minimize.cpp index 56b7a2fed..542f74669 100644 --- a/src/theory/subs_minimize.cpp +++ b/src/theory/subs_minimize.cpp @@ -22,9 +22,9 @@ #include "util/rational.h" using namespace std; -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { SubstitutionMinimize::SubstitutionMinimize(Env& env) : EnvObj(env) {} @@ -467,4 +467,4 @@ bool SubstitutionMinimize::isSingularArg(Node n, Kind k, unsigned arg) } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/subs_minimize.h b/src/theory/subs_minimize.h index 571f629dd..d5a3909d8 100644 --- a/src/theory/subs_minimize.h +++ b/src/theory/subs_minimize.h @@ -23,7 +23,7 @@ #include "expr/node.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { /** SubstitutionMinimize @@ -97,6 +97,6 @@ class SubstitutionMinimize : protected EnvObj }; } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__SUBS_MINIMIZE_H */ diff --git a/src/theory/substitutions.cpp b/src/theory/substitutions.cpp index 1f7000850..f359cde40 100644 --- a/src/theory/substitutions.cpp +++ b/src/theory/substitutions.cpp @@ -19,7 +19,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace theory { SubstitutionMap::SubstitutionMap(context::Context* context) @@ -255,4 +255,4 @@ std::ostream& operator<<(std::ostream& out, const theory::SubstitutionMap::itera return out << "[CDMap-iterator]"; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/substitutions.h b/src/theory/substitutions.h index 1029c7a0a..901a8bd80 100644 --- a/src/theory/substitutions.h +++ b/src/theory/substitutions.h @@ -29,7 +29,7 @@ #include "context/cdhashmap.h" #include "util/hash.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { class Rewriter; @@ -186,6 +186,6 @@ inline std::ostream& operator << (std::ostream& out, const SubstitutionMap& subs std::ostream& operator<<(std::ostream& out, const theory::SubstitutionMap::iterator& i); -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__SUBSTITUTIONS_H */ diff --git a/src/theory/term_registration_visitor.cpp b/src/theory/term_registration_visitor.cpp index 4301251bf..3afbe555c 100644 --- a/src/theory/term_registration_visitor.cpp +++ b/src/theory/term_registration_visitor.cpp @@ -21,9 +21,9 @@ #include "smt/logic_exception.h" #include "theory/theory_engine.h" -using namespace cvc5::theory; +using namespace cvc5::internal::theory; -namespace cvc5 { +namespace cvc5::internal { std::string PreRegisterVisitor::toString() const { std::stringstream ss; @@ -305,4 +305,4 @@ void SharedTermsVisitor::clear() { d_visited.clear(); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/term_registration_visitor.h b/src/theory/term_registration_visitor.h index 3fed2c321..e3f4aef31 100644 --- a/src/theory/term_registration_visitor.h +++ b/src/theory/term_registration_visitor.h @@ -24,7 +24,7 @@ #include "smt/env_obj.h" #include "theory/shared_terms_database.h" -namespace cvc5 { +namespace cvc5::internal { class TheoryEngine; @@ -183,4 +183,4 @@ class SharedTermsVisitor : protected EnvObj TNodeToTheorySetMap d_preregistered; }; -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/theory.cpp b/src/theory/theory.cpp index 8f4c9ee6d..e8438de0f 100644 --- a/src/theory/theory.cpp +++ b/src/theory/theory.cpp @@ -39,7 +39,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace theory { std::ostream& operator<<(std::ostream& os, Theory::Effort level){ @@ -740,4 +740,4 @@ theory::Assertion Theory::get() } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/theory.h b/src/theory/theory.h index cd6b7f431..134102db2 100644 --- a/src/theory/theory.h +++ b/src/theory/theory.h @@ -39,7 +39,7 @@ #include "theory/valuation.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { class ProofNodeManager; class TheoryEngine; @@ -99,7 +99,7 @@ namespace eq { class Theory : protected EnvObj { friend class CarePairArgumentCallback; - friend class ::cvc5::TheoryEngine; + friend class ::cvc5::internal::TheoryEngine; protected: /** Name of this theory instance. Along with the TheoryId this should @@ -843,7 +843,7 @@ class Theory : protected EnvObj std::ostream& operator<<(std::ostream& os, theory::Theory::Effort level); inline std::ostream& operator<<(std::ostream& out, - const cvc5::theory::Theory& theory) + const cvc5::internal::theory::Theory& theory) { return out << theory.identify(); } @@ -863,6 +863,6 @@ inline std::ostream& operator << (std::ostream& out, theory::Theory::PPAssertSta } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__THEORY_H */ diff --git a/src/theory/theory_engine.cpp b/src/theory/theory_engine.cpp index 2dd9d6a2c..aa10da4ac 100644 --- a/src/theory/theory_engine.cpp +++ b/src/theory/theory_engine.cpp @@ -49,9 +49,9 @@ using namespace std; -using namespace cvc5::theory; +using namespace cvc5::internal::theory; -namespace cvc5 { +namespace cvc5::internal { /* -------------------------------------------------------------------------- */ @@ -64,19 +64,19 @@ namespace theory { */ #define CVC5_FOR_EACH_THEORY \ - CVC5_FOR_EACH_THEORY_STATEMENT(cvc5::theory::THEORY_BUILTIN) \ - CVC5_FOR_EACH_THEORY_STATEMENT(cvc5::theory::THEORY_BOOL) \ - CVC5_FOR_EACH_THEORY_STATEMENT(cvc5::theory::THEORY_UF) \ - CVC5_FOR_EACH_THEORY_STATEMENT(cvc5::theory::THEORY_ARITH) \ - CVC5_FOR_EACH_THEORY_STATEMENT(cvc5::theory::THEORY_BV) \ - CVC5_FOR_EACH_THEORY_STATEMENT(cvc5::theory::THEORY_FP) \ - CVC5_FOR_EACH_THEORY_STATEMENT(cvc5::theory::THEORY_ARRAYS) \ - CVC5_FOR_EACH_THEORY_STATEMENT(cvc5::theory::THEORY_DATATYPES) \ - CVC5_FOR_EACH_THEORY_STATEMENT(cvc5::theory::THEORY_SEP) \ - CVC5_FOR_EACH_THEORY_STATEMENT(cvc5::theory::THEORY_SETS) \ - CVC5_FOR_EACH_THEORY_STATEMENT(cvc5::theory::THEORY_BAGS) \ - CVC5_FOR_EACH_THEORY_STATEMENT(cvc5::theory::THEORY_STRINGS) \ - CVC5_FOR_EACH_THEORY_STATEMENT(cvc5::theory::THEORY_QUANTIFIERS) + CVC5_FOR_EACH_THEORY_STATEMENT(cvc5::internal::theory::THEORY_BUILTIN) \ + CVC5_FOR_EACH_THEORY_STATEMENT(cvc5::internal::theory::THEORY_BOOL) \ + CVC5_FOR_EACH_THEORY_STATEMENT(cvc5::internal::theory::THEORY_UF) \ + CVC5_FOR_EACH_THEORY_STATEMENT(cvc5::internal::theory::THEORY_ARITH) \ + CVC5_FOR_EACH_THEORY_STATEMENT(cvc5::internal::theory::THEORY_BV) \ + CVC5_FOR_EACH_THEORY_STATEMENT(cvc5::internal::theory::THEORY_FP) \ + CVC5_FOR_EACH_THEORY_STATEMENT(cvc5::internal::theory::THEORY_ARRAYS) \ + CVC5_FOR_EACH_THEORY_STATEMENT(cvc5::internal::theory::THEORY_DATATYPES) \ + CVC5_FOR_EACH_THEORY_STATEMENT(cvc5::internal::theory::THEORY_SEP) \ + CVC5_FOR_EACH_THEORY_STATEMENT(cvc5::internal::theory::THEORY_SETS) \ + CVC5_FOR_EACH_THEORY_STATEMENT(cvc5::internal::theory::THEORY_BAGS) \ + CVC5_FOR_EACH_THEORY_STATEMENT(cvc5::internal::theory::THEORY_STRINGS) \ + CVC5_FOR_EACH_THEORY_STATEMENT(cvc5::internal::theory::THEORY_QUANTIFIERS) } // namespace theory @@ -1981,4 +1981,4 @@ void TheoryEngine::initializeProofChecker(ProofChecker* pc) theory::Rewriter* TheoryEngine::getRewriter() { return d_env.getRewriter(); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/theory_engine.h b/src/theory/theory_engine.h index 290ad096b..2acffd38b 100644 --- a/src/theory/theory_engine.h +++ b/src/theory/theory_engine.h @@ -40,7 +40,7 @@ #include "util/hash.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { class Env; class ResourceManager; @@ -644,6 +644,6 @@ class TheoryEngine : protected EnvObj }; /* class TheoryEngine */ -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY_ENGINE_H */ diff --git a/src/theory/theory_engine_proof_generator.cpp b/src/theory/theory_engine_proof_generator.cpp index eaa9a1746..b8f8fa1a9 100644 --- a/src/theory/theory_engine_proof_generator.cpp +++ b/src/theory/theory_engine_proof_generator.cpp @@ -19,9 +19,9 @@ #include "proof/proof_node.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { TheoryEngineProofGenerator::TheoryEngineProofGenerator(ProofNodeManager* pnm, context::Context* c) @@ -129,4 +129,4 @@ std::string TheoryEngineProofGenerator::identify() const return "TheoryEngineProofGenerator"; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/theory_engine_proof_generator.h b/src/theory/theory_engine_proof_generator.h index 1cb99b039..46dbaa43e 100644 --- a/src/theory/theory_engine_proof_generator.h +++ b/src/theory/theory_engine_proof_generator.h @@ -27,7 +27,7 @@ #include "proof/proof_node_manager.h" #include "proof/trust_node.h" -namespace cvc5 { +namespace cvc5::internal { /** * A simple proof generator class used by the theory engine. This class @@ -75,6 +75,6 @@ class TheoryEngineProofGenerator : public ProofGenerator Node d_false; }; -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY_ENGINE_PROOF_GENERATOR_H */ diff --git a/src/theory/theory_eq_notify.h b/src/theory/theory_eq_notify.h index 1d6a9cdd1..03bf84b70 100644 --- a/src/theory/theory_eq_notify.h +++ b/src/theory/theory_eq_notify.h @@ -22,7 +22,7 @@ #include "theory/theory_inference_manager.h" #include "theory/uf/equality_engine_notify.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { /** @@ -78,6 +78,6 @@ class TheoryEqNotifyClass : public eq::EqualityEngineNotify }; } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/theory_id.cpp b/src/theory/theory_id.cpp index d9b25bf98..592027ba8 100644 --- a/src/theory/theory_id.cpp +++ b/src/theory/theory_id.cpp @@ -23,7 +23,7 @@ #include "base/check.h" #include "lib/ffs.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { TheoryId& operator++(TheoryId& id) @@ -163,4 +163,4 @@ std::string TheoryIdSetUtil::setToString(TheoryIdSet theorySet) } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/theory_id.h b/src/theory/theory_id.h index 3bd2df556..101ab04c3 100644 --- a/src/theory/theory_id.h +++ b/src/theory/theory_id.h @@ -23,7 +23,7 @@ #include -namespace cvc5 { +namespace cvc5::internal { namespace theory { /** @@ -107,5 +107,5 @@ class TheoryIdSetUtil }; } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/theory_inference.cpp b/src/theory/theory_inference.cpp index daead4e86..632737c2a 100644 --- a/src/theory/theory_inference.cpp +++ b/src/theory/theory_inference.cpp @@ -17,9 +17,9 @@ #include "theory/theory_inference_manager.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { SimpleTheoryLemma::SimpleTheoryLemma(InferenceId id, @@ -54,4 +54,4 @@ Node SimpleTheoryInternalFact::processFact(std::vector& exp, } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/theory_inference.h b/src/theory/theory_inference.h index 7d90c4554..581273158 100644 --- a/src/theory/theory_inference.h +++ b/src/theory/theory_inference.h @@ -22,7 +22,7 @@ #include "theory/inference_id.h" #include "theory/output_channel.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { class TheoryInferenceManager; @@ -119,6 +119,6 @@ class SimpleTheoryInternalFact : public TheoryInference }; } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/theory_inference_manager.cpp b/src/theory/theory_inference_manager.cpp index 97019d101..e3c1ae86b 100644 --- a/src/theory/theory_inference_manager.cpp +++ b/src/theory/theory_inference_manager.cpp @@ -29,9 +29,9 @@ #include "theory/uf/equality_engine.h" #include "theory/uf/proof_equality_engine.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { TheoryInferenceManager::TheoryInferenceManager(Env& env, @@ -634,4 +634,4 @@ void TheoryInferenceManager::notifyInConflict() } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/theory_inference_manager.h b/src/theory/theory_inference_manager.h index c626bbef9..83a195dfa 100644 --- a/src/theory/theory_inference_manager.h +++ b/src/theory/theory_inference_manager.h @@ -29,7 +29,7 @@ #include "theory/output_channel.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { class ProofNodeManager; class AnnotationProofGenerator; @@ -483,6 +483,6 @@ class TheoryInferenceManager : protected EnvObj }; } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__THEORY_INFERENCE_MANAGER_H */ diff --git a/src/theory/theory_model.cpp b/src/theory/theory_model.cpp index 3e603c5a8..453b323d8 100644 --- a/src/theory/theory_model.cpp +++ b/src/theory/theory_model.cpp @@ -27,10 +27,10 @@ #include "util/rational.h" using namespace std; -using namespace cvc5::kind; -using namespace cvc5::context; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::context; -namespace cvc5 { +namespace cvc5::internal { namespace theory { TheoryModel::TheoryModel(Env& env, std::string name, bool enableFuncModels) @@ -892,4 +892,4 @@ bool TheoryModel::isValue(TNode n) const } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/theory_model.h b/src/theory/theory_model.h index e1ddef5d4..eacb74f07 100644 --- a/src/theory/theory_model.h +++ b/src/theory/theory_model.h @@ -29,7 +29,7 @@ #include "theory/uf/equality_engine.h" #include "util/cardinality.h" -namespace cvc5 { +namespace cvc5::internal { class Env; @@ -419,6 +419,6 @@ class TheoryModel : protected EnvObj };/* class TheoryModel */ } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__THEORY_MODEL_H */ diff --git a/src/theory/theory_model_builder.cpp b/src/theory/theory_model_builder.cpp index 6b5216650..6938f7bf0 100644 --- a/src/theory/theory_model_builder.cpp +++ b/src/theory/theory_model_builder.cpp @@ -27,10 +27,10 @@ #include "util/uninterpreted_sort_value.h" using namespace std; -using namespace cvc5::kind; -using namespace cvc5::context; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::context; -namespace cvc5 { +namespace cvc5::internal { namespace theory { TheoryEngineModelBuilder::TheoryEngineModelBuilder(Env& env) : EnvObj(env) {} @@ -1473,4 +1473,4 @@ void TheoryEngineModelBuilder::assignFunctions(TheoryModel* m) } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/theory_model_builder.h b/src/theory/theory_model_builder.h index fb6204b69..2e78044a8 100644 --- a/src/theory/theory_model_builder.h +++ b/src/theory/theory_model_builder.h @@ -24,7 +24,7 @@ #include "smt/env_obj.h" #include "theory/theory_model.h" -namespace cvc5 { +namespace cvc5::internal { class Env; @@ -317,6 +317,6 @@ class TheoryEngineModelBuilder : protected EnvObj }; /* class TheoryEngineModelBuilder */ } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__THEORY_MODEL_BUILDER_H */ diff --git a/src/theory/theory_preprocessor.cpp b/src/theory/theory_preprocessor.cpp index 75f03a445..f3683490d 100644 --- a/src/theory/theory_preprocessor.cpp +++ b/src/theory/theory_preprocessor.cpp @@ -25,7 +25,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace theory { TheoryPreprocessor::TheoryPreprocessor(Env& env, TheoryEngine& engine) @@ -501,4 +501,4 @@ void TheoryPreprocessor::registerTrustedRewrite(TrustNode trn, } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/theory_preprocessor.h b/src/theory/theory_preprocessor.h index 382bcd2da..036458c20 100644 --- a/src/theory/theory_preprocessor.h +++ b/src/theory/theory_preprocessor.h @@ -31,7 +31,7 @@ #include "smt/term_formula_removal.h" #include "theory/skolem_lemma.h" -namespace cvc5 { +namespace cvc5::internal { class LogicInfo; class TheoryEngine; @@ -206,6 +206,6 @@ class TheoryPreprocessor : protected EnvObj }; } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__THEORY_PREPROCESSOR_H */ diff --git a/src/theory/theory_rewriter.cpp b/src/theory/theory_rewriter.cpp index 5324cd302..1f7068175 100644 --- a/src/theory/theory_rewriter.cpp +++ b/src/theory/theory_rewriter.cpp @@ -17,7 +17,7 @@ #include "theory/theory_rewriter.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { std::ostream& operator<<(std::ostream& os, RewriteStatus rs) @@ -79,4 +79,4 @@ TrustNode TheoryRewriter::expandDefinition(Node node) } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/theory_rewriter.h b/src/theory/theory_rewriter.h index cc4eb67bc..2b7117c05 100644 --- a/src/theory/theory_rewriter.h +++ b/src/theory/theory_rewriter.h @@ -23,7 +23,7 @@ #include "expr/node.h" #include "proof/trust_node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { class Rewriter; @@ -172,6 +172,6 @@ class TheoryRewriter }; } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__THEORY_REWRITER_H */ diff --git a/src/theory/theory_state.cpp b/src/theory/theory_state.cpp index 7bf95028f..f67447690 100644 --- a/src/theory/theory_state.cpp +++ b/src/theory/theory_state.cpp @@ -17,7 +17,7 @@ #include "theory/uf/equality_engine.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { TheoryState::TheoryState(Env& env, Valuation val) @@ -171,4 +171,4 @@ context::CDList::const_iterator TheoryState::factsEnd(TheoryId tid) Valuation& TheoryState::getValuation() { return d_valuation; } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/theory_state.h b/src/theory/theory_state.h index 99d3f6cad..05afb684f 100644 --- a/src/theory/theory_state.h +++ b/src/theory/theory_state.h @@ -24,7 +24,7 @@ #include "smt/env_obj.h" #include "theory/valuation.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace eq { @@ -119,6 +119,6 @@ class TheoryState : protected EnvObj }; } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__SOLVER_STATE_H */ diff --git a/src/theory/theory_traits_template.h b/src/theory/theory_traits_template.h index fa6552be1..e2933c84f 100644 --- a/src/theory/theory_traits_template.h +++ b/src/theory/theory_traits_template.h @@ -29,7 +29,7 @@ ${theory_includes} // clang-format on -namespace cvc5 { +namespace cvc5::internal { namespace theory { template @@ -52,7 +52,7 @@ ${theory_constructors} default: Unhandled() << id; } } -}; /* struct cvc5::theory::TheoryConstructor */ +}; /* struct cvc5::internal::theory::TheoryConstructor */ } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/trust_substitutions.cpp b/src/theory/trust_substitutions.cpp index 57681688b..22d5f16f6 100644 --- a/src/theory/trust_substitutions.cpp +++ b/src/theory/trust_substitutions.cpp @@ -17,7 +17,7 @@ #include "theory/rewriter.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { TrustSubstitutionMap::TrustSubstitutionMap(context::Context* c, @@ -282,4 +282,4 @@ Node TrustSubstitutionMap::getSubstitution(size_t index) } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/trust_substitutions.h b/src/theory/trust_substitutions.h index abcf039ba..98cab9438 100644 --- a/src/theory/trust_substitutions.h +++ b/src/theory/trust_substitutions.h @@ -30,7 +30,7 @@ #include "proof/trust_node.h" #include "theory/substitutions.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { /** @@ -149,6 +149,6 @@ class TrustSubstitutionMap : public ProofGenerator }; } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__TRUST_SUBSTITUTIONS_H */ diff --git a/src/theory/type_enumerator.h b/src/theory/type_enumerator.h index 2965cf199..17f4235df 100644 --- a/src/theory/type_enumerator.h +++ b/src/theory/type_enumerator.h @@ -24,7 +24,7 @@ #include "expr/type_node.h" #include "util/integer.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { class NoMoreValuesException : public Exception { @@ -197,6 +197,6 @@ class TypeEnumerator { };/* class TypeEnumerator */ } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__TYPE_ENUMERATOR_H */ diff --git a/src/theory/type_enumerator_template.cpp b/src/theory/type_enumerator_template.cpp index 4f942d6c6..bfa5d07d4 100644 --- a/src/theory/type_enumerator_template.cpp +++ b/src/theory/type_enumerator_template.cpp @@ -25,7 +25,7 @@ ${type_enumerator_includes} using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace theory { TypeEnumeratorInterface* TypeEnumerator::mkTypeEnumerator( @@ -51,4 +51,4 @@ TypeEnumeratorInterface* TypeEnumerator::mkTypeEnumerator( } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/type_set.cpp b/src/theory/type_set.cpp index 12bb2bae6..192556303 100644 --- a/src/theory/type_set.cpp +++ b/src/theory/type_set.cpp @@ -15,9 +15,9 @@ #include "theory/type_set.h" using namespace std; -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { TypeSet::~TypeSet() @@ -138,4 +138,4 @@ void TypeSet::addSubTerms(TNode n, } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/type_set.h b/src/theory/type_set.h index fb4859602..4b37e708c 100644 --- a/src/theory/type_set.h +++ b/src/theory/type_set.h @@ -23,7 +23,7 @@ #include "theory/type_enumerator.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { /* Type set @@ -84,6 +84,6 @@ class TypeSet }; /* class TypeSet */ } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__TYPE_SET_H */ diff --git a/src/theory/uf/cardinality_extension.cpp b/src/theory/uf/cardinality_extension.cpp index c52fce677..8c75a407d 100644 --- a/src/theory/uf/cardinality_extension.cpp +++ b/src/theory/uf/cardinality_extension.cpp @@ -32,10 +32,10 @@ #include "util/rational.h" using namespace std; -using namespace cvc5::kind; -using namespace cvc5::context; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::context; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace uf { @@ -1799,4 +1799,4 @@ CardinalityExtension::Statistics::Statistics() } // namespace uf } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/uf/cardinality_extension.h b/src/theory/uf/cardinality_extension.h index 822f13f23..d5155141f 100644 --- a/src/theory/uf/cardinality_extension.h +++ b/src/theory/uf/cardinality_extension.h @@ -25,7 +25,7 @@ #include "theory/theory.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace uf { @@ -460,6 +460,6 @@ class CardinalityExtension : protected EnvObj } // namespace uf } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY_UF_STRONG_SOLVER_H */ diff --git a/src/theory/uf/eq_proof.cpp b/src/theory/uf/eq_proof.cpp index 52579e223..d6dc4b599 100644 --- a/src/theory/uf/eq_proof.cpp +++ b/src/theory/uf/eq_proof.cpp @@ -20,7 +20,7 @@ #include "proof/proof.h" #include "proof/proof_checker.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace eq { @@ -1452,4 +1452,4 @@ Node EqProof::addToProof(CDProof* p, } // namespace eq } // Namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/uf/eq_proof.h b/src/theory/uf/eq_proof.h index 3179da592..0ea17bd30 100644 --- a/src/theory/uf/eq_proof.h +++ b/src/theory/uf/eq_proof.h @@ -17,7 +17,7 @@ #include "expr/node.h" #include "theory/uf/equality_engine_types.h" -namespace cvc5 { +namespace cvc5::internal { class CDProof; @@ -354,4 +354,4 @@ class EqProof } // Namespace eq } // Namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/uf/equality_engine.cpp b/src/theory/uf/equality_engine.cpp index b220164e3..71613604f 100644 --- a/src/theory/uf/equality_engine.cpp +++ b/src/theory/uf/equality_engine.cpp @@ -25,7 +25,7 @@ #include "theory/rewriter.h" #include "theory/uf/eq_proof.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace eq { @@ -2639,4 +2639,4 @@ EqualityNodeId EqualityEngine::TriggerTermSet::getTrigger(TheoryId tag) const } // Namespace uf } // Namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/uf/equality_engine.h b/src/theory/uf/equality_engine.h index 8f7ebda4e..28da5abff 100644 --- a/src/theory/uf/equality_engine.h +++ b/src/theory/uf/equality_engine.h @@ -37,7 +37,7 @@ #include "theory/uf/equality_engine_types.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { class Env; @@ -858,6 +858,6 @@ class EqualityEngine : public context::ContextNotifyObj, protected EnvObj { } // Namespace eq } // Namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/uf/equality_engine_iterator.cpp b/src/theory/uf/equality_engine_iterator.cpp index 14cc00414..286545a85 100644 --- a/src/theory/uf/equality_engine_iterator.cpp +++ b/src/theory/uf/equality_engine_iterator.cpp @@ -17,7 +17,7 @@ #include "theory/uf/equality_engine.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace eq { @@ -133,4 +133,4 @@ bool EqClassIterator::isFinished() const { return d_current == null_id; } } // namespace eq } // Namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/uf/equality_engine_iterator.h b/src/theory/uf/equality_engine_iterator.h index 6a4b281df..953a167ee 100644 --- a/src/theory/uf/equality_engine_iterator.h +++ b/src/theory/uf/equality_engine_iterator.h @@ -21,7 +21,7 @@ #include "expr/node.h" #include "theory/uf/equality_engine_types.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace eq { @@ -80,6 +80,6 @@ class EqClassIterator } // Namespace eq } // Namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/uf/equality_engine_notify.h b/src/theory/uf/equality_engine_notify.h index f5447923a..f5ddef02f 100644 --- a/src/theory/uf/equality_engine_notify.h +++ b/src/theory/uf/equality_engine_notify.h @@ -20,7 +20,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace eq { @@ -116,6 +116,6 @@ class EqualityEngineNotifyNone : public EqualityEngineNotify } // Namespace eq } // Namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/uf/equality_engine_types.h b/src/theory/uf/equality_engine_types.h index 2f4e14887..3532f2689 100644 --- a/src/theory/uf/equality_engine_types.h +++ b/src/theory/uf/equality_engine_types.h @@ -27,7 +27,7 @@ #include "util/hash.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace eq { @@ -360,6 +360,6 @@ struct TriggerInfo { } // namespace eq } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__UF__EQUALITY_ENGINE_TYPES_H */ diff --git a/src/theory/uf/function_const.cpp b/src/theory/uf/function_const.cpp index ef19a65d2..06ebf296c 100644 --- a/src/theory/uf/function_const.cpp +++ b/src/theory/uf/function_const.cpp @@ -18,7 +18,7 @@ #include "expr/array_store_all.h" #include "theory/rewriter.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace uf { @@ -411,4 +411,4 @@ Node FunctionConst::getArrayRepresentationForLambda(TNode n) } // namespace uf } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/uf/function_const.h b/src/theory/uf/function_const.h index 10d1bf89c..feb99b980 100644 --- a/src/theory/uf/function_const.h +++ b/src/theory/uf/function_const.h @@ -22,7 +22,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace uf { @@ -105,6 +105,6 @@ class FunctionConst } // namespace uf } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__UF__FUNCTION_CONST_H */ diff --git a/src/theory/uf/ho_extension.cpp b/src/theory/uf/ho_extension.cpp index aec223d66..f9792c6c9 100644 --- a/src/theory/uf/ho_extension.cpp +++ b/src/theory/uf/ho_extension.cpp @@ -23,9 +23,9 @@ #include "theory/uf/theory_uf_rewriter.h" using namespace std; -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace uf { @@ -732,4 +732,4 @@ bool HoExtension::cacheLemma(TNode lem) } // namespace uf } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/uf/ho_extension.h b/src/theory/uf/ho_extension.h index 13d381622..779fada92 100644 --- a/src/theory/uf/ho_extension.h +++ b/src/theory/uf/ho_extension.h @@ -28,7 +28,7 @@ #include "theory/theory_model.h" #include "theory/theory_state.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace uf { @@ -235,6 +235,6 @@ class HoExtension : protected EnvObj } // namespace uf } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/uf/kinds b/src/theory/uf/kinds index 252020b88..30bccd34c 100644 --- a/src/theory/uf/kinds +++ b/src/theory/uf/kinds @@ -4,61 +4,61 @@ # src/theory/builtin/kinds. # -theory THEORY_UF ::cvc5::theory::uf::TheoryUF "theory/uf/theory_uf.h" +theory THEORY_UF ::cvc5::internal::theory::uf::TheoryUF "theory/uf/theory_uf.h" typechecker "theory/uf/theory_uf_type_rules.h" properties stable-infinite parametric properties check ppStaticLearn presolve -rewriter ::cvc5::theory::uf::TheoryUfRewriter "theory/uf/theory_uf_rewriter.h" +rewriter ::cvc5::internal::theory::uf::TheoryUfRewriter "theory/uf/theory_uf_rewriter.h" parameterized APPLY_UF VARIABLE 1: "application of an uninterpreted function; first parameter is the function, remaining ones are parameters to that function" -typerule APPLY_UF ::cvc5::theory::uf::UfTypeRule +typerule APPLY_UF ::cvc5::internal::theory::uf::UfTypeRule operator FUNCTION_TYPE 2: "a function type" cardinality FUNCTION_TYPE \ - "::cvc5::theory::uf::FunctionProperties::computeCardinality(%TYPE%)" \ + "::cvc5::internal::theory::uf::FunctionProperties::computeCardinality(%TYPE%)" \ "theory/uf/theory_uf_type_rules.h" well-founded FUNCTION_TYPE \ - "::cvc5::theory::uf::FunctionProperties::isWellFounded(%TYPE%)" \ - "::cvc5::theory::uf::FunctionProperties::mkGroundTerm(%TYPE%)" \ + "::cvc5::internal::theory::uf::FunctionProperties::isWellFounded(%TYPE%)" \ + "::cvc5::internal::theory::uf::FunctionProperties::mkGroundTerm(%TYPE%)" \ "theory/uf/theory_uf_type_rules.h" enumerator FUNCTION_TYPE \ - ::cvc5::theory::uf::FunctionEnumerator \ + ::cvc5::internal::theory::uf::FunctionEnumerator \ "theory/uf/type_enumerator.h" operator LAMBDA 2 "a lambda expression; first parameter is a BOUND_VAR_LIST, second is lambda body" -typerule LAMBDA ::cvc5::theory::uf::LambdaTypeRule +typerule LAMBDA ::cvc5::internal::theory::uf::LambdaTypeRule variable BOOLEAN_TERM_VARIABLE "Boolean term variable" # lambda expressions that are isomorphic to array constants can be considered constants -construle LAMBDA ::cvc5::theory::uf::LambdaTypeRule +construle LAMBDA ::cvc5::internal::theory::uf::LambdaTypeRule operator HO_APPLY 2 "higher-order (partial) function application" -typerule HO_APPLY ::cvc5::theory::uf::HoApplyTypeRule +typerule HO_APPLY ::cvc5::internal::theory::uf::HoApplyTypeRule constant CARDINALITY_CONSTRAINT_OP \ class \ CardinalityConstraint \ - ::cvc5::CardinalityConstraintHashFunction \ + ::cvc5::internal::CardinalityConstraintHashFunction \ "expr/cardinality_constraint.h" \ - "the empty set constant; payload is an instance of the cvc5::CardinalityConstraint class" + "the empty set constant; payload is an instance of the cvc5::internal::CardinalityConstraint class" parameterized CARDINALITY_CONSTRAINT CARDINALITY_CONSTRAINT_OP 0 "a fixed upper bound on the cardinality of an uninterpreted sort" -typerule CARDINALITY_CONSTRAINT_OP ::cvc5::theory::uf::CardinalityConstraintOpTypeRule -typerule CARDINALITY_CONSTRAINT ::cvc5::theory::uf::CardinalityConstraintTypeRule +typerule CARDINALITY_CONSTRAINT_OP ::cvc5::internal::theory::uf::CardinalityConstraintOpTypeRule +typerule CARDINALITY_CONSTRAINT ::cvc5::internal::theory::uf::CardinalityConstraintTypeRule constant COMBINED_CARDINALITY_CONSTRAINT_OP \ class \ CombinedCardinalityConstraint \ - ::cvc5::CombinedCardinalityConstraintHashFunction \ + ::cvc5::internal::CombinedCardinalityConstraintHashFunction \ "expr/cardinality_constraint.h" \ - "the empty set constant; payload is an instance of the cvc5::CombinedCardinalityConstraint class" + "the empty set constant; payload is an instance of the cvc5::internal::CombinedCardinalityConstraint class" parameterized COMBINED_CARDINALITY_CONSTRAINT COMBINED_CARDINALITY_CONSTRAINT_OP 0 "a fixed upper bound on the sum of cardinalities of uninterpreted sorts" -typerule COMBINED_CARDINALITY_CONSTRAINT_OP ::cvc5::theory::uf::CombinedCardinalityConstraintOpTypeRule -typerule COMBINED_CARDINALITY_CONSTRAINT ::cvc5::theory::uf::CombinedCardinalityConstraintTypeRule +typerule COMBINED_CARDINALITY_CONSTRAINT_OP ::cvc5::internal::theory::uf::CombinedCardinalityConstraintOpTypeRule +typerule COMBINED_CARDINALITY_CONSTRAINT ::cvc5::internal::theory::uf::CombinedCardinalityConstraintTypeRule endtheory diff --git a/src/theory/uf/lambda_lift.cpp b/src/theory/uf/lambda_lift.cpp index 01b0259b3..9b67bba9a 100644 --- a/src/theory/uf/lambda_lift.cpp +++ b/src/theory/uf/lambda_lift.cpp @@ -20,9 +20,9 @@ #include "options/uf_options.h" #include "smt/env.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace uf { @@ -204,4 +204,4 @@ Node LambdaLift::betaReduce(TNode lam, const std::vector& args) const } // namespace uf } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/uf/lambda_lift.h b/src/theory/uf/lambda_lift.h index 1e36dad31..8a80d8d7c 100644 --- a/src/theory/uf/lambda_lift.h +++ b/src/theory/uf/lambda_lift.h @@ -26,7 +26,7 @@ #include "smt/env_obj.h" #include "theory/skolem_lemma.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace uf { @@ -94,6 +94,6 @@ class LambdaLift : protected EnvObj } // namespace uf } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__UF__LAMBDA_LIFT_H */ diff --git a/src/theory/uf/proof_checker.cpp b/src/theory/uf/proof_checker.cpp index eb43341a0..218f214b1 100644 --- a/src/theory/uf/proof_checker.cpp +++ b/src/theory/uf/proof_checker.cpp @@ -17,9 +17,9 @@ #include "theory/uf/theory_uf_rewriter.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace uf { @@ -208,4 +208,4 @@ Node UfProofRuleChecker::checkInternal(PfRule id, } // namespace uf } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/uf/proof_checker.h b/src/theory/uf/proof_checker.h index caeda828e..dbfa7bd26 100644 --- a/src/theory/uf/proof_checker.h +++ b/src/theory/uf/proof_checker.h @@ -22,7 +22,7 @@ #include "proof/proof_checker.h" #include "proof/proof_node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace uf { @@ -45,6 +45,6 @@ class UfProofRuleChecker : public ProofRuleChecker } // namespace uf } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__UF__PROOF_CHECKER_H */ diff --git a/src/theory/uf/proof_equality_engine.cpp b/src/theory/uf/proof_equality_engine.cpp index 53a91d52b..3467aaec4 100644 --- a/src/theory/uf/proof_equality_engine.cpp +++ b/src/theory/uf/proof_equality_engine.cpp @@ -24,9 +24,9 @@ #include "theory/uf/equality_engine.h" #include "theory/uf/proof_checker.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace eq { @@ -557,4 +557,4 @@ void ProofEqEngine::explainWithProof(Node lit, } // namespace eq } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/uf/proof_equality_engine.h b/src/theory/uf/proof_equality_engine.h index 47bb2fe0d..32a1e3009 100644 --- a/src/theory/uf/proof_equality_engine.h +++ b/src/theory/uf/proof_equality_engine.h @@ -29,7 +29,7 @@ #include "proof/lazy_proof.h" #include "smt/env_obj.h" -namespace cvc5 { +namespace cvc5::internal { class Env; class ProofNode; @@ -302,6 +302,6 @@ class ProofEqEngine : protected EnvObj, public EagerProofGenerator } // namespace eq } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__STRINGS__PROOF_MANAGER_H */ diff --git a/src/theory/uf/symmetry_breaker.cpp b/src/theory/uf/symmetry_breaker.cpp index a1494aead..c236fbdc2 100644 --- a/src/theory/uf/symmetry_breaker.cpp +++ b/src/theory/uf/symmetry_breaker.cpp @@ -46,11 +46,11 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace uf { -using namespace ::cvc5::context; +using namespace ::cvc5::internal::context; SymmetryBreaker::Template::Template() : d_template(), @@ -801,4 +801,4 @@ std::ostream& operator<<(std::ostream& out, const theory::uf::SymmetryBreaker::P return out; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/uf/symmetry_breaker.h b/src/theory/uf/symmetry_breaker.h index 80a5a592d..191a7116e 100644 --- a/src/theory/uf/symmetry_breaker.h +++ b/src/theory/uf/symmetry_breaker.h @@ -54,7 +54,7 @@ #include "smt/smt_statistics_registry.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace uf { @@ -170,8 +170,8 @@ public: std::ostream& operator<<( std::ostream& out, - const ::cvc5::theory::uf::SymmetryBreaker::Permutation& p); + const ::cvc5::internal::theory::uf::SymmetryBreaker::Permutation& p); -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__UF__SYMMETRY_BREAKER_H */ diff --git a/src/theory/uf/theory_uf.cpp b/src/theory/uf/theory_uf.cpp index cdd2e0501..ae476fa69 100644 --- a/src/theory/uf/theory_uf.cpp +++ b/src/theory/uf/theory_uf.cpp @@ -37,7 +37,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace uf { @@ -684,4 +684,4 @@ bool TheoryUF::isHigherOrderType(TypeNode tn) } // namespace uf } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/uf/theory_uf.h b/src/theory/uf/theory_uf.h index ec011ef48..8187f9d25 100644 --- a/src/theory/uf/theory_uf.h +++ b/src/theory/uf/theory_uf.h @@ -29,7 +29,7 @@ #include "theory/uf/symmetry_breaker.h" #include "theory/uf/theory_uf_rewriter.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace uf { @@ -183,6 +183,6 @@ private: } // namespace uf } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__UF__THEORY_UF_H */ diff --git a/src/theory/uf/theory_uf_model.cpp b/src/theory/uf/theory_uf_model.cpp index 6d8d421ba..7006a9e5f 100644 --- a/src/theory/uf/theory_uf_model.cpp +++ b/src/theory/uf/theory_uf_model.cpp @@ -22,9 +22,9 @@ #include "theory/rewriter.h" #include "theory/theory_model.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace uf { @@ -251,4 +251,4 @@ Node UfModelTree::getFunctionValue(const std::string& argPrefix, Rewriter* r) } // namespace uf } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/uf/theory_uf_model.h b/src/theory/uf/theory_uf_model.h index e4235623e..f763896cd 100644 --- a/src/theory/uf/theory_uf_model.h +++ b/src/theory/uf/theory_uf_model.h @@ -22,7 +22,7 @@ #include "expr/node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { class TheoryModel; @@ -120,6 +120,6 @@ public: } } -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/theory/uf/theory_uf_rewriter.cpp b/src/theory/uf/theory_uf_rewriter.cpp index b052ced62..61c2f80be 100644 --- a/src/theory/uf/theory_uf_rewriter.cpp +++ b/src/theory/uf/theory_uf_rewriter.cpp @@ -20,7 +20,7 @@ #include "theory/substitutions.h" #include "theory/uf/function_const.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace uf { @@ -262,4 +262,4 @@ Node TheoryUfRewriter::rewriteLambda(Node node) } // namespace uf } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/uf/theory_uf_rewriter.h b/src/theory/uf/theory_uf_rewriter.h index 31a6f4669..73ebe49d4 100644 --- a/src/theory/uf/theory_uf_rewriter.h +++ b/src/theory/uf/theory_uf_rewriter.h @@ -27,7 +27,7 @@ #include "theory/substitutions.h" #include "theory/theory_rewriter.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace uf { @@ -72,6 +72,6 @@ class TheoryUfRewriter : public TheoryRewriter } // namespace uf } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__UF__THEORY_UF_REWRITER_H */ diff --git a/src/theory/uf/theory_uf_type_rules.cpp b/src/theory/uf/theory_uf_type_rules.cpp index e46560a71..7f15f1c57 100644 --- a/src/theory/uf/theory_uf_type_rules.cpp +++ b/src/theory/uf/theory_uf_type_rules.cpp @@ -23,7 +23,7 @@ #include "util/cardinality.h" #include "util/rational.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace uf { @@ -263,4 +263,4 @@ Node FunctionProperties::mkGroundTerm(TypeNode type) } // namespace uf } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/uf/theory_uf_type_rules.h b/src/theory/uf/theory_uf_type_rules.h index 3ff0f63c6..4f452ff7c 100644 --- a/src/theory/uf/theory_uf_type_rules.h +++ b/src/theory/uf/theory_uf_type_rules.h @@ -21,7 +21,7 @@ #include "expr/node.h" #include "expr/type_node.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace uf { @@ -120,6 +120,6 @@ class FunctionProperties } // namespace uf } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__UF__THEORY_UF_TYPE_RULES_H */ diff --git a/src/theory/uf/type_enumerator.cpp b/src/theory/uf/type_enumerator.cpp index a7f1f3ec3..c38d4c64e 100644 --- a/src/theory/uf/type_enumerator.cpp +++ b/src/theory/uf/type_enumerator.cpp @@ -17,7 +17,7 @@ #include "theory/uf/function_const.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace uf { @@ -48,4 +48,4 @@ FunctionEnumerator& FunctionEnumerator::operator++() } // namespace uf } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/uf/type_enumerator.h b/src/theory/uf/type_enumerator.h index dfbbc1924..df98773e9 100644 --- a/src/theory/uf/type_enumerator.h +++ b/src/theory/uf/type_enumerator.h @@ -23,7 +23,7 @@ #include "theory/type_enumerator.h" #include "util/integer.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { namespace uf { @@ -54,6 +54,6 @@ class FunctionEnumerator : public TypeEnumeratorBase } // namespace uf } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__UF__TYPE_ENUMERATOR_H */ diff --git a/src/theory/valuation.cpp b/src/theory/valuation.cpp index bd7a3872c..d6b04e836 100644 --- a/src/theory/valuation.cpp +++ b/src/theory/valuation.cpp @@ -23,7 +23,7 @@ #include "theory/theory_engine.h" #include "theory/theory_model.h" -namespace cvc5 { +namespace cvc5::internal { namespace theory { std::ostream& operator<<(std::ostream& os, EqualityStatus s) @@ -233,4 +233,4 @@ context::CDList::const_iterator Valuation::factsEnd(TheoryId tid) } } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/theory/valuation.h b/src/theory/valuation.h index f1b14da76..de76bb21f 100644 --- a/src/theory/valuation.h +++ b/src/theory/valuation.h @@ -26,7 +26,7 @@ #include "expr/node.h" #include "options/theory_options.h" -namespace cvc5 { +namespace cvc5::internal { class TheoryEngine; @@ -234,6 +234,6 @@ public: };/* class Valuation */ } // namespace theory -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__THEORY__VALUATION_H */ diff --git a/src/util/bin_heap.h b/src/util/bin_heap.h index 44b290a16..20ee9e06e 100644 --- a/src/util/bin_heap.h +++ b/src/util/bin_heap.h @@ -29,7 +29,7 @@ #include "base/check.h" #include "base/exception.h" -namespace cvc5 { +namespace cvc5::internal { /** * BinaryHeap that orders its elements greatest-first (i.e., in the opposite @@ -383,6 +383,6 @@ private: template const size_t BinaryHeap::MAX_SIZE = (std::numeric_limits::max()-2)/2; -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__BIN_HEAP_H */ diff --git a/src/util/bitvector.cpp b/src/util/bitvector.cpp index 848fc44f9..4ce1bff0e 100644 --- a/src/util/bitvector.cpp +++ b/src/util/bitvector.cpp @@ -17,7 +17,7 @@ #include "base/exception.h" -namespace cvc5 { +namespace cvc5::internal { unsigned BitVector::getSize() const { return d_size; } @@ -372,4 +372,4 @@ BitVector BitVector::mkMaxSigned(unsigned size) return ~BitVector::mkMinSigned(size); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/util/bitvector.h b/src/util/bitvector.h index cd0870722..eb61e751d 100644 --- a/src/util/bitvector.h +++ b/src/util/bitvector.h @@ -24,7 +24,7 @@ #include "base/exception.h" #include "util/integer.h" -namespace cvc5 { +namespace cvc5::internal { class BitVector { @@ -445,6 +445,6 @@ inline std::ostream& operator<<(std::ostream& os, const IntToBitVector& bv) return os << "[" << bv.d_size << "]"; } -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__BITVECTOR_H */ diff --git a/src/util/bool.h b/src/util/bool.h index f35df58a2..51ea409c5 100644 --- a/src/util/bool.h +++ b/src/util/bool.h @@ -18,7 +18,7 @@ #ifndef CVC5__BOOL_H #define CVC5__BOOL_H -namespace cvc5 { +namespace cvc5::internal { struct BoolHashFunction { inline size_t operator()(bool b) const { @@ -26,6 +26,6 @@ struct BoolHashFunction { } };/* struct BoolHashFunction */ -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__BOOL_H */ diff --git a/src/util/cardinality.cpp b/src/util/cardinality.cpp index 1526cfa29..0d501907f 100644 --- a/src/util/cardinality.cpp +++ b/src/util/cardinality.cpp @@ -23,7 +23,7 @@ #include "base/check.h" #include "base/exception.h" -namespace cvc5 { +namespace cvc5::internal { const Integer Cardinality::s_unknownCard(0); const Integer Cardinality::s_intCard(-1); @@ -264,4 +264,4 @@ std::ostream& operator<<(std::ostream& out, const Cardinality& c) { return out; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/util/cardinality.h b/src/util/cardinality.h index a480d1375..eafae137c 100644 --- a/src/util/cardinality.h +++ b/src/util/cardinality.h @@ -25,7 +25,7 @@ #include "util/integer.h" -namespace cvc5 { +namespace cvc5::internal { /** * Representation for a Beth number, used only to construct @@ -226,6 +226,6 @@ std::ostream& operator<<(std::ostream& out, CardinalityBeth b); /** Print a cardinality in a human-readable fashion. */ std::ostream& operator<<(std::ostream& out, const Cardinality& c); -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__CARDINALITY_H */ diff --git a/src/util/cardinality_class.cpp b/src/util/cardinality_class.cpp index 70b321963..301054861 100644 --- a/src/util/cardinality_class.cpp +++ b/src/util/cardinality_class.cpp @@ -17,7 +17,7 @@ #include -namespace cvc5 { +namespace cvc5::internal { const char* toString(CardinalityClass c) { @@ -65,4 +65,4 @@ bool isCardinalityClassFinite(CardinalityClass c, bool fmfEnabled) return false; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/util/cardinality_class.h b/src/util/cardinality_class.h index 253bdd63b..aa19eb0d0 100644 --- a/src/util/cardinality_class.h +++ b/src/util/cardinality_class.h @@ -20,7 +20,7 @@ #include -namespace cvc5 { +namespace cvc5::internal { /** * Cardinality classes. A type has exactly one cardinality class. The @@ -93,6 +93,6 @@ CardinalityClass maxCardinalityClass(CardinalityClass c1, CardinalityClass c2); */ bool isCardinalityClassFinite(CardinalityClass c, bool fmfEnabled); -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/util/dense_map.h b/src/util/dense_map.h index afc5b2189..997e7f688 100644 --- a/src/util/dense_map.h +++ b/src/util/dense_map.h @@ -36,7 +36,7 @@ #include "base/check.h" #include "util/index.h" -namespace cvc5 { +namespace cvc5::internal { template class DenseMap { @@ -339,4 +339,4 @@ public: void pop_back() { d_map.pop_back(); } }; /* class DenseMultiset */ -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/util/didyoumean.cpp b/src/util/didyoumean.cpp index f4dbbbd36..6e86d236c 100644 --- a/src/util/didyoumean.cpp +++ b/src/util/didyoumean.cpp @@ -26,7 +26,7 @@ #include #include -namespace cvc5 { +namespace cvc5::internal { namespace { @@ -154,4 +154,4 @@ std::string DidYouMean::getMatchAsString(const std::string& input) return oss.str(); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/util/didyoumean.h b/src/util/didyoumean.h index 26de80f66..86cd1511d 100644 --- a/src/util/didyoumean.h +++ b/src/util/didyoumean.h @@ -25,7 +25,7 @@ #include #include -namespace cvc5 { +namespace cvc5::internal { class CVC5_EXPORT DidYouMean { public: @@ -47,4 +47,4 @@ class CVC5_EXPORT DidYouMean { std::vector d_words; }; -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/util/divisible.cpp b/src/util/divisible.cpp index 5b4fafc3d..261dc3b94 100644 --- a/src/util/divisible.cpp +++ b/src/util/divisible.cpp @@ -23,10 +23,10 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { Divisible::Divisible(const Integer& n) : k(n) { PrettyCheckArgument(n > 0, n, "Divisible predicate must be constructed over positive N"); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/util/divisible.h b/src/util/divisible.h index 220b47afb..47b3e3e69 100644 --- a/src/util/divisible.h +++ b/src/util/divisible.h @@ -27,7 +27,7 @@ #include "util/integer.h" -namespace cvc5 { +namespace cvc5::internal { /** * The structure representing the divisibility-by-k predicate. @@ -62,6 +62,6 @@ inline std::ostream& operator <<(std::ostream& os, const Divisible& d) { return os << "divisible-by-" << d.k; } -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__DIVISIBLE_H */ diff --git a/src/util/floatingpoint.cpp b/src/util/floatingpoint.cpp index 3c8e706c0..db10578b6 100644 --- a/src/util/floatingpoint.cpp +++ b/src/util/floatingpoint.cpp @@ -29,7 +29,7 @@ /* -------------------------------------------------------------------------- */ -namespace cvc5 { +namespace cvc5::internal { /* -------------------------------------------------------------------------- */ @@ -521,4 +521,4 @@ std::ostream& operator<<(std::ostream& os, const FloatingPointConvertSort& fpcs) return os << "(_ to_fp " << fpcs.getSize().exponentWidth() << " " << fpcs.getSize().significandWidth() << ")"; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/util/floatingpoint.h b/src/util/floatingpoint.h index 2056f37ca..df4914fb5 100644 --- a/src/util/floatingpoint.h +++ b/src/util/floatingpoint.h @@ -30,7 +30,7 @@ /* -------------------------------------------------------------------------- */ -namespace cvc5 { +namespace cvc5::internal { /* -------------------------------------------------------------------------- */ @@ -508,7 +508,7 @@ struct FloatingPointToBVHashFunction { inline size_t operator()(const FloatingPointToBV& fptbv) const { - UnsignedHashFunction< ::cvc5::BitVectorSize> f; + UnsignedHashFunction< ::cvc5::internal::BitVectorSize> f; return (key ^ 0x46504256) ^ f(fptbv.d_bv_size); } }; /* struct FloatingPointToBVHashFunction */ @@ -527,6 +527,6 @@ std::ostream& operator<<(std::ostream& os, const FloatingPointSize& fps); std::ostream& operator<<(std::ostream& os, const FloatingPointConvertSort& fpcs); -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__FLOATINGPOINT_H */ diff --git a/src/util/floatingpoint_literal_symfpu.cpp b/src/util/floatingpoint_literal_symfpu.cpp index dc3dce6b9..b77184ff9 100644 --- a/src/util/floatingpoint_literal_symfpu.cpp +++ b/src/util/floatingpoint_literal_symfpu.cpp @@ -37,9 +37,9 @@ namespace symfpu { #define CVC5_LIT_ITE_DFN(T) \ template <> \ - struct ite<::cvc5::symfpuLiteral::Cvc5Prop, T> \ + struct ite<::cvc5::internal::symfpuLiteral::Cvc5Prop, T> \ { \ - static const T& iteOp(const ::cvc5::symfpuLiteral::Cvc5Prop& cond, \ + static const T& iteOp(const ::cvc5::internal::symfpuLiteral::Cvc5Prop& cond, \ const T& l, \ const T& r) \ { \ @@ -47,17 +47,17 @@ namespace symfpu { } \ } -CVC5_LIT_ITE_DFN(::cvc5::symfpuLiteral::traits::rm); -CVC5_LIT_ITE_DFN(::cvc5::symfpuLiteral::traits::prop); -CVC5_LIT_ITE_DFN(::cvc5::symfpuLiteral::traits::sbv); -CVC5_LIT_ITE_DFN(::cvc5::symfpuLiteral::traits::ubv); +CVC5_LIT_ITE_DFN(::cvc5::internal::symfpuLiteral::traits::rm); +CVC5_LIT_ITE_DFN(::cvc5::internal::symfpuLiteral::traits::prop); +CVC5_LIT_ITE_DFN(::cvc5::internal::symfpuLiteral::traits::sbv); +CVC5_LIT_ITE_DFN(::cvc5::internal::symfpuLiteral::traits::ubv); #undef CVC5_LIT_ITE_DFN } // namespace symfpu /* -------------------------------------------------------------------------- */ -namespace cvc5 { +namespace cvc5::internal { uint32_t FloatingPointLiteral::getUnpackedExponentWidth(FloatingPointSize& size) { @@ -333,4 +333,4 @@ BitVector FloatingPointLiteral::convertToUBVTotal(BitVectorSize width, d_fp_size, rm, d_symuf, width, undefinedCase); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/util/floatingpoint_literal_symfpu.h b/src/util/floatingpoint_literal_symfpu.h index 5b2b0f7c8..9934c23ef 100644 --- a/src/util/floatingpoint_literal_symfpu.h +++ b/src/util/floatingpoint_literal_symfpu.h @@ -26,7 +26,7 @@ /* -------------------------------------------------------------------------- */ -namespace cvc5 { +namespace cvc5::internal { using SymFPUUnpackedFloatLiteral = ::symfpu::unpackedFloat; @@ -221,6 +221,6 @@ class FloatingPointLiteral /* -------------------------------------------------------------------------- */ -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/util/floatingpoint_literal_symfpu_traits.cpp b/src/util/floatingpoint_literal_symfpu_traits.cpp index 0f46708b0..50bf2c0ac 100644 --- a/src/util/floatingpoint_literal_symfpu_traits.cpp +++ b/src/util/floatingpoint_literal_symfpu_traits.cpp @@ -17,7 +17,7 @@ #include "base/check.h" -namespace cvc5 { +namespace cvc5::internal { namespace symfpuLiteral { template @@ -410,4 +410,4 @@ void traits::invariant(const traits::prop& p) return; } } // namespace symfpuLiteral -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/util/floatingpoint_literal_symfpu_traits.h b/src/util/floatingpoint_literal_symfpu_traits.h index bc5caaf88..6c35a3ba0 100644 --- a/src/util/floatingpoint_literal_symfpu_traits.h +++ b/src/util/floatingpoint_literal_symfpu_traits.h @@ -33,7 +33,7 @@ /* -------------------------------------------------------------------------- */ -namespace cvc5 { +namespace cvc5::internal { namespace symfpuLiteral { /** @@ -45,8 +45,8 @@ class wrappedBitVector; using Cvc5BitWidth = uint32_t; using Cvc5Prop = bool; -using Cvc5RM = ::cvc5::RoundingMode; -using Cvc5FPSize = ::cvc5::FloatingPointSize; +using Cvc5RM = ::cvc5::internal::RoundingMode; +using Cvc5FPSize = ::cvc5::internal::FloatingPointSize; using Cvc5UnsignedBitVector = wrappedBitVector; using Cvc5SignedBitVector = wrappedBitVector; @@ -95,7 +95,7 @@ struct signedToLiteralType }; /** - * This extends the interface for cvc5::BitVector for compatibility with symFPU. + * This extends the interface for cvc5::internal::BitVector for compatibility with symFPU. * The template parameter distinguishes signed and unsigned bit-vectors, a * distinction symfpu uses. */ @@ -144,7 +144,7 @@ class wrappedBitVector : public BitVector /** * Inherited but ... * *sigh* if we use the inherited version then it will return a - * cvc5::BitVector which can be converted back to a + * cvc5::internal::BitVector which can be converted back to a * wrappedBitVector but isn't done automatically when working * out types for templates instantiation. ITE is a particular * problem as expressions and constants no longer derive the @@ -254,6 +254,6 @@ class wrappedBitVector : public BitVector Cvc5BitWidth lower) const; }; } // namespace symfpuLiteral -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/util/floatingpoint_size.cpp b/src/util/floatingpoint_size.cpp index d0c1f95f3..18edff520 100644 --- a/src/util/floatingpoint_size.cpp +++ b/src/util/floatingpoint_size.cpp @@ -16,7 +16,7 @@ #include "base/check.h" -namespace cvc5 { +namespace cvc5::internal { FloatingPointSize::FloatingPointSize(uint32_t exp_size, uint32_t sig_size) : d_exp_size(exp_size), d_sig_size(sig_size) @@ -32,4 +32,4 @@ FloatingPointSize::FloatingPointSize(const FloatingPointSize& old) Assert(validSignificandSize(d_sig_size)); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/util/floatingpoint_size.h b/src/util/floatingpoint_size.h index a5b7a336c..188bce571 100644 --- a/src/util/floatingpoint_size.h +++ b/src/util/floatingpoint_size.h @@ -17,7 +17,7 @@ #ifndef CVC5__FLOATINGPOINT_SIZE_H #define CVC5__FLOATINGPOINT_SIZE_H -namespace cvc5 { +namespace cvc5::internal { // Inline these! inline bool validExponentSize(uint32_t e) { return e >= 2; } @@ -93,6 +93,6 @@ struct FloatingPointSizeHashFunction | t.significandWidth()); } }; /* struct FloatingPointSizeHashFunction */ -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/util/gmp_util.h b/src/util/gmp_util.h index 9938bb163..de56bed6e 100644 --- a/src/util/gmp_util.h +++ b/src/util/gmp_util.h @@ -23,7 +23,7 @@ #include -namespace cvc5 { +namespace cvc5::internal { /** Hashes the gmp integer primitive in a word by word fashion. */ inline size_t gmpz_hash(const mpz_t toHash) { @@ -36,6 +36,6 @@ inline size_t gmpz_hash(const mpz_t toHash) { return hash; }/* gmpz_hash() */ -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__GMP_UTIL_H */ diff --git a/src/util/hash.h b/src/util/hash.h index ef8bf4a2a..09615d0e7 100644 --- a/src/util/hash.h +++ b/src/util/hash.h @@ -39,7 +39,7 @@ struct hash { }/* std namespace */ -namespace cvc5 { +namespace cvc5::internal { namespace fnv1a { @@ -68,6 +68,6 @@ struct PairHashFunction { } };/* struct PairHashFunction */ -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__HASH_H */ diff --git a/src/util/iand.h b/src/util/iand.h index 6c29c38b4..89868796c 100644 --- a/src/util/iand.h +++ b/src/util/iand.h @@ -23,7 +23,7 @@ #include "base/exception.h" #include "util/integer.h" -namespace cvc5 { +namespace cvc5::internal { struct IntAnd { @@ -42,6 +42,6 @@ inline std::ostream& operator<<(std::ostream& os, const IntAnd& ia) return os << "(_ iand " << ia.d_size << ")"; } -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__IAND_H */ diff --git a/src/util/index.cpp b/src/util/index.cpp index d9fea498f..368159938 100644 --- a/src/util/index.cpp +++ b/src/util/index.cpp @@ -17,7 +17,7 @@ #include -namespace cvc5 { +namespace cvc5::internal { static_assert(sizeof(Index) <= sizeof(size_t), "Index cannot be larger than size_t"); @@ -32,4 +32,4 @@ static_assert(!std::numeric_limits::is_signed, * (Limited testing suggests a ~1/16 of running time.) Interestingly, * uint_fast32_t also has a sizeof == 8 on x86_64. */ -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/util/index.h b/src/util/index.h index 8e0be5103..f26005677 100644 --- a/src/util/index.h +++ b/src/util/index.h @@ -18,11 +18,11 @@ #ifndef CVC5__INDEX_H #define CVC5__INDEX_H -namespace cvc5 { +namespace cvc5::internal { /** Index is a standardized unsigned integer used for efficient indexing. */ using Index = uint32_t; -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__INDEX_H */ diff --git a/src/util/indexed_root_predicate.h b/src/util/indexed_root_predicate.h index 7ded4244a..402afd26d 100644 --- a/src/util/indexed_root_predicate.h +++ b/src/util/indexed_root_predicate.h @@ -18,7 +18,7 @@ #ifndef CVC5__UTIL__INDEXED_ROOT_PREDICATE_H #define CVC5__UTIL__INDEXED_ROOT_PREDICATE_H -namespace cvc5 { +namespace cvc5::internal { /** * The structure representing the index of a root predicate. @@ -68,6 +68,6 @@ struct IndexedRootPredicateHashFunction } }; /* struct IndexedRootPredicateHashFunction */ -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/util/integer_cln_imp.cpp b/src/util/integer_cln_imp.cpp index 149e02edc..e58a25c35 100644 --- a/src/util/integer_cln_imp.cpp +++ b/src/util/integer_cln_imp.cpp @@ -32,7 +32,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { signed int Integer::s_fastSignedIntMin = -(1 << 29); signed int Integer::s_fastSignedIntMax = (1 << 29) - 1; @@ -609,4 +609,4 @@ std::ostream& operator<<(std::ostream& os, const Integer& n) { return os << n.toString(); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/util/integer_cln_imp.h b/src/util/integer_cln_imp.h index 333d8f502..95300dad9 100644 --- a/src/util/integer_cln_imp.h +++ b/src/util/integer_cln_imp.h @@ -32,13 +32,13 @@ namespace cln struct cl_read_flags; } -namespace cvc5 { +namespace cvc5::internal { class Rational; class CVC5_EXPORT Integer { - friend class cvc5::Rational; + friend class cvc5::internal::Rational; public: /** @@ -379,11 +379,11 @@ class CVC5_EXPORT Integer struct IntegerHashFunction { - size_t operator()(const cvc5::Integer& i) const { return i.hash(); } + size_t operator()(const cvc5::internal::Integer& i) const { return i.hash(); } }; /* struct IntegerHashFunction */ std::ostream& operator<<(std::ostream& os, const Integer& n); -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__INTEGER_H */ diff --git a/src/util/integer_gmp_imp.cpp b/src/util/integer_gmp_imp.cpp index 8d9f7d050..4da391e1e 100644 --- a/src/util/integer_gmp_imp.cpp +++ b/src/util/integer_gmp_imp.cpp @@ -29,7 +29,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { Integer::Integer(const char* s, unsigned base) : d_value(s, base) @@ -553,4 +553,4 @@ const Integer& Integer::max(const Integer& a, const Integer& b) return (a >= b) ? a : b; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/util/integer_gmp_imp.h b/src/util/integer_gmp_imp.h index 397455f87..02c10d431 100644 --- a/src/util/integer_gmp_imp.h +++ b/src/util/integer_gmp_imp.h @@ -25,13 +25,13 @@ #include "cvc5_export.h" // remove when Cvc language support is removed -namespace cvc5 { +namespace cvc5::internal { class Rational; class CVC5_EXPORT Integer { - friend class cvc5::Rational; + friend class cvc5::internal::Rational; public: /** @@ -328,7 +328,7 @@ class CVC5_EXPORT Integer struct IntegerHashFunction { - inline size_t operator()(const cvc5::Integer& i) const { return i.hash(); } + inline size_t operator()(const cvc5::internal::Integer& i) const { return i.hash(); } }; /* struct IntegerHashFunction */ inline std::ostream& operator<<(std::ostream& os, const Integer& n) @@ -336,6 +336,6 @@ inline std::ostream& operator<<(std::ostream& os, const Integer& n) return os << n.toString(); } -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__INTEGER_H */ diff --git a/src/util/ostream_util.cpp b/src/util/ostream_util.cpp index f7f4dfa86..e2cca79e4 100644 --- a/src/util/ostream_util.cpp +++ b/src/util/ostream_util.cpp @@ -16,7 +16,7 @@ #include -namespace cvc5 { +namespace cvc5::internal { StreamFormatScope::StreamFormatScope(std::ostream& out) : d_out(out), d_format_flags(out.flags()), d_precision(out.precision()) @@ -29,4 +29,4 @@ StreamFormatScope::~StreamFormatScope() d_out.flags(d_format_flags); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/util/ostream_util.h b/src/util/ostream_util.h index f8c130477..f95a65d42 100644 --- a/src/util/ostream_util.h +++ b/src/util/ostream_util.h @@ -21,7 +21,7 @@ #include #include -namespace cvc5 { +namespace cvc5::internal { // Saves the formatting of an ostream and restores the previous settings on // destruction. Example usage: @@ -43,6 +43,6 @@ class StreamFormatScope std::streamsize d_precision; }; -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__UTIL__OSTREAM_UTIL_H */ diff --git a/src/util/poly_util.cpp b/src/util/poly_util.cpp index 7a5ae714e..953411c91 100644 --- a/src/util/poly_util.cpp +++ b/src/util/poly_util.cpp @@ -27,7 +27,7 @@ #include "util/rational.h" #include "util/real_algebraic_number.h" -namespace cvc5 { +namespace cvc5::internal { namespace poly_utils { namespace { @@ -353,6 +353,6 @@ void getVariableInformation(VariableInformation& vi, } } // namespace poly_utils -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/util/poly_util.h b/src/util/poly_util.h index f8c430bc2..c5dded017 100644 --- a/src/util/poly_util.h +++ b/src/util/poly_util.h @@ -29,7 +29,7 @@ #include -namespace cvc5 { +namespace cvc5::internal { /** * Utilities for working with libpoly. * This namespace contains various basic conversion routines necessary for the @@ -42,28 +42,28 @@ namespace cvc5 { */ namespace poly_utils { -/** Converts a poly::Integer to a cvc5::Integer. */ +/** Converts a poly::Integer to a cvc5::internal::Integer. */ Integer toInteger(const poly::Integer& i); -/** Converts a poly::Integer to a cvc5::Rational. */ +/** Converts a poly::Integer to a cvc5::internal::Rational. */ Rational toRational(const poly::Integer& r); -/** Converts a poly::Rational to a cvc5::Rational. */ +/** Converts a poly::Rational to a cvc5::internal::Rational. */ Rational toRational(const poly::Rational& r); -/** Converts a poly::DyadicRational to a cvc5::Rational. */ +/** Converts a poly::DyadicRational to a cvc5::internal::Rational. */ Rational toRational(const poly::DyadicRational& dr); -/** Converts a poly::Value to a cvc5::Rational (that may be a bit above). */ +/** Converts a poly::Value to a cvc5::internal::Rational (that may be a bit above). */ Rational toRationalAbove(const poly::Value& v); -/** Converts a poly::Value to a cvc5::Rational (that may be a bit below). */ +/** Converts a poly::Value to a cvc5::internal::Rational (that may be a bit below). */ Rational toRationalBelow(const poly::Value& v); -/** Converts a cvc5::Integer to a poly::Integer. */ +/** Converts a cvc5::internal::Integer to a poly::Integer. */ poly::Integer toInteger(const Integer& i); -/** Converts a vector of cvc5::Integers to a vector of poly::Integers. */ +/** Converts a vector of cvc5::internal::Integers to a vector of poly::Integers. */ std::vector toInteger(const std::vector& vi); -/** Converts a cvc5::Rational to a poly::Rational. */ +/** Converts a cvc5::internal::Rational to a poly::Rational. */ poly::Rational toRational(const Rational& r); /** - * Converts a cvc5::Rational to a poly::DyadicRational. If the input is not + * Converts a cvc5::internal::Rational to a poly::DyadicRational. If the input is not * dyadic, no result is produced. */ std::optional toDyadicRational(const Rational& r); @@ -84,7 +84,7 @@ poly::Rational approximateToDyadic(const poly::Rational& r, /** * Constructs a poly::AlgebraicNumber, allowing for refinement of the - * cvc5::Rational bounds. As a poly::AlgebraicNumber works on + * cvc5::internal::Rational bounds. As a poly::AlgebraicNumber works on * poly::DyadicRationals internally, the bounds are iteratively refined using * approximateToDyadic until the respective interval is isolating. If the * provided rational bounds are already dyadic, the refinement is skipped. @@ -94,7 +94,7 @@ poly::AlgebraicNumber toPolyRanWithRefinement(poly::UPolynomial&& p, const Rational& upper); /** - * Constructs a cvc5::RealAlgebraicNumber, simply wrapping + * Constructs a cvc5::internal::RealAlgebraicNumber, simply wrapping * toPolyRanWithRefinement. */ RealAlgebraicNumber toRanWithRefinement(poly::UPolynomial&& p, @@ -131,7 +131,7 @@ void getVariableInformation(VariableInformation& vi, const poly::Polynomial& poly); } // namespace poly_utils -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/util/random.cpp b/src/util/random.cpp index a42d74a3c..20cac6121 100644 --- a/src/util/random.cpp +++ b/src/util/random.cpp @@ -20,7 +20,7 @@ #include #include "base/check.h" -namespace cvc5 { +namespace cvc5::internal { Random::Random(uint64_t seed) { setSeed(seed); } @@ -65,4 +65,4 @@ bool Random::pickWithProb(double probability) return r < p; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/util/random.h b/src/util/random.h index 1f76890ee..b7bb70395 100644 --- a/src/util/random.h +++ b/src/util/random.h @@ -20,7 +20,7 @@ #ifndef CVC5__UTIL__RANDOM_H #define CVC5__UTIL__RANDOM_H -namespace cvc5 { +namespace cvc5::internal { class Random { @@ -68,5 +68,5 @@ class Random uint64_t d_state; }; -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/util/rational_cln_imp.cpp b/src/util/rational_cln_imp.cpp index 2e5097ef1..155156401 100644 --- a/src/util/rational_cln_imp.cpp +++ b/src/util/rational_cln_imp.cpp @@ -28,7 +28,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { /* Computes a rational given a decimal string. The rational * version of xxx.yyy is xxxyyy/(10^3). @@ -155,4 +155,4 @@ std::optional Rational::fromDouble(double d) } } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/util/rational_cln_imp.h b/src/util/rational_cln_imp.h index 8f8552e9c..65d78fa46 100644 --- a/src/util/rational_cln_imp.h +++ b/src/util/rational_cln_imp.h @@ -35,7 +35,7 @@ #include "cvc5_export.h" // remove when Cvc language support is removed #include "util/integer.h" -namespace cvc5 { +namespace cvc5::internal { /** * A multi-precision rational constant. @@ -299,11 +299,11 @@ class CVC5_EXPORT Rational struct RationalHashFunction { - inline size_t operator()(const cvc5::Rational& r) const { return r.hash(); } + inline size_t operator()(const cvc5::internal::Rational& r) const { return r.hash(); } }; /* struct RationalHashFunction */ std::ostream& operator<<(std::ostream& os, const Rational& n) CVC5_EXPORT; -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__RATIONAL_H */ diff --git a/src/util/rational_gmp_imp.cpp b/src/util/rational_gmp_imp.cpp index c68e15e27..f22b26635 100644 --- a/src/util/rational_gmp_imp.cpp +++ b/src/util/rational_gmp_imp.cpp @@ -25,7 +25,7 @@ #include "base/check.h" -namespace cvc5 { +namespace cvc5::internal { std::ostream& operator<<(std::ostream& os, const Rational& q){ return os << q.toString(); @@ -96,4 +96,4 @@ std::optional Rational::fromDouble(double d) return std::optional(); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/util/rational_gmp_imp.h b/src/util/rational_gmp_imp.h index de3fcd03d..6de086c46 100644 --- a/src/util/rational_gmp_imp.h +++ b/src/util/rational_gmp_imp.h @@ -27,7 +27,7 @@ #include "util/gmp_util.h" #include "util/integer.h" -namespace cvc5 { +namespace cvc5::internal { /** * A multi-precision rational constant. @@ -324,11 +324,11 @@ class CVC5_EXPORT Rational struct RationalHashFunction { - inline size_t operator()(const cvc5::Rational& r) const { return r.hash(); } + inline size_t operator()(const cvc5::internal::Rational& r) const { return r.hash(); } }; /* struct RationalHashFunction */ std::ostream& operator<<(std::ostream& os, const Rational& n) CVC5_EXPORT; -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__RATIONAL_H */ diff --git a/src/util/real_algebraic_number_poly_imp.cpp b/src/util/real_algebraic_number_poly_imp.cpp index 1880502d6..34fc52b14 100644 --- a/src/util/real_algebraic_number_poly_imp.cpp +++ b/src/util/real_algebraic_number_poly_imp.cpp @@ -28,7 +28,7 @@ #define RAN_UNREACHABLE \ Unreachable() << "RealAlgebraicNumber is not available without libpoly." -namespace cvc5 { +namespace cvc5::internal { #ifdef CVC5_POLY_IMP RealAlgebraicNumber::RealAlgebraicNumber(poly::AlgebraicNumber&& an) @@ -247,11 +247,11 @@ RealAlgebraicNumber inverse(const RealAlgebraicNumber& ran) #endif } -} // namespace cvc5 +} // namespace cvc5::internal namespace std { -size_t hash::operator()( - const cvc5::RealAlgebraicNumber& ran) const +size_t hash::operator()( + const cvc5::internal::RealAlgebraicNumber& ran) const { #ifdef CVC5_POLY_IMP return lp_algebraic_number_hash_approx(ran.getValue().get_internal(), 2); diff --git a/src/util/real_algebraic_number_poly_imp.h b/src/util/real_algebraic_number_poly_imp.h index 079bbf824..6ecd3ae41 100644 --- a/src/util/real_algebraic_number_poly_imp.h +++ b/src/util/real_algebraic_number_poly_imp.h @@ -27,7 +27,7 @@ #include "util/integer.h" #include "util/rational.h" -namespace cvc5 { +namespace cvc5::internal { /** * Represents a real algebraic number based on poly::AlgebraicNumber. @@ -186,11 +186,11 @@ RealAlgebraicNumber inverse(const RealAlgebraicNumber& ran); using RealAlgebraicNumberHashFunction = std::hash; -} // namespace cvc5 +} // namespace cvc5::internal namespace std { template <> -struct hash +struct hash { /** * Computes a hash of the given real algebraic number. Given that the internal @@ -198,7 +198,7 @@ struct hash * interval may be refined for comparisons) we hash a well-defined rational * approximation. */ - size_t operator()(const cvc5::RealAlgebraicNumber& ran) const; + size_t operator()(const cvc5::internal::RealAlgebraicNumber& ran) const; }; } // namespace std diff --git a/src/util/regexp.cpp b/src/util/regexp.cpp index 43d73ae96..fb6f071a4 100644 --- a/src/util/regexp.cpp +++ b/src/util/regexp.cpp @@ -17,7 +17,7 @@ #include -namespace cvc5 { +namespace cvc5::internal { RegExpRepeat::RegExpRepeat(uint32_t repeatAmount) : d_repeatAmount(repeatAmount) { @@ -58,4 +58,4 @@ std::ostream& operator<<(std::ostream& os, const RegExpLoop& r) return os << "[" << r.d_loopMinOcc << ".." << r.d_loopMaxOcc << "]"; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/util/regexp.h b/src/util/regexp.h index 78d064a3b..852ceb3bf 100644 --- a/src/util/regexp.h +++ b/src/util/regexp.h @@ -20,7 +20,7 @@ #include -namespace cvc5 { +namespace cvc5::internal { struct RegExpRepeat { @@ -70,6 +70,6 @@ std::ostream& operator<<(std::ostream& os, const RegExpRepeat& bv); std::ostream& operator<<(std::ostream& os, const RegExpLoop& bv); -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__UTIL__REGEXP_H */ diff --git a/src/util/resource_manager.cpp b/src/util/resource_manager.cpp index 0640cad32..fc4bfee20 100644 --- a/src/util/resource_manager.cpp +++ b/src/util/resource_manager.cpp @@ -29,7 +29,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { bool WallClockTimer::on() const { @@ -308,4 +308,4 @@ void ResourceManager::registerListener(Listener* listener) return d_listeners.push_back(listener); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/util/resource_manager.h b/src/util/resource_manager.h index 117953b0a..502c2ac72 100644 --- a/src/util/resource_manager.h +++ b/src/util/resource_manager.h @@ -29,7 +29,7 @@ #include "theory/inference_id.h" -namespace cvc5 { +namespace cvc5::internal { class Listener; class Options; @@ -209,6 +209,6 @@ class ResourceManager std::unique_ptr d_statistics; }; /* class ResourceManager */ -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__RESOURCE_MANAGER_H */ diff --git a/src/util/result.cpp b/src/util/result.cpp index 22cce81e7..7e09fd721 100644 --- a/src/util/result.cpp +++ b/src/util/result.cpp @@ -25,7 +25,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { Result::Result() : d_status(NONE), d_unknownExplanation(UNKNOWN_REASON), d_inputName("") @@ -222,4 +222,4 @@ void Result::toStreamTptp(std::ostream& out) const { out << " for " << getInputName(); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/util/result.h b/src/util/result.h index 8bcddb9d2..4897bb7e9 100644 --- a/src/util/result.h +++ b/src/util/result.h @@ -23,7 +23,7 @@ #include "options/language.h" -namespace cvc5 { +namespace cvc5::internal { class Result; @@ -125,6 +125,6 @@ class Result std::ostream& operator<<(std::ostream& out, enum Result::Status s); std::ostream& operator<<(std::ostream& out, enum Result::UnknownExplanation e); -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__RESULT_H */ diff --git a/src/util/roundingmode.cpp b/src/util/roundingmode.cpp index 00aec6635..5b4ad9f67 100644 --- a/src/util/roundingmode.cpp +++ b/src/util/roundingmode.cpp @@ -19,7 +19,7 @@ #include "base/check.h" -namespace cvc5 { +namespace cvc5::internal { std::ostream& operator<<(std::ostream& os, RoundingMode rm) { @@ -43,4 +43,4 @@ std::ostream& operator<<(std::ostream& os, RoundingMode rm) return os; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/util/roundingmode.h b/src/util/roundingmode.h index f4edbd00b..33cd70867 100644 --- a/src/util/roundingmode.h +++ b/src/util/roundingmode.h @@ -21,7 +21,7 @@ #include -namespace cvc5 { +namespace cvc5::internal { #define CVC5_NUM_ROUNDING_MODES 5 @@ -50,6 +50,6 @@ struct RoundingModeHashFunction std::ostream& operator<<(std::ostream& os, RoundingMode s); -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/util/safe_print.cpp b/src/util/safe_print.cpp index 221809fec..e46ece0b5 100644 --- a/src/util/safe_print.cpp +++ b/src/util/safe_print.cpp @@ -29,7 +29,7 @@ /* Size of buffers used */ #define BUFFER_SIZE 20 -namespace cvc5 { +namespace cvc5::internal { template <> void safe_print(int fd, const std::string& msg) { @@ -215,4 +215,4 @@ void safe_print_right_aligned(int fd, uint64_t i, ssize_t width) { } } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/util/safe_print.h b/src/util/safe_print.h index 0bc2b0599..28153036b 100644 --- a/src/util/safe_print.h +++ b/src/util/safe_print.h @@ -45,7 +45,7 @@ #include "cvc5_export.h" -namespace cvc5 { +namespace cvc5::internal { template void CVC5_EXPORT safe_print(int fd, const char (&msg)[N]); @@ -142,6 +142,6 @@ void safe_print_hex(int fd, uint64_t i); */ void safe_print_right_aligned(int fd, uint64_t i, ssize_t width); -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__SAFE_PRINT_H */ diff --git a/src/util/sampler.cpp b/src/util/sampler.cpp index 9c50a39c4..b5bddfea8 100644 --- a/src/util/sampler.cpp +++ b/src/util/sampler.cpp @@ -24,7 +24,7 @@ #include "util/bitvector.h" #include "util/random.h" -namespace cvc5 { +namespace cvc5::internal { BitVector Sampler::pickBvUniform(unsigned sz) { @@ -173,4 +173,4 @@ FloatingPoint Sampler::pickFpBiased(unsigned e, unsigned s) return FloatingPoint(e, s, bv); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/util/sampler.h b/src/util/sampler.h index d52da6211..7765444cd 100644 --- a/src/util/sampler.h +++ b/src/util/sampler.h @@ -23,7 +23,7 @@ #include "util/floatingpoint.h" -namespace cvc5 { +namespace cvc5::internal { class Sampler { @@ -53,6 +53,6 @@ class Sampler static constexpr double probSpecial = 0.2; }; -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__UTIL_FLOATINGPOINT_SAMPLER_H */ diff --git a/src/util/sexpr.cpp b/src/util/sexpr.cpp index 638208767..58fbe65cd 100644 --- a/src/util/sexpr.cpp +++ b/src/util/sexpr.cpp @@ -21,7 +21,7 @@ #include "util/rational.h" #include "util/statistics_value.h" -namespace cvc5 { +namespace cvc5::internal { void toSExpr(std::ostream& out, const std::string& s) { @@ -55,4 +55,4 @@ void toSExpr(std::ostream& out, const std::unique_ptr& sbv) out << *sbv; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/util/sexpr.h b/src/util/sexpr.h index 18a579dec..d90427c60 100644 --- a/src/util/sexpr.h +++ b/src/util/sexpr.h @@ -37,7 +37,7 @@ #include #include -namespace cvc5 { +namespace cvc5::internal { // Forward declarations struct StatisticBaseValue; @@ -137,6 +137,6 @@ std::string toSExpr(Iterator begin, Iterator end) return ss.str(); } -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__SEXPR_H */ diff --git a/src/util/smt2_quote_string.cpp b/src/util/smt2_quote_string.cpp index e2ab4a74c..769dd81dc 100644 --- a/src/util/smt2_quote_string.cpp +++ b/src/util/smt2_quote_string.cpp @@ -18,7 +18,7 @@ #include #include -namespace cvc5 { +namespace cvc5::internal { /** * SMT-LIB 2 quoting for symbols @@ -54,4 +54,4 @@ std::string quoteString(const std::string& s) { return '"' + output + '"'; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/util/smt2_quote_string.h b/src/util/smt2_quote_string.h index f8be53c0c..00d4510d5 100644 --- a/src/util/smt2_quote_string.h +++ b/src/util/smt2_quote_string.h @@ -20,7 +20,7 @@ #include -namespace cvc5 { +namespace cvc5::internal { /** * SMT-LIB 2 quoting for symbols @@ -32,6 +32,6 @@ std::string quoteSymbol(const std::string& s); */ std::string quoteString(const std::string& s); -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__UTIL__SMT2_QUOTE_STRING_H */ diff --git a/src/util/statistics_public.cpp b/src/util/statistics_public.cpp index 386169046..5ef045da6 100644 --- a/src/util/statistics_public.cpp +++ b/src/util/statistics_public.cpp @@ -21,13 +21,13 @@ #include "theory/theory_id.h" #include "util/statistics_registry.h" -namespace cvc5 { +namespace cvc5::internal { void registerPublicStatistics(StatisticsRegistry& reg) { - reg.registerHistogram("api::CONSTANT", false); - reg.registerHistogram("api::VARIABLE", false); - reg.registerHistogram("api::TERM", false); + reg.registerHistogram("cvc5::CONSTANT", false); + reg.registerHistogram("cvc5::VARIABLE", false); + reg.registerHistogram("cvc5::TERM", false); reg.registerValue("driver::filename", false); reg.registerTimer("global::totalTime", false); @@ -45,4 +45,4 @@ void registerPublicStatistics(StatisticsRegistry& reg) } } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/util/statistics_public.h b/src/util/statistics_public.h index 1e66a6111..75824d734 100644 --- a/src/util/statistics_public.h +++ b/src/util/statistics_public.h @@ -18,7 +18,7 @@ #ifndef CVC5__UTIL__STATISTICS_PUBLIC_H #define CVC5__UTIL__STATISTICS_PUBLIC_H -namespace cvc5 { +namespace cvc5::internal { class StatisticsRegistry; @@ -27,6 +27,6 @@ class StatisticsRegistry; */ void registerPublicStatistics(StatisticsRegistry& reg); -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/util/statistics_registry.cpp b/src/util/statistics_registry.cpp index 5c43fb2d9..4c18c3282 100644 --- a/src/util/statistics_registry.cpp +++ b/src/util/statistics_registry.cpp @@ -20,7 +20,7 @@ #include "options/base_options.h" #include "util/statistics_public.h" -namespace cvc5 { +namespace cvc5::internal { StatisticsRegistry::StatisticsRegistry(Env& env, bool registerPublic) : EnvObj(env) @@ -153,4 +153,4 @@ std::ostream& operator<<(std::ostream& os, const StatisticsRegistry& sr) return os; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/util/statistics_registry.h b/src/util/statistics_registry.h index 671ff6258..201c3ef79 100644 --- a/src/util/statistics_registry.h +++ b/src/util/statistics_registry.h @@ -76,7 +76,7 @@ #include "util/statistics_stats.h" #include "util/statistics_value.h" -namespace cvc5 { +namespace cvc5::internal { struct StatisticBaseValue; @@ -265,6 +265,6 @@ class StatisticsRegistry : protected EnvObj /** Calls `sr.print(os)`. */ std::ostream& operator<<(std::ostream& os, const StatisticsRegistry& sr); -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__STATISTICS_REGISTRY_H */ diff --git a/src/util/statistics_stats.cpp b/src/util/statistics_stats.cpp index 9adbe3bb1..cb1e5df00 100644 --- a/src/util/statistics_stats.cpp +++ b/src/util/statistics_stats.cpp @@ -18,7 +18,7 @@ #include "base/check.h" #include "util/statistics_value.h" -namespace cvc5 { +namespace cvc5::internal { AverageStat& AverageStat::operator<<(double v) { @@ -137,4 +137,4 @@ CodeTimer::~CodeTimer() } } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/util/statistics_stats.h b/src/util/statistics_stats.h index e30593041..dc70cefe8 100644 --- a/src/util/statistics_stats.h +++ b/src/util/statistics_stats.h @@ -28,7 +28,7 @@ #include "base/configuration.h" -namespace cvc5 { +namespace cvc5::internal { // forward declare all values to avoid inclusion struct StatisticAverageValue; @@ -109,8 +109,8 @@ class HistogramStat * `ReferenceStat` the current value of the referenced object is copied into * the `StatisticsRegistry`. * - * To convert to the API representation in `api::Stat`, `T` can only be one - * of the types accepted by the `api::Stat` constructors (or be implicitly + * To convert to the API representation in `cvc5::Stat`, `T` can only be one + * of the types accepted by the `cvc5::Stat` constructors (or be implicitly * converted to one of them). */ template @@ -211,7 +211,7 @@ class TimerStat { public: /** Utility for RAII-style timing of code blocks */ - using CodeTimer = cvc5::CodeTimer; + using CodeTimer = cvc5::internal::CodeTimer; /** Allow access to private constructor */ friend class StatisticsRegistry; /** Value stored for this statistic */ @@ -270,8 +270,8 @@ class CodeTimer * Stores a simple value that can be set manually using regular assignment * or the `set` method. * - * To convert to the API representation in `api::Stat`, `T` can only be one - * of the types accepted by the `api::Stat` constructors (or be implicitly + * To convert to the API representation in `cvc5::Stat`, `T` can only be one + * of the types accepted by the `cvc5::Stat` constructors (or be implicitly * converted to one of them). */ template @@ -347,6 +347,6 @@ class IntStat : public ValueStat IntStat(stat_type* data) : ValueStat(data) {} }; -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/util/statistics_value.cpp b/src/util/statistics_value.cpp index 24b482f85..0cd628a31 100644 --- a/src/util/statistics_value.cpp +++ b/src/util/statistics_value.cpp @@ -27,7 +27,7 @@ #include "util/ostream_util.h" -namespace cvc5 { +namespace cvc5::internal { // standard helper, see https://en.cppreference.com/w/cpp/utility/variant/visit template @@ -110,4 +110,4 @@ uint64_t StatisticTimerValue::get() const return static_cast(data / std::chrono::milliseconds(1)); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/util/statistics_value.h b/src/util/statistics_value.h index 66f4c7864..21b05d496 100644 --- a/src/util/statistics_value.h +++ b/src/util/statistics_value.h @@ -38,7 +38,7 @@ #include "util/safe_print.h" -namespace cvc5 { +namespace cvc5::internal { class StatisticsRegistry; @@ -369,6 +369,6 @@ struct StatisticTimerValue : StatisticBaseValue bool d_running; }; -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/src/util/string.cpp b/src/util/string.cpp index 2235ac5ee..1acca2964 100644 --- a/src/util/string.cpp +++ b/src/util/string.cpp @@ -27,7 +27,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { static_assert(UCHAR_MAX == 255, "Unsigned char is assumed to have 256 values."); @@ -112,7 +112,7 @@ void String::addCharToInternal(unsigned char ch, std::vector& str) std::stringstream serr; serr << "Illegal string character: \"" << ch << "\", must use escape sequence"; - throw cvc5::Exception(serr.str()); + throw cvc5::internal::Exception(serr.str()); } else { @@ -522,7 +522,7 @@ Rational String::toNumber() const namespace strings { -size_t StringHashFunction::operator()(const ::cvc5::String& s) const +size_t StringHashFunction::operator()(const ::cvc5::internal::String& s) const { uint64_t ret = fnv1a::offsetBasis; for (unsigned c : s.d_str) @@ -538,4 +538,4 @@ std::ostream &operator<<(std::ostream &os, const String &s) { return os << "\"" << s.toString() << "\""; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/util/string.h b/src/util/string.h index 017c60fb8..6b3d59117 100644 --- a/src/util/string.h +++ b/src/util/string.h @@ -24,7 +24,7 @@ #include "util/rational.h" -namespace cvc5 { +namespace cvc5::internal { namespace strings { struct StringHashFunction; @@ -53,7 +53,7 @@ class String static inline unsigned num_codes() { return 196608; } /** constructors for String * - * Internally, a cvc5::String is represented by a vector of unsigned + * Internally, a cvc5::internal::String is represented by a vector of unsigned * integers (d_str) representing the code points of the characters. * * To build a string from a C++ string, we may process escape sequences @@ -68,7 +68,7 @@ class String * where d_0 ... d_4 are hexadecimal digits, to the appropriate character. * * If useEscSequences is false, then the characters of the constructed - * cvc5::String correspond one-to-one with the input string. + * cvc5::internal::String correspond one-to-one with the input string. */ String() = default; explicit String(const std::string& s, bool useEscSequences = false) @@ -120,7 +120,7 @@ class String * If useEscSequences is false, the string's printable characters are * printed as characters. Notice that for all std::string s having only * printable characters, we have that - * cvc5::String( s ).toString() = s. + * cvc5::internal::String( s ).toString() = s. */ std::string toString(bool useEscSequences = false) const; /* toWString @@ -273,13 +273,13 @@ namespace strings { struct StringHashFunction { - size_t operator()(const ::cvc5::String& s) const; + size_t operator()(const ::cvc5::internal::String& s) const; }; /* struct StringHashFunction */ } // namespace strings std::ostream& operator<<(std::ostream& os, const String& s); -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__UTIL__STRING_H */ diff --git a/src/util/synth_result.cpp b/src/util/synth_result.cpp index 862dec3b4..bd4f0cd62 100644 --- a/src/util/synth_result.cpp +++ b/src/util/synth_result.cpp @@ -19,7 +19,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { SynthResult::SynthResult() : d_status(NONE), d_unknownExplanation(Result::UNKNOWN_REASON) @@ -70,4 +70,4 @@ ostream& operator<<(ostream& out, SynthResult::Status s) return out; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/util/synth_result.h b/src/util/synth_result.h index 164028aa6..45287edd7 100644 --- a/src/util/synth_result.h +++ b/src/util/synth_result.h @@ -23,7 +23,7 @@ #include "util/result.h" -namespace cvc5 { +namespace cvc5::internal { /** * A result for a synthesis query. This can be used for synthesis, abduction, @@ -72,6 +72,6 @@ class SynthResult std::ostream& operator<<(std::ostream& out, const SynthResult& r); std::ostream& operator<<(std::ostream& out, SynthResult::Status s); -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__RESULT_H */ diff --git a/src/util/uninterpreted_sort_value.cpp b/src/util/uninterpreted_sort_value.cpp index e635a4b77..b2fde93f3 100644 --- a/src/util/uninterpreted_sort_value.cpp +++ b/src/util/uninterpreted_sort_value.cpp @@ -24,7 +24,7 @@ using namespace std; -namespace cvc5 { +namespace cvc5::internal { std::ostream& operator<<(std::ostream& out, const UninterpretedSortValue& val) { @@ -73,4 +73,4 @@ bool UninterpretedSortValue::operator<=(const UninterpretedSortValue& val) const || (getType() == val.getType() && d_index <= val.d_index); } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/util/uninterpreted_sort_value.h b/src/util/uninterpreted_sort_value.h index e9fa8a24a..f5c7d17fa 100644 --- a/src/util/uninterpreted_sort_value.h +++ b/src/util/uninterpreted_sort_value.h @@ -22,7 +22,7 @@ #include "util/integer.h" -namespace cvc5 { +namespace cvc5::internal { class TypeNode; @@ -72,4 +72,4 @@ struct UninterpretedSortValueHashFunction } }; /* struct UninterpretedSortValueHashFunction */ -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/util/utility.cpp b/src/util/utility.cpp index 9bc09dbc9..376ca3304 100644 --- a/src/util/utility.cpp +++ b/src/util/utility.cpp @@ -21,7 +21,7 @@ #include "base/check.h" -namespace cvc5 { +namespace cvc5::internal { std::unique_ptr openTmpFile(std::string* pattern) { @@ -51,4 +51,4 @@ std::unique_ptr openTmpFile(std::string* pattern) return tmpStream; } -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/src/util/utility.h b/src/util/utility.h index 9126d3e25..d59d363af 100644 --- a/src/util/utility.h +++ b/src/util/utility.h @@ -24,7 +24,7 @@ #include #include -namespace cvc5 { +namespace cvc5::internal { /** * Using std::find_if(), finds the first iterator in [first,last) @@ -102,6 +102,6 @@ std::ostream& operator<<(std::ostream& out, const std::optional& m) */ std::unique_ptr openTmpFile(std::string* pattern); -} // namespace cvc5 +} // namespace cvc5::internal #endif /* CVC5__UTILITY_H */ diff --git a/test/api/cpp/boilerplate.cpp b/test/api/cpp/boilerplate.cpp index a57a6a895..0e6a8af60 100644 --- a/test/api/cpp/boilerplate.cpp +++ b/test/api/cpp/boilerplate.cpp @@ -22,7 +22,7 @@ #include "api/cpp/cvc5.h" -using namespace cvc5::api; +using namespace cvc5; using namespace std; int main() { diff --git a/test/api/cpp/issue4889.cpp b/test/api/cpp/issue4889.cpp index 404255c4a..a4e995a04 100644 --- a/test/api/cpp/issue4889.cpp +++ b/test/api/cpp/issue4889.cpp @@ -15,7 +15,7 @@ #include "api/cpp/cvc5.h" -using namespace cvc5::api; +using namespace cvc5; int main() { diff --git a/test/api/cpp/issue5074.cpp b/test/api/cpp/issue5074.cpp index b744ea824..06810bf23 100644 --- a/test/api/cpp/issue5074.cpp +++ b/test/api/cpp/issue5074.cpp @@ -15,7 +15,7 @@ #include "api/cpp/cvc5.h" -using namespace cvc5::api; +using namespace cvc5; int main() { diff --git a/test/api/cpp/issue6111.cpp b/test/api/cpp/issue6111.cpp index 2780f3257..e382840e6 100644 --- a/test/api/cpp/issue6111.cpp +++ b/test/api/cpp/issue6111.cpp @@ -18,7 +18,7 @@ #include "api/cpp/cvc5.h" -using namespace cvc5::api; +using namespace cvc5; using namespace std; int main() diff --git a/test/api/cpp/ouroborous.cpp b/test/api/cpp/ouroborous.cpp index 4e5b81ce4..cfc932fb4 100644 --- a/test/api/cpp/ouroborous.cpp +++ b/test/api/cpp/ouroborous.cpp @@ -35,8 +35,9 @@ #include "smt/command.h" using namespace cvc5; +using namespace cvc5::internal; using namespace cvc5::parser; -using namespace cvc5::language; +using namespace cvc5::internal::language; int runTest(); @@ -46,11 +47,11 @@ int main() { return runTest(); } - catch (api::CVC5ApiException& e) + catch (cvc5::CVC5ApiException& e) { std::cerr << e.getMessage() << std::endl; } - catch (parser::ParserException& e) + catch (ParserException& e) { std::cerr << e.getMessage() << std::endl; } @@ -80,27 +81,27 @@ std::string parse(std::string instr, (declare-fun a () (Array U (Array U U)))\n\ "; - api::Solver solver; - std::string ilang = "LANG_SMTLIB_V2_6"; + cvc5::Solver solver; + std::string ilang = "LANG_SMTLIB_V2_6"; - solver.setOption("input-language", input_language); - solver.setOption("output-language", output_language); - SymbolManager symman(&solver); - std::unique_ptr parser( - ParserBuilder(&solver, &symman, false) - .withInputLanguage(solver.getOption("input-language")) - .build()); - parser->setInput( - Input::newStringInput(ilang, declarations, "internal-buffer")); - // we don't need to execute the commands, but we DO need to parse them to - // get the declarations - while (Command* c = parser->nextCommand()) - { - delete c; - } + solver.setOption("input-language", input_language); + solver.setOption("output-language", output_language); + SymbolManager symman(&solver); + std::unique_ptr parser( + ParserBuilder(&solver, &symman, false) + .withInputLanguage(solver.getOption("input-language")) + .build()); + parser->setInput( + Input::newStringInput(ilang, declarations, "internal-buffer")); + // we don't need to execute the commands, but we DO need to parse them to + // get the declarations + while (Command* c = parser->nextCommand()) + { + delete c; + } assert(parser->done()); // parser should be done parser->setInput(Input::newStringInput(ilang, instr, "internal-buffer")); - api::Term e = parser->nextExpression(); + cvc5::Term e = parser->nextExpression(); std::string s = e.toString(); assert(parser->nextExpression().isNull()); // next expr should be null return s; diff --git a/test/api/cpp/proj-issue306.cpp b/test/api/cpp/proj-issue306.cpp index 8aa857e66..bb361a8ca 100644 --- a/test/api/cpp/proj-issue306.cpp +++ b/test/api/cpp/proj-issue306.cpp @@ -16,7 +16,7 @@ #include "api/cpp/cvc5.h" -using namespace cvc5::api; +using namespace cvc5; int main(void) { diff --git a/test/api/cpp/proj-issue334.cpp b/test/api/cpp/proj-issue334.cpp index 6598bba2e..9a18602aa 100644 --- a/test/api/cpp/proj-issue334.cpp +++ b/test/api/cpp/proj-issue334.cpp @@ -16,7 +16,7 @@ #include "api/cpp/cvc5.h" -using namespace cvc5::api; +using namespace cvc5; int main(void) { diff --git a/test/api/cpp/proj-issue344.cpp b/test/api/cpp/proj-issue344.cpp index 6d91f72fa..77847c3a9 100644 --- a/test/api/cpp/proj-issue344.cpp +++ b/test/api/cpp/proj-issue344.cpp @@ -18,7 +18,7 @@ #include "api/cpp/cvc5.h" #include -using namespace cvc5::api; +using namespace cvc5; int main(void) { diff --git a/test/api/cpp/proj-issue345.cpp b/test/api/cpp/proj-issue345.cpp index f5484e306..1bef8a05b 100644 --- a/test/api/cpp/proj-issue345.cpp +++ b/test/api/cpp/proj-issue345.cpp @@ -18,7 +18,7 @@ #include "api/cpp/cvc5.h" #include -using namespace cvc5::api; +using namespace cvc5; int main(void) { diff --git a/test/api/cpp/proj-issue377.cpp b/test/api/cpp/proj-issue377.cpp index 137b12c44..3206fb82b 100644 --- a/test/api/cpp/proj-issue377.cpp +++ b/test/api/cpp/proj-issue377.cpp @@ -18,7 +18,7 @@ #include "api/cpp/cvc5.h" #include -using namespace cvc5::api; +using namespace cvc5; int main(void) { diff --git a/test/api/cpp/proj-issue395.cpp b/test/api/cpp/proj-issue395.cpp index 17cac8cb1..9706d0916 100644 --- a/test/api/cpp/proj-issue395.cpp +++ b/test/api/cpp/proj-issue395.cpp @@ -18,7 +18,7 @@ #include "api/cpp/cvc5.h" -using namespace cvc5::api; +using namespace cvc5; int main(void) { diff --git a/test/api/cpp/proj-issue399.cpp b/test/api/cpp/proj-issue399.cpp index 03ed55c3e..270c8247a 100644 --- a/test/api/cpp/proj-issue399.cpp +++ b/test/api/cpp/proj-issue399.cpp @@ -18,7 +18,7 @@ #include "api/cpp/cvc5.h" -using namespace cvc5::api; +using namespace cvc5; int main(void) { diff --git a/test/api/cpp/proj-issue445.cpp b/test/api/cpp/proj-issue445.cpp index 730151d07..116486f55 100644 --- a/test/api/cpp/proj-issue445.cpp +++ b/test/api/cpp/proj-issue445.cpp @@ -18,7 +18,7 @@ #include "api/cpp/cvc5.h" -using namespace cvc5::api; +using namespace cvc5; int main(void) { diff --git a/test/api/cpp/proj-issue484.cpp b/test/api/cpp/proj-issue484.cpp index 91d551897..3698e420f 100644 --- a/test/api/cpp/proj-issue484.cpp +++ b/test/api/cpp/proj-issue484.cpp @@ -18,7 +18,7 @@ #include "api/cpp/cvc5.h" -using namespace cvc5::api; +using namespace cvc5; int main(void) { diff --git a/test/api/cpp/reset_assertions.cpp b/test/api/cpp/reset_assertions.cpp index 3edea1a01..72ce5fb64 100644 --- a/test/api/cpp/reset_assertions.cpp +++ b/test/api/cpp/reset_assertions.cpp @@ -23,7 +23,7 @@ #include "api/cpp/cvc5.h" -using namespace cvc5::api; +using namespace cvc5; int main() { diff --git a/test/api/cpp/sep_log_api.cpp b/test/api/cpp/sep_log_api.cpp index 84aac0424..5bcc7f8e0 100644 --- a/test/api/cpp/sep_log_api.cpp +++ b/test/api/cpp/sep_log_api.cpp @@ -25,7 +25,7 @@ #include "api/cpp/cvc5.h" -using namespace cvc5::api; +using namespace cvc5; using namespace std; /** diff --git a/test/api/cpp/smt2_compliance.cpp b/test/api/cpp/smt2_compliance.cpp index 8d484e3bc..6b8866cae 100644 --- a/test/api/cpp/smt2_compliance.cpp +++ b/test/api/cpp/smt2_compliance.cpp @@ -24,14 +24,15 @@ #include "smt/solver_engine.h" using namespace cvc5; +using namespace cvc5::internal; using namespace cvc5::parser; using namespace std; -void testGetInfo(api::Solver* solver, const char* s); +void testGetInfo(cvc5::Solver* solver, const char* s); int main() { - std::unique_ptr solver = std::make_unique(); + std::unique_ptr solver = std::make_unique(); solver->setOption("input-language", "smtlib2"); solver->setOption("output-language", "smtlib2"); testGetInfo(solver.get(), ":error-behavior"); @@ -49,7 +50,7 @@ int main() return 0; } -void testGetInfo(api::Solver* solver, const char* s) +void testGetInfo(cvc5::Solver* solver, const char* s) { std::unique_ptr symman(new SymbolManager(solver)); diff --git a/test/api/cpp/two_solvers.cpp b/test/api/cpp/two_solvers.cpp index a052094b4..45886670b 100644 --- a/test/api/cpp/two_solvers.cpp +++ b/test/api/cpp/two_solvers.cpp @@ -18,7 +18,7 @@ #include "api/cpp/cvc5.h" -using namespace cvc5::api; +using namespace cvc5; using namespace std; int main() { diff --git a/test/unit/api/cpp/api_kind_black.cpp b/test/unit/api/cpp/api_kind_black.cpp index d9078a98c..c149aac29 100644 --- a/test/unit/api/cpp/api_kind_black.cpp +++ b/test/unit/api/cpp/api_kind_black.cpp @@ -20,9 +20,7 @@ #include "api/cpp/cvc5.h" #include "base/output.h" -namespace cvc5 { - -using namespace api; +namespace cvc5::internal { namespace test { @@ -53,5 +51,4 @@ TEST_F(TestApiKind, kindToString) } } // namespace test -} // namespace cvc5 - +} // namespace cvc5::internal diff --git a/test/unit/api/cpp/datatype_api_black.cpp b/test/unit/api/cpp/datatype_api_black.cpp index 79956f679..04811d3b4 100644 --- a/test/unit/api/cpp/datatype_api_black.cpp +++ b/test/unit/api/cpp/datatype_api_black.cpp @@ -15,9 +15,7 @@ #include "test_api.h" -namespace cvc5 { - -using namespace api; +namespace cvc5::internal { namespace test { @@ -568,4 +566,4 @@ TEST_F(TestApiBlackDatatype, datatypeSpecializedCons) ASSERT_THROW(nilc.getInstantiatedConstructorTerm(isort), CVC5ApiException); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/api/cpp/grammar_black.cpp b/test/unit/api/cpp/grammar_black.cpp index 1aa35db8d..0b5899f88 100644 --- a/test/unit/api/cpp/grammar_black.cpp +++ b/test/unit/api/cpp/grammar_black.cpp @@ -15,9 +15,7 @@ #include "test_api.h" -namespace cvc5 { - -using namespace api; +namespace cvc5::internal { namespace test { @@ -125,4 +123,4 @@ TEST_F(TestApiBlackGrammar, addAnyVariable) ASSERT_THROW(g1.addAnyVariable(start), CVC5ApiException); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/api/cpp/op_black.cpp b/test/unit/api/cpp/op_black.cpp index c994003a9..ff4296de6 100644 --- a/test/unit/api/cpp/op_black.cpp +++ b/test/unit/api/cpp/op_black.cpp @@ -15,9 +15,7 @@ #include "test_api.h" -namespace cvc5 { - -using namespace api; +namespace cvc5::internal { namespace test { @@ -170,4 +168,4 @@ TEST_F(TestApiBlackOp, opScopingToString) ASSERT_EQ(bitvector_repeat_ot.toString(), op_repr); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/api/cpp/op_white.cpp b/test/unit/api/cpp/op_white.cpp index d8e7d6d19..c74ee150f 100644 --- a/test/unit/api/cpp/op_white.cpp +++ b/test/unit/api/cpp/op_white.cpp @@ -15,9 +15,7 @@ #include "test_api.h" -namespace cvc5 { - -using namespace api; +namespace cvc5::internal { namespace test { @@ -33,4 +31,4 @@ TEST_F(TestApiWhiteOp, opFromKind) ASSERT_EQ(plus, d_solver.mkOp(ADD)); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/api/cpp/parametric_datatype_black.cpp b/test/unit/api/cpp/parametric_datatype_black.cpp index 219f007ec..4c1c0c833 100644 --- a/test/unit/api/cpp/parametric_datatype_black.cpp +++ b/test/unit/api/cpp/parametric_datatype_black.cpp @@ -16,9 +16,7 @@ #include "test_api.h" #include "base/configuration.h" -namespace cvc5 { - -using namespace api; +namespace cvc5::internal { namespace test { @@ -44,4 +42,4 @@ TEST_F(TestApiBlackParametricDatatype, proj_issue387) } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/api/cpp/result_black.cpp b/test/unit/api/cpp/result_black.cpp index b291a88cc..befaaf7d8 100644 --- a/test/unit/api/cpp/result_black.cpp +++ b/test/unit/api/cpp/result_black.cpp @@ -15,9 +15,7 @@ #include "test_api.h" -namespace cvc5 { - -using namespace api; +namespace cvc5::internal { namespace test { @@ -27,7 +25,7 @@ class TestApiBlackResult : public TestApi TEST_F(TestApiBlackResult, isNull) { - cvc5::api::Result res_null; + cvc5::Result res_null; ASSERT_TRUE(res_null.isNull()); ASSERT_FALSE(res_null.isSat()); ASSERT_FALSE(res_null.isUnsat()); @@ -35,7 +33,7 @@ TEST_F(TestApiBlackResult, isNull) Sort u_sort = d_solver.mkUninterpretedSort("u"); Term x = d_solver.mkConst(u_sort, "x"); d_solver.assertFormula(x.eqTerm(x)); - cvc5::api::Result res = d_solver.checkSat(); + cvc5::Result res = d_solver.checkSat(); ASSERT_FALSE(res.isNull()); } @@ -44,9 +42,9 @@ TEST_F(TestApiBlackResult, eq) Sort u_sort = d_solver.mkUninterpretedSort("u"); Term x = d_solver.mkConst(u_sort, "x"); d_solver.assertFormula(x.eqTerm(x)); - cvc5::api::Result res; - cvc5::api::Result res2 = d_solver.checkSat(); - cvc5::api::Result res3 = d_solver.checkSat(); + cvc5::Result res; + cvc5::Result res2 = d_solver.checkSat(); + cvc5::Result res3 = d_solver.checkSat(); res = res2; ASSERT_EQ(res, res2); ASSERT_EQ(res3, res2); @@ -57,7 +55,7 @@ TEST_F(TestApiBlackResult, isSat) Sort u_sort = d_solver.mkUninterpretedSort("u"); Term x = d_solver.mkConst(u_sort, "x"); d_solver.assertFormula(x.eqTerm(x)); - cvc5::api::Result res = d_solver.checkSat(); + cvc5::Result res = d_solver.checkSat(); ASSERT_TRUE(res.isSat()); ASSERT_FALSE(res.isUnknown()); } @@ -67,7 +65,7 @@ TEST_F(TestApiBlackResult, isUnsat) Sort u_sort = d_solver.mkUninterpretedSort("u"); Term x = d_solver.mkConst(u_sort, "x"); d_solver.assertFormula(x.eqTerm(x).notTerm()); - cvc5::api::Result res = d_solver.checkSat(); + cvc5::Result res = d_solver.checkSat(); ASSERT_TRUE(res.isUnsat()); ASSERT_FALSE(res.isUnknown()); } @@ -80,10 +78,10 @@ TEST_F(TestApiBlackResult, isUnknown) Sort int_sort = d_solver.getIntegerSort(); Term x = d_solver.mkConst(int_sort, "x"); d_solver.assertFormula(x.eqTerm(x).notTerm()); - cvc5::api::Result res = d_solver.checkSat(); + cvc5::Result res = d_solver.checkSat(); ASSERT_FALSE(res.isSat()); ASSERT_TRUE(res.isUnknown()); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/api/cpp/solver_black.cpp b/test/unit/api/cpp/solver_black.cpp index d9a38ec08..a29f9d268 100644 --- a/test/unit/api/cpp/solver_black.cpp +++ b/test/unit/api/cpp/solver_black.cpp @@ -19,9 +19,7 @@ #include "base/output.h" #include "test_api.h" -namespace cvc5 { - -using namespace api; +namespace cvc5::internal { namespace test { @@ -1540,7 +1538,7 @@ TEST_F(TestApiBlackSolver, getOptionInfo) EXPECT_THROW(d_solver.getOptionInfo("asdf-invalid"), CVC5ApiException); } { - api::OptionInfo info = d_solver.getOptionInfo("verbose"); + cvc5::OptionInfo info = d_solver.getOptionInfo("verbose"); EXPECT_EQ("verbose", info.name); EXPECT_EQ(std::vector{}, info.aliases); EXPECT_TRUE(std::holds_alternative(info.valueInfo)); @@ -1550,7 +1548,7 @@ TEST_F(TestApiBlackSolver, getOptionInfo) } { // bool type with default - api::OptionInfo info = d_solver.getOptionInfo("print-success"); + cvc5::OptionInfo info = d_solver.getOptionInfo("print-success"); EXPECT_EQ("print-success", info.name); EXPECT_EQ(std::vector{}, info.aliases); EXPECT_TRUE( @@ -1566,7 +1564,7 @@ TEST_F(TestApiBlackSolver, getOptionInfo) } { // int64 type with default - api::OptionInfo info = d_solver.getOptionInfo("verbosity"); + cvc5::OptionInfo info = d_solver.getOptionInfo("verbosity"); EXPECT_EQ("verbosity", info.name); EXPECT_EQ(std::vector{}, info.aliases); EXPECT_TRUE(std::holds_alternative>( @@ -1582,7 +1580,7 @@ TEST_F(TestApiBlackSolver, getOptionInfo) } { // uint64 type with default - api::OptionInfo info = d_solver.getOptionInfo("rlimit"); + cvc5::OptionInfo info = d_solver.getOptionInfo("rlimit"); EXPECT_EQ("rlimit", info.name); EXPECT_EQ(std::vector{}, info.aliases); EXPECT_TRUE(std::holds_alternative>( @@ -1600,9 +1598,9 @@ TEST_F(TestApiBlackSolver, getOptionInfo) auto info = d_solver.getOptionInfo("random-freq"); ASSERT_EQ(info.name, "random-freq"); ASSERT_EQ(info.aliases, std::vector{"random-frequency"}); - ASSERT_TRUE(std::holds_alternative>( + ASSERT_TRUE(std::holds_alternative>( info.valueInfo)); - auto ni = std::get>(info.valueInfo); + auto ni = std::get>(info.valueInfo); ASSERT_EQ(ni.currentValue, 0.0); ASSERT_EQ(ni.defaultValue, 0.0); ASSERT_TRUE(ni.minimum && ni.maximum); @@ -1617,7 +1615,7 @@ TEST_F(TestApiBlackSolver, getOptionInfo) } { // string type with default - api::OptionInfo info = d_solver.getOptionInfo("force-logic"); + cvc5::OptionInfo info = d_solver.getOptionInfo("force-logic"); EXPECT_EQ("force-logic", info.name); EXPECT_EQ(std::vector{}, info.aliases); EXPECT_TRUE(std::holds_alternative>( @@ -1633,7 +1631,7 @@ TEST_F(TestApiBlackSolver, getOptionInfo) } { // mode option - api::OptionInfo info = d_solver.getOptionInfo("simplification"); + cvc5::OptionInfo info = d_solver.getOptionInfo("simplification"); EXPECT_EQ("simplification", info.name); EXPECT_EQ(std::vector{"simplification-mode"}, info.aliases); EXPECT_TRUE(std::holds_alternative(info.valueInfo)); @@ -1672,7 +1670,7 @@ TEST_F(TestApiBlackSolver, getStatistics) Term t3 = d_solver.mkTerm(Kind::SELECT, {t2, t1}); d_solver.checkSat(); } - cvc5::api::Statistics stats = d_solver.getStatistics(); + cvc5::Statistics stats = d_solver.getStatistics(); { std::stringstream ss; ss << stats; @@ -1712,7 +1710,7 @@ TEST_F(TestApiBlackSolver, getStatistics) // check some basic utility methods EXPECT_TRUE(!(it == stats.end())); EXPECT_EQ(s.first, it->first); - if (s.first == "api::CONSTANT") + if (s.first == "cvc5::CONSTANT") { EXPECT_FALSE(s.second.isInternal()); EXPECT_FALSE(s.second.isDefault()); @@ -1815,7 +1813,7 @@ TEST_F(TestApiBlackSolver, getUnsatCoreAndProof) { d_solver.assertFormula(t); } - cvc5::api::Result res = d_solver.checkSat(); + cvc5::Result res = d_solver.checkSat(); ASSERT_TRUE(res.isUnsat()); ASSERT_NO_THROW(d_solver.getProof()); } @@ -2083,7 +2081,7 @@ void checkSimpleSeparationConstraints(Solver* solver) solver->declareSepHeap(integer, integer); Term x = solver->mkConst(integer, "x"); Term p = solver->mkConst(integer, "p"); - Term heap = solver->mkTerm(cvc5::api::Kind::SEP_PTO, {p, x}); + Term heap = solver->mkTerm(cvc5::Kind::SEP_PTO, {p, x}); solver->assertFormula(heap); Term nil = solver->mkSepNil(integer); solver->assertFormula(nil.eqTerm(solver->mkReal(5))); @@ -2759,7 +2757,7 @@ TEST_F(TestApiBlackSolver, getSynthSolution) ASSERT_THROW(d_solver.getSynthSolution(f), CVC5ApiException); - cvc5::api::SynthResult sr = d_solver.checkSynth(); + cvc5::SynthResult sr = d_solver.checkSynth(); ASSERT_EQ(sr.hasSolution(), true); ASSERT_NO_THROW(d_solver.getSynthSolution(f)); @@ -2803,7 +2801,7 @@ TEST_F(TestApiBlackSolver, checkSynthNext) d_solver.setOption("incremental", "true"); Term f = d_solver.synthFun("f", {}, d_solver.getBooleanSort()); - cvc5::api::SynthResult sr = d_solver.checkSynth(); + cvc5::SynthResult sr = d_solver.checkSynth(); ASSERT_EQ(sr.hasSolution(), true); ASSERT_NO_THROW(d_solver.getSynthSolutions({f})); sr = d_solver.checkSynthNext(); @@ -2892,10 +2890,10 @@ TEST_F(TestApiBlackSolver, Output) ASSERT_THROW(d_solver.isOutputOn("foo-invalid"), CVC5ApiException); ASSERT_THROW(d_solver.getOutput("foo-invalid"), CVC5ApiException); ASSERT_FALSE(d_solver.isOutputOn("inst")); - ASSERT_EQ(cvc5::null_os.rdbuf(), d_solver.getOutput("inst").rdbuf()); + ASSERT_EQ(null_os.rdbuf(), d_solver.getOutput("inst").rdbuf()); d_solver.setOption("output", "inst"); ASSERT_TRUE(d_solver.isOutputOn("inst")); - ASSERT_NE(cvc5::null_os.rdbuf(), d_solver.getOutput("inst").rdbuf()); + ASSERT_NE(null_os.rdbuf(), d_solver.getOutput("inst").rdbuf()); } TEST_F(TestApiBlackSolver, issue7000) @@ -3380,4 +3378,4 @@ TEST_F(TestApiBlackSolver, projIssue337) } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/api/cpp/solver_white.cpp b/test/unit/api/cpp/solver_white.cpp index bab2bcee0..7699b9ae2 100644 --- a/test/unit/api/cpp/solver_white.cpp +++ b/test/unit/api/cpp/solver_white.cpp @@ -16,9 +16,7 @@ #include "base/configuration.h" #include "test_api.h" -namespace cvc5 { - -using namespace api; +namespace cvc5::internal { namespace test { @@ -53,4 +51,4 @@ TEST_F(TestApiWhiteSolver, getOp) } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/api/cpp/sort_black.cpp b/test/unit/api/cpp/sort_black.cpp index bd37aecdf..35c32e030 100644 --- a/test/unit/api/cpp/sort_black.cpp +++ b/test/unit/api/cpp/sort_black.cpp @@ -15,9 +15,7 @@ #include "test_api.h" -namespace cvc5 { - -using namespace api; +namespace cvc5::internal { namespace test { @@ -575,4 +573,4 @@ TEST_F(TestApiBlackSort, toString) } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/api/cpp/synth_result_black.cpp b/test/unit/api/cpp/synth_result_black.cpp index 813138323..b45240343 100644 --- a/test/unit/api/cpp/synth_result_black.cpp +++ b/test/unit/api/cpp/synth_result_black.cpp @@ -15,9 +15,7 @@ #include "test_api.h" -namespace cvc5 { - -using namespace api; +namespace cvc5::internal { namespace test { @@ -27,7 +25,7 @@ class TestApiBlackSynthResult : public TestApi TEST_F(TestApiBlackSynthResult, isNull) { - cvc5::api::SynthResult res_null; + cvc5::SynthResult res_null; ASSERT_TRUE(res_null.isNull()); ASSERT_FALSE(res_null.hasSolution()); ASSERT_FALSE(res_null.hasNoSolution()); @@ -40,7 +38,7 @@ TEST_F(TestApiBlackSynthResult, hasSolution) Term f = d_solver.synthFun("f", {}, d_solver.getBooleanSort()); Term boolTerm = d_solver.mkTrue(); d_solver.addSygusConstraint(boolTerm); - cvc5::api::SynthResult res = d_solver.checkSynth(); + cvc5::SynthResult res = d_solver.checkSynth(); ASSERT_FALSE(res.isNull()); ASSERT_TRUE(res.hasSolution()); ASSERT_FALSE(res.hasNoSolution()); @@ -51,7 +49,7 @@ TEST_F(TestApiBlackSynthResult, hasNoSolution) { // note that we never return synth result for which hasNoSolution is true // currently - cvc5::api::SynthResult res_null; + cvc5::SynthResult res_null; ASSERT_FALSE(res_null.hasNoSolution()); } @@ -61,7 +59,7 @@ TEST_F(TestApiBlackSynthResult, isUnknown) Term f = d_solver.synthFun("f", {}, d_solver.getBooleanSort()); Term boolTerm = d_solver.mkFalse(); d_solver.addSygusConstraint(boolTerm); - cvc5::api::SynthResult res = d_solver.checkSynth(); + cvc5::SynthResult res = d_solver.checkSynth(); // currently isUnknown, could also return hasNoSolution when support for // infeasibility of sygus conjectures is added. ASSERT_FALSE(res.isNull()); @@ -71,4 +69,4 @@ TEST_F(TestApiBlackSynthResult, isUnknown) } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/api/cpp/term_black.cpp b/test/unit/api/cpp/term_black.cpp index e5be408eb..08086d4c2 100644 --- a/test/unit/api/cpp/term_black.cpp +++ b/test/unit/api/cpp/term_black.cpp @@ -15,9 +15,7 @@ #include "test_api.h" -namespace cvc5 { - -using namespace api; +namespace cvc5::internal { namespace test { @@ -1163,4 +1161,4 @@ TEST_F(TestApiBlackTerm, termScopedToString) TEST_F(TestApiBlackTerm, toString) { ASSERT_NO_THROW(Term().toString()); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/api/cpp/term_white.cpp b/test/unit/api/cpp/term_white.cpp index 878c872f0..ef741d35c 100644 --- a/test/unit/api/cpp/term_white.cpp +++ b/test/unit/api/cpp/term_white.cpp @@ -15,9 +15,7 @@ #include "test_api.h" -namespace cvc5 { - -using namespace api; +namespace cvc5::internal { namespace test { @@ -82,4 +80,4 @@ TEST_F(TestApiWhiteTerm, getOp) ASSERT_EQ(tailTerm.getOp(), Op(&d_solver, APPLY_SELECTOR)); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/api/cpp/theory_arith_nl_black.cpp b/test/unit/api/cpp/theory_arith_nl_black.cpp index 8a56c032c..18b426269 100644 --- a/test/unit/api/cpp/theory_arith_nl_black.cpp +++ b/test/unit/api/cpp/theory_arith_nl_black.cpp @@ -16,9 +16,7 @@ #include "test_api.h" #include "base/configuration.h" -namespace cvc5 { - -using namespace api; +namespace cvc5::internal { namespace test { @@ -143,4 +141,4 @@ TEST_F(TestTheoryBlackArithNl, cvc5Projects455) } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/api/cpp/theory_uf_ho_black.cpp b/test/unit/api/cpp/theory_uf_ho_black.cpp index ac252a27a..fc1d5fbaa 100644 --- a/test/unit/api/cpp/theory_uf_ho_black.cpp +++ b/test/unit/api/cpp/theory_uf_ho_black.cpp @@ -16,9 +16,7 @@ #include "base/configuration.h" #include "test_api.h" -namespace cvc5 { - -using namespace api; +namespace cvc5::internal { namespace test { @@ -47,4 +45,4 @@ TEST_F(TestTheoryBlackUfHo, proj_issue361) } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/api/java/SolverTest.java b/test/unit/api/java/SolverTest.java index eebc335d9..e678d3d50 100644 --- a/test/unit/api/java/SolverTest.java +++ b/test/unit/api/java/SolverTest.java @@ -1634,7 +1634,7 @@ class SolverTest for (Statistics.ConstIterator it = stats.iterator(true, true); it.hasNext();) { Map.Entry elem = it.next(); - if (elem.getKey() == "api::CONSTANT") + if (elem.getKey() == "cvc5::CONSTANT") { assertFalse(elem.getValue().isInternal()); assertFalse(elem.getValue().isDefault()); diff --git a/test/unit/api/python/test_solver.py b/test/unit/api/python/test_solver.py index fdb71ed44..7ad960249 100644 --- a/test/unit/api/python/test_solver.py +++ b/test/unit/api/python/test_solver.py @@ -1664,7 +1664,7 @@ def test_get_statistics(solver): solver.assertFormula(f1) solver.checkSat() s = solver.getStatistics() - assert s['api::TERM'] == {'defaulted': False, 'internal': False, 'value': {'GEQ': 3, 'OR': 1}} + assert s['cvc5::TERM'] == {'defaulted': False, 'internal': False, 'value': {'GEQ': 3, 'OR': 1}} assert s.get(True, False) != {} def test_set_info(solver): diff --git a/test/unit/base/map_util_black.cpp b/test/unit/base/map_util_black.cpp index 1b5565c1b..051c30624 100644 --- a/test/unit/base/map_util_black.cpp +++ b/test/unit/base/map_util_black.cpp @@ -26,7 +26,7 @@ #include "context/context.h" #include "test.h" -namespace cvc5 { +namespace cvc5::internal { using context::CDHashMap; using context::CDInsertHashMap; @@ -62,8 +62,8 @@ class TestBaseBlackMap : public TestInternal TEST_F(TestBaseBlackMap, map) { std::map map = default_map(); - ASSERT_TRUE(cvc5::ContainsKey(map, "key")); - ASSERT_FALSE(cvc5::ContainsKey(map, "non key")); + ASSERT_TRUE(ContainsKey(map, "key")); + ASSERT_FALSE(ContainsKey(map, "non key")); ASSERT_EQ(FindOrNull(map, "non key"), nullptr); if (std::string* found_value = FindOrNull(map, "other")) @@ -77,8 +77,8 @@ TEST_F(TestBaseBlackMap, map) TEST_F(TestBaseBlackMap, constant_map) { const std::map map = default_map(); - ASSERT_TRUE(cvc5::ContainsKey(map, "key")); - ASSERT_FALSE(cvc5::ContainsKey(map, "non key")); + ASSERT_TRUE(ContainsKey(map, "key")); + ASSERT_FALSE(ContainsKey(map, "non key")); if (const std::string* found_value = FindOrNull(map, "other")) { @@ -93,8 +93,8 @@ TEST_F(TestBaseBlackMap, unordered_map) { std::unordered_map map(default_map().begin(), default_map().end()); - ASSERT_TRUE(cvc5::ContainsKey(map, "key")); - ASSERT_FALSE(cvc5::ContainsKey(map, "non key")); + ASSERT_TRUE(ContainsKey(map, "key")); + ASSERT_FALSE(ContainsKey(map, "non key")); ASSERT_EQ(FindOrNull(map, "non key"), nullptr); if (std::string* found_value = FindOrNull(map, "other")) @@ -109,8 +109,8 @@ TEST_F(TestBaseBlackMap, const_unordered_map) { const std::unordered_map map(default_map().begin(), default_map().end()); - ASSERT_TRUE(cvc5::ContainsKey(map, "key")); - ASSERT_FALSE(cvc5::ContainsKey(map, "non key")); + ASSERT_TRUE(ContainsKey(map, "key")); + ASSERT_FALSE(ContainsKey(map, "non key")); if (const std::string* found_value = FindOrNull(map, "other")) { @@ -124,23 +124,23 @@ TEST_F(TestBaseBlackMap, const_unordered_map) TEST_F(TestBaseBlackMap, set) { std::set set{"entry", "other"}; - ASSERT_TRUE(cvc5::ContainsKey(set, "entry")); - ASSERT_FALSE(cvc5::ContainsKey(set, "non member")); + ASSERT_TRUE(ContainsKey(set, "entry")); + ASSERT_FALSE(ContainsKey(set, "non member")); const std::set const_set{"entry", "other"}; - ASSERT_TRUE(cvc5::ContainsKey(const_set, "entry")); - ASSERT_FALSE(cvc5::ContainsKey(const_set, "non member")); + ASSERT_TRUE(ContainsKey(const_set, "entry")); + ASSERT_FALSE(ContainsKey(const_set, "non member")); } TEST_F(TestBaseBlackMap, unordered_set) { std::unordered_set set{"entry", "other"}; - ASSERT_TRUE(cvc5::ContainsKey(set, "entry")); - ASSERT_FALSE(cvc5::ContainsKey(set, "non member")); + ASSERT_TRUE(ContainsKey(set, "entry")); + ASSERT_FALSE(ContainsKey(set, "non member")); const std::unordered_set const_set{"entry", "other"}; - ASSERT_TRUE(cvc5::ContainsKey(const_set, "entry")); - ASSERT_FALSE(cvc5::ContainsKey(const_set, "non member")); + ASSERT_TRUE(ContainsKey(const_set, "entry")); + ASSERT_FALSE(ContainsKey(const_set, "non member")); } TEST_F(TestBaseBlackMap, CDHashMap) @@ -149,8 +149,8 @@ TEST_F(TestBaseBlackMap, CDHashMap) CDHashMap map(&context); insert_all(default_map(), &map); - ASSERT_TRUE(cvc5::ContainsKey(map, "key")); - ASSERT_FALSE(cvc5::ContainsKey(map, "non key")); + ASSERT_TRUE(ContainsKey(map, "key")); + ASSERT_FALSE(ContainsKey(map, "non key")); if (const std::string* found_value = FindOrNull(map, "other")) { @@ -167,8 +167,8 @@ TEST_F(TestBaseBlackMap, const_CDHashMap) insert_all(default_map(), &store); const auto& map = store; - ASSERT_TRUE(cvc5::ContainsKey(map, "key")); - ASSERT_FALSE(cvc5::ContainsKey(map, "non key")); + ASSERT_TRUE(ContainsKey(map, "key")); + ASSERT_FALSE(ContainsKey(map, "non key")); if (const std::string* found_value = FindOrNull(map, "other")) { @@ -184,8 +184,8 @@ TEST_F(TestBaseBlackMap, CDInsertHashMap) CDInsertHashMap map(&context); insert_all(default_map(), &map); - ASSERT_TRUE(cvc5::ContainsKey(map, "key")); - ASSERT_FALSE(cvc5::ContainsKey(map, "non key")); + ASSERT_TRUE(ContainsKey(map, "key")); + ASSERT_FALSE(ContainsKey(map, "non key")); if (const std::string* found_value = FindOrNull(map, "other")) { @@ -202,8 +202,8 @@ TEST_F(TestBaseBlackMap, const_CDInsertHashMap) insert_all(default_map(), &store); const auto& map = store; - ASSERT_TRUE(cvc5::ContainsKey(map, "key")); - ASSERT_FALSE(cvc5::ContainsKey(map, "non key")); + ASSERT_TRUE(ContainsKey(map, "key")); + ASSERT_FALSE(ContainsKey(map, "non key")); if (const std::string* found_value = FindOrNull(map, "other")) { ASSERT_EQ(*found_value, "entry"); @@ -212,4 +212,4 @@ TEST_F(TestBaseBlackMap, const_CDInsertHashMap) ASSERT_EQ(FindOrDie(map, "other"), "entry"); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/context/cdhashmap_black.cpp b/test/unit/context/cdhashmap_black.cpp index a4060e1f8..3a27252d1 100644 --- a/test/unit/context/cdhashmap_black.cpp +++ b/test/unit/context/cdhashmap_black.cpp @@ -10,7 +10,7 @@ * directory for licensing information. * **************************************************************************** * - * Black box testing of cvc5::context::CDMap<>. + * Black box testing of context::CDMap<>. */ #include @@ -20,11 +20,11 @@ #include "context/cdlist.h" #include "test_context.h" -namespace cvc5 { +namespace cvc5::internal { namespace test { -using cvc5::context::CDHashMap; -using cvc5::context::Context; +using context::CDHashMap; +using context::Context; class TestContextBlackCDHashMap : public TestContext { @@ -189,4 +189,4 @@ TEST_F(TestContextBlackCDHashMap, insert_at_context_level_zero) ASSERT_TRUE(elements_are(map, {{3, 4}})); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/context/cdhashmap_white.cpp b/test/unit/context/cdhashmap_white.cpp index d45c58731..3210fa5ef 100644 --- a/test/unit/context/cdhashmap_white.cpp +++ b/test/unit/context/cdhashmap_white.cpp @@ -10,14 +10,14 @@ * directory for licensing information. * **************************************************************************** * - * White box testing of cvc5::context::CDMap<>. + * White box testing of context::CDMap<>. */ #include "base/check.h" #include "context/cdhashmap.h" #include "test_context.h" -namespace cvc5 { +namespace cvc5::internal { using namespace context; @@ -43,4 +43,4 @@ TEST_F(TestContextWhiteCDHashMap, unreachable_save_and_restore) } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/context/cdlist_black.cpp b/test/unit/context/cdlist_black.cpp index 6bc48f9d0..843e6b655 100644 --- a/test/unit/context/cdlist_black.cpp +++ b/test/unit/context/cdlist_black.cpp @@ -10,7 +10,7 @@ * directory for licensing information. * **************************************************************************** * - * Black box testing of cvc5::context::CDList<>. + * Black box testing of context::CDList<>. */ #include @@ -22,7 +22,7 @@ #include "context/cdlist.h" #include "test_context.h" -namespace cvc5 { +namespace cvc5::internal { using namespace context; @@ -178,4 +178,4 @@ TEST_F(TestContextBlackCDList, emplace_back) } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/context/cdo_black.cpp b/test/unit/context/cdo_black.cpp index 64b6c0700..57bd6150f 100644 --- a/test/unit/context/cdo_black.cpp +++ b/test/unit/context/cdo_black.cpp @@ -10,7 +10,7 @@ * directory for licensing information. * **************************************************************************** * - * Black box testing of cvc5::context::CDO<>. + * Black box testing of context::CDO<>. */ #include @@ -21,7 +21,7 @@ #include "context/cdo.h" #include "test_context.h" -namespace cvc5 { +namespace cvc5::internal { using namespace context; @@ -47,4 +47,4 @@ TEST_F(TestContextBlackCDO, cdo) } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/context/context_black.cpp b/test/unit/context/context_black.cpp index 28bd1438c..bde4c9d23 100644 --- a/test/unit/context/context_black.cpp +++ b/test/unit/context/context_black.cpp @@ -10,7 +10,7 @@ * directory for licensing information. * **************************************************************************** * - * Black box testing of cvc5::context::Context. + * Black box testing of context::Context. */ #include @@ -21,7 +21,7 @@ #include "context/cdo.h" #include "test_context.h" -namespace cvc5 { +namespace cvc5::internal { using namespace context; @@ -265,4 +265,4 @@ TEST_F(TestContextBlack, detect_invalid_obj) } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/context/context_mm_black.cpp b/test/unit/context/context_mm_black.cpp index d35166193..a539a6e28 100644 --- a/test/unit/context/context_mm_black.cpp +++ b/test/unit/context/context_mm_black.cpp @@ -10,7 +10,7 @@ * directory for licensing information. * **************************************************************************** * - * Black box testing of cvc5::context::ContextMemoryManager. + * Black box testing of context::ContextMemoryManager. */ #include @@ -20,7 +20,7 @@ #include "context/context_mm.h" #include "test.h" -namespace cvc5 { +namespace cvc5::internal { using namespace context; @@ -103,4 +103,4 @@ TEST_F(TestContextBlackMM, push_pop) } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/context/context_white.cpp b/test/unit/context/context_white.cpp index b82fae5dd..f1c570c36 100644 --- a/test/unit/context/context_white.cpp +++ b/test/unit/context/context_white.cpp @@ -10,14 +10,14 @@ * directory for licensing information. * **************************************************************************** * - * White box testing of cvc5::context::Context. + * White box testing of context::Context. */ #include "base/check.h" #include "context/cdo.h" #include "test_context.h" -namespace cvc5 { +namespace cvc5::internal { using namespace context; @@ -179,4 +179,4 @@ TEST_F(TestContextWhite, simple) ASSERT_EQ(c.d_ppContextObjPrev, &s->d_pContextObjList); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/main/interactive_shell_black.cpp b/test/unit/main/interactive_shell_black.cpp index 2170c490f..1d3cbedcd 100644 --- a/test/unit/main/interactive_shell_black.cpp +++ b/test/unit/main/interactive_shell_black.cpp @@ -26,7 +26,7 @@ #include "smt/command.h" #include "test.h" -namespace cvc5 { +namespace cvc5::internal { namespace test { class TestMainBlackInteractiveShell : public TestInternal @@ -39,7 +39,7 @@ class TestMainBlackInteractiveShell : public TestInternal d_sin = std::make_unique(); d_sout = std::make_unique(); - d_solver.reset(new cvc5::api::Solver()); + d_solver.reset(new cvc5::Solver()); d_solver->setOption("input-language", "smt2"); d_symman.reset(new SymbolManager(d_solver.get())); } @@ -79,7 +79,7 @@ class TestMainBlackInteractiveShell : public TestInternal std::unique_ptr d_sin; std::unique_ptr d_sout; std::unique_ptr d_symman; - std::unique_ptr d_solver; + std::unique_ptr d_solver; }; TEST_F(TestMainBlackInteractiveShell, assert_true) @@ -131,4 +131,4 @@ TEST_F(TestMainBlackInteractiveShell, repeated_empty_lines) countCommands(shell, 0, 3); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/node/attribute_black.cpp b/test/unit/node/attribute_black.cpp index ff3aa04d9..543e9f6a4 100644 --- a/test/unit/node/attribute_black.cpp +++ b/test/unit/node/attribute_black.cpp @@ -22,7 +22,7 @@ #include "expr/node_value.h" #include "test_node.h" -namespace cvc5 { +namespace cvc5::internal { using namespace kind; using namespace smt; @@ -124,4 +124,4 @@ TEST_F(TestNodeBlackAttribute, bools) } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/node/attribute_white.cpp b/test/unit/node/attribute_white.cpp index 5a1343833..c36746d91 100644 --- a/test/unit/node/attribute_white.cpp +++ b/test/unit/node/attribute_white.cpp @@ -29,7 +29,7 @@ #include "theory/theory_engine.h" #include "theory/uf/theory_uf.h" -namespace cvc5 { +namespace cvc5::internal { using namespace kind; using namespace smt; @@ -444,4 +444,4 @@ TEST_F(TestNodeWhiteAttribute, attributes) ASSERT_FALSE(unnamed.hasAttribute(VarNameAttr())); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/node/kind_black.cpp b/test/unit/node/kind_black.cpp index a0253b728..28097cbba 100644 --- a/test/unit/node/kind_black.cpp +++ b/test/unit/node/kind_black.cpp @@ -20,7 +20,7 @@ #include "expr/kind.h" #include "test.h" -namespace cvc5 { +namespace cvc5::internal { using namespace kind; @@ -86,4 +86,4 @@ TEST_F(TestNodeBlackKind, output_concat) ASSERT_EQ(act.str(), exp.str()); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/node/kind_map_black.cpp b/test/unit/node/kind_map_black.cpp index 6cc3197d2..47d6d1288 100644 --- a/test/unit/node/kind_map_black.cpp +++ b/test/unit/node/kind_map_black.cpp @@ -20,9 +20,10 @@ #include "expr/kind_map.h" #include "test.h" -namespace cvc5 { +namespace cvc5::internal { -using namespace kind; +using namespace internal; +using namespace internal::kind; namespace test { @@ -44,4 +45,4 @@ TEST_F(TestNodeBlackKindMap, simple) } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/node/node_algorithm_black.cpp b/test/unit/node/node_algorithm_black.cpp index 7fa2b6bfe..517e1aab7 100644 --- a/test/unit/node/node_algorithm_black.cpp +++ b/test/unit/node/node_algorithm_black.cpp @@ -25,7 +25,7 @@ #include "util/integer.h" #include "util/rational.h" -namespace cvc5 { +namespace cvc5::internal { using namespace expr; using namespace kind; @@ -200,4 +200,4 @@ TEST_F(TestNodeBlackNodeAlgorithm, match) ASSERT_EQ(subs[x], a); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/node/node_algorithms_black.cpp b/test/unit/node/node_algorithms_black.cpp index eb54a6b7f..96440d4da 100644 --- a/test/unit/node/node_algorithms_black.cpp +++ b/test/unit/node/node_algorithms_black.cpp @@ -18,7 +18,7 @@ #include "expr/node_manager.h" #include "test_node.h" -namespace cvc5 { +namespace cvc5::internal { using namespace expr; using namespace kind; @@ -160,4 +160,4 @@ TEST_F(TestNodeBlackNodeAlgorithms, flatten) } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/node/node_black.cpp b/test/unit/node/node_black.cpp index a1486df94..8fd74b420 100644 --- a/test/unit/node/node_black.cpp +++ b/test/unit/node/node_black.cpp @@ -37,7 +37,7 @@ #include "util/bitvector.h" #include "util/rational.h" -namespace cvc5 { +namespace cvc5::internal { using namespace kind; @@ -811,4 +811,4 @@ TEST_F(TestNodeBlackNode, node_tnode_usage) } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/node/node_builder_black.cpp b/test/unit/node/node_builder_black.cpp index 8e5a870bf..10bce9cd3 100644 --- a/test/unit/node/node_builder_black.cpp +++ b/test/unit/node/node_builder_black.cpp @@ -29,7 +29,7 @@ #define K 30u #define LARGE_K UINT_MAX / 40 -namespace cvc5 { +namespace cvc5::internal { using namespace kind; @@ -413,4 +413,4 @@ TEST_F(TestNodeBlackNodeBuilder, leftist_building) ASSERT_EQ(nexpected, n); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/node/node_manager_black.cpp b/test/unit/node/node_manager_black.cpp index ad41155c3..0eb03ca42 100644 --- a/test/unit/node/node_manager_black.cpp +++ b/test/unit/node/node_manager_black.cpp @@ -23,7 +23,7 @@ #include "util/integer.h" #include "util/rational.h" -namespace cvc5 { +namespace cvc5::internal { using namespace kind; using namespace expr; @@ -313,4 +313,4 @@ TEST_F(TestNodeBlackNodeManager, mkNode_too_many_children) #endif } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/node/node_manager_white.cpp b/test/unit/node/node_manager_white.cpp index 64f6a70f5..0b206ebc8 100644 --- a/test/unit/node/node_manager_white.cpp +++ b/test/unit/node/node_manager_white.cpp @@ -20,10 +20,10 @@ #include "util/integer.h" #include "util/rational.h" -namespace cvc5 { +namespace cvc5::internal { -using namespace cvc5::expr; -using namespace cvc5::kind; +using namespace cvc5::internal::expr; +using namespace cvc5::internal::kind; namespace test { @@ -81,4 +81,4 @@ TEST_F(TestNodeWhiteNodeManager, topological_sort) } } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/node/node_self_iterator_black.cpp b/test/unit/node/node_self_iterator_black.cpp index 66696b71e..d7f5fa492 100644 --- a/test/unit/node/node_self_iterator_black.cpp +++ b/test/unit/node/node_self_iterator_black.cpp @@ -18,7 +18,7 @@ #include "expr/node_self_iterator.h" #include "test_node.h" -namespace cvc5 { +namespace cvc5::internal { using namespace kind; using namespace expr; @@ -53,4 +53,4 @@ TEST_F(TestNodeBlackNodeSelfIterator, iteration) ASSERT_EQ(++i, x_and_y.end()); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/node/node_traversal_black.cpp b/test/unit/node/node_traversal_black.cpp index b8e68c91b..012fe3532 100644 --- a/test/unit/node/node_traversal_black.cpp +++ b/test/unit/node/node_traversal_black.cpp @@ -27,7 +27,7 @@ #include "expr/node_value.h" #include "test_node.h" -namespace cvc5 { +namespace cvc5::internal { using namespace kind; @@ -294,4 +294,4 @@ TEST_F(TestNodeBlackNodeTraversalPreorder, skip_if) ASSERT_EQ(actual, expected); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/node/node_white.cpp b/test/unit/node/node_white.cpp index f1d46c3ec..8ed563320 100644 --- a/test/unit/node/node_white.cpp +++ b/test/unit/node/node_white.cpp @@ -20,7 +20,7 @@ #include "test_node.h" #include "util/rational.h" -namespace cvc5 { +namespace cvc5::internal { using namespace kind; using namespace expr; @@ -80,4 +80,4 @@ TEST_F(TestNodeWhiteNode, iterators) ASSERT_EQ(v[2], y); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/node/symbol_table_black.cpp b/test/unit/node/symbol_table_black.cpp index baae33694..9710a38f7 100644 --- a/test/unit/node/symbol_table_black.cpp +++ b/test/unit/node/symbol_table_black.cpp @@ -23,7 +23,7 @@ #include "expr/symbol_table.h" #include "test_api.h" -namespace cvc5 { +namespace cvc5::internal { using namespace kind; using namespace context; @@ -37,8 +37,8 @@ class TestNodeBlackSymbolTable : public TestApi TEST_F(TestNodeBlackSymbolTable, bind1) { SymbolTable symtab; - api::Sort booleanType = d_solver.getBooleanSort(); - api::Term x = d_solver.mkConst(booleanType); + cvc5::Sort booleanType = d_solver.getBooleanSort(); + cvc5::Term x = d_solver.mkConst(booleanType); symtab.bind("x", x); ASSERT_TRUE(symtab.isBound("x")); ASSERT_EQ(symtab.lookup("x"), x); @@ -47,9 +47,9 @@ TEST_F(TestNodeBlackSymbolTable, bind1) TEST_F(TestNodeBlackSymbolTable, bind2) { SymbolTable symtab; - api::Sort booleanType = d_solver.getBooleanSort(); + cvc5::Sort booleanType = d_solver.getBooleanSort(); // var name attribute shouldn't matter - api::Term y = d_solver.mkConst(booleanType, "y"); + cvc5::Term y = d_solver.mkConst(booleanType, "y"); symtab.bind("x", y); ASSERT_TRUE(symtab.isBound("x")); ASSERT_EQ(symtab.lookup("x"), y); @@ -58,10 +58,10 @@ TEST_F(TestNodeBlackSymbolTable, bind2) TEST_F(TestNodeBlackSymbolTable, bind3) { SymbolTable symtab; - api::Sort booleanType = d_solver.getBooleanSort(); - api::Term x = d_solver.mkConst(booleanType); + cvc5::Sort booleanType = d_solver.getBooleanSort(); + cvc5::Term x = d_solver.mkConst(booleanType); symtab.bind("x", x); - api::Term y = d_solver.mkConst(booleanType); + cvc5::Term y = d_solver.mkConst(booleanType); // new binding covers old symtab.bind("x", y); ASSERT_TRUE(symtab.isBound("x")); @@ -71,11 +71,11 @@ TEST_F(TestNodeBlackSymbolTable, bind3) TEST_F(TestNodeBlackSymbolTable, bind4) { SymbolTable symtab; - api::Sort booleanType = d_solver.getBooleanSort(); - api::Term x = d_solver.mkConst(booleanType); + cvc5::Sort booleanType = d_solver.getBooleanSort(); + cvc5::Term x = d_solver.mkConst(booleanType); symtab.bind("x", x); - api::Sort t = d_solver.mkUninterpretedSort("T"); + cvc5::Sort t = d_solver.mkUninterpretedSort("T"); // duplicate binding for type is OK symtab.bindType("x", t); @@ -88,7 +88,7 @@ TEST_F(TestNodeBlackSymbolTable, bind4) TEST_F(TestNodeBlackSymbolTable, bind_type1) { SymbolTable symtab; - api::Sort s = d_solver.mkUninterpretedSort("S"); + cvc5::Sort s = d_solver.mkUninterpretedSort("S"); symtab.bindType("S", s); ASSERT_TRUE(symtab.isBoundType("S")); ASSERT_EQ(symtab.lookupType("S"), s); @@ -98,7 +98,7 @@ TEST_F(TestNodeBlackSymbolTable, bind_type2) { SymbolTable symtab; // type name attribute shouldn't matter - api::Sort s = d_solver.mkUninterpretedSort("S"); + cvc5::Sort s = d_solver.mkUninterpretedSort("S"); symtab.bindType("T", s); ASSERT_TRUE(symtab.isBoundType("T")); ASSERT_EQ(symtab.lookupType("T"), s); @@ -107,9 +107,9 @@ TEST_F(TestNodeBlackSymbolTable, bind_type2) TEST_F(TestNodeBlackSymbolTable, bind_type3) { SymbolTable symtab; - api::Sort s = d_solver.mkUninterpretedSort("S"); + cvc5::Sort s = d_solver.mkUninterpretedSort("S"); symtab.bindType("S", s); - api::Sort t = d_solver.mkUninterpretedSort("T"); + cvc5::Sort t = d_solver.mkUninterpretedSort("T"); // new binding covers old symtab.bindType("S", t); ASSERT_TRUE(symtab.isBoundType("S")); @@ -119,15 +119,15 @@ TEST_F(TestNodeBlackSymbolTable, bind_type3) TEST_F(TestNodeBlackSymbolTable, push_scope) { SymbolTable symtab; - api::Sort booleanType = d_solver.getBooleanSort(); - api::Term x = d_solver.mkConst(booleanType); + cvc5::Sort booleanType = d_solver.getBooleanSort(); + cvc5::Term x = d_solver.mkConst(booleanType); symtab.bind("x", x); symtab.pushScope(); ASSERT_TRUE(symtab.isBound("x")); ASSERT_EQ(symtab.lookup("x"), x); - api::Term y = d_solver.mkConst(booleanType); + cvc5::Term y = d_solver.mkConst(booleanType); symtab.bind("x", y); ASSERT_TRUE(symtab.isBound("x")); @@ -145,4 +145,4 @@ TEST_F(TestNodeBlackSymbolTable, bad_pop) } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/node/type_cardinality_black.cpp b/test/unit/node/type_cardinality_black.cpp index 21e87c5c2..858ca3790 100644 --- a/test/unit/node/type_cardinality_black.cpp +++ b/test/unit/node/type_cardinality_black.cpp @@ -20,7 +20,7 @@ #include "test_node.h" #include "util/cardinality.h" -namespace cvc5 { +namespace cvc5::internal { using namespace kind; @@ -331,4 +331,4 @@ TEST_F(TestNodeBlackTypeCardinality, bitvectors) } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/node/type_node_white.cpp b/test/unit/node/type_node_white.cpp index 424fee989..a5367680d 100644 --- a/test/unit/node/type_node_white.cpp +++ b/test/unit/node/type_node_white.cpp @@ -23,7 +23,7 @@ #include "test_node.h" #include "util/rational.h" -namespace cvc5 { +namespace cvc5::internal { using namespace kind; using namespace context; @@ -95,4 +95,4 @@ TEST_F(TestNodeWhiteTypeNode, sub_types) ASSERT_TRUE(bvType.getBaseType() == bvType); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/options/options_black.cpp b/test/unit/options/options_black.cpp index 0aa160677..4a4b7b26d 100644 --- a/test/unit/options/options_black.cpp +++ b/test/unit/options/options_black.cpp @@ -20,9 +20,7 @@ #include "options/options_public.h" #include "test_api.h" -namespace cvc5 { - -using namespace api; +namespace cvc5::internal { namespace test { @@ -170,4 +168,4 @@ TEST_F(TestBlackOptions, set) } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/parser/parser_black.cpp b/test/unit/parser/parser_black.cpp index e0337a802..7c763ddb4 100644 --- a/test/unit/parser/parser_black.cpp +++ b/test/unit/parser/parser_black.cpp @@ -27,7 +27,7 @@ #include "smt/command.h" #include "test.h" -namespace cvc5 { +namespace cvc5::internal { using namespace parser; @@ -44,7 +44,7 @@ class TestParserBlackParser : public TestInternal { TestInternal::SetUp(); d_symman.reset(nullptr); - d_solver.reset(new cvc5::api::Solver()); + d_solver.reset(new cvc5::Solver()); d_solver->setOption("parse-only", "true"); } @@ -62,9 +62,9 @@ class TestParserBlackParser : public TestInternal parser.bindVar("b", d_solver.get()->getBooleanSort()); parser.bindVar("c", d_solver.get()->getBooleanSort()); /* t, u, v: TYPE */ - api::Sort t = parser.mkSort("t"); - api::Sort u = parser.mkSort("u"); - api::Sort v = parser.mkSort("v"); + cvc5::Sort t = parser.mkSort("t"); + cvc5::Sort u = parser.mkSort("u"); + cvc5::Sort v = parser.mkSort("v"); /* f : t->u; g: u->v; h: v->t; */ parser.bindVar("f", d_solver.get()->mkFunctionSort(t, u)); parser.bindVar("g", d_solver.get()->mkFunctionSort(u, v)); @@ -134,7 +134,7 @@ class TestParserBlackParser : public TestInternal ASSERT_FALSE(parser->done()); setupContext(*parser); ASSERT_FALSE(parser->done()); - api::Term e = parser->nextExpression(); + cvc5::Term e = parser->nextExpression(); ASSERT_FALSE(e.isNull()); e = parser->nextExpression(); ASSERT_TRUE(parser->done()); @@ -161,7 +161,7 @@ class TestParserBlackParser : public TestInternal parser->setInput(Input::newStringInput(d_lang, badExpr, "test")); setupContext(*parser); ASSERT_FALSE(parser->done()); - ASSERT_THROW(api::Term e = parser->nextExpression(); + ASSERT_THROW(cvc5::Term e = parser->nextExpression(); std::cout << std::endl << "Bad expr succeeded." << std::endl << "Input: <<" << badExpr << ">>" << std::endl @@ -170,7 +170,7 @@ class TestParserBlackParser : public TestInternal } std::string d_lang; - std::unique_ptr d_solver; + std::unique_ptr d_solver; std::unique_ptr d_symman; }; @@ -278,4 +278,4 @@ TEST_F(TestParserBlackSmt2Parser, bad_exprs) #endif } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/parser/parser_builder_black.cpp b/test/unit/parser/parser_builder_black.cpp index 97e6406f8..95d16cd0d 100644 --- a/test/unit/parser/parser_builder_black.cpp +++ b/test/unit/parser/parser_builder_black.cpp @@ -29,7 +29,7 @@ #include "smt/command.h" #include "test_api.h" -namespace cvc5 { +namespace cvc5::internal { using namespace parser; @@ -42,7 +42,7 @@ class TestParseBlackParserBuilder : public TestApi void checkEmptyInput(Parser* parser) { - api::Term e = parser->nextExpression(); + cvc5::Term e = parser->nextExpression(); ASSERT_TRUE(e.isNull()); } @@ -143,4 +143,4 @@ TEST_F(TestParseBlackParserBuilder, true_stream_input) } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/preprocessing/pass_bv_gauss_white.cpp b/test/unit/preprocessing/pass_bv_gauss_white.cpp index 1a36d682b..18d6eabec 100644 --- a/test/unit/preprocessing/pass_bv_gauss_white.cpp +++ b/test/unit/preprocessing/pass_bv_gauss_white.cpp @@ -29,7 +29,7 @@ #include "theory/rewriter.h" #include "util/bitvector.h" -namespace cvc5 { +namespace cvc5::internal { using namespace preprocessing; using namespace preprocessing::passes; @@ -3108,4 +3108,4 @@ TEST_F(TestPPWhiteBVGauss, get_min_bw5b) ASSERT_EQ(d_bv_gauss->getMinBwExpr(Rewriter::rewrite(plus7)), 17); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/preprocessing/pass_foreign_theory_rewrite_white.cpp b/test/unit/preprocessing/pass_foreign_theory_rewrite_white.cpp index 6687f2459..f42187267 100644 --- a/test/unit/preprocessing/pass_foreign_theory_rewrite_white.cpp +++ b/test/unit/preprocessing/pass_foreign_theory_rewrite_white.cpp @@ -19,10 +19,10 @@ #include "test_smt.h" #include "util/rational.h" -using namespace cvc5::kind; -using namespace cvc5::preprocessing::passes; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::preprocessing::passes; -namespace cvc5 { +namespace cvc5::internal { namespace test { class TestPPWhiteForeignTheoryRewrite : public TestSmt @@ -49,4 +49,4 @@ TEST_F(TestPPWhiteForeignTheoryRewrite, simplify) } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/printer/smt2_printer_black.cpp b/test/unit/printer/smt2_printer_black.cpp index 015875cc7..99a043116 100644 --- a/test/unit/printer/smt2_printer_black.cpp +++ b/test/unit/printer/smt2_printer_black.cpp @@ -24,7 +24,7 @@ #include "util/regexp.h" #include "util/string.h" -namespace cvc5 { +namespace cvc5::internal { using namespace kind; @@ -61,4 +61,4 @@ TEST_F(TestPrinterBlackSmt2, regexp_loop) checkToString(n, "((_ re.loop 1 3) (str.to_re \"x\"))"); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/proof/lfsc_node_converter_black.cpp b/test/unit/proof/lfsc_node_converter_black.cpp index 31badc812..8a776d85a 100644 --- a/test/unit/proof/lfsc_node_converter_black.cpp +++ b/test/unit/proof/lfsc_node_converter_black.cpp @@ -18,8 +18,8 @@ #include "proof/lfsc/lfsc_node_converter.h" #include "test.h" -namespace cvc5 { -using namespace cvc5::proof; +namespace cvc5::internal { +using namespace cvc5::internal::proof; namespace test { @@ -57,4 +57,4 @@ TEST_F(TestLfscNodeConverterBlack, ident_sanitize) } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/prop/cnf_stream_white.cpp b/test/unit/prop/cnf_stream_white.cpp index d29ef69cc..4bb3d9bf2 100644 --- a/test/unit/prop/cnf_stream_white.cpp +++ b/test/unit/prop/cnf_stream_white.cpp @@ -27,7 +27,7 @@ #include "theory/theory.h" #include "theory/theory_engine.h" -namespace cvc5 { +namespace cvc5::internal { using namespace context; using namespace prop; @@ -111,11 +111,10 @@ class TestPropWhiteCnfStream : public TestSmt d_satSolver.reset(new FakeSatSolver()); d_cnfContext.reset(new context::Context()); d_cnfRegistrar.reset(new prop::NullRegistrar); - d_cnfStream.reset( - new cvc5::prop::CnfStream(d_slvEngine->getEnv(), - d_satSolver.get(), - d_cnfRegistrar.get(), - d_cnfContext.get())); + d_cnfStream.reset(new prop::CnfStream(d_slvEngine->getEnv(), + d_satSolver.get(), + d_cnfRegistrar.get(), + d_cnfContext.get())); } void TearDown() override @@ -258,4 +257,4 @@ TEST_F(TestPropWhiteCnfStream, ensure_literal) ASSERT_TRUE(d_cnfStream->hasLiteral(a_and_b)); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/test.h b/test/unit/test.h index d7035efcd..8e680de4b 100644 --- a/test/unit/test.h +++ b/test/unit/test.h @@ -18,7 +18,7 @@ #include "gtest/gtest.h" -namespace cvc5 { +namespace cvc5::internal { namespace test { class TestInternal : public ::testing::Test @@ -26,5 +26,5 @@ class TestInternal : public ::testing::Test }; } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/test/unit/test_api.h b/test/unit/test_api.h index 533bdaaa2..95b7c3b17 100644 --- a/test/unit/test_api.h +++ b/test/unit/test_api.h @@ -19,15 +19,15 @@ #include "api/cpp/cvc5.h" #include "gtest/gtest.h" -namespace cvc5 { +namespace cvc5::internal { namespace test { class TestApi : public ::testing::Test { protected: - cvc5::api::Solver d_solver; + cvc5::Solver d_solver; }; } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/test/unit/test_context.h b/test/unit/test_context.h index b034aaa2e..5e875cb52 100644 --- a/test/unit/test_context.h +++ b/test/unit/test_context.h @@ -19,16 +19,16 @@ #include "context/context.h" #include "test.h" -namespace cvc5 { +namespace cvc5::internal { namespace test { class TestContext : public TestInternal { protected: - void SetUp() override { d_context.reset(new cvc5::context::Context()); } - std::unique_ptr d_context; + void SetUp() override { d_context.reset(new context::Context()); } + std::unique_ptr d_context; }; } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/test/unit/test_env.h b/test/unit/test_env.h index b06254e7e..376fd75db 100644 --- a/test/unit/test_env.h +++ b/test/unit/test_env.h @@ -24,7 +24,7 @@ #include "smt/solver_engine_scope.h" #include "test.h" -namespace cvc5 { +namespace cvc5::internal { namespace test { class TestEnv : public TestInternal @@ -43,5 +43,5 @@ class TestEnv : public TestInternal }; } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/test/unit/test_node.h b/test/unit/test_node.h index 7d3db971c..b6f43b394 100644 --- a/test/unit/test_node.h +++ b/test/unit/test_node.h @@ -22,7 +22,7 @@ #include "smt/solver_engine_scope.h" #include "test.h" -namespace cvc5 { +namespace cvc5::internal { namespace test { class TestNode : public TestInternal @@ -48,5 +48,5 @@ class TestNode : public TestInternal }; } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/test/unit/test_smt.h b/test/unit/test_smt.h index feb41822a..7d57d0b47 100644 --- a/test/unit/test_smt.h +++ b/test/unit/test_smt.h @@ -31,7 +31,7 @@ #include "theory/valuation.h" #include "util/resource_manager.h" -namespace cvc5 { +namespace cvc5::internal { namespace test { /* -------------------------------------------------------------------------- */ @@ -103,7 +103,7 @@ inline std::ostream& operator<<(std::ostream& out, OutputChannelCallType type) } } -class DummyOutputChannel : public cvc5::theory::OutputChannel +class DummyOutputChannel : public theory::OutputChannel { public: DummyOutputChannel() {} @@ -258,5 +258,5 @@ class DummyTheory : public theory::Theory /* -------------------------------------------------------------------------- */ } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal #endif diff --git a/test/unit/theory/arith_poly_white.cpp b/test/unit/theory/arith_poly_white.cpp index adfa59f0e..c8f38e43d 100644 --- a/test/unit/theory/arith_poly_white.cpp +++ b/test/unit/theory/arith_poly_white.cpp @@ -23,7 +23,7 @@ #include "theory/arith/arith_poly_norm.h" #include "util/rational.h" -namespace cvc5 { +namespace cvc5::internal { using namespace theory; using namespace theory::arith; @@ -129,4 +129,4 @@ TEST_F(TestTheoryWhiteArithPolyNorm, check_poly_norm_real) } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/theory/evaluator_white.cpp b/test/unit/theory/evaluator_white.cpp index 4ff6d174f..fd8b85f90 100644 --- a/test/unit/theory/evaluator_white.cpp +++ b/test/unit/theory/evaluator_white.cpp @@ -25,10 +25,10 @@ #include "theory/rewriter.h" #include "util/rational.h" -using namespace cvc5::kind; -using namespace cvc5::theory; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::theory; -namespace cvc5 { +namespace cvc5::internal { namespace test { class TestTheoryWhiteEvaluator : public TestSmt @@ -161,4 +161,4 @@ TEST_F(TestTheoryWhiteEvaluator, code) } } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/theory/logic_info_white.cpp b/test/unit/theory/logic_info_white.cpp index e999297fd..cc6ea757f 100644 --- a/test/unit/theory/logic_info_white.cpp +++ b/test/unit/theory/logic_info_white.cpp @@ -18,7 +18,7 @@ #include "test.h" #include "theory/logic_info.h" -namespace cvc5 { +namespace cvc5::internal { using namespace theory; @@ -543,33 +543,29 @@ TEST_F(TestTheoryWhiteLogicInfo, default_logic) LogicInfo info; ASSERT_FALSE(info.isLocked()); - ASSERT_THROW(info.getLogicString(), cvc5::IllegalArgumentException); - ASSERT_THROW(info.isTheoryEnabled(THEORY_BUILTIN), - cvc5::IllegalArgumentException); - ASSERT_THROW(info.isTheoryEnabled(THEORY_BOOL), - cvc5::IllegalArgumentException); - ASSERT_THROW(info.isTheoryEnabled(THEORY_UF), cvc5::IllegalArgumentException); - ASSERT_THROW(info.isTheoryEnabled(THEORY_ARITH), - cvc5::IllegalArgumentException); - ASSERT_THROW(info.isTheoryEnabled(THEORY_ARRAYS), - cvc5::IllegalArgumentException); - ASSERT_THROW(info.isTheoryEnabled(THEORY_BV), cvc5::IllegalArgumentException); + ASSERT_THROW(info.getLogicString(), IllegalArgumentException); + ASSERT_THROW(info.isTheoryEnabled(THEORY_BUILTIN), IllegalArgumentException); + ASSERT_THROW(info.isTheoryEnabled(THEORY_BOOL), IllegalArgumentException); + ASSERT_THROW(info.isTheoryEnabled(THEORY_UF), IllegalArgumentException); + ASSERT_THROW(info.isTheoryEnabled(THEORY_ARITH), IllegalArgumentException); + ASSERT_THROW(info.isTheoryEnabled(THEORY_ARRAYS), IllegalArgumentException); + ASSERT_THROW(info.isTheoryEnabled(THEORY_BV), IllegalArgumentException); ASSERT_THROW(info.isTheoryEnabled(THEORY_DATATYPES), - cvc5::IllegalArgumentException); + IllegalArgumentException); ASSERT_THROW(info.isTheoryEnabled(THEORY_QUANTIFIERS), - cvc5::IllegalArgumentException); - ASSERT_THROW(info.isPure(THEORY_BUILTIN), cvc5::IllegalArgumentException); - ASSERT_THROW(info.isPure(THEORY_BOOL), cvc5::IllegalArgumentException); - ASSERT_THROW(info.isPure(THEORY_UF), cvc5::IllegalArgumentException); - ASSERT_THROW(info.isPure(THEORY_ARITH), cvc5::IllegalArgumentException); - ASSERT_THROW(info.isPure(THEORY_ARRAYS), cvc5::IllegalArgumentException); - ASSERT_THROW(info.isPure(THEORY_BV), cvc5::IllegalArgumentException); - ASSERT_THROW(info.isPure(THEORY_DATATYPES), cvc5::IllegalArgumentException); - ASSERT_THROW(info.isPure(THEORY_QUANTIFIERS), cvc5::IllegalArgumentException); - ASSERT_THROW(info.isQuantified(), cvc5::IllegalArgumentException); - ASSERT_THROW(info.areIntegersUsed(), cvc5::IllegalArgumentException); - ASSERT_THROW(info.areRealsUsed(), cvc5::IllegalArgumentException); - ASSERT_THROW(info.isLinear(), cvc5::IllegalArgumentException); + IllegalArgumentException); + ASSERT_THROW(info.isPure(THEORY_BUILTIN), IllegalArgumentException); + ASSERT_THROW(info.isPure(THEORY_BOOL), IllegalArgumentException); + ASSERT_THROW(info.isPure(THEORY_UF), IllegalArgumentException); + ASSERT_THROW(info.isPure(THEORY_ARITH), IllegalArgumentException); + ASSERT_THROW(info.isPure(THEORY_ARRAYS), IllegalArgumentException); + ASSERT_THROW(info.isPure(THEORY_BV), IllegalArgumentException); + ASSERT_THROW(info.isPure(THEORY_DATATYPES), IllegalArgumentException); + ASSERT_THROW(info.isPure(THEORY_QUANTIFIERS), IllegalArgumentException); + ASSERT_THROW(info.isQuantified(), IllegalArgumentException); + ASSERT_THROW(info.areIntegersUsed(), IllegalArgumentException); + ASSERT_THROW(info.areRealsUsed(), IllegalArgumentException); + ASSERT_THROW(info.isLinear(), IllegalArgumentException); info.lock(); ASSERT_TRUE(info.isLocked()); @@ -597,17 +593,15 @@ TEST_F(TestTheoryWhiteLogicInfo, default_logic) ASSERT_TRUE(info.areTranscendentalsUsed()); ASSERT_FALSE(info.isLinear()); - ASSERT_THROW(info.arithOnlyLinear(), cvc5::IllegalArgumentException); - ASSERT_THROW(info.disableIntegers(), cvc5::IllegalArgumentException); - ASSERT_THROW(info.disableQuantifiers(), cvc5::IllegalArgumentException); - ASSERT_THROW(info.disableTheory(THEORY_BV), cvc5::IllegalArgumentException); - ASSERT_THROW(info.disableTheory(THEORY_DATATYPES), - cvc5::IllegalArgumentException); - ASSERT_THROW(info.enableIntegers(), cvc5::IllegalArgumentException); - ASSERT_THROW(info.disableReals(), cvc5::IllegalArgumentException); - ASSERT_THROW(info.disableTheory(THEORY_ARITH), - cvc5::IllegalArgumentException); - ASSERT_THROW(info.disableTheory(THEORY_UF), cvc5::IllegalArgumentException); + ASSERT_THROW(info.arithOnlyLinear(), IllegalArgumentException); + ASSERT_THROW(info.disableIntegers(), IllegalArgumentException); + ASSERT_THROW(info.disableQuantifiers(), IllegalArgumentException); + ASSERT_THROW(info.disableTheory(THEORY_BV), IllegalArgumentException); + ASSERT_THROW(info.disableTheory(THEORY_DATATYPES), IllegalArgumentException); + ASSERT_THROW(info.enableIntegers(), IllegalArgumentException); + ASSERT_THROW(info.disableReals(), IllegalArgumentException); + ASSERT_THROW(info.disableTheory(THEORY_ARITH), IllegalArgumentException); + ASSERT_THROW(info.disableTheory(THEORY_UF), IllegalArgumentException); info = info.getUnlockedCopy(); ASSERT_FALSE(info.isLocked()); info.disableTheory(THEORY_STRINGS); @@ -1349,4 +1343,4 @@ TEST_F(TestTheoryWhiteLogicInfo, comparison) gt(ufHo, "QF_UF"); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/theory/regexp_operation_black.cpp b/test/unit/theory/regexp_operation_black.cpp index 8d3a672f7..01999f527 100644 --- a/test/unit/theory/regexp_operation_black.cpp +++ b/test/unit/theory/regexp_operation_black.cpp @@ -26,7 +26,7 @@ #include "theory/strings/regexp_entail.h" #include "util/string.h" -namespace cvc5 { +namespace cvc5::internal { using namespace kind; using namespace theory; @@ -138,4 +138,4 @@ TEST_F(TestTheoryBlackRegexpOperation, star_wildcards) } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/theory/sequences_rewriter_white.cpp b/test/unit/theory/sequences_rewriter_white.cpp index 3f41d5ba1..15ec507b2 100644 --- a/test/unit/theory/sequences_rewriter_white.cpp +++ b/test/unit/theory/sequences_rewriter_white.cpp @@ -29,11 +29,11 @@ #include "util/rational.h" #include "util/string.h" -using namespace cvc5::kind; -using namespace cvc5::theory; -using namespace cvc5::theory::strings; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::theory; +using namespace cvc5::internal::theory::strings; -namespace cvc5 { +namespace cvc5::internal { namespace test { class TestTheoryWhiteSequencesRewriter : public TestSmt @@ -88,10 +88,10 @@ TEST_F(TestTheoryWhiteSequencesRewriter, check_entail_length_one) TypeNode intType = d_nodeManager->integerType(); TypeNode strType = d_nodeManager->stringType(); - Node a = d_nodeManager->mkConst(::cvc5::String("A")); - Node abcd = d_nodeManager->mkConst(::cvc5::String("ABCD")); - Node aaad = d_nodeManager->mkConst(::cvc5::String("AAAD")); - Node b = d_nodeManager->mkConst(::cvc5::String("B")); + Node a = d_nodeManager->mkConst(String("A")); + Node abcd = d_nodeManager->mkConst(String("ABCD")); + Node aaad = d_nodeManager->mkConst(String("AAAD")); + Node b = d_nodeManager->mkConst(String("B")); Node x = d_nodeManager->mkVar("x", strType); Node y = d_nodeManager->mkVar("y", strType); Node negOne = d_nodeManager->mkConst(CONST_RATIONAL, Rational(-1)); @@ -154,8 +154,8 @@ TEST_F(TestTheoryWhiteSequencesRewriter, check_entail_with_with_assumption) Node zero = d_nodeManager->mkConst(CONST_RATIONAL, Rational(0)); Node one = d_nodeManager->mkConst(CONST_RATIONAL, Rational(1)); - Node empty = d_nodeManager->mkConst(::cvc5::String("")); - Node a = d_nodeManager->mkConst(::cvc5::String("A")); + Node empty = d_nodeManager->mkConst(String("")); + Node a = d_nodeManager->mkConst(String("A")); Node slen_y = d_nodeManager->mkNode(kind::STRING_LENGTH, y); Node x_plus_slen_y = d_nodeManager->mkNode(kind::ADD, x, slen_y); @@ -288,10 +288,10 @@ TEST_F(TestTheoryWhiteSequencesRewriter, rewrite_substr) TypeNode intType = d_nodeManager->integerType(); TypeNode strType = d_nodeManager->stringType(); - Node empty = d_nodeManager->mkConst(::cvc5::String("")); - Node a = d_nodeManager->mkConst(::cvc5::String("A")); - Node b = d_nodeManager->mkConst(::cvc5::String("B")); - Node abcd = d_nodeManager->mkConst(::cvc5::String("ABCD")); + Node empty = d_nodeManager->mkConst(String("")); + Node a = d_nodeManager->mkConst(String("A")); + Node b = d_nodeManager->mkConst(String("B")); + Node abcd = d_nodeManager->mkConst(String("ABCD")); Node negone = d_nodeManager->mkConst(CONST_RATIONAL, Rational(-1)); Node zero = d_nodeManager->mkConst(CONST_RATIONAL, Rational(0)); Node one = d_nodeManager->mkConst(CONST_RATIONAL, Rational(1)); @@ -530,8 +530,8 @@ TEST_F(TestTheoryWhiteSequencesRewriter, rewrite_concat) TypeNode intType = d_nodeManager->integerType(); TypeNode strType = d_nodeManager->stringType(); - Node empty = d_nodeManager->mkConst(::cvc5::String("")); - Node a = d_nodeManager->mkConst(::cvc5::String("A")); + Node empty = d_nodeManager->mkConst(String("")); + Node a = d_nodeManager->mkConst(String("A")); Node zero = d_nodeManager->mkConst(CONST_RATIONAL, Rational(0)); Node three = d_nodeManager->mkConst(CONST_RATIONAL, Rational(3)); @@ -598,11 +598,11 @@ TEST_F(TestTheoryWhiteSequencesRewriter, length_preserve_rewrite) TypeNode intType = d_nodeManager->integerType(); TypeNode strType = d_nodeManager->stringType(); - Node empty = d_nodeManager->mkConst(::cvc5::String("")); - Node abcd = d_nodeManager->mkConst(::cvc5::String("ABCD")); - Node f = d_nodeManager->mkConst(::cvc5::String("F")); - Node gh = d_nodeManager->mkConst(::cvc5::String("GH")); - Node ij = d_nodeManager->mkConst(::cvc5::String("IJ")); + Node empty = d_nodeManager->mkConst(String("")); + Node abcd = d_nodeManager->mkConst(String("ABCD")); + Node f = d_nodeManager->mkConst(String("F")); + Node gh = d_nodeManager->mkConst(String("GH")); + Node ij = d_nodeManager->mkConst(String("IJ")); Node i = d_nodeManager->mkVar("i", intType); Node s = d_nodeManager->mkVar("s", strType); @@ -631,12 +631,12 @@ TEST_F(TestTheoryWhiteSequencesRewriter, rewrite_indexOf) TypeNode intType = d_nodeManager->integerType(); TypeNode strType = d_nodeManager->stringType(); - Node a = d_nodeManager->mkConst(::cvc5::String("A")); - Node abcd = d_nodeManager->mkConst(::cvc5::String("ABCD")); - Node aaad = d_nodeManager->mkConst(::cvc5::String("AAAD")); - Node b = d_nodeManager->mkConst(::cvc5::String("B")); - Node c = d_nodeManager->mkConst(::cvc5::String("C")); - Node ccc = d_nodeManager->mkConst(::cvc5::String("CCC")); + Node a = d_nodeManager->mkConst(String("A")); + Node abcd = d_nodeManager->mkConst(String("ABCD")); + Node aaad = d_nodeManager->mkConst(String("AAAD")); + Node b = d_nodeManager->mkConst(String("B")); + Node c = d_nodeManager->mkConst(String("C")); + Node ccc = d_nodeManager->mkConst(String("CCC")); Node x = d_nodeManager->mkVar("x", strType); Node y = d_nodeManager->mkVar("y", strType); Node negOne = d_nodeManager->mkConst(CONST_RATIONAL, Rational(-1)); @@ -711,12 +711,12 @@ TEST_F(TestTheoryWhiteSequencesRewriter, rewrite_replace) TypeNode intType = d_nodeManager->integerType(); TypeNode strType = d_nodeManager->stringType(); - Node empty = d_nodeManager->mkConst(::cvc5::String("")); - Node a = d_nodeManager->mkConst(::cvc5::String("A")); - Node ab = d_nodeManager->mkConst(::cvc5::String("AB")); - Node b = d_nodeManager->mkConst(::cvc5::String("B")); - Node c = d_nodeManager->mkConst(::cvc5::String("C")); - Node d = d_nodeManager->mkConst(::cvc5::String("D")); + Node empty = d_nodeManager->mkConst(String("")); + Node a = d_nodeManager->mkConst(String("A")); + Node ab = d_nodeManager->mkConst(String("AB")); + Node b = d_nodeManager->mkConst(String("B")); + Node c = d_nodeManager->mkConst(String("C")); + Node d = d_nodeManager->mkConst(String("D")); Node x = d_nodeManager->mkVar("x", strType); Node y = d_nodeManager->mkVar("y", strType); Node z = d_nodeManager->mkVar("z", strType); @@ -907,7 +907,7 @@ TEST_F(TestTheoryWhiteSequencesRewriter, rewrite_replace_re) d_nodeManager->mkConst(String("AZZZB")), re, foo); - Node res = d_nodeManager->mkConst(::cvc5::String("FOO")); + Node res = d_nodeManager->mkConst(String("FOO")); sameNormalForm(t, res); } @@ -924,7 +924,7 @@ TEST_F(TestTheoryWhiteSequencesRewriter, rewrite_replace_re) d_nodeManager->mkConst(String("ZAZZZBZZB")), re, foo); - Node res = d_nodeManager->mkConst(::cvc5::String("ZFOOZZB")); + Node res = d_nodeManager->mkConst(String("ZFOOZZB")); sameNormalForm(t, res); } @@ -941,7 +941,7 @@ TEST_F(TestTheoryWhiteSequencesRewriter, rewrite_replace_re) d_nodeManager->mkConst(String("ZAZZZBZAZB")), re, foo); - Node res = d_nodeManager->mkConst(::cvc5::String("ZFOOZAZB")); + Node res = d_nodeManager->mkConst(String("ZFOOZAZB")); sameNormalForm(t, res); } @@ -958,7 +958,7 @@ TEST_F(TestTheoryWhiteSequencesRewriter, rewrite_replace_re) d_nodeManager->mkConst(String("ZZZ")), re, foo); - Node res = d_nodeManager->mkConst(::cvc5::String("ZZZ")); + Node res = d_nodeManager->mkConst(String("ZZZ")); sameNormalForm(t, res); } @@ -975,7 +975,7 @@ TEST_F(TestTheoryWhiteSequencesRewriter, rewrite_replace_re) d_nodeManager->mkConst(String("ZZZ")), sigStar, foo); - Node res = d_nodeManager->mkConst(::cvc5::String("FOOZZZ")); + Node res = d_nodeManager->mkConst(String("FOOZZZ")); sameNormalForm(t, res); } @@ -992,7 +992,7 @@ TEST_F(TestTheoryWhiteSequencesRewriter, rewrite_replace_re) d_nodeManager->mkConst(String("")), sigStar, foo); - Node res = d_nodeManager->mkConst(::cvc5::String("FOO")); + Node res = d_nodeManager->mkConst(String("FOO")); sameNormalForm(t, res); } } @@ -1027,7 +1027,7 @@ TEST_F(TestTheoryWhiteSequencesRewriter, rewrite_replace_all) d_nodeManager->mkConst(String("AZZZB")), re, foo); - Node res = d_nodeManager->mkConst(::cvc5::String("FOO")); + Node res = d_nodeManager->mkConst(String("FOO")); sameNormalForm(t, res); } @@ -1044,7 +1044,7 @@ TEST_F(TestTheoryWhiteSequencesRewriter, rewrite_replace_all) d_nodeManager->mkConst(String("ZAZZZBZZB")), re, foo); - Node res = d_nodeManager->mkConst(::cvc5::String("ZFOOZZB")); + Node res = d_nodeManager->mkConst(String("ZFOOZZB")); sameNormalForm(t, res); } @@ -1061,7 +1061,7 @@ TEST_F(TestTheoryWhiteSequencesRewriter, rewrite_replace_all) d_nodeManager->mkConst(String("ZAZZZBZAZB")), re, foo); - Node res = d_nodeManager->mkConst(::cvc5::String("ZFOOZFOO")); + Node res = d_nodeManager->mkConst(String("ZFOOZFOO")); sameNormalForm(t, res); } @@ -1078,7 +1078,7 @@ TEST_F(TestTheoryWhiteSequencesRewriter, rewrite_replace_all) d_nodeManager->mkConst(String("ZZZ")), re, foo); - Node res = d_nodeManager->mkConst(::cvc5::String("ZZZ")); + Node res = d_nodeManager->mkConst(String("ZZZ")); sameNormalForm(t, res); } @@ -1095,7 +1095,7 @@ TEST_F(TestTheoryWhiteSequencesRewriter, rewrite_replace_all) d_nodeManager->mkConst(String("ZZZ")), sigStar, foo); - Node res = d_nodeManager->mkConst(::cvc5::String("FOOFOOFOO")); + Node res = d_nodeManager->mkConst(String("FOOFOOFOO")); sameNormalForm(t, res); } @@ -1112,7 +1112,7 @@ TEST_F(TestTheoryWhiteSequencesRewriter, rewrite_replace_all) d_nodeManager->mkConst(String("")), sigStar, foo); - Node res = d_nodeManager->mkConst(::cvc5::String("")); + Node res = d_nodeManager->mkConst(String("")); sameNormalForm(t, res); } } @@ -1122,18 +1122,18 @@ TEST_F(TestTheoryWhiteSequencesRewriter, rewrite_contains) TypeNode intType = d_nodeManager->integerType(); TypeNode strType = d_nodeManager->stringType(); - Node empty = d_nodeManager->mkConst(::cvc5::String("")); - Node a = d_nodeManager->mkConst(::cvc5::String("A")); - Node ab = d_nodeManager->mkConst(::cvc5::String("AB")); - Node b = d_nodeManager->mkConst(::cvc5::String("B")); - Node c = d_nodeManager->mkConst(::cvc5::String("C")); - Node e = d_nodeManager->mkConst(::cvc5::String("E")); - Node h = d_nodeManager->mkConst(::cvc5::String("H")); - Node j = d_nodeManager->mkConst(::cvc5::String("J")); - Node p = d_nodeManager->mkConst(::cvc5::String("P")); - Node abc = d_nodeManager->mkConst(::cvc5::String("ABC")); - Node def = d_nodeManager->mkConst(::cvc5::String("DEF")); - Node ghi = d_nodeManager->mkConst(::cvc5::String("GHI")); + Node empty = d_nodeManager->mkConst(String("")); + Node a = d_nodeManager->mkConst(String("A")); + Node ab = d_nodeManager->mkConst(String("AB")); + Node b = d_nodeManager->mkConst(String("B")); + Node c = d_nodeManager->mkConst(String("C")); + Node e = d_nodeManager->mkConst(String("E")); + Node h = d_nodeManager->mkConst(String("H")); + Node j = d_nodeManager->mkConst(String("J")); + Node p = d_nodeManager->mkConst(String("P")); + Node abc = d_nodeManager->mkConst(String("ABC")); + Node def = d_nodeManager->mkConst(String("DEF")); + Node ghi = d_nodeManager->mkConst(String("GHI")); Node x = d_nodeManager->mkVar("x", strType); Node y = d_nodeManager->mkVar("y", strType); Node xy = d_nodeManager->mkNode(kind::STRING_CONCAT, x, y); @@ -1474,9 +1474,9 @@ TEST_F(TestTheoryWhiteSequencesRewriter, infer_eqs_from_contains) StringsEntail& se = d_seqRewriter->getStringsEntail(); TypeNode strType = d_nodeManager->stringType(); - Node empty = d_nodeManager->mkConst(::cvc5::String("")); - Node a = d_nodeManager->mkConst(::cvc5::String("A")); - Node b = d_nodeManager->mkConst(::cvc5::String("B")); + Node empty = d_nodeManager->mkConst(String("")); + Node a = d_nodeManager->mkConst(String("A")); + Node b = d_nodeManager->mkConst(String("B")); Node x = d_nodeManager->mkVar("x", strType); Node y = d_nodeManager->mkVar("y", strType); Node xy = d_nodeManager->mkNode(kind::STRING_CONCAT, x, y); @@ -1518,8 +1518,8 @@ TEST_F(TestTheoryWhiteSequencesRewriter, rewrite_prefix_suffix) { TypeNode strType = d_nodeManager->stringType(); - Node empty = d_nodeManager->mkConst(::cvc5::String("")); - Node a = d_nodeManager->mkConst(::cvc5::String("A")); + Node empty = d_nodeManager->mkConst(String("")); + Node a = d_nodeManager->mkConst(String("A")); Node x = d_nodeManager->mkVar("x", strType); Node y = d_nodeManager->mkVar("y", strType); Node xx = d_nodeManager->mkNode(kind::STRING_CONCAT, x, x); @@ -1555,11 +1555,11 @@ TEST_F(TestTheoryWhiteSequencesRewriter, rewrite_equality_ext) TypeNode strType = d_nodeManager->stringType(); TypeNode intType = d_nodeManager->integerType(); - Node empty = d_nodeManager->mkConst(::cvc5::String("")); - Node a = d_nodeManager->mkConst(::cvc5::String("A")); - Node aaa = d_nodeManager->mkConst(::cvc5::String("AAA")); - Node b = d_nodeManager->mkConst(::cvc5::String("B")); - Node ba = d_nodeManager->mkConst(::cvc5::String("BA")); + Node empty = d_nodeManager->mkConst(String("")); + Node a = d_nodeManager->mkConst(String("A")); + Node aaa = d_nodeManager->mkConst(String("AAA")); + Node b = d_nodeManager->mkConst(String("B")); + Node ba = d_nodeManager->mkConst(String("BA")); Node w = d_nodeManager->mkVar("w", strType); Node x = d_nodeManager->mkVar("x", strType); Node y = d_nodeManager->mkVar("y", strType); @@ -1845,14 +1845,14 @@ TEST_F(TestTheoryWhiteSequencesRewriter, strip_constant_endpoints) TypeNode intType = d_nodeManager->integerType(); TypeNode strType = d_nodeManager->stringType(); - Node empty = d_nodeManager->mkConst(::cvc5::String("")); - Node a = d_nodeManager->mkConst(::cvc5::String("A")); - Node ab = d_nodeManager->mkConst(::cvc5::String("AB")); - Node abc = d_nodeManager->mkConst(::cvc5::String("ABC")); - Node abcd = d_nodeManager->mkConst(::cvc5::String("ABCD")); - Node bc = d_nodeManager->mkConst(::cvc5::String("BC")); - Node c = d_nodeManager->mkConst(::cvc5::String("C")); - Node cd = d_nodeManager->mkConst(::cvc5::String("CD")); + Node empty = d_nodeManager->mkConst(String("")); + Node a = d_nodeManager->mkConst(String("A")); + Node ab = d_nodeManager->mkConst(String("AB")); + Node abc = d_nodeManager->mkConst(String("ABC")); + Node abcd = d_nodeManager->mkConst(String("ABCD")); + Node bc = d_nodeManager->mkConst(String("BC")); + Node c = d_nodeManager->mkConst(String("C")); + Node cd = d_nodeManager->mkConst(String("CD")); Node x = d_nodeManager->mkVar("x", strType); Node y = d_nodeManager->mkVar("y", strType); Node n = d_nodeManager->mkVar("n", intType); @@ -1952,7 +1952,7 @@ TEST_F(TestTheoryWhiteSequencesRewriter, rewrite_membership) TypeNode strType = d_nodeManager->stringType(); std::vector vec_empty; - Node abc = d_nodeManager->mkConst(::cvc5::String("ABC")); + Node abc = d_nodeManager->mkConst(String("ABC")); Node re_abc = d_nodeManager->mkNode(kind::STRING_TO_REGEXP, abc); Node x = d_nodeManager->mkVar("x", strType); @@ -2028,4 +2028,4 @@ TEST_F(TestTheoryWhiteSequencesRewriter, rewrite_regexp_concat) } } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/theory/strings_rewriter_white.cpp b/test/unit/theory/strings_rewriter_white.cpp index 020fb6e8f..e868a2062 100644 --- a/test/unit/theory/strings_rewriter_white.cpp +++ b/test/unit/theory/strings_rewriter_white.cpp @@ -24,7 +24,7 @@ #include "theory/strings/strings_rewriter.h" #include "util/string.h" -namespace cvc5 { +namespace cvc5::internal { using namespace kind; using namespace theory; @@ -41,8 +41,8 @@ TEST_F(TestTheoryWhiteStringsRewriter, rewrite_leq) TypeNode intType = d_nodeManager->integerType(); TypeNode strType = d_nodeManager->stringType(); - Node a = d_nodeManager->mkConst(::cvc5::String("A")); - Node bc = d_nodeManager->mkConst(::cvc5::String("BC")); + Node a = d_nodeManager->mkConst(String("A")); + Node bc = d_nodeManager->mkConst(String("BC")); Node x = d_nodeManager->mkVar("x", strType); Node y = d_nodeManager->mkVar("y", strType); @@ -61,4 +61,4 @@ TEST_F(TestTheoryWhiteStringsRewriter, rewrite_leq) } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/theory/theory_arith_coverings_white.cpp b/test/unit/theory/theory_arith_coverings_white.cpp index 864402eed..e4d4c1e09 100644 --- a/test/unit/theory/theory_arith_coverings_white.cpp +++ b/test/unit/theory/theory_arith_coverings_white.cpp @@ -38,13 +38,13 @@ #include "theory/theory_engine.h" #include "util/poly_util.h" -namespace cvc5::test { +namespace cvc5::internal::test { -using namespace cvc5; -using namespace cvc5::kind; -using namespace cvc5::theory; -using namespace cvc5::theory::arith; -using namespace cvc5::theory::arith::nl; +using namespace cvc5::internal; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::theory; +using namespace cvc5::internal::theory::arith; +using namespace cvc5::internal::theory::arith::nl; NodeManager* nodeManager; class TestTheoryWhiteArithCoverings : public TestSmt @@ -480,6 +480,6 @@ TEST_F(TestTheoryWhiteArithCoverings, test_ran_conversion) EXPECT_TRUE(ran == back); } } -} // namespace cvc5::test +} // namespace cvc5::internal::test #endif diff --git a/test/unit/theory/theory_arith_pow2_white.cpp b/test/unit/theory/theory_arith_pow2_white.cpp index fd942c5b5..714eff579 100644 --- a/test/unit/theory/theory_arith_pow2_white.cpp +++ b/test/unit/theory/theory_arith_pow2_white.cpp @@ -21,7 +21,7 @@ #include "theory/arith/nl/pow2_solver.h" #include "util/rational.h" -namespace cvc5 { +namespace cvc5::internal { using namespace kind; using namespace theory; @@ -43,4 +43,4 @@ class TestTheoryWhiteArithPow2 : public TestSmtNoFinishInit Node d_one; }; } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/theory/theory_arith_rewriter_black.cpp b/test/unit/theory/theory_arith_rewriter_black.cpp index a2967697e..88af6b021 100644 --- a/test/unit/theory/theory_arith_rewriter_black.cpp +++ b/test/unit/theory/theory_arith_rewriter_black.cpp @@ -17,7 +17,7 @@ #include "util/rational.h" #include "util/real_algebraic_number.h" -namespace cvc5 { +namespace cvc5::internal { using namespace kind; using namespace context; @@ -115,4 +115,4 @@ TEST_F(TestTheoryArithRewriterBlack, Abs) } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/theory/theory_arith_white.cpp b/test/unit/theory/theory_arith_white.cpp index d22dd4e04..a358e5b60 100644 --- a/test/unit/theory/theory_arith_white.cpp +++ b/test/unit/theory/theory_arith_white.cpp @@ -25,7 +25,7 @@ #include "theory/theory_engine.h" #include "util/rational.h" -namespace cvc5 { +namespace cvc5::internal { using namespace theory; using namespace theory::arith; @@ -123,4 +123,4 @@ TEST_F(TestTheoryWhiteArith, int_normal_form) ASSERT_EQ(Rewriter::rewrite(Rewriter::rewrite(t)), Rewriter::rewrite(t)); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/theory/theory_bags_normal_form_white.cpp b/test/unit/theory/theory_bags_normal_form_white.cpp index 4c8c41f0b..469f532b0 100644 --- a/test/unit/theory/theory_bags_normal_form_white.cpp +++ b/test/unit/theory/theory_bags_normal_form_white.cpp @@ -23,7 +23,7 @@ #include "util/rational.h" #include "util/string.h" -namespace cvc5 { +namespace cvc5::internal { using namespace theory; using namespace kind; @@ -45,8 +45,7 @@ class TestTheoryWhiteBagsNormalForm : public TestSmt std::vector getNStrings(size_t n) { std::vector elements(n); - cvc5::theory::strings::StringEnumerator enumerator( - d_nodeManager->stringType()); + theory::strings::StringEnumerator enumerator(d_nodeManager->stringType()); for (size_t i = 0; i < n; i++) { @@ -654,4 +653,4 @@ TEST_F(TestTheoryWhiteBagsNormalForm, to_set) ASSERT_EQ(output3, BagsUtils::evaluate(input3)); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/theory/theory_bags_rewriter_white.cpp b/test/unit/theory/theory_bags_rewriter_white.cpp index 9f46a3f46..0ef2a564b 100644 --- a/test/unit/theory/theory_bags_rewriter_white.cpp +++ b/test/unit/theory/theory_bags_rewriter_white.cpp @@ -21,7 +21,7 @@ #include "util/rational.h" #include "util/string.h" -namespace cvc5 { +namespace cvc5::internal { using namespace theory; using namespace kind; @@ -849,4 +849,4 @@ TEST_F(TestTheoryWhiteBagsRewriter, fold) } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/theory/theory_bags_type_rules_white.cpp b/test/unit/theory/theory_bags_type_rules_white.cpp index 7b5b3be2c..815bcb67f 100644 --- a/test/unit/theory/theory_bags_type_rules_white.cpp +++ b/test/unit/theory/theory_bags_type_rules_white.cpp @@ -19,7 +19,7 @@ #include "theory/strings/type_enumerator.h" #include "util/rational.h" -namespace cvc5 { +namespace cvc5::internal { using namespace theory; using namespace kind; @@ -35,8 +35,7 @@ class TestTheoryWhiteBagsTypeRule : public TestSmt std::vector getNStrings(size_t n) { std::vector elements(n); - cvc5::theory::strings::StringEnumerator enumerator( - d_nodeManager->stringType()); + theory::strings::StringEnumerator enumerator(d_nodeManager->stringType()); for (size_t i = 0; i < n; i++) { @@ -154,4 +153,4 @@ TEST_F(TestTheoryWhiteBagsTypeRule, map_operator) } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/theory/theory_black.cpp b/test/unit/theory/theory_black.cpp index 1aea9e481..de936112e 100644 --- a/test/unit/theory/theory_black.cpp +++ b/test/unit/theory/theory_black.cpp @@ -25,7 +25,7 @@ #include "util/bitvector.h" #include "util/rational.h" -namespace cvc5 { +namespace cvc5::internal { using namespace kind; using namespace context; @@ -130,4 +130,4 @@ TEST_F(TestTheoryBlack, array_const) ASSERT_TRUE(arr2.isConst()); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/theory/theory_bv_int_blaster_white.cpp b/test/unit/theory/theory_bv_int_blaster_white.cpp index e8238ecbb..ae96889ef 100644 --- a/test/unit/theory/theory_bv_int_blaster_white.cpp +++ b/test/unit/theory/theory_bv_int_blaster_white.cpp @@ -24,7 +24,7 @@ #include "theory/bv/theory_bv_utils.h" #include "util/bitvector.h" #include "util/rational.h" -namespace cvc5 { +namespace cvc5::internal { using namespace kind; using namespace theory; @@ -321,4 +321,4 @@ TEST_F(TestTheoryWhiteBvIntblaster, intblaster_bitwise) } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/theory/theory_bv_opt_white.cpp b/test/unit/theory/theory_bv_opt_white.cpp index ae9880ad9..d4deaab2c 100644 --- a/test/unit/theory/theory_bv_opt_white.cpp +++ b/test/unit/theory/theory_bv_opt_white.cpp @@ -18,7 +18,7 @@ #include "test_smt.h" #include "util/bitvector.h" -namespace cvc5 { +namespace cvc5::internal { using namespace theory; using namespace smt; @@ -165,4 +165,4 @@ TEST_F(TestTheoryWhiteBVOpt, min_boundary) } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/theory/theory_bv_rewriter_white.cpp b/test/unit/theory/theory_bv_rewriter_white.cpp index 25c332236..c22bc3458 100644 --- a/test/unit/theory/theory_bv_rewriter_white.cpp +++ b/test/unit/theory/theory_bv_rewriter_white.cpp @@ -23,7 +23,7 @@ #include "theory/rewriter.h" #include "util/bitvector.h" -namespace cvc5 { +namespace cvc5::internal { using namespace kind; using namespace theory; @@ -113,4 +113,4 @@ TEST_F(TestTheoryWhiteBvRewriter, rewrite_bv_comp) } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/theory/theory_bv_white.cpp b/test/unit/theory/theory_bv_white.cpp index 5429dddc0..90ab3facd 100644 --- a/test/unit/theory/theory_bv_white.cpp +++ b/test/unit/theory/theory_bv_white.cpp @@ -25,7 +25,7 @@ #include "theory/theory.h" #include "theory/theory_engine.h" -namespace cvc5 { +namespace cvc5::internal { using namespace theory; using namespace theory::bv; @@ -62,4 +62,4 @@ TEST_F(TestTheoryWhiteBv, mkUmulo) } } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/theory/theory_engine_white.cpp b/test/unit/theory/theory_engine_white.cpp index 24bac4c20..fa0fbbd73 100644 --- a/test/unit/theory/theory_engine_white.cpp +++ b/test/unit/theory/theory_engine_white.cpp @@ -33,7 +33,7 @@ #include "util/integer.h" #include "util/rational.h" -namespace cvc5 { +namespace cvc5::internal { using namespace theory; using namespace expr; @@ -183,4 +183,4 @@ TEST_F(TestTheoryWhiteEngine, rewrite_rules) } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/theory/theory_int_opt_white.cpp b/test/unit/theory/theory_int_opt_white.cpp index 07b982b9a..40ecd376a 100644 --- a/test/unit/theory/theory_int_opt_white.cpp +++ b/test/unit/theory/theory_int_opt_white.cpp @@ -18,11 +18,11 @@ #include "test_smt.h" #include "util/rational.h" -using namespace cvc5::kind; -using namespace cvc5::theory; -using namespace cvc5::smt; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::theory; +using namespace cvc5::internal::smt; -namespace cvc5 { +namespace cvc5::internal { namespace test { class TestTheoryWhiteIntOpt : public TestSmtNoFinishInit @@ -168,4 +168,4 @@ TEST_F(TestTheoryWhiteIntOpt, open_interval) } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/theory/theory_opt_multigoal_white.cpp b/test/unit/theory/theory_opt_multigoal_white.cpp index 5d344620d..0f46f6a6e 100644 --- a/test/unit/theory/theory_opt_multigoal_white.cpp +++ b/test/unit/theory/theory_opt_multigoal_white.cpp @@ -18,7 +18,7 @@ #include "test_smt.h" #include "util/bitvector.h" -namespace cvc5 { +namespace cvc5::internal { using namespace theory; using namespace smt; @@ -298,4 +298,4 @@ TEST_F(TestTheoryWhiteOptMultigoal, pushpop) } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/theory/theory_quantifiers_bv_instantiator_white.cpp b/test/unit/theory/theory_quantifiers_bv_instantiator_white.cpp index 6c336afd4..249969b79 100644 --- a/test/unit/theory/theory_quantifiers_bv_instantiator_white.cpp +++ b/test/unit/theory/theory_quantifiers_bv_instantiator_white.cpp @@ -23,7 +23,7 @@ #include "theory/rewriter.h" #include "util/bitvector.h" -namespace cvc5 { +namespace cvc5::internal { using namespace theory; using namespace theory::bv; @@ -451,4 +451,4 @@ TEST_F(TestTheoryWhiteyQuantifiersBvInstantiator, normalizePvEqual) ASSERT_EQ(norm_axax[1], a); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/theory/theory_quantifiers_bv_inverter_white.cpp b/test/unit/theory/theory_quantifiers_bv_inverter_white.cpp index 9ee5a2644..528aadbc7 100644 --- a/test/unit/theory/theory_quantifiers_bv_inverter_white.cpp +++ b/test/unit/theory/theory_quantifiers_bv_inverter_white.cpp @@ -19,7 +19,7 @@ #include "theory/quantifiers/bv_inverter_utils.h" #include "util/result.h" -namespace cvc5 { +namespace cvc5::internal { using namespace kind; using namespace theory; @@ -1610,4 +1610,4 @@ TEST_F(TestTheoryWhiteQuantifiersBvInverter, getIC_bv_sext_sgt_false) runTestSext(false, BITVECTOR_SGT); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/theory/theory_sets_rewriter_white.cpp b/test/unit/theory/theory_sets_rewriter_white.cpp index 49dbe0c73..4d6fc035d 100644 --- a/test/unit/theory/theory_sets_rewriter_white.cpp +++ b/test/unit/theory/theory_sets_rewriter_white.cpp @@ -20,7 +20,7 @@ #include "util/rational.h" #include "util/string.h" -namespace cvc5 { +namespace cvc5::internal { using namespace theory; using namespace kind; @@ -90,4 +90,4 @@ TEST_F(TestTheoryWhiteSetsRewriter, map) } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/theory/theory_sets_type_enumerator_white.cpp b/test/unit/theory/theory_sets_type_enumerator_white.cpp index ecef0773b..2d8909e01 100644 --- a/test/unit/theory/theory_sets_type_enumerator_white.cpp +++ b/test/unit/theory/theory_sets_type_enumerator_white.cpp @@ -20,7 +20,7 @@ #include "test_smt.h" #include "theory/sets/theory_sets_type_enumerator.h" -namespace cvc5 { +namespace cvc5::internal { using namespace theory; using namespace kind; @@ -151,4 +151,4 @@ TEST_F(TestTheoryWhiteSetsTypeEnumerator, bv) ASSERT_TRUE(setEnumerator.isFinished()); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/theory/theory_sets_type_rules_white.cpp b/test/unit/theory/theory_sets_type_rules_white.cpp index de668b3a3..f73311e34 100644 --- a/test/unit/theory/theory_sets_type_rules_white.cpp +++ b/test/unit/theory/theory_sets_type_rules_white.cpp @@ -19,9 +19,9 @@ #include "theory/sets/singleton_op.h" #include "util/rational.h" -using namespace cvc5::api; +using namespace cvc5; -namespace cvc5 { +namespace cvc5::internal { namespace test { class TestTheoryWhiteSetsTypeRuleApi : public TestApi @@ -48,8 +48,8 @@ TEST_F(TestTheoryWhiteSetsTypeRuleApi, singleton_term) Term emptyReal = d_solver.mkEmptySet(d_solver.mkSetSort(realSort)); Term integerOne = d_solver.mkInteger(1); Term realOne = d_solver.mkReal(1); - Term singletonInt = d_solver.mkTerm(api::SET_SINGLETON, {integerOne}); - Term singletonReal = d_solver.mkTerm(api::SET_SINGLETON, {realOne}); + Term singletonInt = d_solver.mkTerm(cvc5::SET_SINGLETON, {integerOne}); + Term singletonReal = d_solver.mkTerm(cvc5::SET_SINGLETON, {realOne}); // (union // (singleton (singleton_op Int) 1) // (as emptyset (Set Real))) @@ -86,4 +86,4 @@ TEST_F(TestTheoryWhiteSetsTypeRuleInternal, singleton_node) ASSERT_TRUE(n.isConst()); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/theory/theory_strings_skolem_cache_black.cpp b/test/unit/theory/theory_strings_skolem_cache_black.cpp index bb4b8122b..e30912422 100644 --- a/test/unit/theory/theory_strings_skolem_cache_black.cpp +++ b/test/unit/theory/theory_strings_skolem_cache_black.cpp @@ -21,10 +21,10 @@ #include "util/rational.h" #include "util/string.h" -using namespace cvc5::kind; -using namespace cvc5::theory::strings; +using namespace cvc5::internal::kind; +using namespace cvc5::internal::theory::strings; -namespace cvc5 { +namespace cvc5::internal { namespace test { class TestTheoryBlackStringsSkolemCache : public TestSmt @@ -60,4 +60,4 @@ TEST_F(TestTheoryBlackStringsSkolemCache, mkSkolemCached) } } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/theory/theory_strings_utils_white.cpp b/test/unit/theory/theory_strings_utils_white.cpp index 4706be523..4fef34066 100644 --- a/test/unit/theory/theory_strings_utils_white.cpp +++ b/test/unit/theory/theory_strings_utils_white.cpp @@ -21,7 +21,7 @@ #include "theory/strings/theory_strings_utils.h" #include "util/string.h" -namespace cvc5 { +namespace cvc5::internal { using namespace kind; using namespace theory; @@ -38,7 +38,7 @@ TEST_F(TestTheoryWhiteStringsUtils, collect_empty_eqs) TypeNode strType = d_nodeManager->stringType(); Node empty = d_nodeManager->mkConst(String("")); - Node a = d_nodeManager->mkConst(::cvc5::String("A")); + Node a = d_nodeManager->mkConst(String("A")); Node x = d_nodeManager->mkVar("x", strType); Node emptyEqX = empty.eqNode(x); @@ -63,4 +63,4 @@ TEST_F(TestTheoryWhiteStringsUtils, collect_empty_eqs) } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/theory/theory_strings_word_white.cpp b/test/unit/theory/theory_strings_word_white.cpp index 941c422a1..6ee23cc56 100644 --- a/test/unit/theory/theory_strings_word_white.cpp +++ b/test/unit/theory/theory_strings_word_white.cpp @@ -22,7 +22,7 @@ #include "theory/strings/word.h" #include "util/string.h" -namespace cvc5 { +namespace cvc5::internal { using namespace theory; using namespace theory::strings; @@ -123,4 +123,4 @@ TEST_F(TestTheoryWhiteStringsWord, strings) ASSERT_TRUE(Word::roverlap(aaaaa, aa) == 2); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/theory/theory_white.cpp b/test/unit/theory/theory_white.cpp index e50670eb3..d9f22b11e 100644 --- a/test/unit/theory/theory_white.cpp +++ b/test/unit/theory/theory_white.cpp @@ -23,7 +23,7 @@ #include "theory/theory_engine.h" #include "util/resource_manager.h" -namespace cvc5 { +namespace cvc5::internal { using namespace theory; using namespace expr; @@ -91,4 +91,4 @@ TEST_F(TestTheoryWhite, outputChannel) d_outputChannel.d_callHistory.clear(); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/theory/type_enumerator_white.cpp b/test/unit/theory/type_enumerator_white.cpp index a84cad193..2fbd5bbd9 100644 --- a/test/unit/theory/type_enumerator_white.cpp +++ b/test/unit/theory/type_enumerator_white.cpp @@ -29,7 +29,7 @@ #include "util/rational.h" #include "util/uninterpreted_sort_value.h" -namespace cvc5 { +namespace cvc5::internal { using namespace theory; using namespace kind; @@ -336,4 +336,4 @@ TEST_F(TestTheoryWhiteTypeEnumerator, bv) ASSERT_THROW(*++te, NoMoreValuesException); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/util/array_store_all_white.cpp b/test/unit/util/array_store_all_white.cpp index e67954508..0ceb256be 100644 --- a/test/unit/util/array_store_all_white.cpp +++ b/test/unit/util/array_store_all_white.cpp @@ -18,9 +18,9 @@ #include "util/rational.h" #include "util/uninterpreted_sort_value.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace test { class TestUtilWhiteArrayStoreAll : public TestSmt @@ -80,4 +80,4 @@ TEST_F(TestUtilWhiteArrayStoreAll, const_error) IllegalArgumentException); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/util/assert_white.cpp b/test/unit/util/assert_white.cpp index e55c8e9ba..28fdbecb9 100644 --- a/test/unit/util/assert_white.cpp +++ b/test/unit/util/assert_white.cpp @@ -19,7 +19,7 @@ #include "base/check.h" #include "test.h" -namespace cvc5 { +namespace cvc5::internal { namespace test { class TestUtilWhite : public TestInternal @@ -85,4 +85,4 @@ TEST_F(TestUtilWhite, CheckArgument) ASSERT_THROW(CheckArgument(false, "x"), IllegalArgumentException); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/util/binary_heap_black.cpp b/test/unit/util/binary_heap_black.cpp index acbf0871b..3de0d2047 100644 --- a/test/unit/util/binary_heap_black.cpp +++ b/test/unit/util/binary_heap_black.cpp @@ -19,7 +19,7 @@ #include "test.h" #include "util/bin_heap.h" -namespace cvc5 { +namespace cvc5::internal { namespace test { class TestUtilBlackBinaryHeap : public TestInternal @@ -229,4 +229,4 @@ TEST_F(TestUtilBlackBinaryHeap, large_heap) ASSERT_TRUE(heap.empty()); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/util/bitvector_black.cpp b/test/unit/util/bitvector_black.cpp index 98331cc7f..967e8b347 100644 --- a/test/unit/util/bitvector_black.cpp +++ b/test/unit/util/bitvector_black.cpp @@ -18,7 +18,7 @@ #include "test.h" #include "util/bitvector.h" -namespace cvc5 { +namespace cvc5::internal { namespace test { class TestUtilBlackBitVector : public TestInternal @@ -207,4 +207,4 @@ TEST_F(TestUtilBlackBitVector, static_helpers) ASSERT_EQ(BitVector::mkMaxSigned(4).toSignedInteger(), Integer(7)); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/util/boolean_simplification_black.cpp b/test/unit/util/boolean_simplification_black.cpp index bbb4b5840..28fc06f7b 100644 --- a/test/unit/util/boolean_simplification_black.cpp +++ b/test/unit/util/boolean_simplification_black.cpp @@ -24,7 +24,7 @@ #include "smt_util/boolean_simplification.h" #include "test_node.h" -namespace cvc5 { +namespace cvc5::internal { namespace test { class TestUtilBlackBooleanSimplification : public TestNode @@ -240,4 +240,4 @@ TEST_F(TestUtilBlackBooleanSimplification, simplifyConflict) #endif } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/util/cardinality_black.cpp b/test/unit/util/cardinality_black.cpp index b19f88ae4..7f8f31c9c 100644 --- a/test/unit/util/cardinality_black.cpp +++ b/test/unit/util/cardinality_black.cpp @@ -21,7 +21,7 @@ #include "util/cardinality.h" #include "util/integer.h" -namespace cvc5 { +namespace cvc5::internal { namespace test { class TestUtilBlackCardinality : public TestInternal @@ -269,4 +269,4 @@ TEST_F(TestUtilBlackCardinality, cardinalities) ASSERT_EQ((z ^ z).getBethNumber(), 3); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/util/check_white.cpp b/test/unit/util/check_white.cpp index ff4712c63..15d2371fa 100644 --- a/test/unit/util/check_white.cpp +++ b/test/unit/util/check_white.cpp @@ -19,7 +19,7 @@ #include "base/check.h" #include "test.h" -namespace cvc5 { +namespace cvc5::internal { namespace test { class TestUtilWhiteCheck : public TestInternal @@ -62,4 +62,4 @@ TEST_F(TestUtilWhiteCheck, expect_abort) ASSERT_DEATH(AlwaysAssert(false), "false"); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/util/configuration_black.cpp b/test/unit/util/configuration_black.cpp index 5e659ed28..237aec700 100644 --- a/test/unit/util/configuration_black.cpp +++ b/test/unit/util/configuration_black.cpp @@ -16,7 +16,7 @@ #include "base/configuration.h" #include "test.h" -namespace cvc5 { +namespace cvc5::internal { namespace test { class TestUtilBlackConfiguration : public TestInternal @@ -92,4 +92,4 @@ TEST_F(TestUtilBlackConfiguration, about) Configuration::about(); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/util/datatype_black.cpp b/test/unit/util/datatype_black.cpp index 490def60e..1992c4154 100644 --- a/test/unit/util/datatype_black.cpp +++ b/test/unit/util/datatype_black.cpp @@ -21,9 +21,9 @@ #include "test_smt.h" #include "util/rational.h" -using namespace cvc5::kind; +using namespace cvc5::internal::kind; -namespace cvc5 { +namespace cvc5::internal { namespace test { class TestUtilBlackDatatype : public TestSmt @@ -536,4 +536,4 @@ TEST_F(TestUtilBlackDatatype, parametric_DType) ASSERT_EQ(TypeNode::leastCommonTypeNode(pairIntInt, pairIntInt), pairIntInt); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/util/didyoumean_black.cpp b/test/unit/util/didyoumean_black.cpp index cc2fdf878..d60fed62f 100644 --- a/test/unit/util/didyoumean_black.cpp +++ b/test/unit/util/didyoumean_black.cpp @@ -17,7 +17,7 @@ #include "util/didyoumean.h" -namespace cvc5::test { +namespace cvc5::internal::test { class TestUtilDidYouMean : public TestInternal { @@ -72,4 +72,4 @@ Did you mean any of these? } } -} // namespace cvc5::test +} // namespace cvc5::internal::test diff --git a/test/unit/util/exception_black.cpp b/test/unit/util/exception_black.cpp index 1ebc94b75..c8f0ab05f 100644 --- a/test/unit/util/exception_black.cpp +++ b/test/unit/util/exception_black.cpp @@ -19,7 +19,7 @@ #include "base/exception.h" #include "test.h" -namespace cvc5 { +namespace cvc5::internal { namespace test { class TestUtilBlackException : public TestInternal @@ -51,4 +51,4 @@ TEST_F(TestUtilBlackException, exceptions) ASSERT_EQ(s3.str(), std::string("three of 'em!")); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/util/floatingpoint_black.cpp b/test/unit/util/floatingpoint_black.cpp index 4bf01151a..09d934f63 100644 --- a/test/unit/util/floatingpoint_black.cpp +++ b/test/unit/util/floatingpoint_black.cpp @@ -16,7 +16,7 @@ #include "test.h" #include "util/floatingpoint.h" -namespace cvc5 { +namespace cvc5::internal { namespace test { class TestUtilBlackFloatingPoint : public TestInternal @@ -135,4 +135,4 @@ TEST_F(TestUtilBlackFloatingPoint, makeMaxNormal) ASSERT_TRUE(mfp128.isNormal()); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/util/integer_black.cpp b/test/unit/util/integer_black.cpp index 2be2515eb..4b11ad7f4 100644 --- a/test/unit/util/integer_black.cpp +++ b/test/unit/util/integer_black.cpp @@ -20,7 +20,7 @@ #include "test.h" #include "util/integer.h" -namespace cvc5 { +namespace cvc5::internal { namespace test { class TestUtilBlackInteger : public TestInternal @@ -614,4 +614,4 @@ TEST_F(TestUtilBlackInteger, modInverse) } } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/util/integer_white.cpp b/test/unit/util/integer_white.cpp index a7582ba17..92426d6cb 100644 --- a/test/unit/util/integer_white.cpp +++ b/test/unit/util/integer_white.cpp @@ -18,7 +18,7 @@ #include "test.h" #include "util/integer.h" -namespace cvc5 { +namespace cvc5::internal { namespace test { class TestUtilWhiteInteger : public TestInternal @@ -52,4 +52,4 @@ TEST_F(TestUtilWhiteInteger, construction) ASSERT_EQ(Integer(u), Integer(u)); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/util/output_black.cpp b/test/unit/util/output_black.cpp index 1182ae3ab..5b26a3624 100644 --- a/test/unit/util/output_black.cpp +++ b/test/unit/util/output_black.cpp @@ -19,7 +19,7 @@ #include "base/output.h" #include "test.h" -namespace cvc5 { +namespace cvc5::internal { namespace test { class TestUtilBlackOutput : public TestInternal @@ -143,4 +143,4 @@ TEST_F(TestUtilBlackOutput, simple_print) #endif /* CVC5_MUZZLE */ } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/util/rational_black.cpp b/test/unit/util/rational_black.cpp index d117025a5..442c89a9b 100644 --- a/test/unit/util/rational_black.cpp +++ b/test/unit/util/rational_black.cpp @@ -18,7 +18,7 @@ #include "test.h" #include "util/rational.h" -namespace cvc5 { +namespace cvc5::internal { namespace test { class TestUtilBlackRational : public TestInternal @@ -43,4 +43,4 @@ TEST_F(TestUtilBlackRational, fromDecimal) ASSERT_THROW(Rational::fromDecimal("Hello, world!");, std::invalid_argument); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/util/rational_white.cpp b/test/unit/util/rational_white.cpp index 20740652e..2b05cf5c4 100644 --- a/test/unit/util/rational_white.cpp +++ b/test/unit/util/rational_white.cpp @@ -18,7 +18,7 @@ #include "test.h" #include "util/rational.h" -namespace cvc5 { +namespace cvc5::internal { namespace test { class TestUtilWhiteRational : public TestInternal @@ -415,4 +415,4 @@ TEST_F(TestUtilWhiteRational, constructrion) ASSERT_EQ(Rational(u), Rational(u)); } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/util/real_algebraic_number_black.cpp b/test/unit/util/real_algebraic_number_black.cpp index 3744f8346..b90e8d364 100644 --- a/test/unit/util/real_algebraic_number_black.cpp +++ b/test/unit/util/real_algebraic_number_black.cpp @@ -16,7 +16,7 @@ #include "test.h" #include "util/real_algebraic_number.h" -namespace cvc5 { +namespace cvc5::internal { namespace test { #ifndef CVC5_POLY_IMP @@ -91,4 +91,4 @@ TEST_F(TestUtilBlackRealAlgebraicNumber, division) } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal diff --git a/test/unit/util/stats_black.cpp b/test/unit/util/stats_black.cpp index 03610d9ce..cf01d39d6 100644 --- a/test/unit/util/stats_black.cpp +++ b/test/unit/util/stats_black.cpp @@ -26,7 +26,7 @@ #include "util/statistics_registry.h" #include "util/statistics_stats.h" -namespace cvc5 { +namespace cvc5::internal { std::ostream& operator<<(std::ostream& os, const StatisticBaseValue* sbv) { @@ -98,4 +98,4 @@ TEST_F(TestUtilBlackStats, stats) #endif } } // namespace test -} // namespace cvc5 +} // namespace cvc5::internal