diff options
author | Tim King <taking@google.com> | 2016-01-28 12:35:45 -0800 |
---|---|---|
committer | Tim King <taking@google.com> | 2016-01-28 12:35:45 -0800 |
commit | 2ba8bb701ce289ba60afec01b653b0930cc59298 (patch) | |
tree | 46df365b7b41ce662a0f94de5b11c3ed20829851 /src/parser/antlr_undefines.h | |
parent | 42b665f2a00643c81b42932fab1441987628c5a5 (diff) |
Adding listeners to Options.
- Options
-- Added the new option attribute :notify. One can get a notify() call on the Listener after a the option's value is updated. This is the new preferred way to achieve dynamic dispatch for options.
-- Removed SmtOptionsHandler and pushed its functionality into OptionsHandler and Listeners.
-- Added functions to Options for registering listeners of the notify calls.
-- Changed a number of options to use the new listener infrastructure.
-- Fixed a number of warnings in options.
-- Added the ArgumentExtender class to better capture how arguments are inserted while parsing options and ease memory management. Previously this was the "preemptGetopt" procedure.
-- Moved options/options_handler_interface.{cpp,h} to options/options_handler.{cpp,h}.
- Theories
-- Reimplemented alternative theories to use a datastructure stored on TheoryEngine instead of on Options.
- Ostream Handling:
-- Added new functionality that generalized how ostreams are opened, options/open_stream.h.
-- Simplified the memory management for different ostreams, smt/managed_ostreams.h.
-- Had the SmtEnginePrivate manage the memory for the ostreams set by options.
-- Simplified how the setting of ostreams are updated, smt/update_ostream.h.
- Configuration and Tags:
-- Configuration can now be used during predicates and handlers for options.
-- Moved configuration.{cpp,h,i} and configuration_private.h from util/ into base/.
-- Moved {Debug,Trace}_tags.* from being generated in options/ into base/.
- cvc4_private.h
-- Upgraded #warning's in cvc4_private.h and cvc4_private_library.h to #error's.
-- Added public first-order (non-templatized) member functions for options get and set the value of options outside of libcvc4. Fixed all of the use locations.
-- Made lib/lib/clock_gettime.h a cvc4_private_library.h header.
- Antlr
-- Fixed antlr and cvc4 macro definition conflicts that caused warnings.
- SmtGlobals
-- Refactored replayStream and replayLog out of SmtGlobals.
-- Renamed SmtGlobals to LemmaChannels and moved the implementation into smt_util/lemma_channels.{h,cpp}.
Diffstat (limited to 'src/parser/antlr_undefines.h')
-rw-r--r-- | src/parser/antlr_undefines.h | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/src/parser/antlr_undefines.h b/src/parser/antlr_undefines.h new file mode 100644 index 000000000..35a6c7e12 --- /dev/null +++ b/src/parser/antlr_undefines.h @@ -0,0 +1,69 @@ +/********************* */ +/*! \file antlr_undefines.h + ** \verbatim + ** Original author: Tim King + ** Major contributors: none + ** Minor contributors (to current version): none + ** This file is part of the CVC4 project. + ** Copyright (c) 2009-2016 New York University and The University of Iowa + ** See the file COPYING in the top-level source directory for licensing + ** information.\endverbatim + ** + ** \brief Every usage undefines standard autotools macro names. + ** + ** This header is very sensitive and it should be understood *in full* before + ** it is used or *moved* in position relative to other headers. + ** + ** Including this header runs #undef on the following identifiers: + ** - PACKAGE_BUGREPORT, + ** - PACKAGE_NAME + ** - PACKAGE_STRING + ** - PACKAGE_TARNAME + ** - PACKAGE_VERSION + ** + ** This is to solves a problem caused by antlr and cvc4 both defining these + ** symbols. This has to do with both packages using autotools in a slightly + ** dicey way. This was reported by us a long time ago, but most versions + ** of libantlr are quite old (3.2). + ** http://www.antlr3.org/pipermail/antlr-interest/2010-March/037859.html + ** + ** The source of both of these two definitions are given below. + ** + ** From antlr, the autogenerated antlr lexers and parsers include antlr3.h. + ** The chain of inclusions is: + ** Lang{Lexer,Parser}.h -> <antlr3.h> -> <antlr3config.h> -> <antlr3defs.h> + ** + ** where Lang is in {Smt1,Smt2,Tptp,Cvc}. + ** + ** From CVC4, the parsers use Debug("...") and other features from + ** "base/output.h". This is a cvc4_private_library.h header file. This means + ** the files is usable while building the driver and parsers, but is otherwise + ** conceptually the same as a cvc4_private.h header. (If that sounds sketchy, + ** it is sure is! [See src/DESIGN.txt for more details].) + ** The include chain is then + ** "base/output.h" -> "cvc4_private_library.h" -> "cvc4_private.h" -> + ** "cvc4autoconfig.h". + ** The file cvc4autoconfig.h is autogenerated by autotools and can be found in + ** builds/<arch>/<target>/cvc4autoconfig.h + ** + ** Thus a working solution is to include this header immediately after all + ** locations of #include <antlr3.h>. This includes all autogenerated files. + ** This potentially has to be repeated so this header should not be guarded. + ** + ** To ensure that we do not remove cvc4's versions and use antlr's by mistake + ** #include <antlr3.h> needs to proceed any other includes like + ** #include "cvc4parser_private.h". + ** + ** It is worth noting that future version of antlr can both not define these + ** macros and may generate different code. This is at best a stop gap + ** solution. + ** + ** Every location this header is included needs to be documented. + ** When in doubt do not move this header! + **/ + +#undef PACKAGE_BUGREPORT +#undef PACKAGE_NAME +#undef PACKAGE_STRING +#undef PACKAGE_TARNAME +#undef PACKAGE_VERSION |