summaryrefslogtreecommitdiff
path: root/src/bindings
AgeCommit message (Collapse)Author
2017-10-27Modify LDFLAGS to support shared libraries for Win (#1280)Andres Noetzli
* Use uintptr_t for pointer casts in Swig files CVC4's Swig interface files were casting pointers to longs in multiple instances. The problem with that is that on certain platforms *cough* Windows/MinGW *cough* long is only 32-bit even when compiling a 64-bit executable (they use the LLP64 data model). This made the compilation of language bindings fail with MinGW. This commit changes the types to uintptr_t defined in Swig's stdint.i. * Modify LDFLAGS to support shared libraries for Win This commit adds "-no-undefined" to the LDFLAGS of CVC4's library, which is required for building DLLs (shared libraries on Windows). It also adds "--export-all-symbols" to the linker flags of the parser to ensure that there are no unresolved symbols when linking against it (see comment in the Makefile.am for details). * Fix for non-Windows builds * add no-undefined to libcvc4compatjni
2017-09-19Fixing a null pointer dereference in the cvc3 compatibility layer. (#1089)Tim King
2017-09-13Remove unused RecordSelect and TupleSelect (#1087)Andres Noetzli
Commit 62b673a6b8444c14c169a984dd6e3fc8f685851e remove most of the record/tuple infrastructure but did not remove the classes RecordSelect and TupleSelect which lead to issues with Java bindings (the references to the corresponding mkConst implementations could not be resolved). This commit removes the remaining traces of those classes.
2017-08-30Use thread_local instead of compiler extensions (#210)Andres Noetzli
C++11 introduced the thread_local keyword, so we don't need to use non-standard extensions or our custom pthread extension anymore. The behavior was previously introduced as a workaround in commit 753a072c542c1c254d7c6adbf10e091ba585ede5. This commit introduces the macro CVC4_THREAD_LOCAL that can be used to declare variables as thread local. For Swig, this macro is defined to be empty.
2017-07-07Update copyright headers.Mathias Preiner
2016-04-20update from the masterPaulMeng
2015-12-24Miscellaneous fixesTim King
- Splitting the two instances of CheckArgument. The template version is now always defined in base/exception.h and is available in a cvc4_public header. This version has lost its variadic version (due to swig not supporting va_list's). The CPP macro version has been renamed PrettyCheckArgument. (Taking suggestions for a better name.) This is now only defined in base/cvc4_assert.h. Only use this in cvc4_private headers and in .cpp files that can use cvc4_private headers. To use a variadic version of CheckArguments, outside of this scope, you need to duplicate this macro locally. See cvc3_compat.cpp for an example. - Making fitsSignedInt() and fitsUnsignedInt() work more robustly for CLN on 32 bit systems. - Refactoring ArrayStoreAll to avoid potential problems with circular header inclusions. - Changing some headers to use iosfwd when possible.
2015-12-14Refactoring Options Handler & Library Cycle BreakingTim King
What to Know As a User: A number of files have moved. Users that include files in the public API in more refined ways than using #include <cvc4.h> should consult which files have moved. Note though that some files may move again after being cleaned up. A number of small tweaks have been made to the swig interfaces that may cause issues. Please file bug reports for any problems. The Problem: The build order of CVC4 used to be [roughly] specified as: options < expr < util < libcvc4 < parsers < main Each of these had their own directories and their own Makefile.am files. With the exception of the util/ directory, each of the subdirectories built exactly one convenience library. The util/ directory additionally built a statistics library. While the order above was partially correct, the build order was more complicated as options/Makefile.am executed building the sources for expr/Makefile.am as part of its BUILT_SOURCES phase. This options/Makefile.am also build the options/h and options.cpp files in other directories. There were cyclical library dependencies between the first four above libraries. All of these aspects combined to make options extremely brittle and hard to develop. Maintaining these between clang versus gcc, and bazel versus autotools has become increasing unpredictable. The Solution: To address these cyclic build problems, I am simplifying the build process. Here are the main things that have to happen: 1. util/ will be split into 3 separate directories: base, util, and smt_util. Each will have their own library and Makefile.am file. 2. Dependencies for options/ will be moved into options/. If a type appears as an option, this file will be moved into options. 3. All of the old options_handlers.h files have been refactored. 4. Some files have moved from util into expr/ to resolve cycles. Some of these moves are temporary. 5. I am removing the libstatistics library. The constraints that the CVC4 build system will eventually satisfy are: - The include order for both the .h and .cpp files for a directory must respect the order libraries are built. For example, a file in options/ cannot include from the expr/ directory. This includes built source files such as those coming from */kinds files and */options files. - The types definitions must also respect the build order. Forward type declarations will be allowed in exceptional, justified cases. - The Makefile.am for a directory cannot generate a file outside of the directory it controls. (Or call another Makefile.am except through subdirectory calls.) - One library per Makefile.am. - No extra copies of libraries will be built for the purpose of distinguishing between external and internal visibility in libraries for building parser/ or main/ libraries and binaries. Any function used by parser/ and main/ will be labeled with CVC4_PUBLIC and be in a public API. (AFAICT, libstatistics was being built exactly to skirt this.) The build order of CVC4 can now be [roughly] specified as base < options < util < expr < smt_util < libcvc4 < parsers < main The distinction between "base < options < util < expr" are currently clean. The relationship between expr and the subsequent directories/libraries are not yet clean. More details about the directories: base/ The new directory base/ contains the shared utilities that are absolutely crucial to starting cvc4. The list currently includes just: cvc4_assert.{h,cpp}, output.{h,cpp}, exception.{h,cpp}, and tls.{h, h.in, cpp}. These are things that are required everywhere. options/ The options/ directory is self contained. - It contains all of the enums that appear as options. This includes things like theory/bv/bitblast_mode.h . - There are exactly 4 classes that handled currently using forward declarations currently to this: LogicInfo, LemmaInputChannel, LemmaOutputChannel, and CommandSequence. These will all be removed from options. - Functionality of the options_handlers.h files has been moved into smt/smt_options_handler.h. The options library itself only uses an interface class defined in options/options_handler_interface.h. We are now using virtual dispatch to avoid using inlined functions as was previously done. - The */options_handlers.h files have been removed. - The generated smt/smt_options.cpp file has been be replaced by pushing the functionality that was generated into: options/options_handler_{get,set}_option_template.cpp . The non-generated functionality was moved into smt_engine.cpp. - All of the options files have been moved from their directories into options/. This means includes like theory/arith/options.h have changed to change to options/arith_options.h . util/ The util/ directory continues to contain core utility classes that may be used [almost] everywhere. The exception is that these are not used by options/ or base/. This includes things like rational and integer. These may not use anything in expr/ or libcvc4. A number of files have been moved out of this directory as they have cyclic dependencies graph with exprs and types. The build process up to this directory is currently clean. expr/ The expr/ directory continues to be the home of expressions. The major change is files moving from util/ moving into expr/. The reason for this is that these files form a cycle with files in expr/. - An example is datatype.h. This includes "expr/expr.h", "expr/type.h" while "expr/command.h" includes datatype.h. - Another example is predicate.h. This uses expr.h and is also declared in a kinds file and thus appears in kinds.h. - The rule of thumb is if expr/ pulls it in it needs to be independent of expr/, in which case it is in util/, or it is not, in which case it is pulled into expr/. - Some files do not have a strong justification currently. Result, ResourceManager and SExpr can be moved back into util/ once the iostream manipulation routines are refactored out of the Node and Expr classes. - Note the kinds files are expected to remain in the theory/ directories. These are only read in order to build sources. - This directory is not yet clean. It contains forward references into libcvc4 such as the printer. It also makes some classes used by main/ and parser CVC4_PUBLIC. smt_util/ The smt_util/ directory contains those utility classes which require exprs, but expr/ does not require them. These are mostly utilities for working with expressions and nodes. Examples include ite_removal.h, LemmaInputChannel and LemmaOutputChannel. What is up next: - A number of new #warning "TODO: ..." items have been scattered throughout the code as reminders to myself. Help with these issues is welcomed. - The expr/ directory needs to be cleaned up in a similar to options/. Before this happens statistics needs to be cleaned up.
2014-08-06First crack at fixing double-linking issues in build system.Morgan Deters
2014-07-01Update copyrights.Morgan Deters
2014-06-21Fix compat-Java layer, should fix build.Morgan Deters
2014-06-21Lower the Java JRE version requirement.Morgan Deters
2014-06-21Adjust library dependencies to be more correct (fixes lintian warnings).Morgan Deters
2013-12-03Work around a swig segfault issue when building on Mac OSMorgan Deters
2013-11-26Fix Java output stream adapter.Morgan Deters
2013-11-13Some patches to CVC3 compatibility layer; Thanks to Adam Buchbinder @ Google ↵Morgan Deters
for the report and patch!
2013-11-10Fix compat-java library naming on Mac OS; thanks to Zheng Manchun for ↵Morgan Deters
reporting this issue
2013-07-30Minor fixes to build system.Morgan Deters
2013-07-29Fix numerous compiler warnings on various platformsMorgan Deters
2013-04-29Some fixes for GCC 4.2, and for Java on MacMorgan Deters
2013-04-02Regenerated copyrights: canonicalized names, no emailsMorgan Deters
2013-04-01update copyrightsMorgan Deters
2013-03-26Fixes for warnings from clang++, from -std=gnu++0x, from swig, and from javacMorgan Deters
2013-03-25java input stream adapters workingMorgan Deters
2013-03-15fix up build system for swig (d242c30 introduced a subtle error)1.0.xMorgan Deters
2013-03-14fix to build system: #include the proper file when they are in both builds ↵Morgan Deters
and src
2012-11-17* enable previously-failing (now succeeding) datatype example that uses recordsMorgan Deters
* some bindings cleanup (this commit was certified error- and warning-free by the test-and-commit script.)
2012-11-17* Fix for bug 445 agreed to in meeting 11/13/2012: always dump in ↵Morgan Deters
ALL_SUPPORTED logic * Java bindings fixes: fixed access to ostreams, iterators * Make SmtEngine::setUserAttribute() (and others) take a const string& * Also a few compliance fixes (this commit was certified error- and warning-free by the test-and-commit script.)
2012-11-12* Fix language bindings: various issuesMorgan Deters
** remove a number of warnings in bindings generation ** give appropriate names for operator-overloading ** make sure Java language bindings are built with -fno-strict-aliasing, to ensure the optimizer doesn't produce bad code * Also remove BitVector::equals(), which wasn't used and was inconsistently implemented (operator==() is still there). (this commit was certified error- and warning-free by the test-and-commit script.)
2012-10-25more minor fixes to build systemACSYS
2012-10-11Standardizing copyright notice. Touches **ALL** sources, guys, sorry.. it'sMorgan Deters
just the header comments at the top, though. Don't update to this rev if you don't have time for a complete rebuild, and exclude this rev if you want to see what's new across a range of commits. (this commit was certified error- and warning-free by the test-and-commit script.)
2012-10-08small fix for compat JNI library installationMorgan Deters
2012-10-06* Some documentation about building compatibility and language bindingsMorgan Deters
* Better errors/warnings when SWIG isn't installed (resolves bug 373) * Allow compatibility bindings to be built when SWIG isn't available
2012-09-29fixes to "make distclean" and C compatibility bindings; should fix the ↵Morgan Deters
broken builds last night
2012-09-28fixes for compatibility (i.e., CVC3) Java bindingsMorgan Deters
2012-09-28* fix compatibility library naming for SMT-LIBv1Morgan Deters
* change name of JNI library to "libcvc4jni", which works better with Java's System.loadLibrary(). (this commit was certified error- and warning-free by the test-and-commit script.)
2012-09-26Fix a handful of things for Mac, and Java bindings.Morgan Deters
Also add a "mac-build" script that sets up prerequisites for Mac.
2012-08-29* Numerous documentation fixes (fix doxygen warnings, add missing ↵Morgan Deters
documentation, etc.). * Remove sat_module.cpp, which was no longer used (was previously refactored?)
2012-06-12fix a few compatibility bindings issuesMorgan Deters
2012-06-11Merge from quantifiers2-trunkmerge branch.Morgan Deters
Adds TheoryQuantifiers and TheoryRewriteRules, QuantifiersEngine, and other infrastructure. Adds theory instantiators to many theories. Adds the UF strong solver.
2012-06-08minor fixes, for Mac OSMorgan Deters
2012-05-31pass JAVA_CPPFLAGS properlyMorgan Deters
2012-05-16Fixing C compatibility library (it still had a reference to CONST_INTEGER).Morgan Deters
This hopefully fixes the Debian build.
2012-03-08fix "make dist"Morgan Deters
2012-03-07fix some Java compatibility-layer interface problems; also fix some Mac OS X ↵Morgan Deters
build issues
2012-02-03updating configure to use python-config for building python bindingsDejan Jovanović
2012-01-27effecting the same change in the compat Java binding as was done to CVC3 ↵Morgan Deters
yesterday (ValidityChecker::value() and ValidityChecker::getValue())
2011-11-26Fix Java JNI installation pathMorgan Deters
2011-11-22fix module name for CVC4 jar file; part of the fix for the Debian package ↵Morgan Deters
build failure last night
2011-11-22More language bindings work:Morgan Deters
* with a patched SWIG, the ocaml bindings build correctly. ** I will provide my patch to the SWIG dev team. * fixed some class interfaces to play more nicely with SWIG. * php, perl, tcl now work; examples added. * improved binding module building and installation. Also: Stop #defining NULL ((void*) 0). This has been in cvc4_public.h for a long, long time, I forget why I added it in the first place, and it's a very, very bad idea. In C++, certain things are permitted for NULL that aren't permitted for ((void*) 0), like for instance implicit conversion to any pointer type. We didn't see an issue here (until now, when interfacing with SWIG), because GCC is usually pretty smart at working around such a broken #definition of NULL. But that's fragile. New exception-free Command architecture. Previously, some command invocations were wrapped in a try {} catch() {} and printed out an error. This is much more consistent now. Each Command invocation results in a CommandStatus. The status can be "unsupported", "error", or "success" (these are each derived classes, though, not strings, so that they can be easily printed in a language-specific way... e.g., in SMT-LIBv2, they are printed in a manner consistent with the spec, and "success" is not printed if the print-success option is off.) All Command functionality are now no-throw functions, which @cconway reports is a Good Thing for Google (where all C++ exceptions are suspect), and also I think is much cleaner than the old way in this instance. Added an --smtlib2 option that enables an "SMT-LIBv2 compliance mode"---really it just sets a few other options like strictParsing, inputLanguage, and printSuccess. In the future we might put other options into a compliance mode, or we might choose to make it the default.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback