This file contains a summary of important user-visible changes.
+Changes since 1.7
+=================
+
+Changes:
+* Java API change: The name of CVC4's package is now `edu.stanford.CVC4`
+ instead of `edu.nyu.acsys.CVC4`.
+
Changes since 1.6
=================
**
**/
-import edu.nyu.acsys.CVC4.*;
+import edu.stanford.CVC4.*;
public class SimpleVC {
public static void main(String[] args) {
**
**/
-import edu.nyu.acsys.CVC4.*;
+import edu.stanford.CVC4.*;
public class BitVectors {
public static void main(String[] args) {
**
**/
-import edu.nyu.acsys.CVC4.*;
+import edu.stanford.CVC4.*;
import java.util.*;
public class BitVectorsAndArrays {
vectorExpr assertions = new vectorExpr();
for (int i = 1; i < k; ++i) {
- index = em.mkConst(new BitVector(index_size, new edu.nyu.acsys.CVC4.Integer(i)));
+ index = em.mkConst(new BitVector(index_size, new edu.stanford.CVC4.Integer(i)));
Expr new_current = em.mkExpr(Kind.BITVECTOR_MULT, two, old_current);
// current[i] = 2 * current[i-1]
current_array = em.mkExpr(Kind.STORE, current_array, index, new_current);
**/
import java.io.*;
-import edu.nyu.acsys.CVC4.*;
+import edu.stanford.CVC4.*;
public class CVC4Streams {
public static void main(String[] args) throws IOException {
** The model is displayed using getValue().
**/
-import edu.nyu.acsys.CVC4.*;
+import edu.stanford.CVC4.*;
public class Combination {
private static void prefixPrintGetValue(SmtEngine smt, Expr e, int level) {
** An example of using inductive datatypes in CVC4 (Java version).
**/
-import edu.nyu.acsys.CVC4.*;
+import edu.stanford.CVC4.*;
import java.util.Iterator;
public class Datatypes {
** IEEE 754-2008 bit-vector to a floating-point number.
**/
-import edu.nyu.acsys.CVC4.*;
+import edu.stanford.CVC4.*;
import java.util.Iterator;
public class FloatingPointArith {
** A very simple CVC4 tutorial example.
**/
-import edu.nyu.acsys.CVC4.*;
+import edu.stanford.CVC4.*;
public class HelloWorld {
public static void main(String[] args) {
** the push pop of CVC4. This also gives an example option.
**/
-import edu.nyu.acsys.CVC4.*;
+import edu.stanford.CVC4.*;
public class LinearArith {
public static void main(String[] args) {
** used from Java.
**/
-import edu.nyu.acsys.CVC4.*;
+import edu.stanford.CVC4.*;
import java.io.*;
public class PipedInput {
** An example of accessing CVC4's statistics using the Java API.
**/
-import edu.nyu.acsys.CVC4.*;
+import edu.stanford.CVC4.*;
import java.util.Iterator;
public class Statistics {
// `Statistics` class implements the `Iterable<Statistic>` interface. A
// `Statistic` is a pair that consists of a name and an `SExpr` that stores
// the value of the statistic.
- edu.nyu.acsys.CVC4.Statistics stats = smt.getStatistics();
+ edu.stanford.CVC4.Statistics stats = smt.getStatistics();
for (Statistic stat : stats) {
System.out.println(stat.getFirst() + " = " + stat.getSecond());
}
** A simple demonstration of reasoning about strings with CVC4 via Jave API.
**/
-import edu.nyu.acsys.CVC4.*;
+import edu.stanford.CVC4.*;
public class Strings {
public static void main(String[] args) {
** An example of interacting with unsat cores using CVC4's Java API.
**/
-import edu.nyu.acsys.CVC4.*;
+import edu.stanford.CVC4.*;
import java.util.Iterator;
public class UnsatCores {
set(SWIG_MODULE_cvc4jni_EXTRA_DEPS cvc4 cvc4parser)
set_property(SOURCE ${CVC4_SWIG_INTERFACE} PROPERTY CPLUSPLUS ON)
-set(CMAKE_SWIG_FLAGS -package edu.nyu.acsys.CVC4)
+set(CMAKE_SWIG_FLAGS -package edu.stanford.CVC4)
if(${CMAKE_VERSION} VERSION_LESS "3.8.0")
swig_add_module(cvc4jni Java ${CVC4_SWIG_INTERFACE})
// Create a mapping from C++ Exceptions to Java Exceptions.
// This is in a couple of throws typemaps, simply because it's sensitive to SWIG's concept of which namespace we're in.
%typemap(throws) Exception %{
- std::string name = "edu/nyu/acsys/CVC4/$1_type";
+ std::string name = "edu/stanford/CVC4/$1_type";
/*
size_t i = name.find("::");
if(i != std::string::npos) {
assert(status == 0);
%}
%typemap(throws) CVC4::Exception %{
- std::string name = "edu/nyu/acsys/$1_type";
+ std::string name = "edu/stanford/$1_type";
size_t i = name.find("::");
if(i != std::string::npos) {
size_t j = name.rfind("::");
%typemap(jtype) std::ostream& "long"
%typemap(jstype) std::ostream& "java.io.OutputStream"
%typemap(javain,
- pre=" edu.nyu.acsys.CVC4.JavaOutputStreamAdapter temp$javainput = new edu.nyu.acsys.CVC4.JavaOutputStreamAdapter();", pgcppname="temp$javainput",
+ pre=" edu.stanford.CVC4.JavaOutputStreamAdapter temp$javainput = new edu.stanford.CVC4.JavaOutputStreamAdapter();", pgcppname="temp$javainput",
post=" new java.io.PrintStream($javainput).print(temp$javainput.toString());")
- std::ostream& "edu.nyu.acsys.CVC4.JavaOutputStreamAdapter.getCPtr(temp$javainput)"
+ std::ostream& "edu.stanford.CVC4.JavaOutputStreamAdapter.getCPtr(temp$javainput)"
%typemap(jni) std::istream& "jlong"
%typemap(jtype) std::istream& "long"
%typemap(jstype) std::istream& "java.io.InputStream"
%typemap(javain,
- pre=" edu.nyu.acsys.CVC4.JavaInputStreamAdapter temp$javainput = edu.nyu.acsys.CVC4.JavaInputStreamAdapter.get($javainput);", pgcppname="temp$javainput",
+ pre=" edu.stanford.CVC4.JavaInputStreamAdapter temp$javainput = edu.stanford.CVC4.JavaInputStreamAdapter.get($javainput);", pgcppname="temp$javainput",
post="")
- std::istream& "edu.nyu.acsys.CVC4.JavaInputStreamAdapter.getCPtr(temp$javainput)"
+ std::istream& "edu.stanford.CVC4.JavaInputStreamAdapter.getCPtr(temp$javainput)"
%typemap(in) jobject inputStream %{
$1 = jenv->NewGlobalRef($input);
%}
}
// Expr is "iterable" on the Java side
-%typemap(javainterfaces) CVC4::Expr "java.lang.Iterable<edu.nyu.acsys.CVC4.Expr>";
+%typemap(javainterfaces) CVC4::Expr "java.lang.Iterable<edu.stanford.CVC4.Expr>";
// the JavaIteratorAdapter should not be public, and implements Iterator
%typemap(javaclassmodifiers) CVC4::JavaIteratorAdapter<CVC4::Expr, CVC4::Expr> "class";
-%typemap(javainterfaces) CVC4::JavaIteratorAdapter<CVC4::Expr, CVC4::Expr> "java.util.Iterator<edu.nyu.acsys.CVC4.Expr>";
+%typemap(javainterfaces) CVC4::JavaIteratorAdapter<CVC4::Expr, CVC4::Expr> "java.util.Iterator<edu.stanford.CVC4.Expr>";
// add some functions to the Java side (do it here because there's no way to do these in C++)
%typemap(javacode) CVC4::JavaIteratorAdapter<CVC4::Expr, CVC4::Expr> "
public void remove() {
throw new java.lang.UnsupportedOperationException();
}
- public edu.nyu.acsys.CVC4.Expr next() {
+ public edu.stanford.CVC4.Expr next() {
if(hasNext()) {
return getNext();
} else {
%typemap(out) std::pair<std::string, CVC4::Type> {
$result = jenv->NewObjectArray(2, jenv->FindClass("java/lang/Object"), $null);
jenv->SetObjectArrayElement($result, 0, jenv->NewStringUTF($1.first.c_str()));
- jclass clazz = jenv->FindClass("edu/nyu/acsys/CVC4/Type");
+ jclass clazz = jenv->FindClass("edu/stanford/CVC4/Type");
jmethodID methodid = jenv->GetMethodID(clazz, "<init>", "(JZ)V");
jenv->SetObjectArrayElement($result, 1, jenv->NewObject(clazz, methodid, reinterpret_cast<uintptr_t>(new CVC4::Type($1.second)), true));
};
}
// UnsatCore is "iterable" on the Java side
-%typemap(javainterfaces) CVC4::UnsatCore "java.lang.Iterable<edu.nyu.acsys.CVC4.Expr>";
+%typemap(javainterfaces) CVC4::UnsatCore "java.lang.Iterable<edu.stanford.CVC4.Expr>";
// the JavaIteratorAdapter should not be public, and implements Iterator
%typemap(javaclassmodifiers) CVC4::JavaIteratorAdapter<CVC4::UnsatCore, CVC4::Expr> "class";
-%typemap(javainterfaces) CVC4::JavaIteratorAdapter<CVC4::UnsatCore, CVC4::Expr> "java.util.Iterator<edu.nyu.acsys.CVC4.Expr>";
+%typemap(javainterfaces) CVC4::JavaIteratorAdapter<CVC4::UnsatCore, CVC4::Expr> "java.util.Iterator<edu.stanford.CVC4.Expr>";
// add some functions to the Java side (do it here because there's no way to do these in C++)
%typemap(javacode) CVC4::JavaIteratorAdapter<CVC4::UnsatCore, CVC4::Expr> "
public void remove() {
throw new java.lang.UnsupportedOperationException();
}
- public edu.nyu.acsys.CVC4.Expr next() {
+ public edu.stanford.CVC4.Expr next() {
if(hasNext()) {
return getNext();
} else {
}
// CommandSequence is "iterable" on the Java side
-%typemap(javainterfaces) CVC4::CommandSequence "java.lang.Iterable<edu.nyu.acsys.CVC4.Command>";
+%typemap(javainterfaces) CVC4::CommandSequence "java.lang.Iterable<edu.stanford.CVC4.Command>";
// the JavaIteratorAdapter should not be public, and implements Iterator
%typemap(javaclassmodifiers) CVC4::JavaIteratorAdapter<CVC4::CommandSequence, CVC4::Command*> "class";
-%typemap(javainterfaces) CVC4::JavaIteratorAdapter<CVC4::CommandSequence, CVC4::Command*> "java.util.Iterator<edu.nyu.acsys.CVC4.Command>";
+%typemap(javainterfaces) CVC4::JavaIteratorAdapter<CVC4::CommandSequence, CVC4::Command*> "java.util.Iterator<edu.stanford.CVC4.Command>";
// add some functions to the Java side (do it here because there's no way to do these in C++)
%typemap(javacode) CVC4::JavaIteratorAdapter<CVC4::CommandSequence, CVC4::Command*> "
public void remove() {
throw new java.lang.UnsupportedOperationException();
}
- public edu.nyu.acsys.CVC4.Command next() {
+ public edu.stanford.CVC4.Command next() {
if(hasNext()) {
return getNext();
} else {
%native (dlRef) void SmtEngine::dlRef(jobject);
%{
extern "C" {
-SWIGEXPORT jobject JNICALL Java_edu_nyu_acsys_CVC4_SmtEngine_mkRef(JNIEnv* jenv, jclass jcls, jobject o) {
+SWIGEXPORT jobject JNICALL Java_edu_stanford_CVC4_SmtEngine_mkRef(JNIEnv* jenv, jclass jcls, jobject o) {
if(o == NULL) {
return NULL;
}
return jenv->NewGlobalRef(o);
}
-SWIGEXPORT void JNICALL Java_edu_nyu_acsys_CVC4_SmtEngine_dlRef(JNIEnv* jenv, jclass jcls, jobject o) {
+SWIGEXPORT void JNICALL Java_edu_stanford_CVC4_SmtEngine_dlRef(JNIEnv* jenv, jclass jcls, jobject o) {
if(o != NULL) {
jenv->DeleteGlobalRef(o);
}