General subscriber infrastructure for NodeManager, as discussed in the
authorMorgan Deters <mdeters@gmail.com>
Wed, 19 Sep 2012 21:21:00 +0000 (21:21 +0000)
committerMorgan Deters <mdeters@gmail.com>
Wed, 19 Sep 2012 21:21:00 +0000 (21:21 +0000)
commit46c12d84290f3ed23bd0b435c6e8e5852ab1af39
tree64c2d2175eb814b9187d8cc6ccecbddf90151b2a
parent7a15b2c1fb45f0cc7480466473f344f8b1f5ed94
General subscriber infrastructure for NodeManager, as discussed in the
meeting last week.  The SmtEngine now subscribes to NodeManager events,
does appropriate dumping of variable declarations, and notifies the Model
class.

The way to create a skolem is now:

  nodeManager->mkSkolem("myvar_$$", TypeNode, "is a variable created by the theory of Foo")

The first argument is the name of the skolem, and the (optional) "$$" is a
placeholder for the node id (to get a unique name).  Without a "$$", a "_$$"
is automatically appended to the given name.

The second argument is the type.

The (optional, but recommended) third argument is a comment, used by the
dump infrastructure to indicate what the variable is for / who owns it.

An optional fourth argument (not shown) allows you to specify flags that
control the behavior (e.g., don't do notification, and/or don't make a
unique name).  Look at the documentation for details on these.

In particular, the above means you can't just do a mkSkolem(boolType) for
example---you have to specify a name and (hopefully also,
but it's optional) a comment.  This leads to easier debugging than the
anonymous skolems before, since we'll be able to track where the skolems
came from.

Much of the Model and Dump stuff, as well as some Command stuff, is cleaned up
by this commit.  Some remains to be cleaned up.

(this commit was certified error- and warning-free by the test-and-commit script.)
49 files changed:
AUTHORS
src/context/cdlist.h
src/expr/command.cpp
src/expr/expr_manager_template.cpp
src/expr/expr_template.cpp
src/expr/node_manager.cpp
src/expr/node_manager.h
src/expr/symbol_table.cpp
src/parser/smt2/smt2.cpp
src/printer/ast/ast_printer.cpp
src/printer/ast/ast_printer.h
src/printer/cvc/cvc_printer.cpp
src/printer/cvc/cvc_printer.h
src/printer/dagification_visitor.cpp
src/printer/printer.cpp
src/printer/printer.h
src/printer/smt/smt_printer.cpp
src/printer/smt/smt_printer.h
src/printer/smt2/smt2_printer.cpp
src/printer/smt2/smt2_printer.h
src/smt/Makefile.am
src/smt/command_list.cpp [new file with mode: 0644]
src/smt/command_list.h [new file with mode: 0644]
src/smt/options_handlers.h
src/smt/smt_engine.cpp
src/smt/smt_engine.h
src/theory/arith/dio_solver.cpp
src/theory/arrays/theory_arrays.cpp
src/theory/builtin/theory_builtin_type_rules.h
src/theory/bv/theory_bv_utils.h
src/theory/ite_simplifier.cpp
src/theory/model.cpp
src/theory/model.h
src/theory/quantifiers/quantifiers_rewriter.cpp
src/theory/quantifiers/term_database.cpp
src/theory/rep_set.cpp
src/theory/rewriterules/theory_rewriterules.cpp
src/theory/theory_engine.cpp
src/theory/uf/theory_uf_strong_solver.cpp
src/theory/unconstrained_simplifier.cpp
src/util/datatype.cpp
src/util/dump.h
src/util/ite_removal.cpp
src/util/model.cpp
src/util/model.h
test/unit/expr/attribute_black.h
test/unit/expr/node_black.h
test/unit/expr/node_builder_black.h
test/unit/expr/node_manager_black.h