From c0c351a89871e0a6881668fa1a8d87349ab8af8e Mon Sep 17 00:00:00 2001 From: Morgan Deters Date: Fri, 28 Sep 2012 16:46:13 +0000 Subject: [PATCH] * fix compatibility library naming for SMT-LIBv1 * 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.) --- examples/SimpleVC.java | 2 +- src/bindings/Makefile.am | 12 ++++++------ src/compat/cvc3_compat.h | 2 +- test/system/CVC4JavaTest.java | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/examples/SimpleVC.java b/examples/SimpleVC.java index a5e2d4e4f..41c4542fd 100644 --- a/examples/SimpleVC.java +++ b/examples/SimpleVC.java @@ -37,7 +37,7 @@ import edu.nyu.acsys.CVC4.*; public class SimpleVC { public static void main(String[] args) { - System.loadLibrary("CVC4"); + System.loadLibrary("cvc4jni"); ExprManager em = new ExprManager(); SmtEngine smt = new SmtEngine(em); diff --git a/src/bindings/Makefile.am b/src/bindings/Makefile.am index 82c45fe92..65961b019 100644 --- a/src/bindings/Makefile.am +++ b/src/bindings/Makefile.am @@ -55,12 +55,12 @@ csharplib_LTLIBRARIES = rubylib_LTLIBRARIES = tcllib_LTLIBRARIES = if CVC4_LANGUAGE_BINDING_JAVA -javalib_LTLIBRARIES += java/CVC4.la +javalib_LTLIBRARIES += java/libcvc4jni.la javadata_DATA += CVC4.jar -java_CVC4_la_LDFLAGS = \ +java_libcvc4jni_la_LDFLAGS = \ -module \ -version-info $(LIBCVC4BINDINGS_VERSION) -java_CVC4_la_LIBADD = \ +java_libcvc4jni_la_LIBADD = \ -L@builddir@/.. -lcvc4 \ -L@builddir@/../parser -lcvc4parser endif @@ -137,8 +137,8 @@ tcl_CVC4_la_LIBADD = \ -L@builddir@/../parser -lcvc4parser endif -nodist_java_CVC4_la_SOURCES = java.cpp -java_CVC4_la_CXXFLAGS = -fno-strict-aliasing +nodist_java_libcvc4jni_la_SOURCES = java.cpp +java_libcvc4jni_la_CXXFLAGS = -fno-strict-aliasing nodist_csharp_CVC4_la_SOURCES = csharp.cpp nodist_perl_CVC4_la_SOURCES = perl.cpp nodist_php_CVC4_la_SOURCES = php.cpp @@ -164,7 +164,7 @@ MOSTLYCLEANFILES = \ $(patsubst %,%.d,$(filter-out c c++,$(CVC4_LANGUAGE_BINDINGS))) \ CVC4.jar -java_CVC4_la-java.lo java.lo: java.cpp +java_libcvc4jni_la-java.lo java.lo: java.cpp $(AM_V_CXX)$(LTCXXCOMPILE) -c $(JAVA_CPPFLAGS) -o $@ $< CVC4.jar: java.cpp $(AM_V_GEN) \ diff --git a/src/compat/cvc3_compat.h b/src/compat/cvc3_compat.h index c140d2994..31d914b58 100644 --- a/src/compat/cvc3_compat.h +++ b/src/compat/cvc3_compat.h @@ -472,7 +472,7 @@ public: typedef CVC4::Statistics Statistics; #define PRESENTATION_LANG ::CVC4::language::input::LANG_CVC4 -#define SMTLIB_LANG ::CVC4::language::input::LANG_SMTLIB +#define SMTLIB_LANG ::CVC4::language::input::LANG_SMTLIB_V1 #define SMTLIB_V2_LANG ::CVC4::language::input::LANG_SMTLIB_V2 #define TPTP_LANG ::CVC4::language::input::LANG_TPTP #define AST_LANG ::CVC4::language::input::LANG_AST diff --git a/test/system/CVC4JavaTest.java b/test/system/CVC4JavaTest.java index 168961b5c..5a654d03f 100644 --- a/test/system/CVC4JavaTest.java +++ b/test/system/CVC4JavaTest.java @@ -17,7 +17,7 @@ import edu.nyu.acsys.CVC4.ParserBuilder; public class CVC4JavaTest { public static void main(String[] args) { try { - System.loadLibrary("CVC4"); + System.loadLibrary("cvc4jni"); //CVC4.getDebugChannel().on("current"); @@ -42,7 +42,7 @@ public class CVC4JavaTest { Result r = smt.checkSat(e); boolean correct = r.isSat() == Result.Sat.UNSAT; - System.out.println(smt.getStatisticsRegistry()); + System.out.println(smt.getStatistics()); System.exit(correct ? 0 : 1); } catch(Exception e) { -- 2.30.2