summaryrefslogtreecommitdiff
path: root/src/expr
AgeCommit message (Collapse)Author
2010-07-03With this commit come a number of changes to build system to supportMorgan Deters
building with CLN or with GMP, the contrib/switch-config script (enabling "fast switching" of different configurations in the same builds/ directory), and also some minor changes. ./configure --with-gmp (or --without-cln) forces building with GMP and doesn't even look for CLN. Configure fails if GMP isn't installed. ./configure --with-cln (or --without-gmp) forces building with CLN and doesn't even look for GMP. Configure fails if CLN isn't installed. ./configure [no arguments] will detect what's installed. CLN is default, if it isn't installed, or is too old, GMP is looked for (and configure fails if neither is available). It is an error to specify --with-gmp --with-cln (or --without-* for both) at the same time. Building with CLN (whether forced or detected) adds a note to the configure output mentioning the fact that the build of CVC4 will be linked against a GPLed library and notifying the user of the --without-cln option. Building with GMP (whether forced or detected) affects the build directory, so CLN and GMP builds are kept separate. ./configure --with-cln debug builds in builds/$arch/debug ./configure --with-gmp debug builds in builds/$arch/debug-gmp The final binaries are linked explicitly against either gmp or cln, but not both. If linked against cln, cln pulls in gmp as a dependency, so the result will be linked against both. === Details that you probably don't care about === The headers src/util/{integer,rational}.h are generated from the corresponding .in versions. A user installing a CVC4-devel package will get the headers for rational and integer that match the library that s/he installs. The preprocessor #defines CVC4_GMP_IMP and CVC4_CLN_IMP are added to cvc4autoconfig.h. Only one is ever #defined. cvc4autoconfig.h doesn't need to be #included directly; you get it through #including cvc4_private.h (or the parser version). AM_CONDITIONALs are also defined so that Makefiles get the cln/gmp configuration. AC_SUBSTs are defined so that public headers (see src/util/{integer,rational}.h.in) can use the setting. *Public* headers that need to depend on the cln/gmp configuration can't use cvc4autoconfig.h, because we're keeping that in the private, internal-only space, never to be installed on users' machines. Here, something special is required, like the configure-level generation of headers that I used for src/util/{integer,rational}.h.in. Tim's Integer and Rational wrappers are the only bits of code that should care which library is used (and also src/util/configuration.h, which gives the user of the library information about how CVC4 is built), and possibly some unit tests (?).
2010-07-02re-generated comment headers of source filesMorgan Deters
2010-07-02* Added white-box TheoryEngine test that tests the rewriterMorgan Deters
* Added regression documentation to test/regress/README * Added ability to print types of vars in expr printouts with iomanipulator Node::printtypes(true)... for example, Warning() << Node::printtypes(true) << n << std::endl; * Types-printing can be specified on the command line with --print-expr-types * Improved type handling facilities and theoryOf(). For now, SORT_TYPE moved from builtin theory to UF theory to match old behavior. * Additional gdb debug functionality. Now we have: debugPrintNode(Node) debugPrintRawNode(Node) debugPrintTNode(TNode) debugPrintRawTNode(TNode) debugPrintTypeNode(TypeNode) debugPrintRawTypeNode(TypeNode) debugPrintNodeValue(NodeValue*) debugPrintRawNodeValue(NodeValue*) they all print a {Node,TNode,NodeValue*} from the debugger. The "Raw" versions print a very low-level AST-like form. The regular versions do the same as operator<<, but force full printing on (no depth-limiting). * Other trivial fixes
2010-06-30* theory "tree" rewriting implemented and worksMorgan Deters
* added TheoryArith::preRewrite() to test and demonstrate the use of pre-rewriting. * array types and type checking now supported * array type checking now supported * theoryOf() dispatching properly to arrays now * theories now required to implement a (simple) identify() function that returns a string identifying them for debugging/user output purposes * added "builtin" theory to hold all built-in kinds and their type rules and rewriting (currently only exploding distinct) * fixed production build failure (regarding NodeSetDepth) * removed an errant "using namespace std" in util/bitvector.h (and made associated trivial fixes elsewhere) * fixes to make unexpected exceptions more verbose in debug builds * fixes to make multiple, cascading assertion fails simpler * minor other fixes to comments etc.
2010-06-29add --default-expr-depth=N command line parameter, expose setdepth() to ↵Morgan Deters
public interface
2010-06-29* Add CDMap<>::insertAtContextLevelZero(k, d) for inserting "initializing"Morgan Deters
data into a CDMap. Such a key doesn't disappear from the map on pop, but rather returns to its "initializing" state, set by insertAtContextLevelZero(). This can be used for lazy assignment, among other things, and has been added to support some exploratory coding by Tim in arithmetic. * Made internal CDOmap<> copy constructor private (it should always have been). This is necessary to avoid CxxTest (or others) doing nasty generic programming things that cause context invariants to be broken. * Added unit testing for this feature, and in general beef up the unit testing for CDMap<>. * src/expr/node_manager.cpp: Better output for unhandled cases in getType().
2010-06-18bug fix (unreported on bugzilla): skolem variables failing removal from poolMorgan Deters
2010-06-16This commit just contains miscellaneous arithmetic cleanup.Tim King
2010-06-15fix last commit gcc options (-wunknown-pragmas ==> -Wno-unknown-pragmas)Morgan Deters
2010-06-15remove warnings about unknown #pragma GCC diagnostic on older compilersMorgan Deters
2010-06-04** Don't fear the files-changed list, almost all changes are in the **Morgan Deters
** file-level documentation at the top of the sources. ** This is the "make bugzilla stop bugging me" bugfix commit. * Remove BackedNodeBuilder<> and collapse NodeBuilder<> hierarchy. Updated documentation in the file. Resolves bug #99. * Convenience NodeBuilders (PlusNodeBuilder, OrNodeBuilder, etc.) moved into a separate file. Partially resolves bug #100. * Moved isAssociative(Kind) into kind.h (and into the CVC4::kind namespace) instead of metakind.h (where it was in CVC4::metakind). This clears up a warning (private #inclusion) from the SMT and SMT2 parsers, and maybe makes more sense anyways, since this is based on the kind (and not the metakind) of an operator. * Documentation improvement; doxygen top-level \file gestures, \brief gestures for files, etc. Changed contrib/update-copyright.pl for this change, and post-processed to add \brief. Resolves bug #98. * Removed ExprManager::mkExpr(Kind) and NodeManager::mkNode(Kind). They no longer made sense. Resolves bug #91.
2010-06-03* Added NodeBuilder<>::getChild() to make interface more consistentMorgan Deters
with that of Node. * If NodeBuilder<> hasn't yet been assigned a Kind, several member functions related to children now throw an IllegalArgumentException: * getNumChildren() * begin() * end() * operator[] * getChild() This is because if you later assign the NodeBuilder<> a PARAMETERIZED kind, the children are "reinterpreted" -- the first being an operator. Interface-wise, it doesn't make sense to return one thing for nb[0], then later, after setting the kind, to return another thing for nb[0]. * Fixed unit tests depending on this behavior. * Added a warning to the testing summary if unit tests didn't run (because this is likely due to compilation problems, and without a warning it looks kind of like a test success) * VERBOSE wasn't exported to the environment for unit test "make check." Fixed.
2010-06-03resolving bug 139: metaKindOf() warnings still exist, but it's probably a ↵Morgan Deters
g++ 4.3 and 4.4 issue
2010-06-01Fixing test failures in production buildChristopher L. Conway
2010-06-01Fixed a bug in partial_model.cpp where the data was immediately deallocated ↵Tim King
before being used. Fixed a bug in node_builder.h's crop where a pointer is dereferenced after a realloc call.
2010-06-01Fixing failing test in r521Christopher L. Conway
Adding general support for associative operators in SMT v1 and v2
2010-05-31First draft implementation of mkAssociativeChristopher L. Conway
2010-05-28Moving the ITE removal from CnfStream to TheoryEngine, which is a bit closer ↵Tim King
to its final destination. Added a basic rewriter to TheoryUF. (x=x rewrites to true.) Added DIVISION to src/expr/node_manager.cpp's getType. Fixed the theory returned for variables in theoryOf() for bool and arith. Fixed TheoryEngine rewrite children to properly handle APPLY_UFs. Removed the special case for equality in TheoryEngine rewrite. A few tests are currently broken due to deallocation errors. Morgan and I will try to commit a fix to this in a little bit.
2010-05-27fix bug #134: infinite deallocation loopMorgan Deters
2010-05-27Remove isAtomic() as per 4/27/2010 meeting. Add comments about its ↵Morgan Deters
potential design for later. Resolves bug 113, invalidates bugs 93 and 94.
2010-05-27Adding debug assertions on most TNode operationsChristopher L. Conway
2010-05-27Adding NodeManager::prepareToBeDestroyed() (Fixes: #128)Christopher L. Conway
2010-05-21Small fixes to TheoryArith. Added a hack to make Integers a subtype of ↵Tim King
Real. See Bug 127 for a discussion of the hack. I am also adding a regression test that does not work (bug 128). It is not enabled so make check should still be fine.
2010-05-19Significant revision to theory/arith. The new draft has a lot of small bug ↵Tim King
fixes and organizational changes. The theory is now enabled to perform checking in the TheoryEngine. This draft can now solve 2 new regression tests test/regress/regress0/ineq_slack.smt and test/regress/regress0/ineq_basic.smt. There is also a small bug fix inside src/expr/attribute.h.
2010-05-13Minor refactorings and corrections to commentsChristopher L. Conway
2010-05-12Adding class Smt2 to handle declaration of logic and theory symbolsChristopher L. Conway
2010-05-06fixing the nightly failure. TypeCheckingException is now marked with CVC4_PUBLICDejan Jovanović
2010-05-05bug fixes for types, old unit tests for types work nowDejan Jovanović
2010-05-04Adding general support for SMT2 set-info commandChristopher L. Conway
2010-05-04Type-checking classes and hooks (not tested yet).Dejan Jovanović
2010-05-03theory detection fixes; fixes build breakage when you delete build directoriesMorgan Deters
2010-05-02smt parser for bit-vectorsDejan Jovanović
2010-05-01Fix for the last night's build errors (type that broke proper expression ↵Dejan Jovanović
generation).
2010-04-30Fix for bug 115, mapping was going in the wrong direction.Dejan Jovanović
2010-04-29Added the capability to construct expressions by passing the operator ↵Dejan Jovanović
instead of the kind, i.e. Expr op = ..."f"... em.mkExpr(op, children); Operator kinds are automatically associated with the enclosing expression kind in the DSL and generated.
2010-04-29First draft implementation of SMT v2 parserChristopher L. Conway
2010-04-28adding integer and real types to the public interfaceDejan Jovanović
2010-04-26Some cleanup. Also added the integer and real types.Dejan Jovanović
2010-04-26Adding the intermediary TypeNode to represent (and separate) the Types at ↵Dejan Jovanović
the Node level.
2010-04-15Implementing missing NodeBuilder::constructNodeChristopher L. Conway
2010-04-15Enhancements to NodeManager tests, taking advantage of new Type implementationChristopher L. Conway
2010-04-14Marging from types 404:415, changes: MassiveDejan Jovanović
* Types are now represented as nodes in the attribute table and are managed, i.e. you can say Type booleanType = d_nodeManager->booleanType(); Type t = d_nodeManager->mkFunctionType(booleanType, booleanType); FunctionType ft = (FunctionType)t; Assert(ft.getArgTypes()[0], booleanType); * The attributes now have a table for Nodes and a table for TNodes (both should be used with caution) * Changes the way nodes are extracted from NodeBuilder, added several methods to extract a Node, NodeValue, or Node*, with corresponding methods for extraction * Used the above in the construction of Expr and Type objects * The NodeManager now destroys the attributes in the destructor by pausing the garbage collection * To achive destruction a flag d_inDesctruction has been added to loosen the assertion in NodeValue::dec() (there might be -refcount TNodes leftover) * Beginnings of the Bitvector constants using GMP Not yet in tiptop phase, needs more documentation, and Types should be pulled out to TypeNodes eventually. Also, the types are currently defined in the builting_kinds, and I need to add these to the theory specific definitions with special 'type' constructs. I hate branching and merging.
2010-04-14* Better dependency tracking for unit test building and linking, andMorgan Deters
auto-generated headers (metakind.h etc.), so they don't have to be recompiled every time. This drastically improves build time when only small updates are made. * Added "memory.h" unit test header for checking out-of-memory conditions. cdlist_black uses it. * Added helpful output when you "make lcov" in a non-coverage-enabled build. * Removed strict aliasing warning when compiling metakind.h header with optimization on. * Removed const version of NodeBuilder::operator Node()---it was poorly performing, better to not permit it---and fixed the convenience builders to use the non-const version (re: code review #63) * Color-coded test output on capable terminals. * Fixed some warnings in unit tests.
2010-04-13Merging from branches/decl-scopes (r401:411)Christopher L. Conway
2010-04-13Doxygen fixesChristopher L. Conway
2010-04-09added experimental "make lcov" target (it runs only unit tests); better ↵Morgan Deters
coverage for util and context classes; implemented some output functionality that was missing; reclassified some tests white -> black or black -> public; other minor fixes
2010-04-06* Add some protected ContextObj accessors for ContextObj-derived classes:Morgan Deters
+ Context* getContext() -- gets the context + ContextMemoryManager* getCMM() -- gets the CMM + int getLevel() -- the scope level of the ContextObj's most recent update + bool isCurrent() -- true iff the most recent update is the current top level In particular, the ContextObj::getCMM() call cleans up by TheoryUF's ECData::addPredecessor() function substantially (re: code review bug #64). * Fix serious bugs in context operations that corrupted the ContextObj linked lists. Closes bug #85. * Identified a bug in the way objects of the "Link" class are allocated; see bug #96. * Re-enable context white-box tests that ensure proper links in linked lists. Closes bug #86. * Re-enable CDMap<>::emptyTrash(). Closes bug #87. * Add a tracing option (-t foo or --trace foo) to the driver to enable Trace("foo") output stream. -d foo implies -t foo. * Minor clean-up of some TheoryUF code; addition of some documentation (re: code review bug #64). * Address some things that caused Doxygen discomfort. * Address an issue raised in NodeManager's code review (bug #65). * Remove an inaccurate comment in Attribute code (re: code review bug #61).
2010-04-05Adding black-box tests for NodeManager (Closes bug #65)Christopher L. Conway
2010-04-05Minor refactorings, in response to code review (Bug #73)Christopher L. Conway
2010-04-05Typos and renames for code reviewChristopher L. Conway
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback