New LogicInfo functionality.
authorMorgan Deters <mdeters@gmail.com>
Sat, 28 Apr 2012 01:12:21 +0000 (01:12 +0000)
committerMorgan Deters <mdeters@gmail.com>
Sat, 28 Apr 2012 01:12:21 +0000 (01:12 +0000)
commit9ac1cb18f03a5edf4b50532d29e195f74d6a83c2
tree1a0a5d07391b8d22d546c64bd050b9ec4396352b
parentbee9dd1d28afec632381083bdfb7e3ed119dd35a
New LogicInfo functionality.

src/theory/logic_info.{h,cpp} contains the CVC4::LogicInfo class, which keeps
track of which theories are active (which should remain constant throughout
the life of an SmtEngine) and other details (like integers, reals,
linear/nonlinear, etc.).

This class has a default constructor which is the most all-inclusive logic.
Alternatively, this class can be constructed from an SMT-LIB logic string
(the empty string gives the same as "QF_SAT").  Once constructed, theories
can be enabled or disabled, quantifiers flipped on and off, integers flipped
on and off, etc.  At any point an SMT-LIB-like logic string can be extracted.

The SmtEngine keeps a LogicInfo for itself and shares with the TheoryEngine
(and, in turn, the theories) only a const reference to it.  This ensures that
the logic info doesn't mutate over the course of the run.

As part of this commit, the TheoryEngine's old notion of "active theories"
has been completely removed.  As a result, SMT benchmarks that are incorrectly
tagged with a logic will assert-fail or worse.  (We should probably fail
more gracefully in this case.)  One such example was bug303.smt2,
which used UF reasoning but was tagged QF_LIA.  This has been fixed.
15 files changed:
src/expr/kind_template.h
src/smt/smt_engine.cpp
src/smt/smt_engine.h
src/theory/Makefile.am
src/theory/logic_info.cpp [new file with mode: 0644]
src/theory/logic_info.h [new file with mode: 0644]
src/theory/term_registration_visitor.cpp
src/theory/theory.h
src/theory/theory_engine.cpp
src/theory/theory_engine.h
test/regress/regress0/bug303.smt2
test/unit/Makefile.am
test/unit/prop/cnf_stream_black.h
test/unit/theory/logic_info_white.h [new file with mode: 0644]
test/unit/theory/theory_engine_white.h