Transfer ownership of internal Options from NodeManager to SmtEngine (#4682)
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>
Tue, 7 Jul 2020 23:18:54 +0000 (18:18 -0500)
committerGitHub <noreply@github.com>
Tue, 7 Jul 2020 23:18:54 +0000 (18:18 -0500)
commit6b673474218c300576cae43388b513c7fc8448f8
tree693a7b7ccbcb7a5a20b45df4c3564cf93dc0f2d3
parent55767b9620f18763b7b56ecefa954202d35fe2d3
Transfer ownership of internal Options from NodeManager to SmtEngine (#4682)

This PR decouples Options from NodeManager. Instead, options now live in SmtEngine.

The changes that were required for this PR include:

The main internal options object is now owned by SmtEngine instead of ExprManager.
The ownership resource manager is moved from NodeManager to SmtEngine.
Node manager listeners are deleted, timeouts and resource limits are set during SmtEngine::finishInit.
A temporary hack was added to make the last constructed SmtEngine to be the one in scope. This ensures that options are in scope whenever an SmtEngine is created.
The methods for invoking "subsolvers" (theory/smt_engine_subsolver.h,cpp) was simplified, as versions of these calls that change options do not have to clone a new copy of the ExprManager anymore.
Resource manager was removed from the smt2 parser.
Minor refactoring was done in SmtEngine to copy "original options" so that options are restored to their state after parsing command line options on reset.
Updates to unit tests to ensure conformance to new options scoping.
61 files changed:
src/api/cvc4cpp.cpp
src/api/cvc4cpp.h
src/expr/CMakeLists.txt
src/expr/expr_manager_template.cpp
src/expr/expr_manager_template.h
src/expr/node_manager.cpp
src/expr/node_manager.h
src/expr/node_manager_listeners.cpp [deleted file]
src/expr/node_manager_listeners.h [deleted file]
src/main/driver_unified.cpp
src/main/interactive_shell.cpp
src/options/options.h
src/options/options_handler.cpp
src/options/options_handler.h
src/options/options_template.cpp
src/options/quantifiers_options.toml
src/options/smt_options.toml
src/parser/parser.cpp
src/parser/parser.h
src/parser/smt2/smt2.cpp
src/parser/tptp/tptp.cpp
src/preprocessing/passes/static_learning.cpp
src/preprocessing/passes/sygus_inference.cpp
src/preprocessing/preprocessing_pass_context.cpp
src/preprocessing/preprocessing_pass_context.h
src/smt/set_defaults.cpp
src/smt/smt_engine.cpp
src/smt/smt_engine.h
src/smt/smt_engine_scope.cpp
src/smt/smt_engine_scope.h
src/theory/bv/bitblast/bitblaster.h
src/theory/bv/bitblast/eager_bitblaster.cpp
src/theory/bv/bitblast/lazy_bitblaster.cpp
src/theory/quantifiers/candidate_rewrite_database.cpp
src/theory/quantifiers/expr_miner.cpp
src/theory/quantifiers/expr_miner.h
src/theory/quantifiers/query_generator.cpp
src/theory/quantifiers/solution_filter.cpp
src/theory/quantifiers/sygus/ce_guided_single_inv.cpp
src/theory/quantifiers/sygus/cegis_core_connective.cpp
src/theory/quantifiers/sygus/sygus_repair_const.cpp
src/theory/quantifiers/sygus/synth_conjecture.cpp
src/theory/quantifiers/sygus/synth_engine.cpp
src/theory/quantifiers/sygus_sampler.cpp
src/theory/rewriter.cpp
src/theory/smt_engine_subsolver.cpp
src/theory/smt_engine_subsolver.h
src/theory/theory_engine.cpp
src/theory/theory_engine.h
test/regress/regress1/sygus/issue4009-qep.smt2
test/system/smt2_compliance.cpp
test/unit/api/grammar_black.h
test/unit/api/result_black.h
test/unit/api/solver_black.h
test/unit/expr/node_black.h
test/unit/parser/parser_black.h
test/unit/prop/cnf_stream_white.h
test/unit/theory/evaluator_white.h
test/unit/theory/sequences_rewriter_white.h
test/unit/theory/theory_bv_rewriter_white.h
test/unit/theory/theory_strings_word_white.h